FREE POSTER
APRIL 2007 £3.80 www.elektor-electronics.co.uk
PROJECTS
NICD/NIMH & LIPO/LI-ION CHARGER G-FORCE INDICATOR BADGE FROM MOBILE PHONE LCD SIMPLE MAINS INVERTER 68HC(9)08 PROGRAMMER
ALTERNATIVE ENERGY SOLAR CELLS, BODY HEAT AND THE QUEST FOR
FREE ENERGY
KNOCKOUT TEST NEW LI-ION BATTERIES REVEAL THRUST SOLAR CELL
DIY FROM HOUSEHOLD INGREDIENTS
FREE POSTER
R17
e , e on th irst on r brand new f e h t u r o Be u f old o pdated colo w o get h u block t ed and fully sting with ne r d u n . b s a t e p s g x e ju n any ra ue. It's catalog ucts across m ue ut at prod /catalog eck it o
s.co.uk lectronic
Ch
ycare www.ja Magnetic Cartridge Pre-amp KC-5433 £11.75 + post & packing This kit is used to amplify the 3-4mV signals from a phono cartridge to line level, so you can use your turntable with the CD or tuner inputs on your Hi-Fi amplifier - most modern amps don't include a phono input any more. Dust off the old LP collection or use it to record your LPs on to CD. The design is suitable for 12" LPs, and also allows for RIAA equalisation of all the really old 78s. Please note that the input sensitivity of this design means it's only suitable for moving-magnet, not moving-coil cartridges. Kit includes PCB with overlay and all electronic components. • Requires 12VAC power
POST AND PACKING CHARGES: Cost Order Value Cost Order Value £200 - £499.99 £30 £20 - £49.99 £5 £40 £50 - £99.99 £10 £500+ £100 - £199.99 £20 Max weight 12lb (5kg). Heavier parcels POA. Minimum order £20. Note: Products are dispatched from Australia, local customs duty and taxes may apply.
Programmable High Energy 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. Features: • 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 • Kit supplied with PCB, and all electronic components.
Car Air Conditioner Controller Kit KC-5437 £11.75 + post & packing This kits stops the air conditioner in your car from taking engine power under acceleration. It will allow the compressor to run with low throttle even when the cabin temperature setting has been reached and will automatically switch the compressor off at idle. It also features an override switch, an LED function indicator. Kit supplied with PCB with overlay and all electronic components with clear English instructions. Recommended box UB3 HB-6013 £1.05
DC Relay Switch KC-5434 £4.50 + post & packing An extremely useful and versatile kit that enables you to use a tiny trigger current - as low as 400μA at 12V to switch up to 30A at 50VDC. It has an isolated input, and is suitable for a variety of triggering options. The kit includes PCB with overlay and all electronic components with clear English instructions.
Short Circuits 1 Learning System KJ-8502 £11.95 + post & packing Short Circuits 1 uses a learning system designed around a baseboard and template where all components are mounted and connected using our exclusive spring system. The templates show exactly where each component goes and almost guarantees success. The 20+ projects are fun & simple to build and all components are included. • 96 pages in full colour • 275 x 205mm
Fuel Cut Defeater Kit
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. • Kit supplied with PCB, and all electronic components.
in Due e n Ju
Knock Sensor
Projects include: Short circuit tester Magic eye alarm Police siren Electronic organ and many more.
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 interface which is cheaply available from most auto recyclers. • Kit supplied with PCB, and all electronic components.
KC-5439 £6.00 + post & packing This simple kit enables you to defeat the factory fuel cut 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 the boost levels and fuel mixture don't reach an unsafe level. • Kit supplied with PCB, and all electronic components.
High Range Adjustable Temperature Switch for Cars KC-5376 £22.75 + post & packing This temperature switch can be set anywhere up to 2192°F, so it is extremely versatile. The relay can be used to trigger an extra thermo fan on an intercooler, a sensor near your turbo manifold to trigger water spray cooling, or a simple buzzer to indicate high temperature. The LCD displays the temperature constantly and can easily be dash mounted. Kit included PCB with overlay and all electronic components with clear English instructions.
Log on to
www.jaycarelectronics.co.uk/elektor for your FREE catalogue!
0800 032 7241
All prices in £ Stg
(Monday - Friday 09.00 to 17.30 GMT + 10 hours only). For those who want to write: 100 Silverwater Rd Free Silverwater NSW 2128 Sydney AUSTRALIA 430+ page
Catalogue
www.jaycarelectronics.co.uk
www.jaycarelectronics.co.uk
4 Channel BitScope 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.
2 Channel BitScope
Pocket Analyzer
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 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.
Data Export
Export data with DSO using portable CSV files or use libraries to build custom BitScope solutions.
Busy times – lead times! Gone are the days when an Elektor editor or designer could hand in copy on paper to the typesetters ‘downstairs’ and then patiently wait for the results of the publication in terms of PCB or microcontroller sales. A lot had to be done before the first board or micro actually reached the customer, and a lot of time it took! After all, there was the page layout to wait for, followed by two or more correction rounds, approval for printing, pagination, printing and magazine distribution – all in due order with lots of red tape in between. Then followed a dead silent period during which readers apparently made up their mind whether or not to jump the bandwagon and order the relevant item through Readers Services. By post, of course. Until about 10 years ago, the ‘time-tomarket’ lag was such that we had no useable feedback on how specific projects were doing until about six months after publication, to which another two to three months should be added on account of the production by Elektor’s design labs and editorial. These days we have the Internet to enable very fast communication with our readers and suppliers, as well as rapid spreadsheet-ish reporting systems that will tell us what’s a hit or a dud. However, neither will forecast the response you, our readers, will give to a published project. It’s a sure cause not just for a lot of excitement and guesstimates on our part but also frustration occasionally. For example, no one on the small teams normally formed by Elektor staff and supplier representatives could have foreseen the overwhelming interest in the Profiler milling machine, the Explorer-16 Value Pack and the FPGA board, just to mention three hits from recent issues. Of these, Profiler is causing the most concern as the supplier is looking at an order volume ten times larger than his most optimistic forecast. I am happy to think that we get it right, too, on occasions, as in the case of the Freescale SpYder Discovery where a massive number of kits was available in time and could be supplied to our readers with a minimum of delay after publishing the March 2007 issue. Jan Buiting, Editor
Battery
Charge-‘n-C
This versatile circuit is used to charge, discharge and evaluate the capacity of battery packs composed of one up to eight NiMH or NiCd cells, or LiPo (Lithium Polymer) or Li-Ion (Lithium-Ion) batteries composed of two elements (serial charge). Model hobbyists, other rechargeable battery users and generally all soldering iron fans will find in it a low cost, simple solution that’s also easily integrated into equipment.
Extra
FREE CENTREFOLD POSTER Solar Cells from Fruit Tea
16 Message in a Bottle
Somehow, we just can’t seem to find efficient and sustainable ways to warm our buildings, light our surroundings, and transport ourselves and our goods. Does Elektor Electronics see a ray of hope here?
CONTENTS
Volume 33 April 2007 no. 364
hands-on 20 Solar Power for Dummies 24 Battery Charge-‘n-Check 32 Simple Solar Charger
heck
24
40 E-blocks Light Chaser Squared 46 g-Force on LEDs 52 Programmer for Freescale 68HC(9)08 58 Explorer-16 (4) 62 Electronic Badge 66 Very Simple Clock 70 A Simple Mains Inverter 74 Miniature Rotating Magnetic Field Generator
34 Tough and Powerful We tested some of the first examples of the latest Li-ion batteries, with results varying from the merely respectable to the sensational!
46 g-Force on LEDs We continue from last month’s Attack of the SpYder article and get to grips with the basics of migrating an MC9S08 micro from thinkware to hardware, all along an extremely low-cost route with free items thrown in exclusively for Elektor readers.
technology 12 The Human Body as an Energy Source 34 Tough and Powerful
info & market 6
Colophon
6
Winners of the September 2006 RFID Card Quest
8
Mailbox
10 News & New Products 81 Elektor SHOP 84 Sneak Preview
infotainment 16 Message in a Bottle 76 Adjustable high-voltage supply (1961) 77 Hexadoku
Subscriptions: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) 208 261 4509, fax: (+44) 208 261 4447 Internet: www.elektor-electronics.co.uk Email:
[email protected] Rates and terms are given on the Subscription Order Form
Volume 33, Number 364, April 2007
ISSN 0268/4519
Elektor Electronics aims at inspiring people to master electronics at any personal level by presenting construction projects and spotting developments in electronics and information technology. Publishers: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) 208 261 4509, fax: (+44) 208 261 4447 www.elektor-electronics.co.uk The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor Electronics is published 11 times a year with a double issue for July & August. Under the name Elektor and Elektuur, the magazine is also published in French, Spanish, German and Dutch. Together with franchised editions the magazine is on circulation in more than 50 countries. International Editors: Mat Heffels (
[email protected]), Wisse Hettinga (
[email protected])
Head Office: Segment b.v. P.O. Box 75 NL-6190-AB Beek Telephone: (+31) 46 4389444, Fax: (+31) 46 4370161
The Netherlands
Distribution: Seymour, 2 East Poultry Street, London EC1A, England Telephone:+44 207 429 4073 UK Advertising: Huson International Media, Cambridge House, Gogmore Lane, Chertsey, Surrey KT16 9AP, England. Telephone: +44 1932 564999, Fax: +44 1932 564998 Email:
[email protected] Internet: www.husonmedia.com Advertising rates and terms available on request. International Advertising: Frank van de Raadt, address as Head Office Email:
[email protected] Advertising rates and terms available on request. Copyright Notice
Editor: Jan Buiting (
[email protected]) International editorial staff: Harry Baggen, Thijs Beckers, Ernst Krempelsauer, Jens Nickel, Guy Raedersdorf. Design staff: Ton Giesberts, Paul Goossens, Luc Lemmens, Christian Vossen Editorial secretariat: Hedwig Hennekens (
[email protected]) Graphic design / DTP: Giel Dols
The circuits described in this magazine are for domestic use only. All drawings, photographs, printed circuit board layouts, programmed integrated circuits, disks, CD-ROMs, software carriers and article texts published in our books and magazines (other than third-party advertisements) are copyright Segment. b.v. and may not be reproduced or transmitted in any form or by any means, including photocopying, scanning an recording, in whole or in part without prior written permission from the Publishers. Such written permission must also be obtained before any part of this publication is stored in a retrieval system of any nature. Patent protection may exist in respect of circuits, devices, components etc. described in this magazine. The Publisher does not accept responsibility for failing to identify such patent(s) or other protection. The submission of designs or articles implies permission to the Publishers to alter the text and design, and to use the contents in other Segment publications and activities. The Publishers cannot guarantee to return any material submitted to them.
Managing Director / Publisher: Paul Snakkers Marketing: Carlo van Nistelrooy Customer Services: Margriet Debeij (
[email protected])
Disclaimer Prices and descriptions of publication-related items subject to change. Errors and omissions excluded.
© Segment b.v. 2007
Printed in the Netherlands
Winners of the September 2006 Elektor RFID Card Quest During January of this year, our international websites announced Round #2 of the Elektor RFID Card Quest originally launched with the publication of the September 2006 issue with its free RFID card. Statistics indicate that around 3,000 RFID cards were actually read. To check the number stored on the free card, some of our readers used their own Elektor RFID Reader, while others borrowed a reader unit for the occasion. Thanks are due to all those who helped fellow Elektor readers by allowing them to access a functional RFID Reader unit for the purpose of the Card Quest. As announced, special prizes consisting of £75 Elektor Vouchers and one a city trip were available to Elektor readers ready to lend a hand to others. We kept our promise and awarded the city trip to Maastricht, The Netherlands, to Wulfram Kurz. The vouchers were sent to Andreas Mayr, Hans Schneider and Marcel Smeets. Because only four hex digits on the RFID card had to match winning numbers instead of 14, Round #2 of the RFID Quest was ‘easier’ than the September 2006 publication. Fortunately this resulted in typically two to ten people reporting the winning number for each prize so lucky winners could be drawn at random. The complete list of winners is given below. The prizes are described in the September 2006 issue on pages 20-21.
6
1st Prize: Philips 42-inch Plasma TV (sponsored by DHL Global Mail) awarded to Matthias Wurzer from Austria. 2nd Prize: Mio C170 Navigation System (sponsored by Conrad Electronics) awarded to Carl Declercq from Belgium. 3rd Prize: Liteon LVW 5045 GDL DVD Recorder (sponsored by Conrad Electronics) awarded to Wolf-Dieter Kaczerowski from Germany. 4th to 7th Prize: E-Blocks Starter Kits Professional (sponsored by Matrix Multimedia) awarded to Thierry Favreau (France), Peter Eggleston (UK), Annika Ganzel (Germany) and Hans Michielsen (Netherlands). 8th and 9th Prize: VMD HD Players (sponsored by New Medium Enerprizes) awarded to Jan Ten Dam (Netherlands) and Thorsten Rink (Germany). 10th to 13th Prize: E-Blocks Starter Kits Professional (sponsored by Matrix Multimedia) awarded to Erik van der Veek (Netherlands), E. Fontrier (Australia), John W. Finlayson (Norway) and Frank Jessen (Germany). 14th and 15th Prize: Parallax RFID Starter kits awarded to Peter Braunschmid (Germany) and Thomas Kuberczyk (Germany).
Visit Elektor/Elektuur at electronica 2006 and win with this card!
RFID
(Munich, November 14-17) Hall A5, Stand A5.531 Info: www.elektor.com/rfid
elektor electronics - 4/2007
mikroElektronika DEVELOPMENT TOOLS | COMPILERS | BOOKS
)9?! @-<-3674-5:@6)8, =1:0@65A*6)8,@%#@ @786/8)44-8@)5,@41286
& A@-<-3674-5:@6)8,
$0-@6473-:-@)8,=)8-@)5,@#6.:=)8-@963;:165@=1:0@65A*6)8,@%#@ 786/8)44-8@)5,@41286 $A;<.6E;=998:<;E EE*7-E E927E" -;"E62,:8,87<:855.:; 2<E,86.;E?2<1E" EFE" E F+2<E2,:8,87<:855.:EEE5*;1 .68:AEEE#E27E E"27E"*,4*0.E@*695.;E27E$E"$ *7E*:.E27,5=-.-E?2<1E<1.E;A;<.6E)8=E,*7E,188;.E+...7E&$E8:E@<.:7*5 "8?.:E ;=995AE 'E FE 1*;E 6*7AE /.*<=:.;E <1*<E 6*4.;E A8=:E -.>.5896.7< .*;AE @958:.E 7.?E " -;"E "E &;E ?2<1E 'E FE *7.@9.:2.7,.E*55E*->*7<*0.;E8/E<12;E62,:8,87<:855.:;E
A @6)8, FE7<.:/*,. E>2*E"
E @%#
& A@-<-3674-5:@#?9:-4@ @%#
%51A#@@-<-3674-5:@6)8,
A @6)8, FE*4.E 7.8:4E?2<1E$"E27<.:/*,.EE @%#
=1:0@65A*6)8,@%#@ @786/8)44-8@
$A;<.6E ;=998:<;E "E'#E E#E *7-E "$8E 62,:8,87<:855.:;E ?2<1E * 5*:0.E7=6+.:E8/E9.:291.:*5;E<E2;E.78=01E<8E;?2<,1E*E,*:-E*7-E,87<27=.E?8:4F 270E27E<1.E;*6.E-.>.5896.7<E.7>2:876.7<E+=<E?2<1E*E-2//.:.7<E,129E& F$ 1*;E 6*7AE /.*<=:.;E <1*<E 6*4.;E A8=:E -.>.5896.7<E .*;AE )8=E ,*7E ,188;. +...7E&$E8:E@<.:7*5E"8?.:E;=995AE*,1E&E,*:-E1*;E8?7E&$E 9:80:*66.:E87E2<E
"# @6)8, FE877.,< -.>2,.;E27<8E#$F E7.8:4EE @%# #-81)3@:0-85-: FE*4.E .<1.:7.<E7.8:4E?2<1E$" 7<.:/*,.E EE @%#
%51A#@@-<-3674-5:@#?9:-4@'=1:0@65-@%@+)8,(@ @%#
3 in1
)9?! @ ,-<-3674-5:@ *6)8, 8558?270E 27E <1.E <:*-2<287E 8/E <1. *;A"E*;E87.E8/E<1.E+.;<E" -.>.5896.7<E ;A;<.6;E 87E <1. 6*:4.<E <1.E *;A" E 1*;E 68:. DEVELOPMENT 7.?E/.*<=:.;E/8:E<1.E;*6.E9:2,. %1.E ;A;<.6E ;=998:<;E E E
E E*7-E E927E"E62,:8,87F <:855.:;E2<E,86.;E?2<1E*E"
SYSTEM
@6)8, FE*;AE?*AE<8 =;.E869*,<E/5*;1E27EA8=: -.;207EEEEEEEEEEE @%# #@6)8, FE*;AE?*A <8E=;.EE*7-E$E,*:-;E27 A8=:E-.;207EEE @%# !" @6)8, FE$.:2*5 "#!E+8*:-E>2*E 27<.:/*,.EEEEEEEE @%# "$@6)8, FE" E#% ?2<1E+*<<.:AE+*,4=9EE @%#
HARDWARE ICD ON-BOARD USB 2.0 ON-BOARD PROGRAMMER HIGH PERFORMANCE DEVELOPMENT BOARD
,9!!" @-<-3674-5:@6)8,
=1:0@65A*6)8,@%#@ @786/8)44-8@ $A;<.6E ;=998:<;E -;"E 62,:8,87<:855.:;E 27E E *7-E E 927E 9*,4*0.;E <E 2; -.52>.:.-E ?2<1E -;" 62,:8,87<:855.:E %1.E -;""#! E -.>.589F 6.7<E;A;<.6E2;E*E/=55F/.*<=:.-E-.>.5896.7<E+8*:-E/8:E2,:8,129E-;"E& -;""#! E +8*:-E *558?;E 62,:8,87<:855.:E <8E +.E 27<.:/*,.-E ?2<1E .@<.:7*5E ,2:F ,=2<;E*7-E*E+:8*-E:*70.E8/E9.:291.:*5E-.>2,.;E%12;E-.>.5896.7<E+8*:-E1*; *7E 87F+8*:-E &$E E 9:80:*66.:E *7-E 27<.0:*<.-E ,877.,<8:;E /8:E E $ 6.68:AE,*:-;E E@E#$ E98:<E#$ E EE.<, ,9!!" @-<-3674-5:@#?9:-4@ @%#
41286 2;E *E 12015AE .//.,<2>.E <885E /8:E #.*5F%26.E -.+=00270E 87E * 1*:-?*:.E 5.>.5E %1.E E -.+=00.:E .7*+5.;E A8=E <8E .@.,=<.E * 624:8624:8"*;,*5624:8*;2,E 9:80:*6E 87E *E 18;<E "E 62,:8,87F <:855.:E *7-E >2.?E >*:2*+5.E >*5=.;E $9.,2*5E =7,<287E #.02;<.:;E $# 6.68:AE*7-E"#!E*;E<1.E9:80:*6E2;E:=77270E 5A*6)8,@%#@ @!3)90@786/8)44-8 DE*7E=5<:*E/*;<E&$E 9:80:*66.:E /8:E /*;<E &E 9:80:*66270E 87<27=270E 2<;E <:*-2<287E *; <1.E /*;<.;<E "E 9:80:*66.:E 87E <1.E 6*:4.<E <1.E 7.?E "5*;1E ?2<1 624:8E78?E;=998:<;E68:.E"E&;E02>270E<1.E-.>.589.:E*E?2-.: ,182,.E8/E"E&E/8:E/=:<1.:E9:8<8
.5896.7<E
)9?"@-<-3674-5:@6)8,
=1:0@65A*6)8,@%#@ @786/8)44-8 *;A#E+8*:-E,86.;E?2<1E"12529;E"
E62,:8,87<:855.:E*,1E3=69.: .5.6.7<E*7-E927E2;E,5.*:5AE6*:4.-E87E<1.E+8*:-E<E2;E98;;2+5.E<8E<.;<E68;<E8/ <1.E27-=;<:2*5E7..-;E87E<1.E;A;<.6E<.69.:*<=:.E,87<:855.:;E,8=7<.:;E<26.:; .<,E E *;A#E 1*;E 6*7AE /.*<=:.E <8E 6*4.E A8=:E -.>.5896.7<E .*;AE !7.E 8/ <1.6E2;E87F+8*:-E&$E E9:80:*66.:E?2<1E*=<86*<2,E;?2<,1E+...7EB:=7C *7-E B9:80:*66270C 68-.E @*695.;E 27E @ 5*70=*0.E *:.E 9:8>2-.-E ?2<1E <1. +8*:- )9?"@-<-3674-5:@#?9:-4@@ @%#
)9? -<-3674-5:@6)8, =1:0@65A*6)8,@%#@ @786/8)44-8@
$A;<.6E2;E,869*<2+5.E?2<1E @ @ *7-E @715 62,:8,87<:855.:;E2<E,86.; ?2<1E%$
E&$E E9:80:*66.:E2;E+=25<E27E*7-E9:80:*66270E,*7E+. -87.E?2<18=<E:.68>270E<1.E62,:8,87<:855.:E*7AE27-=;<:2*5E*9952,*<287;E,*7 +.E <.;<.-E 87E <1.E ;A;<.6E E <.69.:*<=:.E ,87<:855.:;E ,8=7<.:;E )9? -.>.5896.7<E;A;<.6E2;E*E/=55F/.*<=:.-E-.>.5896.7<E+8*:-E/8:E E62,:8,87F <:855.:;E<E?*;E-.;207.-E<8E*558?E;<=-.7<;E8:E.7027..:;E<8E.*;25AE.@.:,2;.E*7.@958:.E<1.E,*9*+252<2.;E8/E<1.E E62,:8,87<:855.:;E
@6)8, FE F+2<E*7*580F <8F-202<*5E,87>.:<.: ?2<1E E279=<;EE
@%# @6)8, FE F+2<E-202<*5F <8F*7*580E,87>.:<.: ?2<1E$"EEEEEEEEE @%# -?7),@ > @6)8, FE-4.A9*-E<8EA8=:E*9952,*<287EEEEEEE @%# ++-3@6)8, FE,,.5E2;E*7 .5.,<:872,E-.>2,.E<1*<E?255 6.*;=:.E*,,.5.:*<287E/8:,.;EE @%#
)9? -<-3674-5:@#?9:-4@ @%#
!)+2)/-@+65:)159@*;A" E-.>.5896.7<E;A;<.6E&$E,*+5. $.:2*5E,*+5.E&;.:C;E6*7=*5E24:8E6*7=*5EE?2<1E;8/*:. -:2>.:;E*7-E.@*695.;E27EE$E*7-E"*;,*5E5*70=*0.E 6:-EE$ E<.69E;.7;8:E*7-EE*:.E89<287*5 )9?! @-<-3674-5:@#?9:-4@ @%# 7:165)3
> @@)5,@# @:-47-8):;8-@9-5968@@ @%# 8)701+@@ > @,6:9@@ @%#
412863-2:86512)@64713-89
!)9+)3@)91+@)5,@@[email protected]@<)816;9@41+86+65:8633-89
!3)90@ 786/8)44-8 DE *7 =5<:*E/*;<E&$E E9:80:*66.: /8:E "E 62,:8,87<:855.:; 87<27=270E2<;E<:*-2<287E*;E87. 8/E<1.E/*;<.;<E"E9:80:*66.: 87E <1.E 6*:4.<E <1.E 7.? "5*;1E ?2<1E 624:8E 78? ;=998:<;E68:.E"E&;E02>F 270E <1.E -.>.589.:E *E ?2-.: ,182,.E8/E"E&E/8:E/=:<1.: 9:8<8.5896.7< 41286 -.+=00.:E .7*+5.; A8=E <8E .@.,=<.E 624:8E 624:8"*;,*5E E 624:8*;2,E 9:8F 0:*6;E 87E *E 18;<E "E 62,:8F ,87<:855.:E *7-E >2.?E >*:2*+5. >*5=.;E$9.,2*5E=7,<287E#.02F ;<.:;E $#E 6.68:AE *7"#!E *;E <1.E 9:80:*6E 2; :=77270@%#
$=998:<270*7E269:.F ;;2>.E :*70.E 8/E 62,:8F ,87<:855.:;E *7E .*;AF <8F=;.*E1=7-:.-; 8/E :.*-AF<8F=;.E /=7,F <287;E *7-E 6*7A*27<.F 0:*<.-E <885;6*4.; 24:85.4<:8724*E ,8F 6925.:;E 87.E 8/E <1. +.;<E ,182,.;E 87E <1.E 6*:4.<E <8-*AE .;2-.;E 624:8E E 624:85.4<:8F 724*E,86925.:;E8//.:E*E;<*<2;<2,*5E68-=5.E;26=5*<8:E+2<6*9E0.7.:*<8: /8:E0:*912,E-2;95*A;EF;.06.7<E-2;95*AE,87>.:;287E<885E$E <*+5. % ,8-.E .@98:<E ,866=72,*<287;E <885;E /8:E $E &" <1.:7.<E *7-E &$E E "#!E .-2<8:E 9:80:*66270E 68-.E 6*7*0.F 6.7<E.<, *,1E ,86925.:E 1*;E 6*7AE :8=<27.;E *7-E .@*695.;E ;=,1E *;E "#! $E*7-EE$E*7-EE,*:-E:.*-270?:2<270E?:2<270E<8E,1*:*,F <.:E *7-E 0:*912,E ;E 6*729=5*<287E 8/E 9=;1F+=<<87;E @ E 4.A+8*:*7-E"$ E4.A+8*:-E279=<E0.7.:*<287E8/E;207*5;E*7-E;8=7-;E,1*:*,<.: ;<:270E 6*729=5*<287E 6*<1.6*<2,*5E ,*5,=5*<287;E E $"E #$ E&$E#$ E*7-E!7.(2:.E,866=72,*<287;E*7,1.;<.:E,8-270 6*7*0.6.7<E 5802,*5E *7-E 7=6.:2,*5E ,87>.:;287E "(E ;207*5;E 27<.:F :=9<;E.<,E%1.EF#!E,87<*27;E6*7AE:.*-AF?:2<<.7E*7-E<.;<.-E9:8F 0:*6;E/8:E=;.E?2<1E8=:E-.>.5896.7<E+8*:-; Price with discount: Regular price: 41286)91+!@@@@@@ @%# 41286)91+!@A@@@@ @%# 41286!)9+)3!@@@@@ @%# 41286!)9+)3!@A@@@ @%# 41286!@@@@@@@@@@@@ @%# 41286!@A@@@@@@@@@@@ @%#
FE55E8/E8=:E9:8-=,<;E*:.EE ;1299.-E27E;9.,2*5E 786:-+:1<-@*6>-9
41286)91+&"@@@@@ @%# 41286!)9+)3&"@@@ @%#
41286)91+&"@A@@@@@%# 41286!)9+)3&"@A@ @%#
F !7F527.E;.,=:.E8:-.:270E 9:8>2-.;E*E/*;<E*7-E;*/.E ?*AE<8E+=AE8=:E9:8-=,<;
41286)91+,9!@@ @%# 41286!)9+)3,9!@ @%# 41286,9!@@@@@@@@ @%#
41286)91+,9!@A@ @%# 41286!)9+)3,9!@A @%# 41286,9!@A@@@@@@@@ @%#
15,@?6;8@,19:81*;:68@ 0::7===41286-+64-5,19:81*;:689
! @-<-3674-5:@6)8,
=1:0@65A*6)8,@%#@ @786/8)44-8@)5,@41286 8558?270E27E<1.E<:*-2<287E8/E2<;E9:.-.,.;;8:E<1.E"E*;E87.E8/E<1.E+.;< F927E"E-.>.5896.7<E;A;<.6;E87E<1.E6*:4.<E! ,87<27=.;E<:*-2<287 ?2<1E68:.E7.?E/.*<=:.;E/8:E;*6.E9:2,.E$A;<.6E;=998:<;E<1.E5*<.;<E E*7-EF 927E"E62,:8,87<:855.:;E2<E2;E-.52>.:.-E?2<1E" E*7AE:.*-AE6*-. .@*695.;E0=*:*7<..E;=,,.;;/=5E=;.E8/E<1.E;A;<.6E&5<:*E/*;<E87F+8*:-E9:8F 0:*66.:E*7-E41286 7F,2:,=2<E.+=00.:E.7*+5.;E>.:AE.//2,2.7<E-.+=0F 0270E*7-E/*;<.:E9:8<8.589270E@*695.;E27EE# *7-E!)9+)3@5*7F 0=*0.E*:.E9:8>2-.-E?2<1E<1.E+8*:- ! @-<-3674-5:@#?9:-4@ @%#
)9?&" @-<-3674-5:@6)8, =1:0@65A*6)8,@%#@ @786/8)44-8
$A;<.6E ;=998:<;E @ @ @ )5,@ @ 715 62,:8,87<:855.:;E 2<E ,86.;E ?2<1 % E*,1E3=69.:E.5.6.7<E*7-E927E2;E,5.*:5AE6*:4.-E87E<1.E+8*:- <E2;E98;;2+5.E<8E<.;<E68;<E8/E<1.E27-=;<:2*5E7..-;E87E<1.E;A;<.6E<.69.:*<=:. ,87<:855.:;E ,8=7<.:;E <26.:;E .<,E E )9?&" 2;E *7E .*;AE <8E =;.E<6.5E'# -.>.5896.7<E;A;<.6E!7F+8*:-E&$E E9:80:*66.:E6*4.;EA8=:E-.>.589F 6.7<E.*;AE@*695.;E27E# *7-E!)9+)3@5*70=*0.E*:.E9:8>2-.-E?2<1E<1. +8*:- )9?&" @-<-3674-5:@#?9:-4@ @%#
)9?!#6@-<-3674-5:@6)8, =1:0@65A*6)8,@%#@ @786/8)44-8@
$A;<.6E ;=998:<;E @ @ *7-E @ 715 62,:8,87<:855.:;E 2<E ,86.;E ?2<1 ) E*,1E3=69.:E.5.6.7<E*7-E927E2;E,5.*:5AE6*:4.-E87E<1.E+8*:- *;A"$8E2;E*7E.*;AE<8E=;.E"$8E-.>.5896.7<E;A;<.6E!7F+8*:-E&$E 9:80:*66.:E9:8>2-.;E/*;<E*7-E.*;AE27E;A;<.6E9:80:*66270E )9?!#6@-<-3674-5:@#?9:-4@ @%#
)9?,9!@-<-3674-5:@6)8, =1:0@65A*6)8,@%#@ @786/8)44-8@
$A;<.6E ;=998:<;E E E *7-E E 927E 62,:8,87<:855.:;E 2<E ,86.;E ?2<1 -;" E 0.7.:*5E 9=:98;.E 62,:8,87<:855.:E ?2<1E 27<.:7*5E E +2<E *;A-;"E 1*;E 6*7AE /.*<=:.;E <1*<E 6*4.E A8=:E -.>.5896.7<E .*;AE *7A :.*-AE 6*-.E .@*695.;E 27E E $E *7-E "$ 5*70=*0.E 0=*:*7<..E ;=,F ,.;;/=5E=;.E8/E<1.E;A;<.6E!7F+8*:-E&$E E9:80:*66.:E*558?;E/8:E/*;<.: 9:8<8.5896.7< )9?,9!@-<-3674-5:@#?9:-4@@ @%#
!3-)9-@<191:@6;8@=-*@7)/[email protected]@[email protected]@@0::7===41286-+64
S O F T W A R E
A N D
H A R D W A R E
S O L U T I O N S
F O R
E M B E D D E D
W O R L D
INFO & MARKT MAILBOX
Working with the dsPIC family I am very pleased with your series of articles regarding the dsPIC-family of microcontrollers from Microchip. (articles are about PIC24F, not dsPIC30, Ed.) It would be a pity however, if the enthusiasm of readers was tempered by a few (known) problems for which solutions are known. That is why I would like to bring the following to your attention. The dsPIC-family of microcontrollers from Microchip is very approachable and is therefore eminently suitable for becoming familiar with this type of product and the accompanying development environment. I’ve been working for a year with the dsPIC-30F6014A. A member of a sub-family which unfortunately has not been covered in your articles. This is unfortunate: Firstly the dsPIC30F-family operates from 5 volts, which usually makes the integration with other electronics easier for the hobbyist. Furthermore, the dsPIC30F-family can be programmed much more often (re-flashed). For the dsPIC30F family the nominal number of re-programming cycles is specified as 100,000, compared to ‘only’ 1000 for the products that you cover in your article. In addition there is a very important aspect that may not go unmentioned. For these products to be accepted it is important that the tools that are offered function reasonably reliably. Now this is unfortunately not always the case. Two items are of interest and I hope that you will be able to pay attention to these. Firstly, the MPLAB version that you supply, version 7.50. This one turns out to be somewhat unstable in practice because a large number of new features were incorporated in it. I actively take part in the Microchip forum and this instability has been confirmed by many other participants. This manifests itself as crashes and the not always proper functioning of breakpoints while debugging. The following is very important: Instability is often observed when the software is used on a dual core PC. This has also been confirmed by Microchip in the relevant newsgroup. The good news is that there is a solution to both problems. Version 7.50 of MPLAB has now been replaced by version 7.51, in which a number of problems have been
Optical encoder Dear Editor — in the article about the ‘Capture’ short-wave receiver (December 2006, Ed.), you mention the use of an optical encoder. This is to obtain 100-Hz fine tuning. Unfortunately it is not reported who the manufacturer or what the part number is. Can you please advise me what these are?
8
F. Hardcastle (UK)
what this part should be. It is the same encoder that was already used in the Shortwave Receiver from 1999: Bourns ECW1J-B24AC0024 (available from Farnell, among others)
The type of encoder is indeed not mentioned in the schematic or the parts list, this has unfortunately slipped past us. We have in the meantime checked for you
Audio equipment Dear Jan — As a lover of music and of building my
fixed. The dual core problem can also be solved by using a utility from Microsoft. After the installation of MPLAB, this utility can assign the software to one of the cores of the dual core processor, which in my experience pretty much solves all the instability. The utility has to be executed again if a new version of MPLAB is installed or after a re-installation. The utility can be found at http://www.robpol86.com/Pages/ imagecfg.php. That the dsPIC-family is a ‘mature’ family may be illustrated by the fact that I myself am busy with the development of a pre-emptive real time kernel for this family, called AVIX. Because of the speed and the relatively large amount of memory of these controllers, such an ‘operating system’ is very suitable, which can simplify the programming of certain functions (and complicate others, but I won’t dwell on that). Leon van Snippenberg (Netherlands)
Many thanks for your detailed comments Leon, we hereby pass them on to other readers via the Mailbox column.
own audio equipment, Elektor Electronics is certainly an interesting magazine. I presently still make use of my home built, Crescendo power amplifiers, which was published in the December 1982 issue of Elektor Electronics. The amplifiers are still working well without any problems and provide a nice tightly defined sound. No trouble with distortion or clipping and with 180 W into 4 Ohms, plenty of power. Just to give an impression of my installation: a stereo 2.1 system, three times Crescendo, one for the subwoofer, two for the stereo channels. For the subwoofer I use a large self-built Karlson loudspeaker enclosure with a 15 inch Electrovoice speaker,
a combination with high efficiency and very good characteristics in the region below 75 Hz. Unfortunately it does have an erratic frequency characteristic, but that’s no problem for the Crescendo. For lack of time to build my own, I bought four speaker boxes with good mid and high characteristics, each channel is two speakers in parallel, they are Raveland X2508. For surprisingly little money available from Conrad and with a subwoofer also surprisingly good. The preamp contains electronic filters for the subwoofer and the stereo channels. Unfortunately I had already finished my own design for some time before you published a preamp design with digital potentiometers and
elektor electronics - 4/2007
Solution to Hexadoku February 2007
a microcontroller complete with remote control, in April 2004. The philosophy behind this is clear: ample dimensions and reproduce as transparently as possible. The object after all is to listen to music as the composer intended. Variations with valves are from this point of view only an option when making music. In this case a certain amount of distortion may be desired and favourable clipping behaviour is also a valuable characteristic. I emphasise ‘an option’, because with the present state of DSP-technology and accompanying high quality A/D and D/A conversion any conceivable transfer function should be able to be realised. Perhaps an idea for a future Elektor Electronics design? However, time moves on and and for the Crescendos too there will be a day when replacement is due. The parts that were used back then (in particular the power MOSFETs)
8 C 3 5 6 7 B 2 E A 4 9 D 0 F 1
haven’t been available for years. In addition, the advance of surround audio is undeniable. The future forces the thought of multi-channel amplifiers and speakers. Starting with be above mentioned philosophy it becomes very attractive to go with an amplifier module along the lines of ClariTy, perhaps partially pre-built, to make it reliable, portable and affordable. Obviously also with a switching power supply. Not a simple job, keeping in mind the EMI/EMC trouble lurking around. On the other hand, the successful builder of such a system can expand his CV with an desirable addition. Oh yes, another important detail: we’re talking of course about a system that, to put it mildly, cannot be bought for a more or less reasonable amount of money from high street retailers. Because otherwise the result is, after all, limited to extending one’s skills in electronics assembly.
2 1 0 4 D F 8 9 7 6 5 B E A 3 C
D 7 B 6 E A 3 5 1 F 0 C 8 4 9 2
F 9 E A C 4 1 0 3 D 8 2 7 5 6 B
9 A F 7 8 5 0 D 2 3 B 4 1 6 C E
B 0 C 8 2 3 F 7 6 9 1 E 4 D A 5
E 5 4 3 1 B 6 C D 0 A 8 2 F 7 9
6 D 1 2 4 E 9 A F 5 C 7 0 B 8 3
Not wrong as such, but still. Looking forward to many interesting and challenging projects. Frans Segerink (Netherlands)
We are always very pleased to read how many people are
Corrections & Updates MP3 Preamp February 2007, p. 40-45, 060237-I
On the PCB component overlay, the labels of SMD resistors R29 and R32 have been transposed. Resistor 29 (2 kΩ) should be the top device in the row of resistors fitted to the right of S1 and S2. R2 (6kΩ8) should be directly below it.
0 8 2 B 3 D C 6 9 E F A 5 7 1 4
5 E 6 C A 8 4 B 0 2 7 1 3 9 D F
1 4 A F 7 9 5 E 8 C D 3 B 2 0 6
7 3 D 9 F 0 2 1 4 B 6 5 A C E 8
C 2 8 E 5 1 D F B 7 9 0 6 3 4 A
A F 9 1 0 6 E 3 5 4 2 D C 8 B 7
3 B 5 D 9 C 7 4 A 8 E 6 F 1 2 0
4 6 7 0 B 2 A 8 C 1 3 F 9 E 5 D
still active with serious audio reproduction. We have already thought numerous times about possible new, high quality amplifier designs for publication in Elektor Electronics. A switching final stage is certainly one of the possibilities, but we are still searching for good and readily available solutions. For the autumn of 2007, we have already planned a few power amplifiers with valves and FETs, because of increased interest in recent times. However, serious semiconductor designs will definitely appear again in this magazine.
Ethermeter +4V5
March 2007, p. 72-74, 075035-I
Due to a crashed hard disk in the author’s PC an early version of the circuit diagram was printed. The correct schematic is reproduced here.
C3
BT1
C4 100n
1 2 3
•Publication of reader’s RESET PD0
PB2 PB3
IC1
PD1
PB5 PB6
R1
Canon EOS Cameras go Wireless
K1
July/August 2004, p. 102,
8
2 TX–
9
3 RX+
6 R2
In the transmitter circuit diagram, pushbutton S1 should be a normally closed (NC) type.
220
5 6 RX–
7
PD4
PB4
PD2
PB1
PD3
PB0
XO 4
correspondence is at the
15 17
D1 R3 470
18
19
D2 R4 470
16 13 12
5
10
pondents are not necessarily those of the Editor or Publisher.
TX D3 R5 470
XI X1
discretion of the Editor. •Viewpoints expressed by corres-
RX PB7
PD5
7
RJ45
14
ATTiny2313
100 1 TX+
4
030432-1.
MailBox Terms
20
4V5
POWER
•Correspondence may be translated or edited for length, clarity and style.
8
TX pair
•When replying to Mailbox
UTP
C1
C2
correspondence,
RX pair 22p
20MHz
22p
please quote Issue number. 075035 - 11
•Please send your MailBox correspondence to:
12
4/2007 - elektor electronics
34
56
1 = TX+ 2 = TX– 3 = RX+ 6 = RX– 78
[email protected] or Elektor Electronics, The Editor, 1000 Great West Road, Brentford TW8 9HH, England.
9
INFO & MARKET NEWS & NEW PRODUCTS
Full-speed USB 2.0 PIC® micros Microchip now supplies two new Flash PIC® microcontrollers, the PIC18F2450 and PIC18F4450, with certified Full-Speed USB 2.0 connectivity for 12 megabits-persecond (Mbps) data-transfer rates, and 12 MIPS (48 MHz) processing performance. Combined with a wide variety of on-chip peripherals, nanoWatt Technology power management, and self-programmable Flash memory, these features provide a complete solution for designers working with USB in industrial, medical and many other embedded applications. Many USB-capable microcontrollers are optimized for applications in PC peripherals and consumer markets, rather than for embedded designs. Microchip’s USB PIC microcontroller family makes the benefits of Full-Speed USB available to a broader range of embedded applications that operate in harsh environments and only occasionally connect to personal computers. Some applications that may benefit from these new USB PIC microcontrollers include industrial datalogging, timing and analysis tools; battery-powered handheld devices;
and fire, security, home-automation and back-up (UPS) systems. The two new USB PIC microcontrollers feature 16 Kbytes of self-programmable Enhanced Flash memory, which allows field upgrades for end applications via the USB port. Microchip’s advanced Flash technology provides high endurance of up to 100,000 erase/write cycles and data retention of more than 40 years. Other key features include: • 768 bytes of RAM, 256 bytes
of which can be a dedicated USB buffer • AUSART for RS232 and RS485 • 10-bit A-to-D Converter with up to 13 input channels • Capture/Compare/PWM module with 16-bit capture resolution • Three Timers (2 x 16-bit, 1 x 8-bit) • Programmable Brownout Reset and Low Voltage Detect circuits • Enhanced In-Circuit Debugging capabilities
One area of concern for most USB-application designers is the quantity and quality of available firmware support. Microchip has an extensive set of libraries for the most common application classes, including the Human Interface Device (HID), Communication Device Class (CDC) and custom drivers. In addition, Microchip has published application note AN956 “Migrating Applications to USB from RS232 UART with Minimal Impact on PC Software” for migrating legacy serial applications. The new USB PIC microcontrollers are also supported by Microchip’s development systems, including: MPLAB® Integrated Development Environment (IDE), MPLAB C18 C Compiler, MPLAB ICD 2 In-Circuit Debugger, MPLAB ICE 2000 and MPLAB ICE 4000 In-Circuit Emulators and MPLAB PM3 Universal Device Programmer. In addition, the PICDEM™ Full-Speed USB Demo Board (part # DM163025) assists development with this family’s advanced USB features.
www.microchip.com/usb (077029-VI)
Comprehensive line of V•I chip evaluation and validation boards Vicor Corporation an-nounces the availability of a comprehensive line-up of 52 Factorized Power Architecture (FPA) Customer Evaluation and Validation Boards, featuring BCM™, PRM™ and VTM™ V•I Chip™ power components. In addition Vicor has created an expanding library of V•I Chip™ application notes to support the implemen-tation of power system designs. The introduc-tion of the evaluation boards and application note library provides a quick and easy way to get an appreciation of the advantages of V•I Chip technology. FPA technology and the families of V•I Chip power components offer a fundamentally new and improved approach to distributed power. Fac-torising DC-DC power conversion into its basic isolation functions — isolation and transforma-tion in the VTM units and regulation in the PRM module — functions maximizes power system performance and cost effectiveness. Unregu-lated BCM convert-
10
ers complete the line-up. Four PRM non-isolated regulator boards and 13VTM current multiplier boards are available now. A PRM board is selected to match the desired input voltage, and a VTM board is se-lected to provide the desired output voltage and current. Plugged together, they allow the user to explore FPA’s regulated DCDC capa-bilities and develop an
understanding of the technology. Fourteen 48-V BCM con-verter evaluation boards with fixed ratio outputs from 1.5 V to 48Vdc are also available, along with high voltage (352 Vin and 384 Vin) versions. In addition, 21 BCM validation boards with standard 1/4 brick pinning are designed for engineers to test the performance of the BCM intermediate bus
con-verter in their existing application and enable 300W or 600W solutions. The customer evaluation boards are equipped with test sockets, trim pots, and convenient input and output connec-tions. They provide design engineers with a jump start toward im-plementing this leading edge technology in technically challenging applications, meaning faster time to market and faster return on design investment. The new application notes cover a wide range of topics to give power designers practical knowledge and insights to ensure their access to all of the advantages that Factorized Power Architecture offers. All are available on the Vi-cor web site at: http://www.vicorpower.com/library/technical_documenta-tion/ design_center/application_notes/
www.microchip.com/usb (070017-I-U)
elektor electronics - 4/2007
PWM control IC for 12V to 75V input voltage range International Rectifier introduced the IR3651, a synchronous PWM control IC designed for high performance synchronous DC-DC buck applications with an input voltage range up to 75 V. With programmable switching frequency up to 400 kHz, the IR3651 is ideal for a wide range of applications including telecom and base-station power supplies, networking servers, automotive and industrial control. The IR3651 is designed to drive a pair of external N-channel MOSFETs up to 25 A. Protection features such as programmable softstart, hiccup current limit and under-voltage lockout are provided
for required system-level reliability in the event of a fault condition. The device also offers synchronization which allows simplified system-level EMI filter design. The new controller includes a 150V half-bridge driver that allows for considerable design flexibility. For instance, the device may be used in low power (less than 60 W) non-isolated DC-DC converters for network equipment as well as high power (greater than 200 W) pre-regulator stages in regulated isolated converters. As a result, the IR3651 can be applied to designs for 36 V inkjet printers, 28 V aerospace applications, 24 V elec-
tric bicycles, 72 V battery systems, 18 V wall bricks, 12 V secondary-side post regulators and general purpose high-voltage, non-isolated DC/DC converters.
www.irf.com
(070017-IV)
Minisens ASIC transducer for iso-lated current measurement LEM introduces Minisens, a miniature, integrated circuit transducer for AC and DC isolated current measurement up to 100 KHz. This new component offers full isolation (no optocouplers required) and high sensitivity (from 20 mV to 200 mV per Amp of primary current) with no insertion losses. It is mounted directly onto a printed circuit board as an SMD device, reducing manufacturing cost. Minisens integrates, within one mixed signal ASIC, Hall-effect sensors with a magnetic concentrator to allow direct current measurement without the need for an additional magnetic core. The non-contact measurement enables an almost unlimited current level as it eliminates the need for current to flow through the device. The only limitating factor is the thermal capacities of the pri-
mary conductor. The current can be carried either by a track (or tracks) located on a PCB underneath the Minisens, or by a cable or bus bar under or above the IC. The unlimited design possibilities for the primary conductor allow current measurement up to 70 A or even higher. Many parameters of the ASIC can be configured by on-chip nonvolatile memory: adjustment of the transducer’s gain, offset, polarity, temperature drift and gain algorithm (proportional to, or independent of VDD). Two outputs are available: one filtered, to limit the noise bandwidth; and one unfiltered, which has a response time of less than 3 microseconds. The degree of electrical isolation and output sensitivity can be increased by the PCB design – for example, a primary track on the
opposite side of the IC gives best isolation; a track on the same side gives the highest sensitivity. Mounted as part of a standard PCB assembly process, manufacturing costs are minimized. The Minisens operates from a single 5 V supply. To minimise power consumption an optional input pin can be used to switch the Minisens into standby mode. The transducer is manufactured with a CMOS process and assembled in a SO8-IC package. The combination of different IC configurations and flexible PCB designs results in very versatile and attractively priced current transducer solutions. This opens up opportunities for applications such as
white goods or air conditioning to benefit from isolated current measurement, which previously was not feasible. Minisens will also enable enhanced motor control to produce energy savings where other methods such as a shunt have traditionally been used.
www.lem.com (070017-V)
Supersize your display Lascar has added to its popular SP Series of meters with the introduction of the large SP 8-100 voltmeter. This meter is a 3½-digit, red LED voltme-ter that features a 200mV full scale reading and a onepiece housing that ensures splashproof protection when correctly mounted with the supplied seal. Using two scaling resis-tors the SP 8-100 can be set up to measure DC voltages of up to 200 V, allowing for connection to a wide variety of ap-plications such as sen-sor outputs, test box applications and the monitoring of critical processes. 4/2007 - elektor electronics
The digits of the meter are 14.2 mm (0.56.) in height and use bright red LEDs to provide a clear, easy-to-read display. The SP 8-100 is directly compatible with other industry standard models and is available im-mediately at a cost of £ 29.95 (£ 17.97 in OEM quantities of 250+). Lascar Electronics, (+44) (0)1794 884567; Email [email protected]; Website
www.lascarelectronics.com (070017-II)
11
TECHNOLOGY ENERGY SOURCES
The Human Body as an
Energy Source New technologies for generating energy Thijs Beckers
‘Save energy!’ is a much-heard slogan these days, with rising oil prices and the greenhouse effect always in the news. Research has taken place in the Holst Centre for some time on the development of ‘energy scavengers’, energy converters that use body heat. These can only generate small amounts of power, but there are no waste products.
These days a lot of thermal energy is lost to the environment. The giant cooling towers next to power stations are a clear example, with their billowing steam clouds. New developments are taking place on a much smaller scale to utilise this ‘waste heat’ and convert it into electricity.
EVERLASTING ENERGY
Figure 1. The prototype of the pulse oximeter is already small enough to be worn as a wristwatch.
12
Electronic devices need electrical energy to operate. For portable devices batteries have predominantly been used, but this could be about to change... At the Holst Centre development is taking place of ‘Energy Scavengers’, also called ‘Energy Harvesters’. These ingenious technological devices make use of piezo-electric, electrostatic, electromagnetic or thermal energy to generate a voltage. The latter form of energy is of particular interest. There are many heat sources that lose (and therefore
waste) thermal energy to their surroundings. Just think of the heat generated by industrial machines, cars, ovens, etc. Another source of thermal energy is the human body.
MUSIC OF THE FUTURE? For mobile applications it would of course be great if we could make use of an existing heat source such as the human body. We could then listen endlessly to our iPod or MP3 player and our mobile phone would never have to be connected to a mains charger again... But we haven’t come that far yet. The current technology still requires too much power to work off just our body heat (unless you convert all of the body heat, which isn’t very practical). The Holst Centre has already developed a prototype of a blood gas data logger (Figure 1). This is a completely autonomous system, which takes its power from the heat coming from the wrist of the volunteer. The underlying technique in this sy-
elektor electronics - 4/2007
m 2m
Thermoelectric generator
Storage capacitor
Charging circuit
0.7 - 2V
060317 - 11
Startup circuit
DC / DC converter 2.05V
060317 - 14
Figure 2. Structure of thermopiles in silicon. The heat flow (yellow arrows) creates a voltage across the thermal elements. The series connection increases the voltage to a useable level.
stem isn’t new however. It makes use of the so-called Seebeck-effect (see inset). What is new is the way in which the thermal energy from the heat source is converted...
TECHNOLOGY So-called thermopiles can now be constructed using silicon (see Figure 2). These thermopiles consist of thermocouples, which generate a small voltage when there is a temperature difference across the thermocouple junction. When a large number of thermocouples is connected in series a useable voltage is generated. This voltage is calculated using the formula Uo = m⋅α⋅ΔT, where m is the number of thermocouples, α the Seebeck coefficient and ΔT the temperature difference between the two metals of the thermocouple. In practice each thermocouple generates about 1 mV. To obtain a useful voltage (between 1 and 10 V) we therefore need at least a thousand of them. Such a large number isn’t a problem since the thermal elements are built on silicon. Figure 3 shows the block diagram of a thermo-electric power supply. At an ambient temperature of 22°C the hu-
4/2007 - elektor electronics
man body releases about 10 mW/cm2 of heat energy (measured near an artery). Depending on the conditions, the thermo-electric generator can generate between approximately 100 to 200μW. The charger circuit stores this energy in a battery or capacitor. This is then used to supply the circuit with power. The maximum power transfer occurs when the load resistance is the same as the internal resistance of the thermopiles. The energy scavenger in the blood gas data logger supplies between 100 and 600 μW, depending on the conditions. As the ambient temperature rises, the power output decreases. At about 36° there is no temperature difference between the skin and the surroundings so no energy can be generated (see Figure 4). Should the temperature rise even further, the element will start to produce a voltage again. However, it now works ‘in the opposite direction’ in that the skin is now warmed up by the element rather than cooled. This heat is then released elsewhere by the body.
Figure 3. Block diagram of a thermo-electric supply. The energy extracted by the energy scavenger needs further processing before it becomes useable.
Holst Centre The Holst Centre (www.holstcentre.com) is a joint imitative of IMEC and TNO. It is an independent Research & Development institute that develops new technologies for autonomous wireless transducers and systems-in-foil. Research into energy scavenging techniques is carried out within IMEC-NL. An important hallmark of this institute is the interaction and collaboration with industrial and academic institutions. This overlap means that the Holst Centre can adapt their scientific strategies to the industrial requirements. Investments provided by the government and several companies have significantly increased the chances of a successful outcome of the research. The combined knowledge along with the new developments gives the contributing parties a head start in the market, something they couldn’t have achieved without this level of co-operation.
THERMAL RESISTANCE The power output of the thermal element is greatly influenced by the total thermal resistance. This consists of
13
TECHNOLOGY ENERGY SOURCES
Seebeck-effect The Seebeck effect was discovered in 1821 and is named after its inventor Thomas Johann Seebeck. It is the direct conversion of a temperature difference at the junction of two different metals or semiconductors into an electrical potential. It is actually the opposite of the wellknown Peltier effect, where an electrical current is converted into a temperature difference. In fact these two processes are the same, with the energy conversion happening in opposite directions. For this reason they are collectively called the Peltier-Seebeck or thermo-electric effect.
1000 2 100
Power
1 100
1 17
20
23
26
29
32
35
ambient temperature [°C]
38
41
44
060317 - 16
Figure 4. Power output of the thermopiles. Graph 1 is of a seated person; graph 2 is of a running person. The difference is caused mainly by the cooling capacity of the heatsink.
Classical watch position
Near the artery
heatchanger bone artery
Thermal resistance 300 cm2K/W
bone artery
Thermal resistance 150 cm2K/W 060317 - 12
Figure 5. Thermal resistance of the body. The best place for the heat exchanger is clearly near an artery.
the thermal resistance of the body, the thermo-electric generator and the surrounding air. Several studies have been made of the thermal resistance of the human body. The optimum thermal transfer is achieved when the thermal element is placed over an artery (see Figure 5). The thermal resistance is then about 150 cm2K/W. The resistance of the heat exchanger is in the region of several hundred cm2K/W. The thermal resistance of the air depends very much on the surrounding air movement. For a person sitting down this was 500 cm2K/W with the heatsink used. The same heatsink had a resistance of ‘only’ 200 cm2K/W when this person was walking (refer to Figure 4). During these tests it was also found that heavy exercise by the test subjects didn’t result in any extra energy being generated. The body is so efficient in dissipating excess heat that the skin temperature doesn’t rise significantly and hence there won’t be an increase in the energy extracted. The head is generally the warmest part of the body. It is therefore from here that you can get the best return when converting body heat into electrical energy. The only disadvantage is that it doesn’t look very appealing (see Figure 6).
’ENERGY-FREE’ MEASUREMENTS The device designed at the Holst Centre, the wireless pulse oximeter sensor (see Figure 1), uses these newly developed technologies. The signals from a blood gas and hart rate sensor (of the type also used in hospitals) are connected to a sort of wristwatch. This strap contains all of the electronics as well as the power supply. The block diagram in Figure 7 shows how the pulse oximeter is constructed. The heat exchanger is placed above the artery, which indirectly supplies the electronics with the required energy. All the analogue and digital signal processing is carried out on-board. A radio transmitter is used to send the data to (for example) a PC, so that the information can be displayed in real-time and, if necessary, an alarm can be raised when the data goes outside a certain range.
OLD AND NEW TOGETHER The theories behind these devices aren’t exactly new. The technology has existed for quite some time, but was
14
much too bulky for portable applications. Because of this, the Holst Centre concentrates its research mainly on the miniaturisation of the technology. They are now researching the production of a thermopile using silicon. This means that the energy collectors can be manufactured on silicon wafers, similar to microprocessors, which provides a big cost saving. The tiny dimensions of the elements mean that you can connect enough of them in series to produce a useable voltage. This isn’t exactly a new idea, as can be seen from the Seiko Thermic Watch [1,2]. This watch makes use of the same effect that the pulse oximeter uses. The dimensions of the thermopile are much greater, since it is constructed using discrete elements. It
Figure 6. This many scavengers seems a bit over the top...
Commercial pulse oximeter (finger sensor)
Processor ADC
TX DSP & Storage Security
2.4GHz
MAC Power manager / energy storage Energy scavenger Gemiddeld
Thermo-elektrische Energie
060317 - 15
Figure 7. The internal structure of the wireless pulse oximeter is directed at making the size and energy consumption as small as possible.
also converts much less energy into an electrical output. Other products that use ambient energy sources are of course solar cells (see Figure 8). A less well-known, but no less interesting, application are the light switches made by EnOcean (see Figure 9). Pressing the switch genera-
elektor electronics - 4/2007
tes enough power to energise a small transmitter, which activates a remote relay [3]. There are many other devices that make use of ‘human energy’: wind-up radios and telephone chargers, and torches that first have to be shaken to charge them up. But most of these are nowhere near as ingenious as the modern technologies.
ENERGY EVERYWHERE
Thermocouples A thermocouple consists of two wires made from different metals or alloys that have been joined together, preferably welded. When a temperature difference occurs across the junction a potential difference is created, which is proportional to the temperature difference. The potential difference is in the order of 6 to 60 microvolt per °C (μV/°C).
ELECTRONICS UNLIMITED The amount of electronics used in our day-to-day lives is increasing all the time. Just think of the car, coffee machine, electric toothbrush, etc. Many new solutions are invented to provide all these electronic devices with power. The thermopiles from the Holst Centre are just the tip of the (technological) iceberg, which will grow to new heights despite the greenhouse effect... (060317)
Energy scavengers are the future. They operate wirelessly and have uses in numerous applications. Just think of alarm systems, industrial applications where the heat from machines can be used, medical applications, such as the wireless pulse oximeter described earlier, which can also be connected to
With thanks to Ruud Vullers, senior researcher Holst Centre, for his assistance.
Figure 9. A light switch made by EnOcean. This wireless switch converts the energy used in pressing the switch into electrical energy, which powers a transmitter that activates a remote relay.
Figure 8. The Camel fridge. This is a good example of an alternative energy source. (photo Naps Systems Oy)
a GSM, making remote readings from greater distances possible. Other uses are in domotics, where many sensors can be used without having to install cables, gaming (the controller doesn’t require batteries and won’t run out of power in the middle of that all-important game), wireless keyboards and mice, and so on. Another area where these devices will have a future is in the automotive industry. In America it is compulsory for new cars to continuously monitor their tyre pressure. Realistically, this can only be implemented using wireless technology, which is an area that energy scavengers excel in (see the
4/2007 - elektor electronics
May 2005 issue of Elektor electronics, ‘Sense Organs for Vehicles’). The technology can also be used as an alternative to RFID, which is a passive system. With energy scavengers it is possible to actively monitor what happens to a product. As an example, you could tell if a deep freeze product has been defrosted. The temperature can be continuously logged via a sensor, so you can tell at a later date exactly what happened to the product. In combination with a paper display you could even tell directly what the shelf life of the product was.
Weblinks: [1] www.roachman.com/thermic [2] www.natureinterface. com/e/ni03/P045-049 [3] www.enocean.com
15
INFOTAINMENT FREE ENERGY
Message in a Bottle The quest for the holy grail of free energy Wisse Hettinga
It’s too good to be true, and the laws of thermodynamics say it isn’t true, but it’s still a persistent dream: free energy. It also seems a bit strange that the universe is bursting with energy, while here on earth energy is a source of so much misery. Somehow, we just can’t seem to find efficient and sustainable ways to warm our buildings, light our surroundings, and transport ourselves and our goods. Does Elektor Electronics see a ray of hope here?
A MESS
Figure 1. Nathan Stubblefield’s battery.
16
The fact that the science of thermody namics tells us that it’s impossible to extract more energy from a system than you put into it is not enough to stop a large number of enthusiasts from spending their money and time on the quest for free energy, the ‘holy grail’ of the 21st century. Many of them publish their ideas and experiments on the Internet. If you enter “free energy” in Google, you will find yourself in a bizarre world of believers, pseudo-scientists, and – fortunately – normal people who enjoy devoting their attention to this topic. A number of ‘discoveries’ appear to be treacherously interesting. It actually takes a certain amount of effort not to believe them. To cite a few examples: a man who makes normal incandescent bulbs light up by holding them against a number of rods; the inventor of the N-Machine; a company named Steorn; and the ‘joecell’, which lets car engines run on water. There’s not much you can say about
this, except that you can see what the problem is with all these free energy researchers. To put it in a nutshell: it’s a mess. You see dozens of sites with the strangest messages couched in Word Art and idiotic flashing designs. On the video sites, you can find dozens of clips that take you to obscure places where obscure persons perform obscure experiments. It almost appears that everything related to free energy must necessarily be obscure and imprecise. And now it’s time for Elektor Electronics to turn its attention to this subject. Just to make things clear, it’s not our intention here to take you on a perilous adventure with an unknown outcome. But when we see that so many people are spending time on this, and we see meter pointers swinging and lamps lighting up, Elektor Electronics wants to be in the front row to see what’s happening.
elektor electronics - 4/2007
JOURNEY INTO THE PAST First we have to take a brief journey in time. Ever since the early days of natural science, amateur researchers have been fascinated with the idea of free energy. There appears to be a clear link with ancient sciences and descriptions of strange experiments, and dowsers have something to say here as well. This is actually not all that surprising, since the earth conducts electricity to an extent. This was already known around 1800, when Giovanni Aldini discovered that the two conductors of a telegraph circuit could be replaced by a single conductor, with the return path being provided by the earth. (For some interesting reading, search the Internet for Aldini, the cousin of Galvani, and read about his unusual experiments on recently deceased criminals.) But beside the earth as a conductor of electricity, there are also descriptions of the spontaneous occurrence of electrical currents and telegraph circuits that continue working properly even without external batteries or other sources of power. This brings us to the theory of energy currents or ‘telluric currents’, and from there it’s only a small step to dowsers searching for energy currents and earth rays. The story of Nathan B. Stubblefield (1860–1928), a melon grower who lived in Murray, Kentucky, is especially interesting. He liked to tinker with coils and wires, and he managed to make history is his own way. However, it was a somewhat sad history. He is said to be the original inventor of the radio. For instance, tradition has it that he managed to create a wireless communication link exactly 100 years ago, with a clarity and quality that people
4/2007 - elektor electronics
found frightening at the time. Nathan Stubblefield was a contemporary of Alexander Graham Bell. He knew about Bell’s inventions, and he made a wireless version using electromagnetic coupling – the same principle as we use in transformers. In these experiments – and this is where it starts to get interesting for us – he used an unusual form of energy generation: earth batteries. The principle behind these batteries is well known. If you drive a copper rod and a zinc rod into the ground, the chemicals in the ground create a small potential difference that can be measured with a voltmeter. However, the situation with Nathan’s experiments was quite different. According to the legend, a large amount of energy was released during the experiments. Stubblefield used coils in his earth batteries (Figure 1), and it appears that he managed to generate high voltages and currents from the earth. Stubblefield’s experiments were remarkable for his time. There is picture where he shows how a wireless link can be established between a boat and the shore (Figure 2), which is something he actually did. However, he came to a sad end. His financers abandoned him, and he became a recluse who spent the last years of his life in his workshop. He destroyed all his instruments before he died and thus took the secret of his earth batteries with him to his grave. The only thing that keeps his memory alive today is a memorial plaque in Murray, his home town,
HIGH TENSION And then there’s Nicola Tesla, of course. He lived from 1856 to 1943, and he managed to literally electrify everything with his Tesla coil. He also invented the induction motor. Besides his experiments with high voltage, which incidentally are perfectly clear and explainable and thus not at all mysterious, Nicola was also a sort of visionary. For instance, he assured his contemporaries that it would be possible to use a small transmitter/receiver device – not much large than a wristwatch – to establish contact with other people and communicate with someone on the other side of the world. Nowadays this doesn’t sound very strange, but at that time it seemed like pure fantasy. According to Tesla, it was necessary to broadcast large quantities of energy in order to achieve this. Nicola Tesla
Figure 2. Stubblefield’s ship-to-shore link.
Figure 3. Tesla’s free-energy receiver.
had a special project in mind for this, called the Wardenclyffe project. A 60metre tower would serve to broadcast electromagnetic energy, which could then be simply plucked out of the air anywhere in the world. But here again, things start to get hazy. Construction was started with financial backing, but optimism quickly changed to fear of the electrical forces. Everything was stopped, and Tesla’s big project faded into oblivion. We also know that Tesla had plans to tap energy from space. He had the idea of using a large metal plate and draw off the energy using a sort of mechanical rectifier (Figure 3). Just like Stubblefield, Tesla became a recluse. He held annual meetings with journalists, where he made several remarkable predictions. In honour of his memory, the unit of magnetic flux density is called the Tesla (T). All of this is past history. The only remaining memory of Stubblefield is a
17
INFOTAINMENT FREE ENERGY
See for yourself No matter whether it’s truth or fiction, ‘free energy’ is exciting. The simple search term “free energy” will turn up all sorts of sites that provide hours of amazing web surfing. Some of the more remarkable sites are described briefly below. www.teslascience.org - Several enthusiasts are trying to save the site and buildings of the Wardenclyffe project. www.keshetechnologies.com - Note the opening screen of this site. If you dare to go further, you can learn the latest news about Keshe’s experiments, including the cola bottle experiments. www.senternovem.nl/projecten– galerij/overzicht/energie_en_ klimaat/h2uvpagina.asp - A ridiculously long link name, but well worth the effort of typing it in. Here you can learn what is happening at the official scientific level. Worth monitoring. www.nuenergy.org/alt/archive.htm - A variegated collection of free-energy projects. www.nathanstubblefield.com - The man and his inventions. http://www.ecn. nl/egon/rd-programma/micro-wkk - The Stirling engine is back in fashion, and within a few years it is expected to find a place in every house to help reduce energy consumption.
monument in Murray where he used to live, and the ruins of Tesla’s Wardenclyffe project can still be seen on Long Island.
BACK TO THE PRESENT Nowadays we rarely encounter sensational figures such as Stubblefield and Tesla. That’s a pity, since it would be fun to meet the modern-day Teslas and Stubblefields. Our first search on the Internet didn’t turn up very much. It appears that all the free-energy gurus live in North America. But just when it seemed that all our efforts were in vain, we ran into a remarkable group of peo-
18
ple in the press room of the Jaarbeurs building (Utrecht, The Netherlands) during the ‘Instruments’ exhibition. The setting was entirely in the style of the ‘free energy’ community: obscure arrangements with lots of wires and cables running over the table, multimeters, and flashing lamps. And now let me introduce Mr Keshe and his message in a bottle!
MESSAGE IN A BOTTLE It ultimately took several months before I had an opportunity to speak with Mehran Keshe in person. First I was brushed off by an employee who said I wouldn’t understand it anyhow and thus could spare myself the trouble of a visit. After that, I was told that I could come if I promised to support and promote Mr Keshe’s message, but I wasn’t interested in being used that way. The contact became more and more diffuse until a few weeks later, when I once again tried the telephone number and found myself talking directly with Mr Keshe, who said he would be pleased to speak with me. We agreed to meet in a dismal hotel in Antwerp, which appeared even more bleak in the miserable weather. Mehran Keshe is a native of Iran and a nuclear scientist by profession. He studied at the Queen Mary College of the University of London. He lives in Belgium and is confident that he has the support of the Belgian government, which he emphasized repeatedly during our conversation. He also had a plastic cola bottle (Figure 4), and this bottle carries the secret of the world’s future energy supply. As a side effect, the bottle also provides a solution for the CO2 problem, as well as an inexpensive way to produce nanomaterials and a spectacular way to transform a length of ordinary stranded wire into a multi-conductor cable. To avoid making things too difficult, for now we’ll omit any mention of his ideas regarding black holes and travelling through space and time. The basis for all these discoveries has to be found in Mehran Keshe’s insights into the relationship
Figure 4. The cola bottle with the solution to the energy problem (www.keshetechnologies.com).
between the earth’s magnetic field and the force of gravity. He remained vague in response to my question about the underlying theories and how he arrived at these insights; he simply arrived at his understanding by contemplation and study. Mehran Keshe: “There’s actually nothing strange about all this; it’s just how the energy of the world and the universe works. That’s what I have seen, and now I translate it into usable products. Nobody is surprised if you say that millions of stars are created in the universe every day, but if I copy this on a small scale, nobody is willing to accept it.” What he meant by “copying it on a small scale” was the demonstration with the cola bottle. Before our meeting, he had prepared a new bottle specifically for this meeting. It was a normal plastic cola bottle containing several copper nails (roofing nails) fitted to provide electrodes on the outside of the bottle. The copper nails were held in place by plastic glue. The key to all this was not the actual bottle, but instead a special liquid that Keshe has developed. The composition of this liquid is secret, but it is not hazardous. Mr Keshe poured the liquid into the bottle, shook it briefly, set it down again and continued with the conversation. He showed several other bottles that he had used for pre-
elektor electronics - 4/2007
Figure 5. Small voltage differences can be measured between the copper nails in the cola bottle.
vious demos. It was obvious that the plastic of the bottles was deteriorating. The liquid and the chemical reaction had made the plastic granular and fragile. “What you have here with these old bottles is in fact the solution to the CO2 problem”, according to Mr Keshe. “This reaction will enable us to convert CO2 into matter, and then it can be processed easily as household waste.” In the meantime, a reaction had started in the cola bottle. The copper electrodes were turning black. Mr Keshe opened the bottle and poured the liquid back into a glass bottle. “This bottle has become worth many hundred euros in the last half hour”, he said. According to him, the black deposit was “grapheme”, a form of graphite with a nanostructure. “Usually you can only make this under very special conditions of temperature and pressure, but here it happens at ordinary room temperature.” According to him, a previous study with a special meter used in the diamond industry had confirmed that the material was genuine. But the real trick came next: the bottle was empty, the cap was off, and Mr Keshe brought out a simple digital multimeter. He briefly shorted the tips of the probes to show that the meter read 0 volts and then measured the electrodes: 600 mV on the one, and 800 mV on some of the others (Figure 5). In my mind, I can
4/2007 - elektor electronics
hear voices from the public saying “Just a minute here, that calls for further study!” I do not disagree with anyone on this, but with the knowledge I have and what I can see from the other side of the table, I must at least say that this is remarkable. “This is how future batteries will work”, said Mr Keshe. “Pretty soon, you will be able to buy a battery for 1 dollar that in principle will last as long as you want. We still think in terms of electronic components and batteries as being separate things. In a few years, energy cells will be created by vapour deposition during chip manufacturing, and the chips will leave the factory already working”, he continued. However, the black deposit in the bottle is least just as interesting, because the nanomaterial is electrically insulating instead of conductive. Mr Keshe showed how a length of ordinary flexible wire made from a large number of individual copper strands could be converted into a multi-conductor cable in the bottle. All the copper strands were effectively isolated from each other by the black deposit. Now there you have a perfectly clear situation (Figure 6). The meter came out again, and in fact the two treated copper strands proved to be fully insulated. After this, the conversation turned to the more unusual possibilities of the insights of Mehran Keshe: black holes
Mehra Keshe, Nucleair Scientist.
that can enclose us so we can travel through space and time, antigravity systems, and remarkable ideas about how to solve all of our energy problems. Is Mehran Keshe a swindler? Did I overlook the hidden wires? Was I blind to the enormous transformer under the table? Do I have reason do doubt the sincerity of this man? According to Keshe, several institutions and universities are presently studying his findings, and up to now they have reported that they all appear to correct. Time will tell. But there’s still the question of why he chooses to present himself this way. “If you are convinced of what you know, you have to commit yourself to it”, says Mehran Keshe. Time will tell. (070096-1)
19
HANDS-ON SOLAR ENERGY
Solar Power for Dummies
Dr. Thomas Scherer and Jens Nickel
Solar energy, along with wind and water power, is one of the renewable or ‘green’ energy resources that cannot be blamed for creating CO2 emissions or radioactive waste. Photovoltaic technology — PV for short — in which solar cells generate electricity directly from sunlight have a valiant role to play in the climate change challenge. Just now the percentage of electric power produced by PV means is very small; 0.2 per cent of total electricity consumption in Germany [1] and probably about the same in Britain, where a mere two per cent of electric power comes from renewable sources. Unfortunately the efficiency of solar cells is not exactly staggering, since only a small proportion of light energy is converted into electricity (in some latitudes up to 1 kilowatt per square metre). The most widely available cells (made of polycrystalline silicon) are between 14 and 17 per cent efficient. On the positive side, large commercial systems composed of these cells can save the same amount of CO2 that their manufacture involved in just two to three years.
20
Simple standalone pow
Small solar systems have a lot to offer where mains power is unavailable. Installing standalone systems is by no means difficult, using either kits or separate modules and parts you have gathered yourself. Here are some tips to make sure you get it right first time.
SILICON SHORTAGE In pure economic terms the figures for solar electricity generation are not exactly overwhelming; the cost of one kilowatt-hour of electricity produced by photovoltaic means amounts to between 24 and 40 pence, depending on the size of setup, the expected usable life of the modules, the annual sunlight hours total and various other parameters. ‘Cheap as chips’ silicon is not; the production and purification of the base material is both involved and expensive, since it must be almost as unadulterated as the silicon used in the chip industry. In order to promote solar power some European Union countries offer a rebate for consumers who export power into the grid, meaning that anyone who owns or has shares in a solar power system can treat this as an investment for tax relief. A renewable energy law [1] in Germany [2] helped that country take world leadership in solar energy two years ago; the country’s 957 megawatts solar generating capacity was more than twice that of the USA and Japan combined [3]. The downside
of this was the shortage of modules that followed and a price hike of up to 30 per cent from many suppliers. The production bottleneck was the requirement for purest silicon; the days when a modest demand for solar cells could be fulfilled with the IC industry’s surplus silicon were long gone. Respite will not come before 2008 and afterwards, when production plants will have sufficient capacity to satisfy the demand for solar silicon and alternative new cell technologies (see panel, Solar Cell Basics) begin to offer serious competition.
OFF-GRID OPTIONS The high price of solar modules is at least democratic and affects everybody equally to exactly the same degree, regardless of whether they want to generate power for sale or would just like to enjoy a little independence from the grid. For better or for worse, campers, boat owners, people with remote country cottages and experimentally minded enthusiasts will all have to dig deep in their pockets to achieve electri-
elektor electronics - 4/2007
wer plants
Standalone solar power installations play a vital role in regions lacking significant electrical infrastructure. This is a 4.2 kW setup in Indonesia (photo: Schott Solar GmbH).
battery
solar cells
load charge controller
060313 - 12
Figure 1. The block diagram for a standalone setup is extremely straightforward.
cal independence. On the other hand, the remaining elements of a standalone solar power system are not particularly difficult or expensive to procure, assuming we’re talking about a typical setup delivering between 10 and a few hundred watts. Systems of this kind are ideal for DIY construction too. With standalone systems we shall not be feeding any surplus back into the national grid, so we don’t need to worry about the safety complexities of isolating our plant from the grid network. For this reason the block diagram (Figure 1) turns out extremely simple. The voltage source (generator) is the solar module shown. Because the module’s actual output voltage depends on a number of factors (in particular the light level, temperature and loading), direct connection of the module to a suitable battery is not an option. Instead, we employ an electronic interface between the two main building blocks: this is the charge regulator, which matches the energy available to the needs of the rechargeable battery
4/2007 - elektor electronics
Figure 2. The charge regulator matches the energy available to the battery’s requirements (photo: Phocos AG).
(Figure 2).
AC AND DC To maximise the life of your solar setup special batteries known as ‘solar batteries’ are recommended (Figure 3). In reality they differ very little from the ‘maintenance-free’ and ‘position-inde-
pendent’ gel-cell lead acid rechargeable batteries that people have used for many years in burglar alarms and many other applications. These batteries are excellent for the task in hand and they have only two drawbacks. The first is the price you pay for their ‘fit and forget’ and reduced self-discharge characteristics, which is higher than for, say, automotive starter batteries. The other thing is the lower amount of load they can handle. Don’t forget that these are lead-acid batteries and they will rely on the charge regulator to protect them against overcharging, excessive charging current and ideally of course deep discharge. The charge regulator has an additional function of making sure the solar cells are properly loaded to achieve their optimal efficiency [4]. Basic standalone setups comprise just three components therefore, specified to achieve the desired electrical capacity. Low power systems (up to a few hundred watts) tend to use 12 V solar modules, which can be connected in parallel if necessary (using protection diodes in this case). Charge regulators and rechargeable batteries are designed for 12 V operation in the main. If all you need is a few 12 V lamps and suchlike this kind of setup is fine. In this power range you can also buy 12 V refrigerators and low-voltage halogen lamps, intended for mobile homes. There are also special 12 V power supplies for Laptops but there are many other kinds of electrical device that you cannot get in 12 V versions; the cost of redesigning these gadgets would be just too expensive or plain disproportionate. For most people it would be far simpler to use standard mains appliances and de-luxe standalone systems can indeed provide ‘normal’ 230 V alternating current (AC). This is where the fourth component comes in, the AC power inverter. The key requirements now focus on high efficiency and low standby current draw. Lately charge regulators with integrated power inverters have appeared on the market, simplifying systems design and cabling quite significantly (Figure 4). With this kind of integrated charge regulator the construction of a 230 V AC system is almost as straightforward as a 12 V DC one, only more expensive.
21
HANDS-ON SOLAR ENERGY
QUICK CALCULATIONS Various manufacturers offer complete ready-to-install kits comprising module(s), charge regulator and battery. The simplest way of getting hold of these is to visit specialist dealers and be guided by their advice. It’s worth figuring our your requirements and some rough estimates in advance, if only to avoid buying a system that’s under (or even over) specified. False economies can end up costing you dearly as well. The Internet is definitely the solar enthusiast’s friend and is highly recommended for doing your own researching. That said, you can easily end up with information overload, unable to see the wood for the trees. Accordingly here are a few rules of thumb and basic calculations for simplifying the design and specification of your system. The maximum power you’ll need is the sum of all devices active simultaneously. For illuminating a mobile home or cabin you should look to 50 watts. Even the most economical fridges will grab a good 100 watts for the compressor motor. This illustrates a significant difference between 12-V and 230-V technologies, incidentally. The highvoltage version requires a power inverter that can deliver a surge current of up to ten times the normal operational motor load at the moment the refrigerator compressor starts up. Some inverters cannot handle this and will just cut out. If you don’t spot the overload lamp is on until the evening your food will already have started to spoil. Some special fridges provide a good compromise between chilling capacity and power greed — but don’t buy the cheap models using Peltier elements, since their poor overall efficiency will drain your battery completely. A good compressor-equipped coolbox is a kind of mini refrigerator, with a (very silent) motor taking less than 50 W.
ENERGY APPETITES Generally, you will not have all the lights on at once, even for all-night card games. With 50 watt-hours (Wh) at your disposal you’ll be able to light a 10-watt lamp for five hours — and remember that halogen lamps consume more than twice the power that fluorescents use. Adding a refrigerator will drive up your power needs (and your costs!) exponentially. Even the best energy-saving models (properly insulated and naturally without any freezer compartment) can easi-
22
Solar cell basics The smallest current-generating element in a solar power system is the so-called solar cell. These cells are always made up from at least two differing materials, frequently arranged in two thin layers overlaid one above the other. When light falls upon these materials one serves as a donor of electrons, the other acting as an acceptor. Key to this process is a barrier region between the two materials, which permits an electric current to flow in one direction only and is how the electrical voltage arises. If you now attach a conductive electrode (such as metal) to each of the materials and connect these electrodes to an external load, the electrons produced will ‘do the business’ very effectively. metal contact
anti-reflection layer n-doted layer p-doted silicon p-n junction zone
electron missing electron (gap) backplane contact (full area) 060313 - 11
The solar cells most widely used by far are produced from a thin layer of mono or polycrystalline silicon (polycrystalline cells display a typical snowflake pattern after cutting and polishing). The silicon is highly pure but it is doped (depurified) with an extremely small quantity of boron, which then gives a high level of control over the electronic properties of the semiconductor. At the same time the top layer is doped with phosphorus [5]. Within the cell is a p-n junction, exactly as in a diode. Photons of light falling on the cell drive electrons out of what is called the ‘valence band’ into the ‘conduction band’ and in the process this electron traffic across the band gap is transformed into electric current. The voltage that can be abstracted by way of the (silver) contacts attached to the upper and lower sides of the cell is in the region of 0.6 V. The current is proportional to the surface area of the cell, the incident light energy and the efficiency factor. In our latitudes commercially available polycrystalline cells deliver a couple of amps. Cascading cells in ‘strings’ and paralleling these chains of cells to make modules can achieve higher voltages and currents. Polycrystalline cells are up to around 17 % efficient and monocrystalline examples up to 22 % (these figures fall slightly when connected in modules). Improved efficiency can be had using cells made from germanium, gallium arsenide and other combinations; these are more expensive, however, and for this reason are employed only in special applications. Tandem and triple junction cells can be created using multiple overlaid layers, each of these being optimised for maximum sensitivity to a particular wavelength of light. Lastly, it is also possible to use lenses to concentrate sunlight onto a smaller surface area. Employing all these tricks should soon raise the world efficiency record above 40 % [6]. Other approaches are focused not so much on improving efficiency as on reducing the cost. The target is to reduce or avoid altogether the need for absolutely pure silicon. One approach uses so-called CIS Modules, such as those produced by the German company Würth [7], although not in quantities likely to worry to the manufacturers of silicon solar cells. Thinfilm solar cells made of amorphous silicon with efficiency levels up to about 10 % possess for now such a good price/performance ratio that they can be recommended as an alternative, provided of course that users have enough room to accommodate these modules. Not yet commercially available are a new breed of dye-sensitized solar cells (DSCs), in which organic material serves as light collectors (see the other article on solar cell technology in this issue). Looking further ahead, a five-year development programme announced a year ago by the international energy company BP plc and the California Institute of Technology will develop a new type of solar-cell technology called nanorods. These cylindrical ‘wires’ of silicon 100 times thinner than a human hair will absorb light along their entire length, with efficiency levels far greater than conventional solar cells [8, 9].
elektor electronics - 4/2007
ly guzzle more than 300 Wh a day in summer. An adequately dimensioned standalone setup can then cost £1,500 quite easily. More appropriate and affordable are the coolboxes mentioned above, which can get by with less than 100 Wh a day when properly installed using compressor operation. Summing up, standalone installations divide more or less into two basic types. The first is the basic variety with around 50 W peak power and a projected energy budget of 50 Wh a day, which will be appropriate for lighting purposes and charging MP3 players or camera batteries. The second type comes with a coolbox, for which a good 100 W maximum power must be provided and 150 Wh energy budget a day. If you need TV in your holiday home or weekend cottage it makes sense to choose a small LCD set with a screen measuring a few inches across, as these require only a few watts. Screens larger than 10 inches diagonal will add several times their price onto the cost of the solar system...
SIZING UP YOUR SYSTEM The decision on how large a solar module to go for is by no means simple, with no ‘exact’ answer. The average amount of sunlight expected will play a role, also whether you want to guarantee full power even under cloudy conditions. In addition you need to clarify how much reserve energy you want to keep in the rechargeable battery. Commercial kits of components are normally dimensioned on a ‘1-1-1’ basis, which suits the majority of applications in central Europe. This states that for an energy consumption of 1 Wh per day a battery with a capacity of 1 amp-hour and solar cells with a peak power of 1 Ah (at 12 V) should be sufficient. The battery can also carry you over a couple of dull days. The matching charge regulator is usually reasonably overspecified, allowing you to retrofit extra solar modules and/or further battery capacity as required. For a 50 W/50 Wh entry-level setup the choice of the right module and battery is just as simple. A solar module rated 50 watts peak (in other words, maximum performance) and a 50 amp-hour battery will suffice. A complete package including charge regulator and 230 V AC power inverter should cost between £350 and £700. The solar cells account for the lion’s share of this cost, which is expected to fall in future.
4/2007 - elektor electronics
The fridge option (needing the 150 Wh a day mentioned) will call for a single 150 W peak module (or two 75 Wp modules) plus a battery rated between 100 and 200 Ah, so reckon on paying from £1,000 to £1,400 for this.
TAIL-END TIPS From a cost viewpoint the particular type of module used is an incidental consideration of course. Whether the silicon cells you buy are (poly) crystalline or amorphous is determined by the bang per buck you get in watts, or more elegantly the price/performance
Figure 3. ‘Solar batteries’, unlike conventional lead-acid batteries, are genuinely maintenance-free and are less prone to self-discharge (photo: Deutsche Exide GmbH).
The simplest and smallest standalone systems are the ones that power these low-cost garden lights, comprising three small solar cells, a diode, a resistor (= charge regulator) and a 1.2 V NiCd battery. In our latitudes this basic combination will keep an LED lamp alight all night long. (060313)
WEB LINKS [1] www.erneuerbare-energien.de [2] www.solarfoerderung.de [3] www.photon.de [4] www.elektor-electronics.co.uk/Default.aspx?tabid=30&List=1&Cat egoryID=5&Level=1&SortField=8 (Elektor Electronics 6/2005, ‘Solar Power made simple’) [5] http://en.wikipedia. org/wiki/Solar_cell [6] www.spectrolab.com/com/news/ news-detail.asp?id=172 [7] www.wuerth-solar.de/website/frames. php?parLANG=EN&parKAT=233 Additional material [8] www.eetimes.com:80/ news/semi/showArticle. jhtml?articleID=189602144 [9] www.economist.com/science/tq/displayStory. cfm?story_id=2019909 [10] www.nef.org.uk/greenenergy/ solar.htm [11] www.pv-uk.org.uk [12] www.cat.org.uk
Figure 4. Charge regulator with built-in power inverter that makes an off-grid 230V AC installation almost as straightforward as a 12 V DC system (photo: Fronius International GmbH).
ratio. Because charge regulators come in several voltage versions (not just 12 V alone), the one you buy must of course match the voltage range of the solar module selected. If a coolbox is to be used, the power inverter must deliver at least 500 W and preferably somewhat more. There are plenty of offerings on the market; Conrad and Reichelt both have packages for small solar installations in their range. These two suppliers even offer components for really small setups, such as a single garden lamp or a pump to run a pond fountain.
23
HANDS-ON BATTERY CHARGER
Battery Charge-n-Check For NiMH/NiCd and LiPo/Li-Ion packs and cells Florent Coste
More and more electronic devices use batteries, often of varying types. Finding a universal solution now seems more justified — one that’s not only capable of handling a maximum of batteries but also with the ability to evaluate their status.
Originally developed for receiver batteries in radio-controlled (RC) models, the circuit discussed in this article is used to charge, discharge and evaluate the capacity of battery packs composed of one up to eight NiMH or NiCd cells, or LiPo (Lithium Polymer) or LiIon (Lithium-Ion) batteries composed of two elements (serial charge). Model hobbyists, other rechargeable battery users and generally all soldering iron fans will find in the present circuit a low cost, simple solution that’s also easily integrated.
NOT JUST A SIMPLE CHARGER... To update this category, integration and functionalities were pushed ‘to the max’ (just a glance at the size of the circuit makes that point). It really refers to a project that can verify the performance level of your battery packs. No exotic components, only one integrated circuit (a microcontroller from ST), a few transistors that are very easily obtained, all neatly done up with a few square centimetres of epoxy. Ready,
24
set, to your soldering irons!
THE BRAINS OF THE PROJECT Everything depends on using only one unique microcontroller whose original function has been somewhat changed, since it is more specifically dedicated to motor control (see ‘Brushless Motor Controller’ in Elektor, February, 2006). Its very interesting particularity is that it can be integrated into a PWM cell (Pulse Width Modulation) which can work at high frequencies (50 kHz), all coupled with a current loop (see Figure 1). Even better, an internal operational amplifier makes it possible to avoid using any external analogue integrated circuit. That is the way to perfectly fulfil one’s mission!
CURRENT REGULATION: THE PRINCIPLE Designed to make synchronous and asynchronous motors run, the ST7MC includes a current-level control cell that makes it possible to monitor the
current intensity in a motor coil winding. Starting from this functionality, we had no doubts about substituting a battery (pack) for it! The behaviour of the current loop obviously remains unchanged. The principle of the regulation is very simple: when a preprogrammed intensity level is reached, the microcontroller automatically cuts off the output until the next PWM pulse (or as long as the current level remains above the reference level): the duty cycle is therefore directly controlled by the cell hardware, without the least external intervention. Therefore, only one adjustment of the current setpoint is necessary. Figure 2 registers the incidence rate of the current readout on the PWM output of the microcontroller. The operational amplifier included in the ST7MC comes to assist current detection — the amplifier is configured as an inverter with a gain of 9.2 times. Then we amplify the low signal to the terminals of the shunt resistor (low ohmic value) before it is processed by the current loop. In this way, we can
elektor electronics - 4/2007
The author Florent Coste, electronics specialist, received his Electrical Engineering degree in 2000 at the Charles Fabry Institute, Marseilles, France. He is currently an STMICROELECTRONICS employee based in Hong-Kong. Specialised in microcontroller software, Florent heads development for entirely new platforms based n STR750 (32-bit, ARM core-based) for vectorial motor control of synchronous and asynchronous motors intended for the Asian market. A passionate fan of microelectronics and attracted by everything high-tech and technical, he is always on the lookout for something new. Here, he presents one of the Cube prototypes. Contact : fl[email protected]
ST7MC
clock PWM
Microcontroller
4/2007 - elektor electronics
Peripheral outputs
S
LOOK AT THE SCHEMATICS CAREFULLY
MCO0 (pin 42)
+12V Level shifter
Current reference MCCREF (pin 22)
PC7
R11
(pin 23)
P MOSFET
Icharge C11 Motor control peripheral PWM
Battery
Idischarge
R8
Current read (pin 21)
MUX N MOSFET
(T6 & T7)
Uout
OPAMP Gain: 9.2
Usense
100m Ω
The ST7MC functions at maximum speed, while an internal PLL doubles the frequency and filters the 8-MHz signal from the quartz crystal. The PWM frequency controlling the charge and discharge circuit has been set at 50 kHz, thus reducing the size of coil L1 and the noise pollution (slim chances your ears are still sensitive enough to hear it!). We can divide the diagram (Figure 3) into three distinct parts: one charge circuit, one discharge circuit and the control logic (on the left) that goes along with the rest. The charge circuit is a traditional Buck converter, based on T1, L1, D2 and the connected charge (i.e., battery). The PWM control signal comes from pin 42 (MCO0= Motor Control Output Zero) and is applied to a level shifter handling the conversion from TTL level to the power supply (typically +12 V). The converter is based around MOSFET T4 and push-pull circuit T2/T3. Schottky-type diode D1, in parallel with resistor R1, enablles a slow activation (ON) of power MOSFET T1 (under 56 ohms), and a fast de-activation (OFF) (using the low on resistance of the biased diode). L1 comes at the end to ‘smooth out’
MCO1 (pin 43) R
100m Ω
eliminate any expensive Hall-effect transducers.
C10
050073 - 11
Figure 1. Simplified diagram of the ST7MC-based current loop.
the charge current injected into the battery. The discharger section of the circuit is organized around a very traditional N-channel MOSFET type IRF640N, T5; the latter may be replaced by any other equivalent transistor, the most important characteristic being the thermal
resistance (it dissipates lots of heat during the discharge phase!). The PWM control signal (pin 43, MCO1) is filtered with the help of the R8/C10 network. Then we have direct current again on the T5 grid, which works well in linear mode. This may seem atypical at first sight, but it is very efficient in
25
HANDS-ON BATTERY CHARGER
+5V
R15
+5V
2k
R26 10k E
5
R/S
D6
7
D5
10
9
D7
12
11
14
13
8
E
39
R/W
38
R/S
37
D4
29
D5
30
D6
31
D7
32 16 17 20 21 18 4 23
+5V 5k
R11 1 9k1
R17
2 3 22
R3 2k2
R19 10k
6k8
330n
R2
10
R27
R20
330n
R18
C2
8
24
27
VDD
VAREF
VDD
PE2
PA3/AIN0
PE1
RESET
IC1
16V
PB2
PD3/AIN13
PB3
PB5/AIN3
PB4
IRF9Z24N L1
R4
42 43
BC807-40
FDV301N
D2
5A
K1 B520C
13
16V
T5
14 15
16V
R8
PB6
200k
PC3/OAN
PD5
AIN6/OAZ
PD4/AIN14
BATTERY
MUX1
34 33
IRF640N
+5V
PB7/AIN4
ST7FMC2S4
MCES
11
PB0
PC7
MCO2
MCO5
PD6
PC4/MCCREF
PD7
VSS
VSSA
7
25
OSC1
OSC2
5
R10
R9
40
PE3
MCO4
MUX0
19
PC2/OAP
MCO3
Current reference
R12
R13
2W
2W
1k
C4
C11
C6
470n
10n
330n
33p
FDV301N
LM335
26
FDV301N
T6
C7
R16 1k
33p
PWM FAN
+12V
t
K3 R22
+5V
100n 1 2
+12V
3 C15
A0
IC3
A1 A2
C17
SDA
T10
6
SCL
FAN T9
R24
R25
7
WC
270 Ω
T8
M24C02
C16
BD138
FDV301N
BUZZER
4
16V
1N4001
5
t 16V
C14
16V
BZ1
8
+5V
K2
0
4k7
IC4 78L05
D3
R21
C2
PWM output (MCO0 0r MCO1)
SCL
SDA
+5V
+12V
2W
T7
36
t
Motor control peripheral clock
2W
IC2
35
VSS
6
8MHz
R7
100n
R23 C13
R6
C10
44
X1
I (battery)
C5
C3
12
PB1
PD2/AIN12
T3
R5
28
MCO1
PD1
T4
9
MCO0
PD0/AIN11
100n
T1
R1 41
VPP
PA5/AIN1
PE0
C1
D1
BAT54
4k7
3
6
T2
2k
1
4
D4
C8
6k2
2 R/W
+12V BC817-40
C9
4k7
10k
K4
1k
R28
8k2
R14
16V
FDV301N 050073 - 13
050073 - 12
26
+5V
+5V K1 +5V
2
1
R/W
4
3
D4
6
5 R/S
D6
8
7
D5
10
9
D7
12
11
14
13
E
DATA+
S2
D7
D5
D4
E
R/W
R/S
+5V S1
D6
K2
D1
R1 S3
C1
C2
100n
100n 10k
FUNC+
R2
DATA– R3
B–
B+
D7
10 11 12 13 14 15 16
D6
9
D5
8
D4
7
D3
6
D2
5
D1
4
D0
3
E
2
R/W
LCD1
RS
1
S4
CST
FUNC–
VCC
the end in order to simulate a variable resistor. As long as the current level detected at the terminals of resistors R12/R13 is not affected, the voltage on the grid will increase. Inversely, exceeding the current level will cause it to decrease. For that, implementing a pi-type closed-loop control was necessary to manage the input current set point. As previously noted, MOSFET T5 will be responsible for continuously dissipating heat during the discharge phase. Despite the fact that its cooling will be assisted by a fan, a 12-V battery with 4 amperes capacity will produce, for example, 48 W to be dissipated. Therefore, the circuit must be able to ‘breathe’ and the IC2 temperature sensor must be mounted as close as possible to the MOSFET. The circuit has been tested up to 80 watts (16 V, 5 A) without mishap, and an automatic cut-off has been planned, in case of overheating. One last point: the circuit allows the discharge of any battery with a maximum voltage equal to the project’s own supply voltage. In case of a battery voltage that’s in excess of the supply voltage, the current will be drained off to the power supply by the intrinsic diode of the P-channel MOSFET (T1), a situa-
Figure 3. Circuit diagram of the electronics on the main board.
VSS
Figure 2. Effect of the current readout on the PWM output of the micro.
6k8
PWM ON
6k8
PWM OFF
LC DISPLAY 2 x 16
050073 - 14
Figure 4. Electronics for the display (LCD) and the 4-button control sub-unit.
elektor electronics - 4/2007
Principles and measurements Whether referring to LiPo or Li-Ion, the principle for recharging) is the same: constant voltage and limited current intensity. This may seems simple at first if this type of battery was not very squeamish about two things: one, it cannot withstand overcharging, however slight; and second, the level of voltage is to be respected absolutely or else charging will be interrupted. Then nominal voltage of the current generation of LiPo and Li-Ion batteries is stated as 3.7 V. A charging voltage of 4.1 V per element was adopted by the author. The author happily proceeded with a few measurements and logged them in an Excel file. The curves clearly illustrate the process of charging and discharging. We can see the versatility of “Cube” which can accommodate a NiCd pack with 8 cells (Figure a) as well as an LiPo battery composed of two cells (Figure b). Rarely has the fundamental difference between NiMH and LiPo battery charging been so clearly illustrated. For users of Li-Ion cells, the bracket of end of charge stabilisation is set at 8.2 V (2 x 4.1 V, corresponding to the maximum cell voltage recommended by the manufacturers). 16
end-of-charge detection by voltage drop (delta-peak)
14
programmed discharge; start at 1 A, finish at 350 mA
battery voltage [V]
12 10 8 6
brief discharging pulses (every 5 seconds) to prevent any risk of memory effect in battery 1.125 * threshold voltage; progressive decrease of discharge current programmed threshold voltage: 6.8 V
4
charge at 1.2 A
3-minute delay before charging
2 0
30 minutes
1 hour
time [15 mins]
050073 - A
Figure a. Oscillograms taken during a discharge/charge cycle of a NiCd battery (8 cells, 1,300 mAh)
9
stabilisation stretch at 8.4 V and end-of-charge detection if current equals 0.1 * programmed current (130 mA).
1.125 * threshold voltage; progressive decrease of discharge current
8
battery voltage [V]
7 6 5
programmed threshold voltage: 5.7 V charge at 1.3 A
4
3-minute delay before charging
3 2
programmed discharge; start at 5 A, finish at 500 mA
1 0
30 minutes
\1 hour
time [15 mins] 050073 - B
Figure b. Oscillograms taken during a discharge/charge cycle of a LiPo battery (2 cells, 1,400 mAh).
4/2007 - elektor electronics
tion which should be avoided! Finally, the rest of the circuit makes it possible to control different external parameters. An I C EEPROM, IC3, is included with 256 bytes storage space. A type 24C02 will work perfectly (24C04, 24C08, ...remaining compatible). The latter makes it possible to store data, such as the name of the batteries (or miniature models for our hobbyist friends), as well as the charge and discharge currents selected, the type of battery (NiMH, LiPo), etc. Transistors T6 and T7 allow for the multiplexing function to be executed, which is necessary to sample the charge or discharge intensities. The layout retains the use of distinct shunt resistors in order to detect the charge (R6 & R7) and discharge (R12 & R13) current. If we had only kept one of the two shunts, it would have been necessary to read the positive and negative voltage levels on the latter (since the current circulates in both directions, depending on whether we are supplying or draining the battery). Of course, we could have done without a multiplexer (which costs practically nothing in this case), but we would have had to add an external operational amplifier (set up as an inverter) and a DC/DC converter in order to be able to work in negative voltage range. Moreover, the use of small MOSFETS (functioning as switches, here) is largely adequate. For example, during discharging, T6 is on and T7, off. Whatever the discharge current, the voltage gap between the source and grid will be too low to turn back to on or to interfere with the measurement taken with T6. The voltage level of the battery is evaluated by the resistive divider R15/R14/R18. Temperature control is handled by the venerable sensor LM335 (IC2) connected to the 10-bit ADC input on the microcontroller. Depending on the amount of heat to be dissipated, we will find a PWM signal on pin 40 (PE3) applied to the T10 grid for which the drain will supply an RC filter (R22/R24/C16) connected to the base of T9, configured as an emitter-follower. It results in an output (T9 emitter) of nearly continuous voltage: the simplicity of the project results in a few compromises in terms of residual ripple, but is more than adequate to permit control of a small external PC-type fan (12 V). In addition, it is useless to spend a lot for the radiator and fan unit, you just have to find it in the computer ‘flea market’
27
HANDS-ON BATTERY CHARGER
CONSTRUCTION
Resistors (SMA case shape 0805 except unless indicated differently) R1 = 200Ω R2 = 1kΩ R3 = 2kΩ2 R4,R10,R21 = 4kΩ7 R5,R25 = 270Ω R6,R7R12,R13 = 0Ω2 2W (not SMA) R8 = 200kΩ R9 = 2kΩ R11 = 9kΩ1 R14= 8kΩ2 R15 = 2kΩ preset R16,R23 = 1kΩ R17 = 5kΩ preset R18 = 6kΩ2 R19,R26,R28 = 10kΩ R20 = 6kΩ8 R22,R27 = 470Ω R24 = 82Ω Capacitors C1 = 220μF 16V radial (low profile) C2,C10,C12 = 100nF C3,C5 = 2200μF 16V radial (low profile) C4 = 10nF C6,C7 = 33pF C8,C9,C11 = 330nF C13 = 470nF C14 à C17 = 22μF 16V
Inductor L1 = 4μH 5A Semiconductors D1 = BAT54 D2 = B520C D3 = 1N4001 T1 = IRF9Z24N T2 = BC817-40 T3 = BC807-40 T4,T6,T7,T8,T10 = FDV301N T5 = IRF640N T9 = BD138 IC1 = ST7FMC2S4, programmed, order code 050073-41 (SMA device; STMicroelectronics) IC2 = LM335 (National Semiconductor) IC3 = M24C02 (SMA device) IC4 = 78L05 Miscellaneous X1 = 8MHz quartz crystal K2 = 2-way SIL pinheader, lead pitch 0.1 inch K3 = 3-way connector for PC CPU fan K4 = 14-way boxheader or pinheader Bz1 = piezo ceramic resonator (buzzer) Heatsink and fan for T1 & T5 PCB, ref. 050073-1 +
28
main board # 050073-1
+
+
This setup has two boards, the main board with the processor and the board for the control units and the LCD display. Nothing too difficult, the doublesided boards for this setup are easily made using simple UV exposure and transparencies made on the printer (you have my word!). For those who do not have access to boards with metallized holes (order code 050073-1 /-2, available from the usual sources), it is best to place the through-hole contacts using wire-wrap wire, for example (you will also have to solder some of the pins like those of the K4 base on each side of the printed circuit), then install the resistors, capacitors and SMA integrated circuits, to finish with the largest components (connectors, 2-W resistors, electrolyticl capacitors, etc.). Also note that Schottky diode D2 will need to be soldered ‘in the air’, between the circuit ground and the T1 drain. The latter may be replaced by any (near-) equivalent with the same package (DO-201). We will assume that you will use two ready-made boards (Figure 5) to avoid any problems All components, except the two power transistors T1 and T5, are mounted on the component side of the board (see the photo of our prototype in Figure 6). As far as power transistors T1 and T5 are concerned, it is best to orient them so that their metal tabs are turned toward the centre of the board; then you must fold their pins to an angle of 90 degrees and thread them through the holes in the printed circuit, without soldering them right away. Next, we will attach the radiator to the circuit (held in place by a screw and clamp), and we will mark the points for drilling the attachment holes for T1, T5, as well as the one to be used to mount the temperature sensor LM335 (IC2), to be positioned as close as possible to N-channel MOS-
COMPONENTS LIST
+
for a few pence, or salvage the whole thing from an old PC motherboard. Buzzer Bz1 will indicate the end of the discharge and/or charge process, loud enough to wake you up if you are asleep! One last point: LCD display control is established with the help of a connection over 7 wires (4-bit mode), used to limit the size of the flatcable connected between the boards. See Figure 4 for the diagram of this part of the project.
Figure 5. Copper track layout and component mounting plan of the two boards required to make the multi-purpose charger.
FET (thermal coupling demands!). This sensor will be held in place with a simple clamp. Finally, we can solder T1 and T5. Next, drill all the necessary holes, attach the radiator to the circuit again, without forgetting to first add a bit of thermal paste on T1, T5 and IC2. You should also solder a few centimetres of flexible cable to IC2 in order to connect
to the three points identified (IC2) on the printed circuit. Finish by connecting the LCD board using a piece of flatcable. If you have an LCD display with an LED backlight, you should create a solder point on K2 (double solder island) on the LCD board, to allow the +5 V supply to be carried. Note: this will result in an additional power consumption of
elektor electronics - 4/2007
COMPONENTS LIST Display board # 050073-2 Resistors R1 = 10k Ω potentiometer R2,R3 = 6kΩ8 Capacitors C1,C2 = 100nF Semiconductors D1 = LED
Miscellaneous S1-S4 = ‘Digitast’ pushbutton with make contact K1 = 14-way boxheader or pinheader K2 = double solder point LCD1 = general purpose LCD, 2x16 characters PCB, ref 050073-2
Figure 6. One of the charger/discharger prototypes built to validate the concept.
Technical characteristics Charger Input voltage: 11 to 16 V Charge current: adjustable from 200 mA to 4.5 A Supported batteries: from 1 to 8 NiMH or NiCd cells, 2 LiPo or Li-Ion cells ‘Reflex’ type charge for NiMH/NiCd batteries; continuous for LiPo/Li-Ion batteries Detection of end of charge: automatic (‘delta-peak’ with adjustable sensibility)
Discharger Discharge current: adjustable from 200 mA to 5 A with programmable voltage threshold
Capacity meter 14 models, with memory Regulated fan and thermal protection
at least 200 mA. Therefore, you must replace the 78L05 (5-V regulator) with a more robust model (likew the good old 7805), possibly with a small heatsink attached. The LCD display will be mounted on the control board and is attached using its connector. Since the attachment points depend on the type of display used, we did not plan them. It is easy to drill a pair of holes in the
4/2007 - elektor electronics
board, considering that there are no signals in that spot.
CALIBRATION AND UTILISATION For the first start-up, we recommend to not to connect the setup directly to a 12-V car battery; it is preferable to use a current-protected lab power supply! If there is a short-circuit on the board,
the setup will be very grateful. The circuit should consume about 20 mA with no load (without backlighting). If the LCD is not detected (problem with connections, soldering, etc.), the buzzer will beep at regular intervals. Before using it, you should calibrate the circuit. The setup should be supplied with 12 to 16 V (car battery, for example), and we will have a DC 5 to 9 V power supply capable of delivering at least 2 A (with an adjustable power supply, we will adjust the output to about 8.40 V, if possible, which corresponds to the voltage of two LiPo cells at the end of the charging process). As soon as it is connected to ground, you will simultaneously press the FUNC+ and FUNC– keys until an initial menu ‘Calibration #1’ appears (voltage calibration). Then connect the power supply to output BATT+ and BATT– of the setup (beware of inverted polarities!) and connect a multimeter in parallel (an accurate one...) in DC mode. Then turn potentiometer R15 until the same value is displayed on the LCD and on the multimeter. With the circuit adjusted, disconnect the multimeter and configure it as a DC ammeter (it should be able to withstand a current of at least 2 A). Then connect it in series with the DC power supply, all of it still connected to out-
29
HANDS-ON BATTERY CHARGER
A few words about the firmware All of it was written in C using the free version of IDE (Integrated Development Environment), available at SOFTEC (www.softecmicro.com) and with the COSMIC compiler (www.cosmic-software.com). Also a free version and limited to 16 kB of the C compiler, it allows you to practice on the entire line of ST micr ill not cost a lot (available at SOFTEC, http://www.softecmicro.com/products.html?type=det ail&title=inDART-STX%2FD or else at RAISONANCE, http://www. raisonance.com/products/ST7. php#hardware). Those interested can download the source code from the ELEKTOR website; all you need to do is install the SOFTEC development environment and open the dedicated configuration file. You will then be able to make any modifications and re-program the ST7MC at will (long live Flash memory!).
puts BATT+ and BATT–. Holding down any button will get you to the second menu, this time for current calibration. Here all you need to do is adjust R17 until you see the same current value (about 2 A) on the LCD screen and the multimeter. Once this last operation is completed, you can disconnect all power supplies. The interface for adjusting the various parameters is very easy to use. As soon as it is powered up, a welcome message is displayed, then you enter the main screen. The FUNC+ and FUNCkeys allow us to navigate between the different parameters, and the DATA+ and DATA– keys simply let you change those values. We can navigate to our heart’s content among the 14 batteries that can be memorised and adjusted independently: – Battery name. – Sensitivity of the delta-peak )CP) for the NiMH/NiCd batteries (at least for the most sensitive: ‘L’ for low, 1, 2, or ‘H’ for high). Strive to use high sensitivity for batteries with a low number of cells, so there is a smaller drop in voltage at the end of the charge (approximately from 5 to 15 mV per element). – Maximum time allocated for recharging, in order to avoid overcharging a battery (frequent when defective) if the end of charge is not detected. – Current values at the start and the end of discharge, in 50 and 100 mA increments. A closed-loop control is used to handle the process automatically (you may, for example, begin discharging at 3 A and end at 200 mA). The discharge process may be cancelled in order to only do one charge operation. – Charge current value in 50 and 100 mA steps (this process may also be cancelled in order to only do one discharge operation). – Batter y type (NiMH/NiCd or LiPo/Li-Ion). – Battery voltage at which the discharge process must be cut-off (Vcutoff).
user may carry out many experiments, for example, by changing the beginning and end of discharge parameters or increasing or decreasing the ‘deltapeak’ sensitivity. Finally, you can, at any time, interrupt the discharge and/ or charge process by holding down any button.
TWO FINAL POINTS TO HIGHLIGHT Be sure to use properly-sized cables capable of carrying the anticipated currents! Also, if necessary, add dedicated cables and plugs. In order to charge the NiMH/NiCd accumulators with seven or eight cells, you will need at least 13 to 15 volts to power the circuit. This is justified during the charge by a voltage level that can exceed 1.5 V for each of the NiMH/NiCd cells (8 elements times 1.5 V = 12 V on the battery), as well as by the internal resistor causing a noticeable drop in voltage, especially at high current levels. If you observe a current charge setpoint that is lower than the one you have selected, raise the power supply voltage level of the setup! (050073-I)
Internet Links Product sheet features for the ST7MC2S4: http://www.st.com/stonline/products/ literature/ds/9721/st7mc2s4.pdf Application note for the ST7MC: http://www.st.com/stonline/books/ pdf/docs/10267.pdf More information about charging LiPo and Li-Ion batteries: http://www.ni-cd.net/accusphp/theorie/charge/liion.php
Once your parameters have been adjusted (and automatically memorised in the EEPROM), you only have to launch the discharge and/or (re)charge operations by holding down the FUNC+ or FUNC– button. During the battery discharge process, the capacity will be displayed as well as the voltage level. A ‘full’ battery of 1 Ah discharged at 500 mA should therefore display a capacity of approximately 1,000 mA after two hours. The
30
elektor electronics - 4/2007
Paltronix Limited
www.paltronix.com
Microcontroller Development Tools PICmicro Starter Pack now with ICD—still £99
PICmicro BASIC, C and Pascal Compilers—from £59.50
• High-quality development board • • •
• Easy to use with user-friendly IDE. • Features simulator and mikroICD
with on-board USB programmer and built-in I/O devices. Supports 8, 14, 18, 20, 28 and 40pin PICs in 10F, 12F, 16F and 18F families. Now features mikroICD in-circuit debugger. Supplied with PIC16F877A.
The new EasyPIC4 development board now supports even more PICs including 8, 14, 18, 20, 28 and 40-pin devices from the 10F, 12F, 16F and 18F families. With its on-board USB programmer, mikroICD incircuit debugger and useful I/O devices, the EasyPIC4 must be the best-value development board on the market. Our Starter Pack includes the EasyPIC4 board, USB cable, 16x2 LCD, 128x64 GLCD, DS1820 temperature sensor and a starter’s guide with example programs in assembly language, BASIC, C and Pascal.
in-circuit debugger.
• Plentiful ready-written routines and example programs.
• 30% discount for customers purchasing EasyPIC4/BIGPIC4 development boards. MikroElektronika’s popular mikroBASIC, mikroC and mikroPascal compilers now include the mikroICD in-circuit debugger for use with the EasyPIC4 and BIGPIC4 development boards—programs can now be executed on a target PIC with variable values, special function registers, memory and EEPROM viewed on the PC screen. Great value at £85 each for mikroBASIC/mikroPascal and £145 for mikroC, or when bought with an EasyPIC4/BIGPIC4 only £59.50 each for mikroBASIC/mikroPascal, and £101.50 for mikroC.
We also stock development tools for 8051, ARM, AVR, dsPIC, PICmicro, PSoC and other devices—please see our website for details
Educational Products PICmicro Microcontroller Training System—£99
Digital Logic Training System—£99
• Ideal for learning about and experi-
• Teaches both assembly language
menting with digital logic devices.
programming and interfacing. Based on the popular PIC16F877A.
• Built-in logic and pulse switches,
• • Includes USB programmer. • Features built-in I/O devices and solderless breadboard.
•
• Supplied with tutorial and program examples. The PICmicro Microcontroller Training System is an ideal platform for students and hobbyists alike to learn about PIC microcontrollers. The experiment board features a range of built-in I/O devices and a solderless breadboard on which experiments may be conducted. Circuits are connected using the provided jumper wires. A USB programmer is also supplied and connects to the experiment board to program the PIC. Also included are a mains power adapter, 16x2 character LCD, connecting leads and a tutorial with example programs.
LEDs, 7-segment displays, piezo speaker, pulse generator, logic probe and solderless breadboard. Supplied with useful range of ICs, jumper wire and mains adapter.
The Digital Logic Training System makes learning about digital logic and experimenting with discrete logic ICs easy. The experiment board features a range of built-in I/O devices and a solderless breadboard on which experiments may be conducted. Circuits are connected using the provided jumper wires and the system includes features such as a power supply, pulse generator and logic probe. Also included is a mains power adapter, selection of ICs and a tutorial with example circuits.
We also stock other trainers, circuit labs and solderless breadboards—please see our website for details
Robots and Accessories Robo-BOX 3.0 Robot Kit—£99
Test Equipment PoScope USB Oscilloscope/Logic Analyser—only £99
• Low-cost PC-based instrument
• Complete robot kit including con• •
troller, programming software and all mechanical parts. Build different robot configurations from one kit, including wheel-based and track-based. Program intelligence to follow light, detect collisions and trace lines.
Learn about, experiment and have fun with robotics with Robo-BOX 3.0—an incredibly easy-to-build yet adaptable and expandable robot. Various wheel-based and track-based robots can be built from the standard kit including light-following, collision-detecting and linetracing models. Programming is carried out in graphical Logo. A range of low-cost options allow for easy expansion and the development of more sophisticated robots. We also stock similar robot kits based on PICmicro, 8051 and 68HC11 microcontrollers.
Tel: 0845 226 9451
• •
PoScope has to be one of the best-value pieces of test equipment available and features a dual channel oscilloscope (100Hz to 200kHz sample rate), 16 channel logic analyser (1kHz to 8MHz sample rate), and 8-channel pattern generator (1kHz to 1MHz). What makes the PoScope really useful to those working with microcontrollers is its ability to decode serial communications including RS-232, I2C, SPI and 1-wire. Priced at only £99, the PoScope comes with a USB cable, logic analyser test lead set, two oscilloscope probes and software.
Fax: 0845 226 9452
All prices exclude UK delivery (£5 standard/£10 next-day) and VAT.
featuring oscilloscope, spectrum analyser, logic analyser, pattern generator, and chart recorder. Decodes serial buses including UART, SPI, I2C and 1-wire. Supplied with logic analyser test lead set, two oscilloscope probes, USB cable and software.
Email: [email protected]
Major credit and debit cards accepted.
Secure online ordering.
HANDS-ON MINI PROJECT
Simple
Solar Cell Charger
Avoids overcharging of NiCad-batteries Luc Lemmens
Small solar cells can be obtained very cheaply these days — or you could remove them from an old solar powered garden light. It would be nice to use them, but for what? With a handful of parts you could use such a solar panel to safely charge a set of batteries.
In In theory you could just connect a solar panel via a Schottky diode to several batteries connected in series. The internal resistance of a small solar panel is sufficiently large to limit the charging current to a safe value. But with such a simple circuit it would still be possible to overcharge the batteries. That’s why we’ve put together a little charging circuit that avoids this (Figure 1).
OPERATION There’s not much to the circuit: it consists of just two transistors and a few passive components. The way it works is very straightforward. The voltage across the batteries is continuously monitored. When this voltage rises above a certain level (meaning that the batteries are fully charged), a power resistor is switched in parallel with the solar panel, which causes
32
output voltage of the panel to drop and stops the batteries from being charged any further. The voltage is monitored by the circuit around T2. Zener diode D2 puts the emitter of T2 at an offset of about 1.4 V. Potential divider R3, P1 and R6 supplies the base voltage to T2. When this rises above roughly 2 V (1.4 V plus the base-emitter drop of T2) the transistor starts conducting. This pulls the base of T1 lower via R5, which also causes T1 to conduct. The current from the solar panel is then diverted through power resistor R7 (10 Ω, a 1 W type is usually sufficient). This causes the voltage of the panel to drop, stopping the charging process of the batteries. Depending on the tolerance of the components in the potential divider, T2 and D2, you’ll have to experiment a bit with the setting of preset P1 to obtain the correct final voltage for the NiCad bat-
elektor - 4/2007
CONSTRUCTION
Schottky diode D1, the nominal module voltage should exceed the charge voltage set on P1 by about 0.3–0.4 V. A typical (inexpensive) solar module (array) to charge two cells consists of eight series connected solar cells. With a sufficient amount of sunshine such a module will supply about 140 mA at 8 times 0.45 V = 3.6 V. Of course, you can use larger modules with a higher nominal current capacity in order to reduce the charger time — this will be a matter of cost. With the 140mA module, for example, a totally flat 1400-mAh battery (pack) will require 12 to 14 hours worth of uninterrupted sunshine (rare in the UK). There is one thing you may have to watch out for during the construction: a zener diode of 1.4 V often consists of two normal diodes connected in series. This pseudo-zener should be connected in forward bias, not reverse biased like a true zener. The cathode (the connection with the ring) has to be connected to ground in this case!
Since the circuit consists of relatively few components it can easily be built on a piece of experimenter’s board (as the photo of our prototype shows). If you use screw terminals for the input and output connectors it will be easier to connect the leads from the solar panel and the batteries to the board. The nominal voltage of the solar module is determined by the number of cells to be charged. Because of the typical voltage drop of 0.3 to 0.4 V across
The setting of the final charging voltage is best done by temporarily replacing the batteries with an adjustable DC power supply. Its output should be set to exactly 2.88 V. Connect a voltmeter across power resistor R7. Then place the solar panel in bright sunlight. Set the preset to the maximum resistance. Now slowly turn the preset back until the voltmeter suddenly shows a voltage of a few volts, indicating that T1 is conducting. The adjustment is now complete and you can disconnect the power supply and replace it with the batteries again (060315)
D1
BAT86
T1
R3 22k
R2 8k2
8k2
R1
BT1
P1 R5
K1
K2
10k T2 10k
BC328
BT2
BC548B D2
R6 100k
R7 10
teries. The accepted value for a fully charged battery is usually taken to be 1.44 V. In this case (for two batteries connected in series) the circuit has to be adjusted such that T2 starts conducting when the voltage across K2 reaches 2.88 V. If you want to charge more than two batteries at a time you only need to modify the potential divider. Simply increasing the value of R3 will make the circuit work with three or four batteries connected in series.
1V4 060315 - 11
Figure 1. The circuit consists of only two transistors, two diodes, a preset and six resistors.
4/2007 - elektor
33
TECHNOLOGY BATTERIES
Tough and Powerful High power nanophosphate batteries under test Ludwig Retzbach
Lithium-based chemistries have for some time been showing the most promise of all battery technologies. Although they offer an unsurpassed energy density they are difficult and expensive to manufacture and require careful handling and gentle charging. Things could be about to change with the introduction of nanotechnology into the manufacture of the cathode. The author tested some of the first examples of these new Li-ion units for Elektor Electronics, with results varying from the merely respectable to the sensational!
LiPo (lithium polymer electrolyte) batteries have been used at high discharge currents by model aircraft builders for years [1]. The energy density (in Wh/kg) and power density (in W/kg) are such important factors that compromises are made in reliability and service life which would not be acceptable in industrial applications such as power tools or hybrid cars. Here other technologies, such as NiCd, NiMH and even lead-acid (for example ordinary car batteries) are still used. The American manufacturer A123 Systems has been mass-producing a new type of nanotechnology-based high-load cell in Asia since 2006. These lithium cells appear to combine the advantages of traditional lithium cells with those using nickel-based chemistries, without suffering from the disadvantages of either. According to the manufacturer’s information (see Table) the batteries are practically ideal, offering the following benefits: - safety (nonflammable, no protection circuitry required); - robustness (high cycle life, simple charging procedure); - withstands high loads and rapid charging; - constant discharge voltage (flat discharge curve); - high cell voltage and low self-discharge (compared to NiMH and NiCd cells); - high power and energy density. The price is already comparable to that of similar LiPo cells and will surely drop significantly as production quantities increase to satisfy industrial demand. It almost sounds too good to be true: and so we were naturally keen to find out how well the cells perform under test.
34
elektor electronics - 4/2007
ANR26650M1 Specifications
LESS IS MORE? The text box ‘A little physics and chemistry’ discusses the construction and special features of the new cell design, called ‘nanophosphate’ by the manufacturer after the iron phosphate (FePO4) cathode. The first device in the series to be available, ‘ANR26650M1’ to give it its full part number, is a convenient cylindrical cell 26 mm in diameter and 65 mm in length. Traditional Li-ion cells have a nominal voltage of 3.6 V and a charge voltage of 4.1 V, although some manufacturers quote 3.7 V and 4.2 V respectively. Here we see the first difference: the new cells have a nominal voltage of 3.3 V and a charge voltage limited to 3.6 V. The nominal capacity of 2.3 Ah is nothing special when compared to the 2.5 Ah or 2.6 Ah offered by ordinary Liion cells. More notable is the difference in weight: where a similar Sony or Panasonic Li-ion cell might weigh 88 g or 93 g, the A123 M1 cell weighs just 70 g. A reason for this is that the casing of the cell is made from aluminium (Figure 1) rather than sheet steel. This also has the advantage of improving heat conduction from the cell. Breaking with tradition the casing forms the positive terminal of the cell, with a thin layer of ferromagnetic material (presumably nickel) forming the actual contacts. For testing a pair of cells with welded-on connections (Figure 2) was made available to us. Unless otherwise stated, voltage values given below refer to a series connection of two cells.
FIRST IMPRESSIONS To verify the specifications given in the data sheet it is necessary to approach the maximum permissible values carefully to avoid premature damage to the battery. The characteristics of the battery did indeed change: with each charge/discharge cycle we measured a decrease in capacity of approximately 1 mAh, or around 0.05 % of the nominal capacity C. To begin, we tried charging at 1 C (2.3 A) and discharging at 4 C (9.2 A). The cell temperature remained practically unchanged during charging; during discharge, the temperature rose from 21 °C to 31 °C. The 10 C (23 A) discharge test also went smoothly, with the cell temperature rising to 49 °C. With discharge down to 4 V (measured under load) the battery delivered a mean discharge voltage (Um) of 5.68 V, or 2.84 V per cell. The calculated energy density was 94 Wh/kg. The Sony 26650VT cell, which is the same size, gives a rather higher mean voltage of 3.24 V at 10 C discharge. The energy density is slightly but measurably lower than the FePO4 cell at 89 Wh/kg. This difference can be ascribed to the lower cell weight. However, the new cell falls well short of the performance of the LiPo cells (Figure 3) widely used in modelling circles: these commonly have mean discharge voltages of 3.5 V and above at 10 C. The energy density of high-current LiPo cells is typically between 120 Wh/kg and 170 Wh/kg.
4/2007 - elektor electronics
Nominal capacity and voltage:
2,3 Ah, 3,3 V
Internal impedance (at 1 kHz)
8 mΩ typical
Internal DC resistance (10 A, 1 s)
10 mΩ typical
Recommended standard charge rate
3 A to 3.6 V (CCCV), 45 min
Recommended fast charge rate
10 A to 3.6 V (CCCV), 15 min
Maximum continuous discharge current
70 A (approximately 30 C)
Pulse discharge current (10 s
120 A (approximately 50 C)
Recommended charge/discharge cutoff voltages at 25 °C 3,6 V/2 V Recommended charge/discharge cutoff voltages at below 0 °C Cycle life at 10 C discharge, 100 % discharge depth
4,2 V/0,5 V More than 1000 cycles
Operating temperature range
–30 °C to +60 °C
Storage temperature range
–50 °C to +60 °C
Abmessungen (aLänge/Durchmesser)
65 mm/26 mm
Weight (without connections)
70 g
Residual capacity after 1000 cycles at 100 % discharge depth (at 25 °C, 2.3 A charge and discharge current; at 45 °C, 3 A charge and 5 A discharge current; at 60 °C, 3 A charge and 5 A discharge current)
95 % 88 % 77 %
(Source: A123 Systems)
Figure 1. Individual Li-ion FePO4 cells (only available as samples), and welded together to form battery packs.
Figure 2. Eight-point spot welding guarantees low contact resistance.
Figure 3. Only LiPo cells in a foil envelope can offer a higher energy density.
35
TECHNOLOGY BATTERIES
For our next test we fully charged the cells at 1 C and then cooled them to –8 °C. The subsequent discharge at 10 C took place at room temperature (23 °C): before the measurement the surface temperature of the cells had risen to 9 °C, although the internal temperature (unfortunately impossible to measure directly) would have been considerably lower. Figure 4 shows very clearly, however, that the terminal voltage of the cooled cells initially fell very sharply and then, as the internal temperature increased, returned to the same level as if the experiment had been started with the cells at room temperature. The difference in the final temperature of the cells (47 °C versus 49 °C) is surprisingly low. One explanation is the temperature dependence of the internal resistance of the cells: considerably more power is dissipated internally when the cells are at a lower temperature. The next test involved increasing the discharge current to 15 C (34.5 A). Again the cells delivered more than their nominal capacity with their temperature rising from 23 °C to 53 °C. Now to try to push the cells to their limits!
8.0
two cells type ANR26650 M1: 10 C discharge (23 A)
discharge voltage [V]
7.0
6.0
discharge voltage at 23 °C initial temperature
FAST CHARGING
end temperature 49 °C
5.0
discharge voltage at 9 °C initial temperature
end temperature 47 °C
4.0
3.0 0
50
100
150
200
250
discharge time [s]
300
350
400
070019 - 11
Figure 4. Effect of temperature: the voltage of the cooled cell falls initially and increases again as the cell warms up.
CURRENT FUN The experimental setup is shown in Figure 5. A very low resistance circuit is used to measure the peak current levels. The total resistance in the circuit is made up of contributions from the 1 mΩ shunt, the built-in shunt in the 100 A current sink and other resistances associated with it (the cable resistances and the contact resistances in the MPX connector). Together these were so great that it was not possible to discharge a single cell at more than 65 A. We therefore carried out the high current measurements using two cells in series as before: this meant we could also use a pair of multimeters to measure voltage matching between the cells. At the cell’s quoted peak current of 120 A the current sink we used would have been overloaded, so we restricted our experiments somewhat. The temperature rises we observed at 15 C discharge had in any case indicated that it would not be appropriate to test the cells together at their specified continuous discharge rate of 30 C (70 amps). Experts agree that a cell surface temperature of 65 °C during
36
discharge is the maximum allowable for safety. We therefore tested using the following discharge regime: 16 s discharge at 69 A (30 C) followed by alternating ‘recovery’ periods of 11.5 A (5 C) lasting 30 s, and 10 s pulses at 69 A. Discharge was terminated when the minimum discharge voltage or maximum temperature was reached, whichever was earlier. The results are shown in Figure 6. The terminal voltage fell rapidly during the high load periods, indicating that the lithium ions inside the cell are not able to move quickly enough. However, the cell clearly recovers quickly during the low-load periods. Although the voltage gradually decreases overall as the cell is discharged, the drops caused by the higher load becomes significantly less sharp as the cell temperature rises. This shows the dependence on temperature of the internal resistance of the cell. When half discharged we measured an internal resistance to DC of approximately 11 mΩ (the data sheet quotes a typical value of 10 mΩ). By the time discharge was complete, the cell temperature had risen to 63 °C. This leaves very little margin for safety without additional cooling for the cells, and so we did not carry out further tests using longer high-load pulses. In this test the battery delivered 2320 mAh: again, more than the nominal capacity. Matching between the cells was impressive, with a difference between the cell voltages of at most 10 mV over the whole test. We stopped the discharge at full load when the terminal voltage reached 1 V per cell. One minute later the opencircuit voltage of each cell had recovered to 2.74 V.
We carried out fast charging experiments at 4 C (9.2 A) without an electronic balancer; we did, however, continuously monitor the individual cell voltages. As with leadacid batteries, it is only possible to set the initial charging current because the maximum voltage supplied by the charger (Figure 7) must be limited, and after the cell voltage rises to a certain level the charge current starts to be reduced (constant current/constant voltage charging). This happens in this case after about 10 minutes, a time slightly shortened by the effect of the shunt in the meter. After 20 minutes the cell is charged to more than 97 % of its nominal capacity and the charge current has fallen to 0.5 A. A fast charger would then report the cells as ‘full’. Over the fast charging process the cell voltages deviated from one another only occasionally and by at most 20 mV, and the cells completed charging practically simultaneously. During the fast charging process the cells do warm up to a measurable extent, with the temperature slightly lagging the charge current. This can be put down to losses in the internal resistance of the cells. When charging the ANR26650M1 it is important for safety reasons not to exceed the recommended charging voltage of 3.6 V. However, throwing caution to the winds, the author tried ‘overcharging’ the pair of cells with a terminal voltage of 7.8 V (3.9 V per cell). Do not try this experiment at home! The cell voltages (Figure 9) remained matched and no strange noises or smells were emitted, but the rewards were limited: the subsequent 3 C discharge delivered an extra 100 mAh, and the mean discharge voltage was just marginally higher. The conclusion is that overcharging brings a small increase in energy density from 103.6 Wh/kg to 104.6 Wh/kg, not enough to outweigh the risks and the probable negative impact on the life of the cells.
elektor electronics - 4/2007
current sink or charger
A little physics and chemistry
connecting wires
temperature sensor
(4 mm 2 c.s.a)
Cell 2
UniTest 2 www. sm-modellbau.de
Cell 1
Cell 1 voltage
Cell 2 voltage
V
V
070019 - 12
Figure 5. All measurements were taken using two cells connected in series. A Unitest2 datalogger recorded the results. The two multimeters show the individual cell voltages.
8
80
two cells type ANR26650M1 (30 C / 5 C) 70
6
60
5
50
4
40
3
30
cell temperature
2
1
20
10
discharge current
time [s]
300
270
240
210
180
150
120
90
60
30
0 0
0
070019 - 13
Figure 6. High-rate discharge using a current alternating between 30 C and 5 C.
Figure 7. This charger, made by Graupner, allows constant current/constant voltage charging with a current limit at 9.2 A and a maximum charge voltage of 3.6 V per cell. 4/2007 - elektor electronics
37
current [A]; temperature [degrees ºC]
discharge voltage
7
voltage [V]
The idea of using nanotechnology in conjunction with a lithium battery chemistry is to increase the surface area of the electrodes over which reactions can happen. Scope for further developments in the graphite anode (negative terminal) seems to have been almost exhausted, but progress is being made regarding the cathode. At the cathode compounds (generally oxides) of transition metals are used for ion capture. Cathodes using metals such as manganese, cobalt and nickel are already in mass production, each having their own particular advantages and disadvantages. A123 Systems has chosen to use iron (also in the fourth period). In iron phosphate (FePO4) they seem to have found a cathode material which even at relatively low voltages is capable of accepting enough lithium ions to provide adequate battery capacity. Li-ion batteries are essentially only chemically stable within a narrow voltage window from 2.3 V to 4.3 V; and towards either end of this range there are compromises to be made in terms of service life. In practice an upper limit of 4.2 V is regarded as acceptable, with 4.1 V recommended for increased life. To keep within these voltage limits traditional lithium batteries made of a number of cells connected in series come with electronic add-ons such as balancers, equalisers or (at the very least) accurately-set voltage limiters. As charge currents increase these devices become more and more complex and inevitably bring power losses with them. The user would rather do without these devices, and of course would prefer cells which can withstand deep discharge. Other desiderata include as wide as possible an operating temperature range and the ability to charge quickly. The A123 Systems FePO4 cells are definitely a step in the right direction. It is, however, not yet clear how well the ANR26650M1 responds to mistreatment.
TECHNOLOGY BATTERIES
PRELIMINARY CONCLUSIONS The new Li-ion cells using an FePO4 cathode bring highcurrent industrial applications closer to reality, especially considering their broadly flat discharge voltage curves. The energy density offered is not significantly greater than that of traditional Li-ion cells, but the power density is rather greater. The combination of low internal resistance and low weight augurs well for their replacing cells based on nickel or lead in high power applications. The fact that the cells cannot withstand continuous discharge at 30 C without the temperature rising to unhealthy levels is no great disadvantage since you are unlikely to want to discharge a 2.3 Ah cell at 70 A over a period of just two minutes. For such applications lithium cells are not the only solution. On the other hand, there is always demand for faster charging, especially if the charging time can be reduced to the length of a tea break. This is one reason why these batteries are already available in 36 V (ten-cell) professional hammer drills [2]. The most promising application to date is in hybrid and other environmentally friendly vehicles. A battery made
charge accepted 2000
cell temperature 25
charge
U charge
1500
20
15
1000
end of constant-current charging
10
charge voltage
500
charge accepted [mAh]
current [A]; voltage [V]; temperature [degrees ºC]
fast charge at 4 C (9.2 A) of two cells type ANR26640 M1 30
5
charge current 0 0
200
400
600
800
1000
1200
charge time [s]
1400
1600
1800
(070019-I)
Availability
2500
35
from four FePO4 cells (13.2 V) is around 70 % lighter than a lead-acid battery. Lithium technology is expected to be seen in hybrid vehicles such as the Toyota Prius III from 2008. Better cycle life and considerably higher energy and power densities will enable considerable progress in hybrid vehicle technology and moves towards zero-emission vehicles. A series of projects in the USA is under way to develop ‘plug-in hybrids’ whose batteries can be recharged from a supply socket. A123 is working with automotive supplier Cobasys and, together with Johnson Controls (Varta/Saft), has agreed to work with General Motors to develop lithium batteries for a plug-in SUV. The technology is also interesting from the point of view of even more economical electric vehicles from leisure-oriented electric scooters via the trendy Segway to electric bicycles. With acceleration from a lithium battery discharging at 50 C (ten seconds is long enough) perhaps electric bicycles will start to be seen as more than mopeds for the elderly. wegkommt…
The samples we tested were obtained from the German battery system supplier BMZ [3]. As far as we know BMZ is currently the only European importer of A123 batteries. Batteries sold under the ‘BMZ’ and ‘Konion’ brands are assembled by Akku-Service Untermain. It seems likely that as demand increases the cells will also become available from specialist battery suppliers and from the larger electronics distributors. A123 Systems offer developer kits from their own website [4]. A separate site aimed at modellers [5] offers ready-made battery packs and chargers.
0 2000
070019 - 14
Figure 8. Fast (20-minute) charging test with an initial current of 9.2 A.
Figure 9. Even a little overcharging does not upset the matching between the two cells of the battery.
38
[1] Ulrich Passern: ‘Super Lithium Batteries’, Elektor Electronics April 2005, p. 52 [2] http://www.dewalt.com [3] http://www.bmz-gmbh.de/englbmz/eindex.html [4] http://www.a123systems.com [5] http://www.a123racing.com
elektor electronics - 4/2007
4/2007 - elektor electronics
39
HANDS-ON E-BLOCKS
E-Blocks Light Chaser Squared Let’s complicate things!
Jean-Paul Brodier
Sure, the E-Blocks LED Chaser from the February 2007 issue is a bit elementary. This month we’re going to try and expand it to a larger number of LEDs, but the simple light chaser principle doesn’t really lend itself to this.
R1 22
R2 22
J3B
D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
D11
D12
D13
D14
D15
D16
D17
D18
D19
D20
D21
D22
D23
D24
D25
D26
D27
D28
D29
D30
D31
D32
D33
D34
D35
D36
D37
D38
D39
D40
D41
D42
D43
D44
D45
D46
D47
D48
D49
D50
D51
D52
D53
D54
D55
D56
D57
D58
D59
D60
D61
D62
D63
D64
1 6
R3 22
2 7 11
3 8
10
R4 22
4 9 5
R5 22
SUB D9
R6 22
+5V R7 22
J7B
R8 22
+5V
1
11
6
1
2
2
7
3
3
DX
0
G 0_7
1 2
40
4
6
9
5
5
4
0 1 2
U1 74HC138 3
8 10
4
&
Play battleship Each LED can be defined by its row and column numbers, just like in the game of ‘Battleship’. If we enable one row (logic High) and one column (logic Low), the LED at the intersection (its anode connected to the row and its cathode to the column) will light up.
Decoding
16
J2B
5 6 7
15 14 13 12 11 10 9 7
SUB D9 8
Figure 1. Figure 1. The sixty-four LEDs are arranged in a matrix of 8 rows by 8 columns.
If we wanted to drive 64 LEDs directly, we’d need 64 separate output lines. Having decided to stick with our 18pin PIC16F88, we’re going to organize the LEDs into a matrix of 8 rows and 8 columns, as shown in the diagram (Figure 1).
075032 - 11
As before, the rows are fed from the outputs of PORT B; but we don’t have enough output lines left to be able to drive the columns of our matrix directly. This is why we need the 74HC138 IC, which is a 3-to-8 line decoder (BCD decoder). The binary number applied to inputs A, B, and C is represented by the place value of the active output line (active low). In order to scan the eight columns, we need to vary the
elektor - 4/2007
number between 0 and 7 and apply it in binary to the three output lines of PORT A. The column number is incremented using the command line COLUMN = COLUMN + 1 and limited to 7 by the Modulo 8 operation. We’re going to create a new file, here called Ch2D0.fcf (‘2D’ standing for two dimensions). The first job (Figure 2) is to create the variable COLUMN and the different variables for the rows. To do this, we drag a rectangular Calculation box between BEGIN and END, and then edit its properties. Variables are added using Browse for variable and then Add New Variable. Once the new variables have been set up, they then have to be used within the program, i.e. by incrementing the value of COLUMN and copying this value to PORT A in order to scan the eight columns, and by applying the corresponding ROW value to PORT B.
C Language We use the language C whenever it is faster or simpler than using the symbols on the flow diagram — when there’s only one mathematical operation to be performed, for example. The first ‘C Code’ box of the program, entitled Modulo 8, (Figure 3) has just a single C instruction (right click Properties, as usual...). FCV_COLUMN = FCV_COLUMN % 8; The prefix FCV_ in front of the variable COLUMN indicates to the compiler that it is being defined in Flowcode. This is mandatory for instructions in C. For instructions in assembly language, the mandatory prefix is _FCV_. The % (percent) sign signifies the operation modulo — it returns the remainder after division by 8. Our variable COLUMN increments by 1 each time round the loop. In the absence of any other operation, the value would increase as far as 255, and then return to zero, using the eight bits of the register. This is not compatible with the output format we want, which must only use up three lines of PORT A, i.e. must run from 7 to 0. Once the value of COLUMN reaches 7 (111 in binary), COLUMN equals the remainder after division by 8. When the value reaches 8, the remainder of the division (modulo) is 0, the counter restarts from 0. It is possible to achieve the same thing using a mask, a logical AND operator. We have seen that the permitted values for COLUMN are from 000 to 111 in binary (0 to 7 in decimal). The line in C then becomes:
Figure 2. New variables are created and assigned an initial value.
BEGIN Initialisation RANG0 = 1 RANG1 = 2
PORT B. This SLATE byte is used to temporarily write a value that it is to be carried forward later.
Endless loop While 1 Advance column
Once the program is compiled without any mistakes, it can be sent to the microcontroller PIC – Compile to PIC, as we saw in the previous article. Now we have a spot of light that moves diagonally across our 8 × 8 square, but we still only see a single spot at a time. In order to see a line properly, it would be necessary to light all the LEDs of the diagonal. The question that then arises is how can we light A1 and B2 at the same time? If we enable rows A and B at the same time as columns 1 and 2, we will have four LEDs lit instead of two. The answer is multiplexing; successively write 1 to ROW and enable column 1 to light LED A1; 2 to ROW and enable column 2 to light LED B2; and so on. If these operations happen fast enough, our eye will perceive LEDs A1, B2, etc. lit at the same time.
COLUMN = ... Modulo 8 /* Modulo 8 */ FCV_COLU... Active column COLUMN -> PORT A Values Column */ FCV_COLU... Report PORT B value SLATE -> PORT B Time to view 100 ms
Endless loop
END
We wil modify the program to do this, after we’ve renamed it; for example Ch2D1 (File -> Save as…). Figure 3. The display matrix test program.
FCV_COLUMN = FCV_COLUMN & 7; In C, the & sign (ampersand) represents the logical operation AND. The transfer of the COLUMN value to PORT A cannot simply be done abruptly. To avoid scrambling the state of lines RA3–RA7, a command has to be included to mask the value to be written. This is done (Figure 4) in the Properties window of the first OUTPUT box (right click Properties). Check Use Masking: and the bits that are to be written; the others will not be affected. Each time round the loop, we send a new ROW value to PORT B in such a way as to shift the spot of light in either direction. This is the job of the second section in C. The value of SLATE (a kind of scratchboard) is modified in accordance with the value of COLUMN, then transferred to
4/2007 - elektor
Figure 4. Transfer of the variable COLUMN to PORT A.
41
HANDS-ON E-BLOCKS
Interrupts This scanning operation must be extremely fast, but it’s a routine task that doesn’t require any computation as such. So, we’re going to entrust it to an interrupt triggered by one of the microcontroller’s timers.
BEGIN C Code /* Column */
We drag an INT hexagon below the initialization of the variables and configure the interrupt as shown in Figure 5. Each time counter TMR0 passes zero, i.e. 300 times a second, it triggers the execution of the routine (called a MACRO in Flowcode parlance) INTERRUPT_TMR0. So all we have to do is transfer the instructions that up till now have been in the main body of the program into this routine. We click on Macro in the menu bar, then on Edit/ Delete, then on INTERRUPT_TMR0. We drag a C CODE box to the start and copy there the instructions from the previous program.
Output COLUMN -> PORT A Output SLATE -> PORT A
END
Figure 7. The very simple interrupt routine.
Figure 5. Interrupt configuration.
To avoid a lot of work and the risk of introducing errors, all you need do is open the file Ch2D0.c (created by the last compilation) in Wordpad or another simple text editor. Use the mouse to select the block to be copied, then press Ctrl-C (for Copy), go back to the Flowcode editor window and press Ctrl-V (for Paste) (Figure 6). After the C code, all that remains to be done is add the output symbols for PORT A and PORT B (Figure 7). The multiplex demonstration program (Figure 8) picks up again at the interrupt routine.
Let’s move it!
Figure 6. The C code included in the interrupt routine.
BEGIN Initialisation COLUMN = 0 RANG0 = 1 Multiplex Enable TMR0 Overfl... Endless loop While 1
Since our aim was to have an animated light display, we’re going to make the diagonal chase, and even add a second one, four steps away. This is going to be the Ch2D2 program.
ANSI standard and the language C as used by MPLAB The language C understood by MPLAB (the Microchip development tool) doesn’t seem to correspond exactly to the ANSI standard. The masking operation can be written as: FCV_COLUMN &= 7;
Endless loop
C programmers love these highly-condensed forms because they are hard to read (including by themselves!) and disconcerting for novices, who are therefore likely to have greater respect for the masters. Oddly enough, the expression:
END
FCV_COLUMN %= 8; (correct according to the ANSI standard) is refused by the compiler. Figure 8. Multiplexing demonstration. A stationary diagonal is being displayed.
Using computers and modern editors, cut-&-paste operations have become so easy that we really don’t any longer need to worry about saving a few keystrokes. In both cases, the result is the same, as can be verified by checking the .LST file generated by the compiler and the assembler each time. When the compiler refuses a line in C or assembly language, all it does is say so, without explaining why. So you will always have to look back at the .LST file, which contains all the details of the program in assembly language. Another small difference between ANSI and MPLAB: in MPLAB, variable names must be in capitals, whilst the ANSI standard recognizes both cases and differentiates between them.
42
elektor - 4/2007
First of all, the initial values of ROW are replaced in such a way as to illuminate two spots, and then the primary loop shifts the contents of all the registers. The successive hex values for ROW0 to ROW3 are 0x11, 0x22, 0x44, and 0x88. These four values are repeated for ROW4 to ROW7. Because Flowcode does not understand either binary or hex — neither C (0x11) nor Intel (11h) modes — these have to be written in decimal: 17, 34, 68, 136. While the program is running, shifting takes place in each register via a 2-times multiplier. When the bit to be shifted is furthest left, a value of 136 (10001000 in binary), it jumps back to the initial value 17 (00010001). Depending on the exact moment, we will have three or four lines instead of two (Figure 9). It is now possible to change the initial values, to produce for example a single diagonal (1, 2, 4, 8, 16, 32, 64, 128), chevrons (1, 2, 4, 8, 4, 2, 1, 2), or a line broken up into several spots. The program itself can count the scans and, after a given number, change the values to produce another pattern, loaded from blocks of constants defined in the program memory. Although this microcontroller is one of the smallest, the last version of this program occupies only a small fraction of the Flash memory available: 391 words out of 4,096.
Construction
The 22 Ω resistors are pretty much a token, as the LED current is limited (oh horror, heresy!) by the microcontroller outputs’ maximum output current. The total current drawn by the eight pins of PORT B is 100 mA. In any event, it’s worth using high-efficiency LEDs. Double-sided circuit board is far from being necessary. The transverse connections can be produced very simply using wire-wrapping wire. Start by tinning liberally the vacant pads above the LED anodes. Then push the wire into the blob of solder using the soldering iron tip and enough force. The plastic insulation squashes up, melts, and retracts just enough for the copper to become soldered to the pad. Tug gently to check the joint holds, and move on to the next one. Cut off the wire after the last solder joint on the row. (075032-I)
BEGIN Initialisation COLUMN = 0 RANG0 = 17 Multiplex Enable TMR0 Overfl... Endless loop While 1 Offset /* Multiplicati... if (FCV_RAN... Not lost 200 ms
Endless loop
END
Figure 9. The simplicity of the flow diagram conceals numerous statements and instructions in C.
The project can be built on perforated prototyping board or on the printed circuit board shown in Figure 10. It has two male sub-D connectors, J2B and J3B, so named because they mate with the female DB9 sockets J2 (PORT A) and J3 (PORT B) on the E-blocks Multiprogrammer board. The +5 V power will be taken from the +V terminals of screw terminal block J7; the ground is already connected via pin 9 of the DB9 connectors.
COMPONENTS LIST Resistors R1–R8 = 22Ω Semiconductors D1–D64 = LED, diam. 3 or 5 mm IC1 = 74HC138 Miscellaneous J2B, J3B = 9-way sub-D plug, (male) , PCB mount J7B = 2-way terminal block, PCB mount
Figure 10. The board can be built single-sided, with a series of jumpers for paralleling the 8 LEDs in each row. Component layout takes a bit of care in orienting the LEDs.
4/2007 - elektor
43
Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP, United Kingdom Tel: 0870 246 1826 Fax: 0870 460 1045 E-mail: [email protected] Web: www.QuasarElectronics.com
Postage & Packing Options (Up to 2Kg gross weight): UK Standard 3-7 Day Delivery - £3.95; UK Mainland Next Day Delivery - £8.95; Europe (EU) - £6.95; Rest of World - £9.95 (up to 0.5Kg) !Order online for reduced price UK Postage! We accept all major credit/debit cards. Make cheques/PO’s payable to Quasar Electronics. Prices include 17.5% VAT. Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. Discounts for bulk quantities.
Credit Card
Sales Get Plugged In!
Motor Drivers/Controllers
Controllers & Loggers
Here are just a few of our controller and driver modules for AC, DC, unipolar/bipolar stepper motors and servo motors. See website for full details.
Here are just a few of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU445 £8.95
NEW! PC / Standalone Unipolar Stepper Motor Driver Drives any 5, 6 or 8-lead unipolar stepper motor rated up to 6 Amps max. Provides speed and direction control. Operates in stand-alone or PCcontrolled mode. Up to six 3179 driver boards can be connected to a single parallel port. Supply: 9Vdc. PCB: 80x50mm. Kit Order Code: 3179KT - £11.95 Assembled Order Code: AS3179 - £19.95
Serial Isolated I/O Relay Module Computer controlled 8channel relay board. 5A mains rated relay outputs. 4 isolated digital inputs. Useful in a variety of control and sensing applications. Controlled via serial port for programming (using our new Windows interface, terminal emulator or batch files). Includes plastic case 130x100x30mm. Supply: 12Vdc/500mA. Kit Order Code: 3108KT - £54.95 Assembled Order Code: AS3108 - £64.95
NEW! Bi-Polar Stepper Motor Driver Drive any bi-polar stepper motor using externally supplied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-30Vdc. PCB: 75x85mm. Kit Order Code: 3158KT - £15.95 Assembled Order Code: AS3158 - £29.95 NEW! Bidirectional DC Motor Controller Controls the speed of most common DC motors (rated up to 16Vdc/5A) in both the forward and reverse direction. The range of control is from fully OFF to fully ON in both directions. The direction and speed are controlled using a single potentiometer. Screw terminal block for connections. Kit Order Code: 3166KT - £16.95 Assembled Order Code: AS3166 - £25.95 DC Motor Speed Controller (100V/7.5A) Control the speed of almost any common DC motor rated up to 100V/7.5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15Vdc. Box supplied. Dimensions (mm): 60Wx100Lx60H. Kit Order Code: 3067KT - £13.95 Assembled Order Code: AS3067 - £20.95
Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix).
Computer Temperature Data Logger 4-channel temperature logger for serial port. °C or °F. Continuously logs up to 4 separate sensors located 200m+ from board. Wide range of free software applications for storing/using data. PCB just 38x38mm. Powered by PC. Includes one DS1820 sensor and four header cables. Kit Order Code: 3145KT - £18.95 Assembled Order Code: AS3145 - £25.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 includes one Tx but more available 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 - £51.95 NEW! DTMF Telephone Relay Switcher Call your phone number using a DTMF phone from anywhere in the world and remotely turn on/off any of the 4 relays as desired. User settable Security Password, AntiTamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. Not BT approved. 130x110x30mm. Power: 12Vdc. Kit Order Code: 3140KT - £46.95 Assembled Order Code: AS3140 - £64.95
Infrared RC Relay Board Individually control 12 onboard 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 - £66.95
PIC & ATMEL Programmers We have a wide range of low cost PIC and ATMEL Programmers. Complete range and documentation available from our web site. Programmer Accessories: 40-pin Wide ZIF socket (ZIF40W) £15.00 18Vdc Power supply (PSU010) £19.95 Leads: Parallel (LDC136) £4.95 / Serial (LDC441) £4.95 / USB (LDC644) £2.95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows XP software. Wide range of supported PICs - see website for complete listing. ZIF Socket/USB lead not included. Supply: 16-18Vdc. Kit Order Code: 3149EKT - £37.95 Assembled Order Code: AS3149E - £52.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 virtually all 8 to 40 pin serial-mode AND parallel-mode (PIC16C5x family) programmed PIC micro controllers. Free fully functional software. Blank chip auto detect for super fast bulk programming. Parallel port connection. Supply: 16-18Vdc. Assembled Order Code: AS3117 - £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
Secure Online Ordering Facilities Ɣ Full Product Listing, Descriptions & Photos Ɣ Kit Documentation & Software Downloads
www.elektor-electronics.co.uk
Pieces of sheet glass with an electrically conductive coating on one side. They are included in kits that you can order via the Internet. However, you can also use pieces of low-emissivity (low-E) glass. You can usually obtain small pieces of low-E glass from glaziers, since it is used to make thermal insulation windows. You need at least two pieces with dimensions of approximately 5 cm by 2 cm. It will probably cost you a pound or so to have them cut. TiO2 and polyethylene glycol. Polyethylene glycol is a basic ingredient of many sorts of ointments and creams. Here it is used to prepare a suspension of the titanium dioxide. You can obtain both of these ingredients from your local chemist. The polyethylene glycol must have a molecular weight of around 300 so it is sufficiently fluid (there are also solid forms). The Internet kits typically include a prepared white suspension, which is more convenient. With the prepared suspension, you can also be assured that the particle size of the titanium dioxide is correct (approximately 20 nm) and that it is finely dispersed, which is not so easy to achieve with a DIY suspension. If you wish, you can also try using white toothpaste, Tipp-Ex, white wall paint, or a similar product containing titanium dioxide as a whitener. Electrolyte. This is also included in the Internet kits. For our experiments, we used a solution of iodine in 65% ethanol (obtained from a chemist). This works OK, but it produces only around one-third as much current as the standard electrolyte. Fruit tea (e.g. rosehip or hibiscus). Included in the Internet kits, but readily available elsewhere. Gas camping stove and lighter. Laboratory stand with a clamp, ring and screen (for supporting the glass during baking). Pipette (but you can also use a teaspoon to dribble the titanium dioxide suspension on the glass). Tweezers Kettle Teapot Hair dryer Strips of sticky tape (Sellotape) A piece of aluminium foil Petri dish (or a small flat bowl or soup plate) Graphite pencil A piece of glass or a plastic card for spreading the TiO2 Multimeter
Ingredients and tools
3I-
e-
060314 - 11
conductive layer and catalyst (counter-electrode)
electrolyte
dye molecules
TiO2 nanocrystals
conductive layer (electrode)
[1] www.farbstoffsolarzelle.de [2] http://en.wikipedia.org/wiki/Dye-sensitized_solar_cells [3] www.mansolar.com [4] www.solideas.com/solrcell/iceorder.html [5] www.elektor.de/Default.aspx?tabid=29
WEB LINKS
e-
I 3- e-
e-
e-
glass plate
A dye-sensitized solar cell consists of two flat pieces of glass with electrically conductive coatings. The conductive coating is usually made from a metal oxide. A thin layer (approximately 10 μm) of titanium oxide crystals with dimensions of around 20 nm, which have been baked together to form a porous coating, is located between the two pieces of glass. The dye is deposited on this porous layer. The dye used in industrial dye-sensitized solar cells contains the noble metal ruthenium, but naturally occurring red dyes can be used for experimental purposes. Thanks to the minute dimensions of the TiO2 crystals and the spaces between them, the porous structure has a very large effective surface area and the dye layer is very thin. This is essential for proper operation, since the dye is a poor conductor of electricity. When light strikes a dye molecule, it injects an electron into the titanium dioxide. The electrons accumulate in the conductive layer (working electrode) located between the titanium dioxide and the glass sheet. Another conductive layer must be present on the other side to act as a counter electrode, and the space between the electrodes is filled with an electrolyte solution. A simple iodine salt solution (iodine/iodide) is use for experimental purposes, since the acetonitrile electrolyte used in industrial dye-sensitized solar cells is too volatile and toxic. Tri-iodide molecules in the electrolyte solution are ‘inclined’ to react with the counter electrode to form iodide molecules if a catalyst is applied to the electrode (industrial cells use platinum as a catalyst, but graphite can be used in experimental cells). However, this reaction requires electrons. The surplus of electrons on the other electrode creates an electrical potential that can be put to good use. If the electrodes are connected externally via a load, a current will flow. The iodide molecules in the solution surrender electrons to the dye and change back to tri-iodide molecules in the process, which thus closes the electrical circuit.
How dye-sensitized solar cells work
(060314-I)
It will probably take several years for dye-sensitized solar cells to become commercially viable. A few problems must be solved first, such as long-term stability, because oxygen makes the cells unusable [2]. However, it’s quite easy to make your own cells that demonstrate the principle. A suitable dye can be extracted from raspberries or fruit tea, among other sources. Kits with all the necessary ingredients are available on the Internet [3, 4], but it’s fun make your own cells using pieces of low-emissivity (low-E) glass from a glazier’s shop and titanium dioxide from the chemist. The process is described below in words and pictures. Try it for yourself!
THE CELL OF THE FUTURE?
We all know that organic substances in plants can convert sunlight into usable energy, with chlorophyll being the best-known example. However, most people don’t realise that naturally occurring organic dyes can also act as electron donors in solar cells (see inset). The basic material of such a solar cell is not the semiconducting material silicon, but instead titanium dioxide (TiO2), which is also a semiconductor. TiO2 is made using large-scale industrial processes, and it is employed as a white pigment in paper, paints and toothpaste. Titanium dioxide only absorbs light in the ultraviolet band, which forms a relatively small part of the spectrum of sunlight., However, TiO2 can be ‘sensitized’ with an organic dye so it can absorb visible sunlight as well. Dye-sensitized solar cells (also called Grätzel cells after their inventor) are currently a subject of intensive worldwide research [1]. Their efficiency is approximately 7%, which is only a bit more than a third of the efficiency of silicon solar cells. However, solar cells made using this technology could be much cheaper than silicon cells, since the manufacturing process for conventional cells is complicated and expensive.
yourself using simple materials.
this revolutionary new type of cell
It’s truly amazing that you can make
expensive silicon solar cells.
– they might even fully supplant
on the verge of a great future
Dye-sensitized solar cells may well be
Dr Axel Werner and Jens Nickel
dye-sensitized solar cells
Solar Cells from Fruit Tea Make your own
12
11
10
9
Remove the piece of glass from the tea bath. The TiO2 coating will have taken on the colour of the tea (see the middle of the photo). Rinse the glass with clear water and then dry it with a hair dryer or the like. Everything you need to finally assemble the cell is shown in the photo.
Use the resistance range of the multimeter to determine which side of each piece of glass is conductive. Using three strips of sticky tape, secure one piece of glass to the table with the conductive side facing up.
www.elektor-electronics.co.uk
Give it a try!
To the right you find an illustrated DIY guide.
and a red dye, for example from rosehip tea.
the poster). The basic ingredient are titanium dioxide
and some chemicals (see Ingredients and Tools on
– you only need a sheet of conductive coated glass
are easily made from basic materials
in cheaper solar current. These revolutionary cells
may make expensive silicon superfluous resulting
Some time in the future, colour dye solar cells
The coating must be baked in an oven or over an open flame (such as from a gas camping stove) at around 450 °C. Here we use the latter option. Place the support screen a few centimetres above the burner flame and lay the piece of glass with the TiO2 coating on top of it.
... and strike it flat using a plastic card or another piece of glass. You can obtain a uniform layer by resting the card on the strips of tape on each side while striking off. A pre-coated piece of glass from the Internet kit is shown on the right in the photo for comparison. Of course, you can hardly expect to obtain such nice results at home.
Draw some of the titanium dioxide solution into the pipette, and then deposit a few drops on the conductive surface of the glass ...
Industrial dye-sensitized solar cells are sealed, but here you can omit this step. This also lets you use the glass pieces again. If you want to reuse them, separate the two pieces of glass when you are through experimenting and wash the coated surfaces with water while rubbing them gently. It may not be possible to completely remove the graphite layer, so it is advisable to use the counter-electrode glass again for the same purpose in further experiments.
Now you can use a voltmeter to measure the voltage (approximately 0.3 V) and an ammeter to measure the current (up to around 1 mA, although it is naturally a lot less here with the lighting of the photo studio). You can use crocodile clips to connect several cells in series.
Introduce the electrolyte between the two pieces of glass. To do so, place a few drops of electrolyte on one of the pieces of glass. It will be drawn between the two pieces by capillary action.
Place the two pieces of glass together with the conductive (coated) sides facing each other and the ends offset. Be careful not to let them slide over each other, since otherwise the TiO2 may be scratched off. Improvised clips made from paper clips can be used to hold the two pieces of glass firmly together, or you can simply wrap several turns of sticky tape around them.
Now prepare the fruit tea with boiling water (use several teabags and relatively little water) and pour it in a bowl. Alternative dye sources are red beet juice, raspberry juice and red ink. After the piece of coated glass has cooled to room temperature, place it in the tea in the bowl and let it soak for around 5 minutes. While it is soaking, cover the conductive side of a second piece of glass with a layer of graphite (from a lead pencil). This layer will act as a catalyst for transferring electrons from the electrode to the electrolyte.
This photo shows the main items included in the Internet kit (left) and some possible alternatives (right). An alternative to the pieces of glass in the Internet kit is scrap pieces of low-emissivity glass (see the ingredients description). The TiO2 powder should have a particle size of 15–25 nm. Mix it 1-to-1 with the oily emulsifying agent (polyethylene glycol) and stir the mixture thoroughly to obtain a viscous cream (refer to the list of ingredients). You can replace the electrolyte in the Internet kit with a solution of iodine in ethanol (with somewhat poorer results). Just give it a try, and post your results on the Elektor Electronics forum [5].
Solar Cells from Fruit Tea Make your own dye-sensitized solar cells
The TiO2 coating will turn brown at first during the baking process (see photo) due to burning of the organic ingredients. However, the TiO2 coating must turn white again at the end. Allow the glass to cool slowly, since otherwise it may shatter. Do not remove the glass from the hot screen immediately, but instead slide it to a cooler area near the edge.
The substrate of the solar cell is a piece of ordinary window glass approximately 2 mm thick with a transparent, conductive metal oxide coating (such as ZnO). Unfortunately, you can’t make the coating yourself. However, pieces of glass with a conductive coating are included in the Internet kit available from Mansolar [3] (the photo shows some of the items included in the kit). One version of the kit includes pieces of glass with a conductive coating and a ready-made baked-on TiO2 layer
New
£16.25 / US$ 28.75 ISBN 978-90-5381-207-5
CD-ROM
Elektor 2006
Completely new HTML user interface This CD-ROM contains all editorial articles published in Elektor Electronics
All articles in Elektor Electronics Volume 2006 on CD-ROM
magazine Volume 2006. Using the supplied Acrobat Reader
Order now using the Order Form in the
program, articles are presented in the
Readers Services section in this issue.
same layout as originally found in the magazine. Elektor Electronics (Publishing)
All free, printed, supplements our readers got last year, like
Regus Brentford
the Visual Basic, C and i-TRIXX booklets are also contained
1000 Great West Road
on the CD. The Elektor Volume 2006 CD-ROM has a rather different
Brentford TW8 9HH
look and feel than previous editions. It’s gone through a makeover
United Kingdom
in more than one way!
Tel. +44 208 261 4509
See also www.elektor-electronics.co.uk
4/2007 - elektor electronics
45
HANDS-ON FREESCALE MICROS
g-Force on LEDs
Two-axis 2g accelerometer with SpYder and a Freescale micro
Jan Buiting & Luc Lemmens, in cooperation with Inga Harris (Applications Engineer, Freescale Semiconductor Inc.)
Here’s a playful yet educational application of a Freescale MC9S08 microcontroller. It continues from last month’s Attack of the SpYder article and should help you get to grips with the basics of migrating an MC9S08 micro from thinkware to hardware, all along an extremely low-cost route with three free items thrown in exclusively for Elektor readers.
Figure 1. The SpYder Discovery Kit in its final guise (last month we showed a beta version). Thanks to a special arrangement with Freescale Semiconductor, the kit is available from Elektor at a price of just £ 6.45 (Euro 9.75 / US$ 12.70) plus postage & packing. Note that the 6-way BDM ribbon cable has to be sourced or made locally.
46
This month it all falls into place – theory, hands-on, free components and software together form an educational and fun to build project that’s sure to find its way into your car, RC model or on your bicycle. We could even envisage the accelerometer being used in a dragster car, whether real or a scale model! Besides two magazine articles (the second of which you’re reading right now), all items that go into building the project are listed in Table 1. The low price of the SpYder kit and the free accelerometer device you get with the two PCBs for this project is the result of Elektor and Freescale having teamed up in exclusive cooperation for the benefit of Elektor readers.
PROJECT TARGETS Elektor and Freescale set out to publish this project with a few ambitious aims and deliverables in mind. Let’s list them, with the solutions found
printed in italics. 1. The microcontroller used should be cheap – if possible, free. An MC9S08 device was chosen of which samples can be obtained free of charge from Freescale. 2. The micro should come with a full complement of programming and debugging tools. CodeWarrior and the SpYder USB BDM fit the bill. 3. Reader support should be available online. Freescale and Elektor forums are available. 4. The project should be educational and ‘open-platform’. All source code files, datasheets and development notes are available free of charge. 5. The project should have a ‘real-life’ aspect. A compact 2-axis accelerometer with 2g range and LED readout. 6. With students in mind, overall cost to be kept to a minimum. Free accelerometer device, free MC9S08, low-cost PCBs and SpYder Discovery Kit.
elektor electronics - 4/2007
Item
Source / Supplier
Description
SpYder Discovery Kit
Elektor
MC9S08QG8CPBE
Freescale
Contains USB BDM, 8-pin MC9S08 sample, CodeWarrior & utilities CD. Freescale 16-pin PDIP microcontroller
Set of PCBs
Elektor
MMA7260Q
Elektor
Other components
Local supplier / mail order
How to obtain
Cost
Order code 060296-91 from Elektor SHOP. Order from Freescale free sample service Two bare PCBs for home assembly using Order code 060297-71 from Elektor through-hole components SHOP Freescale accelerometer device on Two (!) pieces Included f.o.c. with PCB carrier board set 060296-71 Miscellaneous through-hole components Buy locally or by mail order, e.g. Farnell as shown in components list.
£ 6.45 plus P&P. Free with module or kit from Elektor SHOP Free £ 10.00 (US$ 18.85) Free Approx. £ 5.00 (US$ 9.50)
Table 1. What – Where – How Overview of hardware/software items needed to build the Two-Axis Accelerometer project.
An impressive list that’s sure to have worried managers and workers in commercial departments here and there but stuff to grind their teeth on for the makers of this project. Via the magazine publications, the challenge should extend to you if you are interested in making a start in embedded technology using low-cost 8-bit microcontrollers that have proven worth their salt in automotive applications (very likely your new car will contain one).
ACCELEROMETER An accelerometer is a device measuring and indicating force exerted on a moving body due to acceleration (+g) or deceleration (–g). The present project can measure forces up to 2 g in two planes: forward/reverse and left/right. The readout is comprised of coloured LEDs with the highest value of g being indicated by red LEDs. The instrument is battery powered and suitable for fitting in a vehicle where it will tell you and your passengers (like kids on the back seat) a lot about your driving habits.
SPYDER AGAIN – STEP BY STEP Before moving on to the project and the trusted solder iron, a word or two about your new companion in 8-bit Embedded Land. SpYder (Figure 1) relies on the HCS08 and RS08 Background Debug Controller (BDC). This enables a fast and easy way to program the onchip Flash and any other memories. It is the primary debug interface for development, allowing non-intrusive
4/2007 - elektor electronics
access to memory data and traditional debug features such as CPU register modify breakpoint, and singleinstruction trace commands. If you have used the HC05 or other older Freescale cores, as we endeavoured to, you will appreciate the advancement this module enables. The SpYder tool uses a standard USB interface to communicate to the PC and uses the USB bus voltage to power the tool and microcontroller without the bulky wall adapters of old, making it truly portable. This USB power supply can also power the target board, provided you don’t run too many motors on it (up to 100 mA)! With the tool’s reliance on USB, the SpYder tool’s heart is Freescale’s MC908JB16 MCU. The MCU has a USB (2.0 low-speed) interface and operates from the 5 V supplied by USB. As the tool supports the RS08 microcontrol-
type or use your own target board (as in the case of our accelerometer application) you can do so. By adding a 0-ohm resistor or a short circuit on the space next to the bed of nails labelled R2, you are effectively connecting the power supply to the BDM socket so that you can use another target board. The net result is the SpYder Discovery Kit turned into a BDM pod, but don’t worry… it still works as a standalone tool. If you do not have a BDM form cable already you can easily build one: all you need is two off 6-way IDC sockets with strain relief (Farnell order code 1097021) and ribbon cable with 1.27mm pitch (Farnell order code 9187111). A small vise allows the IDC connectors to be easily pressed onto the ribbon cable ends. Keep the length below 30 cms or so. Remember to only have one micro connected at a time: either in the socket on the SpYder board or on a target board.
The PCBs to build the project come with two free MMA7260 accelerometer sensors mounted on carrier boards – courtesy Elektor & Freescale lers too, 12 V is needed to program the RS08 devices. The MC908JB16 can recognise the target and via control of PTD0 can enable the 12-V signal using the ST662 DC-DC converter chip. Step 1 – SpYder board assembly The essential parts of the SpYder tool are already populated for you, which will allow you to use it as a standalone tool with the socketed micro. If you want to use another package
Step 2 – Debugger installation CodeWarrior™ Development Studio for Freescale HC(S)08/RS08 v5.1 is available FOC in its Special Edition incarnation, a copy of which is on the SpYder CD. A detail of what features Special Edition has over the Standard and Professional editions are available at www.freescale.com/codewarrior. Without a license key, the product will run in a 1-kB code size in limited demonstration mode. To break the 1-kB limit,
47
HANDS-ON FREESCALE MICROS
you have two options: 1. contact Freescale to request an unlimited period, free license key to increase the code size limit to 16 kB. 2. contact Freescale to request a 30-day limited, free license key to run the compiler without limitations. Step 3 – Drivers Once the board is physically the way you want it to be and CodeWarrior is installed you must make the SpYder communicate with your debugger. The next step is to install the SpYder drivers available from the accompanying CD. Instructions on how to do this are available on the inside cover. When the tool is connected to the PC for the first time, Windows recognizes a new USB device; the “Windows New Hardware Wizard” dialogue box will be opened and asks for the required driver. To complete the installation choose the “Install Automatically” option. Simple!
The MMA7260Q acceleration sensor With Freescale’s strong roots in automotive electronics, it is not surprising to see the company supply a wide range of acceleration sensors. Very likely, the brake light control in your new car will contain one! The electronics community was also quick to discover the advantages of Freescale’s g sensors for use in model building (amateur rocketry, RC modelling, etc). An example of such an application will be published in our May 2007 issue. The MMA7260 is a low cost capacitive micromachined accelerometer with signal conditioning, a 1-pole low pass filter, temperature compensation and g-Select which allows for the selection among 4 sensitivities. Zero-g offset full scale span and filter cut-off are factory set and require no external devices. This device includes a sleep mode that makes it ideal for handheld battery powered electronics. The g-cell inside the MMA7260Q is a mechanical structure formed from semiconductor materials (polysilicon) using semiconductor processes (masking and etching). It can be modelled as a set of beams attached to a movable central mass that move between fixed beams. The movable beams can be deflected from their rest position by subjecting the system to an acceleration.
Acceleration
060297 - 13
As the beams attached to the central mass move, the distance from them to the fixed beams on one side will increase by the same amount that the distance to the fixed beams on the other side decreases. The change in distance is a measure of acceleration. The g-cell beams form two back-to-back capacitors. As the centre beam moves with acceleration, the distance between the beams changes and each capacitor’s value will change, as expressed by this equation: C = A∑ / D
Figure 2. In CodeWarrior, be sure to select the right debugging connection to the PC.
READY TO START DISCOVERING It is important to understand that SpYder uses the target microcontroller to execute the in-circuit execution, not an emulator, so microcontroller’s peripherals e.g. Timers, A/D converters, Serial Communication Modules etc. are not reconstructed by software or an external device. The first time you enter a debugging session, an MCU Configuration dialog box will open, prompting you to select the debugging hardware connection to your PC. Make sure that the connection type “USBSPYDER08” is selected (Figure 2). At this point CodeWarrior has erased and reprogrammed the memory and trimmed the oscillator if
48
where A is the area of the beam, ∑ is the dielectric constant, and D is the distance between the beams. The on-chip ASIC uses switched capacitor techniques to measure the g-cell capacitors and extract the acceleration data from the difference between the two capacitors. The ASIC also signal-conditions and filters (switched capacitor) the signal, providing a high level output voltage that is ratiometric and proportional to acceleration. Two free MMA7270Q SMA devices mounted on carrier boards are included with the circuit boards for the project described in this article. The device is normally priced at US$5.95 each for 1k+ order volumes ant then it comes without the carrier board (!). For your convenience, the MMA7260Q datasheet is included in this month’s free download for the project. Application notes (and videos!) on this interesting device at http://www.freescale.com/webapp/sps/site/prod_summary.
that feature is available on the selected MCU. Now you have everything you need to start debugging your code, you just need to know how to do it. CodeWarrior enables a variety of ways to analyse program flow via breakpoints, watchpoints and a trace buffer. All these
features are implemented by taking advantage of the target microcontroller’s debug peripheral. Your window will consist of: - a source window with your code displayed; - an assembly window where you can
elektor electronics - 4/2007
D12
COMPONENTS LIST
D11
Resistors
D4 D9
R1 = 10Ω R2 = 4kΩ7 R3-R7,R9,R12,R13 = 1kΩ R8,R10,R11 = 100Ω
D6
D2
D3
D8
D10
D5
IC1 TS2950CT-3.3
D7
VCC
R1
K1
10 Ω
D13 D1
C6
C7
100n
100n
R8 100 Ω
18V
Capacitors
LEFT
RIGHT
FORWARD
BACK
D3
D2
D4
D5
D8
D6
D11
D7
D10
D9
D12
D13
VCC
GREEN R10 100 Ω
C1-C7 = 100nF 4
3
D1 = zener diode 18V 500mW D2-D5 = LED, green, low current, 3mm D6,D7,D8,D11 = LED, amber or yellow, low current, 3mm D9,D10,D12,D13 = LED, red, low current, 3mm T1-T4 = BC547 IC1 = TS2950CT-3.3 IC2 = MC9S08QG8CPBE (16-pin PDIP; Freescale free sample service) IC3 = MMA7260Q acceleration sensor on carrier board (free, see PCB set below)
6
5
1k
Semiconductors
1
C2
R2 4k7
R6
K2 2
100n
IC2 1 2
VCC
13
R4
VCC
1k
16 15
R3
RESET
PB0
BKGD
PB1
SLEEP
PB2 PB3
PA0
PB4
PA1
PB5
1k C3
PB6
R5
14
1k
100n
PA2
AMBER R11 100 Ω
3
PB7
12
RED
11 10 9 8 7 6 5
T1
R13 1k
T2
R7 1k
T3
R9 1k
T4
R12
IC3
S2
C4
C5
100n
100n
4
S1
C1
1k
4x BC547
HC9S08QGC
100n
SENSITIVITY
ON/OFF
MMA7260Q
060297 - 12
Figure 3. Circuit diagram of the 2-axis 2g accelerometer.
Miscellaneous K2
060297-1
T4
D10
T3
R6
IC3
D12
D11
D4
D7 D2
IC2
R8
K1
K3
IC1
1-792060
R10
D6
R12 R9 R7
D13
D5
D9
C2
R2 C1
+
C7
R11 R1 D1 C6
S2
D3
T1
K4
T2
D8
S1
C4
C3
R3
060297-1 1-792060
R5
C5
R13
R4
T
K1 = 2-way pinheader for battery connection. K2 = 6-way boxheader K3 = 9-way SIL pinheader K4 = 9-way receptacle for K3 S1,S2 = pushbutton, 1 make contact, footprint 6mm 4 PCB spacers, length = 10 mm PCB set, includes two free MMA7260Q accelerometer devices (IC3). Order code 060297-71, see Elektor SHOP. Project software and supplementary documents, free download # 060297-11.zip (www.elektor-electronics.co.uk)
Figure 4. Component mounting plans of the two boards you have to populate and then assemble in piggy-back fashion.
see what the compiler has created of your source code; - a registers window where the CPU registers are visible; - a memory window where you can watch any location or force bytes to another value; - other windows with data, procedures and commands. The format of the data and the refresh rates of the data can be changed by right clicking on the window and changing the mode or format. You can save the changes by following File Save Configuration. Take a few minutes to find and play with the Start/ Continue, Single Step, Step Over, Step Out, Assembly Step, Halt and Reset Target buttons. These two documents: AN3335 - Introduction to HCS08 Back-
4/2007 - elektor electronics
ground Debug Mode and AN2616 - Getting Started with HCS08 and CodeWarrior Using C are a good place to start to find you way around the debugging environment. The bed of nails next to the MCU can be connected to a ’scope to allow you to monitor the pins’ output with the debugger in real time.
YOUR FIRST PROJECT – AN ACCELEROMETER The circuit diagram of the MC9S08 powered accelerometer is shown in Figure 3. The microcontroller, IC2, is a 16-pin PDIP device you can obtain from Freescale’s online free sample program as discussed last month. The
micro comes ‘blank’ and obviously has to be programmed with the firmware. This is done using SpYder. The accelerometer sensor type MMA7260Q is an SMA device that comes fitted on a 12×12 mm carrier board, specially for this Elektor project. You will get two of these free of charge with the PCBs for the project (see parts list). For the rest, there is little more than 12 LEDs physically arranged in four directions and switched on an off in a matrix constellation, under control of the PB0-PB6 lines the MC9S08 micro. The circuit is powered by a battery (pack) with a minimum voltage of 4.5 V (e.g. three AA or AAA penlights in series) and consumes about 25 mA when
49
HANDS-ON FREESCALE MICROS
Modify that accelerometer! The Accelerometer gadget can easily be modified to keep the maximum g reading for each axis displayed. Start by opening the project in the CodeWarrior environment (5.1). The source file, main.c, is where the application code is located. The change is to the Byte2LED function. The following code replaces the previous version: void Byte2LED(char Val, char Dir, char SenMode){ /* Positive Green */ if ((Val < PosA[SenMode])&&(Val >= PosG[SenMode])) { //if (PosA[SenMode] > Val >= PosG[SenMode]) { LEDMag[NegYLED + Dir] = (LEDOFF | LEDMax[NegYLED + Dir]); if(LEDMag[PosYLED + Dir] > LEDMax[PosYLED + Dir]) { LEDMax[PosYLED + Dir] = LEDG; } LEDMag[PosYLED + Dir] = (LEDG | LEDMax[PosYLED + Dir]); }
The code uses the passed parameter Val to scan the range of the G spectrum and finds out whether it is neutral, positive (G, A or R) or negative (G, A or R). Once it has found the correct range, it clears the opposite axis but leaves the maximum LED displayed. It then decides whether Val is a new maximum and updates if appropriate (always if Red). The routine then displays the magnitude with the maximum on that axis.
/* Positive Amber */ if ((Val < PosR[SenMode])&&(Val >= PosA[SenMode])) { //if (PosR[SenMode] > Val >= PosA[SenMode]) { LEDMag[NegYLED + Dir] = (LEDOFF | LEDMax[NegYLED + Dir]); if (LEDMag[PosYLED + Dir] > LEDMax[PosYLED + Dir]) { LEDMax[PosYLED + Dir] = LEDA; } LEDMag[PosYLED + Dir] = (LEDGA | LEDMax[PosYLED + Dir]); }
Remember to add the new LED Bitmap definitions to the header file and LEDMax bitmap to the global variables in main.c.
/* Positive Red */ if (Val >= PosR[SenMode]) LEDMag[NegYLED + Dir] = LEDMag[PosYLED + Dir] = LEDMax[PosYLED + Dir] = }
You can now save the project under a different name if you wish by following File Save A Copy As… as soon as the project is made, it is saved so the previous project version will be lost. You can also save the individual source files by doing File Save As… when in the source code window.
{ (LEDOFF | LEDMax[NegYLED + Dir]); LEDGAR; LEDR;
/* Negative Green */ if ((Val < NegG[SenMode])&&(Val >= NegA[SenMode])) { //if (NegG[SenMode] > Val >= NegA[SenMode]) { LEDMag[PosYLED + Dir] = (LEDOFF | LEDMax[PosYLED + Dir]); if (LEDMag[NegYLED + Dir] > LEDMax[NegYLED + Dir]) { LEDMax[NegYLED + Dir] = LEDG; } LEDMag[NegYLED + Dir] = (LEDG | LEDMax[NegYLED + Dir]); }
Once the code has been modified you must compile/ make the project. If no errors messages are created (fingers crossed) you can now debug the project using the button to the right (green arrow with insect).
/* Negative Amber */ if ((Val < NegA[SenMode])&&(Val >= NegR[SenMode])) { //if (NegA[SenMode] > Val >= NegR[SenMode]) { LEDMag[PosYLED + Dir] = (LEDOFF | LEDMax[PosYLED + Dir]); if (LEDMag[NegYLED + Dir] > LEDMax[NegYLED + Dir]) { LEDMax[NegYLED + Dir] = LEDA; } LEDMag[NegYLED + Dir] = (LEDGA | LEDMax[NegYLED + Dir]); }
Ensure that USBSpYder08 is selected as the Hardware Model and the MC9S08QG8 as the Device. CodeWarrior will now erase and reprogram the device with the new project.
/* Negative Red */ if (NegR[SenMode] >= Val) LEDMag[PosYLED + Dir] = LEDMag[NegYLED + Dir] = LEDMax[NegYLED + Dir] = }
If you go to the Byte2LED function and place a breakpoint at the first if statement by right clicking, CodeWarrior will halt the program when it reaches this point. In the Data window you will be able to see the value of Val and by single stepping through the function you can see the program flow in to the correct range. You can add more breakpoints and remove them by right clicking around other parts of the program.
{ (LEDOFF | LEDMax[PosYLED + Dir]); LEDGAR; LEDR;
/* Neutral */ if ((Val < PosG[SenMode])&&(Val > NegG[SenMode])) { //if (PosG[SenMode] > Val > NegG[SenMode]) { LEDMag[PosYLED + Dir] = (LEDOFF | LEDMax[PosYLED + Dir]); LEDMag[NegYLED + Dir] = (LEDOFF | LEDMax[NegYLED + Dir]); } }
50
elektor electronics - 4/2007
three LEDs in a row are lit. An onboard TS2950CT-3.3 regulator steps the battery voltage down to 3.3 V for the circuitry. Two pushbuttons are provided: S1 is the on/off control and S2 for sensitivity selection. Note the clever and economic method of reading the switches. The circuit is built on two circuit boards, which are stacked using 10-mm PCB spacers. Although the artwork for the boards is duly shown in Figures 4a and 4b, home etching and drilling is largely defeated by the low price of the set of ready-made boards with two sensor devices thrown in free of charge. Can’t beat that. Although we were tempted to design the whole thing in SMA, on second thoughts we decided to stick to a microcontroller in a plain old PDIP 16pin case, and dead common throughhole components on two 55×55 mm through-plated boards. The sensor carrier board is mounted in area ‘IC3’. Connector K2 is the 6-way BDM link to SpYder. The LED/switch board is mounted on top of the controller board using PCB spacers. The electrical connection with the controller board is made via a SIL pinheader. The assembled, fully working prototype is shown in the introductory photograph, the separate boards, in Figure 5.
PROGRAMMING Believe it or not but we still get complaints from readers that Elektor projects do not work despite “a brand new micro bought from Xxyyzz Corp. plugged in at the right location and all solder work approved by a friend with 40 years experience in electronics”. Blank microcontrollers have to be programmed before they can do anything that’s even remotely useful. Download the free archive file 06029711.zip from the Elektor website and unpack it in a suitably named direc-
Figure 5. Populated boards prior to assembly with PCB spacers in the four corners.
tory, e.g., ‘Accelerometer’. Get SpYder, the accelerometer hardware and CodeWarrior connected up and running. In CodeWarrior IDE, follow File➔Open ‘Project’ and then navigate to the previously created directory to locate ‘Accel Proj.mcp’. Load the project, select the right device to program (MC9S08QG), compile, create the object code and program the micro on the accelerometer control board through the BDM link. It’s a good exercise to get to know all aspects of the Freescale microcontroller environment, and nothing can go wrong really as you can always erase and have another go. Let us know how you get on – a topic will be found on the Elektor online Forum to communicate with other users and the designers.
PRACTICAL USE Keep the on/off button depressed until the LEDs come on. A running light(-ish) sequence will be performed allowing you to see that the micro is awake, running firmware and all LEDs are functional. The instrument is then ready for use. Give the boards a few sudden motions with your hand to verify the g readout in four directions. The sensitivity switch may be pressed to select between three ranges, as follows:
Sensitivity Green on Yellow on Red on
Min. 0.45g 0.80g 1.15g
Med. 0.29g 0.53g 0.97g
Max. 0.15g 0.27g 0.39g
The instrument is switched off by keeping the on/off pushbutton depressed until the LEDs start to do a crosshair imitation. A more detailed discussion of the operation of the accelerometer firmware is available in a separate document included in the free download with this article. The content is aimed at seasoned programmers.
CONCLUSION The SpYder Discovery Kit is a surprisingly flexible tool that does meet all the needs of low-budget developments. It directly supports Freescale’s 8-pin S08 PDIP devices with the ability to extend pin count using the chip ‘target’ option. CodeWarrior is a very powerful tool and a bit daunting at first, but once you been shown where all the necessary buttons are you can get started very quickly. You are also sure to learn about other capabilities as you get used to the tool, with the help of the documents and training Freescale provide online. Further projects using SpYder are in the pipeline at Elektor. (060297-I)
4/2007 - elektor electronics
51
HANDS-ON MICROCONTROLLERS
Programmer for Freescale
68HC(9)08 First steps in 8-bit development
Guillaume Dupuis
Freescale is one of the leaders in the microprocessor and microcontroller market, backing up its products with a very comprehensive range of support products and high-performance development tools. For the price of a 74xx TTL IC, there’s something to delight anyone nostalgic for the 68HC11. Here’s a programmer that lets you program Flash M68HC08 and 68HC908 family microcontrollers. There are several ranges in the Freescale micros, available in different packages (DIL, SOIC, QFP, LQFP). There are also hybrid solutions (RF, motor control, etc.) We’re going to take a look at this manufacturer’s 8-bit products and suggest a suitable programmer. The architecture is inherited from the 68HC05, reworked to be optimised with C (address modes, stack operations, conditional branching, and so on). Pure ASM programming is not recommended — it’s better to include the ASM code within the C program. The software suite supplied by Freescale is very powerful and saves a lot of valuable time.
52
THE FREESCALE RANGE Freescale offers ColdFire 32-bit micros intended for heavy-duty applications (Ethernet IDE, etc.). DSPs and 16-bit 68HC12 microcontrollers are also available, used mainly in automotive fields. In the 8-bit category, there are three ranges: 68HC908 This is the oldest range, so it’s no surprise that it includes a wide range of products. Programming is achieved by a monitor program present in ROM, via an RS-232 link.
68HCS908 The latest generation of micros, these have the greatest number of communication ports (I²C, USB, Serial, LIN) and a higher operating frequency. A key feature is their BDM link. See ‘Attack of the SpYder’ (Elektor March 2007) and ‘Two-Axis 2g Accelerometer’ (in this issue). Elektor, in exclusive cooperation with Freescale, sells the SpYder Discovery Kit for just £ 6.45. 68RS08 An ultra-cheap microcontroller ($0.50 in quantities) available in 8- or 6-pin, with a slimmed-down instruction set, and many hardware functions emula-
elektor - 4/2007
The advantage of programming in C C is a language that makes it possible to carry out direct manipulations on the memory (pointer). It also makes it possible to forget about the assembler code specific to the micro. In terms of optimisation, C makes it possible to generate fast code, in particular thanks to the various address modes. It’s always possible to insert chunks of ASM code so as to optimise a function in terms of execution speed — feel free to do so. Example:
DDRA = 0xFF; For (PTA=0;PTA !=0xFF;PTA++ ) {PTA++;} Or: DDRA = 0xFF; For (PTA=0;PTA !=0xFF;PTA++ ) {_asm INC PTA;} Bit manipulation in C The ANSI C language does not allow manipulations on bits out of a byte. Fortunately, Freescale declares Byte types as a structure of eight characters. Example:
x = PTA_PTA2; x = (PTA & 0x04)>>2; These two expressions are equivalent; the first is more readable and stores the result in the stack, which avoids problems when using an interrupt, or recursive functions.
Communication Does the application require specific communication ports? Synchronous or asynchronous serial ports are available, as well as an ADC or I²C interface.
ted in software (e.g. timer, interrupts, and so on).
CHOOSING A MICROCONTROLLER FROM THE 68HC908 RANGE In view of the number of versions available in a family like the 68HC908, before choosing a microcontroller you need to start by defining the specification you want for it. Does it need to be able to communicate? have USB capability? have specialised outputs? It’s perhaps worth taking a quick look at the characteristics of each of these elements to see what the available options are…
4/2007 - elektor
USB The USB port is currently widely used, and two of the families incorporate a USB1 controller. Specialised outputs In certain applications, you may have a requirement to control a 3-phase motor. To do this, you need to use a specialised IC. A 68HC908MR32 family exists that incorporates 6 PWM outputs capable of working with an IGBT bridge. Frequency and dead time (rest time) can be adjusted independently for each bridge. In certain families, 20 mA current source outputs are provided — ideal for powering an LED, for example.
There are also outputs that include internal pull-up/-down resistors. Space requirement Each model is offered in different package types: DIP, PSDIP, LQFP. This explains why some families have only a limited number of I/Os. Memory Each family has several models with different sizes of Flash memory, varying from 2 to 64 kB; they are generally pin-compatible. The development tools are restricted to 16 kB — to remove this restriction, you need to purchase a professional license. The number of read/write cycles is not infinite for Flash-type memory, which is why the 68HC908AB32 family has an EEPROM memory zone. Supply voltage Care is needed with the supply voltage: certain models operate at 1.8, 2.5,
53
HANDS-ON MICROCONTROLLERS
Special peripherals All the micros have an LVI (Low Voltage Interrupt) that enables generation of an interrupt when the supply voltage drops, very useful for saving settings before the system shuts down. Certain micros have a KBI (KeyBoard Interrupt), the principle being to have a large number of outputs with interrupts for easy keyboard interfacing.
R9 D3
+5V D1
1N4004
IC3
S1
9V1
+5V
7805T
OSC1
14
K3 R3
Power saving All the micros have the WAIT instruction that makes it possible to put the CPU into stand-by until an interrupt is received. One of the families puts all peripherals except the interrupt module into standby; the stand-by current is virtually nothing (800 nA).
1
R5
8 C9
C17
C16
100n
100n
C10
D4
7
+5V C2
+5V
2
3
13
8
8
4 9 5
C5
4
T1OUT
T1IN
T2OUT
T2IN
R1IN
R1OUT
R2IN
R2OUT
D2
11
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1N4148
12
IC1 = 74AC04N
9
R1
C2+
1M
IC1.F
15
C2– V-
SUB D9
K1 1
10
MAX232 5
+5V
7
6
13
1
IC1.D 12
9
C3
1
8
C1
6
X1
R8
7
C1–
R7
14
7
THE MON08 INTERFACE
14
IC1
1k
2
16
IC2
JP1
C6
BDM LINK 1
22p
3
5
+5V 22p
060263 - 11
Figure 1. Programmer circuit diagram Note presence of quartz resonator option, which is not on the board.
3.3, or 5 V. The programmer we’re suggesting only works with 5 V micros. Special inputs Virtually all the micros incorporate a multiplexed ADC on several inputs; the resolution may change from one model to another (8- or 10 bit), as well as the acquisition time and the number of multiplexed inputs. Pulse counters can be produced using the timers. We suggest using these two models: 68HC908QY4A A micro intended for smaller applications, available in DIL format, this has: – Built-in oscillator – 4 kB of Flash – 2 16-bit timers – 6 10-bit ADCs – 13 I/Os 68HC908JL16 With a larger memory and serial and I²C communication ports, this has:
54
In order to standardise the various types of programmers, it was decided to adopt common connectivity. The manufacturer’s data gives the pin-outs used according to the family (see the examples given in the ‘K3 jumper setting’ box).
2
3
R6
6
V+
C1+
1k
1
1k
C4
4
1
10k
K2
+5V
R2
– 16 kB of Flash – two 16-bit timers – 13 10-bit ADCs – 26 I/Os including ten LED drivers (20 mA) and eight interrupts. – Serial port and I²C
PERIPHERALS COMMON TO THE 68HC908 FAMILY Flash memory This can be programmed in the course of the program, but the write routine and data to be written have to be in RAM. The maximum number of writes is 10,000, advertised data retention is 10 years.
This link can be found on the HCS908 categories and the RS908s, see the SpYder article mentioned above. Unlike the MON08 link, which uses a large number of I/Os, the BDM uses only three wires: ground, data, Vap (Flash memory). This interface communicates via the USB port, and circuits for programmers are available. They are, however, more complicated as a 68HC908 has to be programmed to manage the USB and the BDM link. You can find BDM programmers for about £35 ($50) (through P&E micro, for example).
COMING SOON In 2007, Freescale is expected to release ColdFire V1, the principle being to use a 32-bit CPU with the 68HCS908 peripherals. The packages will be pin-compatible with their 8-bit equivalents.
CIRCUIT DESCRIPTION All the 68HC(S)08s have a charge pump to produce the voltage required to write to Flash memory. The Flash memory is read-protected by a security register, offering program security.
Current microcontroller programmers have one thing in common: their electronics are as simple as could be. As the circuit diagram in Figure 1 shows, we have opted for a tried and tested solution and an RS-232 interface. This
elektor - 4/2007
Components list Resistors R1 = 1MΩ R2 = 10kΩ R3,R5,R9 = 680Ω R6,R7,R8 = 1kΩ
Miscellaneous: S1 = momentary switch, push-to-make X1 = 9.8304MHz quartz crystal K1 = HE10 header, 2 rows of 8 contacts K2 = 9-pin sub-D socket (female), PCB mount K3 = snap-off pinheader, 1 row of 2 contacts (Power) JP1 = snap-off pinheader, 2 rows of 3 contacts PCB, ref. 060263, from The PCBShop
Capacitors C1,C6 = 22 pF C2-C5 = 1μF 16V C9,C10 = 47μF 16V C16, C17 = 100nF Semiconductors D1 = 1N4004 D2 = 1N4148 D3 = zener diode 9.1V / 400mW D4 = LED, red, 5mm IC1 = 74AC04N IC2 = MAX232 (Maxim) IC3 = 7805
K1 2 1
2,54
16 R6
C4
C1 R1
C2
JP1
SERIAL LINK
R3
R5
IC3
R9 680
K2
D4
1
X1
S1
K3
D1 2
6
R8
14
1
IC2
1
6
F09
OSC1 IC1
8 9,1V
D2 R2
R7
7
C5 D3
1F
5
9
C3
explains the presence of an old friend, the MAX232, IC2. At the bottom left of the circuit diagram is a traditional power supply based around a regulator IC, IC3, with the usual filtering and smoothing capacitors. LED D1 lights to indicate the presence of the supply voltage. We might be wondering what on earth IC1 is for. Well, it’s a hex inverter, often used for clock generation when there is no processor on the board. Here, it’s used to generate the clock frequency needed by the Mode Monitor to talk to the PC at the serial frequency the latter is expecting. The clock frequency can be obtained in two ways: by a combination of a crystal and capacitors plus a pair of inverters built in to IC1 (the solution we’ve chosen here); or by using a quartz resonator, OSC1 (shown here in grey). In the latter case, IC1, R1, X, C1, and C6 will not be fitted. The momentary push-tomake button S1 is used for Reset. Header K1 is used to connect the programmer to the target board. It accepts a 16-way cable, the other end of which will plug into an adaptor whose characteristics depend on the unit being programmed (see heading ‘Programming support’ below).
C17
C9 C10 C16
C6
The programmer we suggest building uses an RS-232 serial link, which is modern computers and laptops don’t tend to have. Version 5.1 of the software does not work very well with USB RS-232 adaptors. One solution is to use version 3.1 of the development software.
CONSTRUCTION
Figure 2. Track layout and component side overlay designed for this project.
4/2007 - elektor
Thanks to the printed circuit board shown in Figure 2, building this project should be within the grasp of most readers, even beginners. You need to start by deciding which type of oscillator to use, either quartz crystal X1 and associated components, or the oscillator block OSC1 (see reference to this under the ‘Circuit description’ heading). The simplest solution is to fit a 14-pin socket in the position marked for IC1, and then to plug into it either IC1 or OSC1 — the two components have the same pin-out, although the quartz oscillator only has 4 pins. If the IC1 option is chosen, R1, X1, C1, and C6 must be fitted. If you choose the OSC1 approach, these four components are not fitted. As usual, start by fitting the passive components, resistors and capacitors,
55
HANDS-ON MICROCONTROLLERS
then the diodes (pay attention to the polarity of the polarised capacitors C2– C5, C9, C10, and the diodes). There are three wire links in the circuit that must not be overlooked on penalty of creating a hard to find fault in the circuit. Connection between the programmer and the support is via a 16-way ribbon cable. Then the IC sockets, crystal, regulator (lie it flat on the board) and the headers can be fitted. Pushbutton S1 will be soldered directly to the pins provided for it, or linked to them via three lengths of flexible wire, if the programmer is to be fitted into an enclosure.
TESTING THE PROGRAMMER When the switch is ‘ON’, the LED should light. Check the orientation of the diodes and electrolytic capacitors. Before fitting the ICs, check the ground and supply rails for proper continuity. Test the continuity of the programmer tracks as far as the programming socket. There’s a tutorial application showing how to test the software element.
PROGRAMMING SOCKET The I/Os used for programming differ between models, so a programming socket has to be built for each family. This socket is very easy to make, it only has an IC socket and a MON08 connector (16-pin). Using the MON08 pinout makes the socket compatible with all programmers, which is very useful when you use QFP or ShrinkDIP supports. Another approach uses an MON08 connector on the target board.
PROGRAMMER CLOCK A 4.9152 or 9.8304 MHz clock can be used; changing jumpers allows the oscillator frequency to be divided by two. It is also possible to set 4,800 baud instead of 9,600 baud in the software. It is preferable to use a quartz resonator, though they’re not always easy to find in the shops, hence it’s possible to fit a crystal with its oscillator circuit.
PROGRAMMER VS. EMULATOR The principle of the programmer is to communicate with the HC908 to perform debugging and send the program. The I/Os used to perform these operations cannot be enabled during debugging. An emulator is a much more complex
56
Setting the jumpers on K3 The selection header K3 has to be configured according to the exact type of 68HC908 microcontroller in use (see Figure 3). Two examples are given here, using either a JL16 or a QY4A.
68HC908 JL16 Communication @ 9,600 baud PTB1 PTB2 PTB3 Fosc 4,9152 1 0 0 9,8304 1 0 1
68HC908 QY4A Fosc 4.9152 9.8304
PTA1 1 1
PTA2 0 0
Bit rate 4,800 baud 9,600 baud
JL16 1
QY1A 1
2
2
NC
GND
NC
GND
NC
RST
NC
RST
NC
IRQ
NC
IRQ
NC
MON4 = NC
NC
MON4 = PTA0(COM)
NC
MON5 = PTB0(COM)
NC
MON5 = PTA4(0)
NC
MON6 = PTB1(1)
NC
MON6 = PTA1(1)
OSC
MON7 = PTB2(0)
OSC
MON7 = NC
VDD
MON8 = PTB3(DIV)
VDD
MON8 = NC
15 16
15 16 060263 - 12
Figure 3. MON08 connector pin-out if a QY4A or JL16 is being used.
system that involves emulating these I/Os by another circuit, leaving all the I/Os usable during debugging, whence its higher price.
PROGRAMMING PRINCIPLES
Freescale offers kits comprising the programmer, USB connectivity and a microcontroller on the same board (e.g. the SpYder BDM). I/Os are available, along with a connector for ‘remoting’ them. These kits normally cost £ 25 ($ 50).
To be programmed, the IC has to go into monitor mode; to achieve this, all you have to do is apply a voltage of 9 V, generated by zener diode D3, to the IRQ pin. Once in monitor mode, the transmission rate must be set using the jumpers. Commands are sent via the RS-232 link to carry out Flash memory operations, display register status, and also to run the program in step-by-step mode (In-Circuit-Debug).
DEBUG
APPLICATIONS
The software includes a debugger that lets you go through the instructions one step at a time. The contents of each register can be displayed at any moment. However, you have to be careful not to disrupt the communication between the micro and the programmer.
So why would anyone want to start programming a microcontroller like the 68HC08 in the first place? Freescale is bound to have asked itself the same question and suggests numerous applications for the products in this family. We’ll mention just a few of them, to whet your appetite and make you want to have a go with these inexpen-
DEVELOPMENT KIT
elektor - 4/2007
sive components, since the investment required for such a programmer is negligible. Controlling a fan The aim is to adjust the rotational speed using a Hall-effect sensor, and also to limit the speed in the event of overheating.
Development support Via its CodeWarrior development environment, Freescale offers us three tools to speed up development time. So you need to start off by installing this IDE (Integrated Development Environment).
Wireless air-conditioning controller This application comprises two modules: a base unit that controls the air-conditioner, and an IR remote to control it. The base unit is designed around a specialised micro used for management of LCD screens. Controlling high-power LEDS We also spotted a 68RS08 micro that can replace a traditional regulator circuit. With a more powerful model, one could produce a so-called ‘industrial’ application, consisting of driving several channels (RGB). Freescale also offers ZigBee and Bluetooth modules ideally suited to all sort of remote control.
Figure 4. Here’s the first screen you’ll see when developing a project based on the HC08. The CodeWarrior software is very user-friendly.
CONCLUSION A very comprehensive range of highperformance products, primarily intended for industrial applications, and as a result, largely unknown to the layman. The choice of a make is no longer based on operating speed; a comparison performed by the author demonstrates the optimisation of Freescale micros in the face of Microchip PICs. It can be seen that manufacturers are competing over the development suite — an important criterion in choosing a micro for an application. The advent of the new generation of Freescale ColdFire V1 micros should open up some interesting possibilities. (060263-I)
WEB LINKS www.freescale.com www.softecmicro.com www.pemicro.com www.68hc08.net (French) https://www.freescale.com/webapp/ search/MainSERP.jsp?SelectedAsset =Design%20Tools#1694054 Search for CWX-HC08-SE (you have to be signed up to be able to download)
4/2007 - elektor
Figure 5. Development using Processor Expert; on the left is the list of ‘Beans’ and on the right, the target micro.
None This mode creates a project, initialising both the registers and the memory. It includes a library defining the addresses of all the registers. Device Initialisation With this tool, the various registers are configured when the micro starts up. Everything is graphical and intuitive, it generates C code or ASM and the necessary functions (interrupts, etc.). This step is transparent for the user.
Processor Expert This is the ultimate solution, the principle is that Beans are used throughout the project. Each Bean can be configured graphically, possesses functions, and can generate interrupts. You just tick the functions you are interested in. To use them, you just drag-and-drop them into place. The system performs very well and offers advanced settings. Functions can still be created in C or ASM. Sticklers will say that this mode is not optimised in terms of the size of the code. True, it isn’t optimal — but is this really a problem when you have 16 kB of Flash to play with? On the other hand, anyone developing simple applications will be glad of the substantial time saving. For smaller projects, it is possible to create an application without even opening the documentation!
57
HANDS-ON PIC24F DESIGN SERIES
Explorer-16 (4) Part 4 (final): beefing up the Speaking Thermometer Jan Buiting & Luc Lemmens, in cooperation with Microchip Technology and Labcenter Electronics
In this final part of the series we combine the information from instalments 2 and 3 to create a system which provides much larger memory capability and therefore increased flexibility, potential for larger spoken messages, and, as we shall see, the option for multi-language support and a (much) larger vocabulary.
from the user manuals that typically come with these low-cost ‘black box engineering’ products. Regarding the hardware aspect of this series, our Explorer-16 Value Pack also proved popular with the first batch of 250 pieces selling out in less than three weeks after publication of Part 2.
THAT CRYPTO PUZZLE!
Figure 1. Demo4 for MPLAB / VSM packs together the things we learned in the two previous instalments.
We’re sure you can get a speaking thermometer from Highstreet electronics outlets that costs far less than the Explorer-16 design we’ve demonstrated on these pages and on our website. Sadly, the devices of far-eastern origin
58
are not only of doubtful construction standards, but more importantly they teach you nothing about microcontroller programming and simulation. On a positive note though, funny bits of Babelfish ‘Engrish’ may be gleaned
The cryptographic puzzle we presented last month has drawn a very good response and lots of readers enjoyed cracking the secret agent’s code. The enthusiasm was such that correct solutions were reported on our forum less than a day after the article instalment and the free download were available from our websites! As it turned out, it was unnecessary for us to post clues to solving the puzzle. To solve the puzzle, readers had to explore the contents of CFIMAGE.BIN using a hex editor and find the directory table and/or possibly the text itself of ENCODE.C. This revealed the encryption algorithm. It was then a fairly simple task to modify the code in DEMO3.C to read, decode and display SECRET.DAT within the simulated environment.
elektor electronics - 4/2007
The algorithm itself was a simple rolling XOR mask. The operation having been set up as symmetrical, the same loop can be used for both encoding and decoding! Hence no specialist cryptography skills (or investments) were required to actually solve the puzzle. Free, fun and challenging! Once decoded, readers found the email address ‘[email protected]’ to send his/her details to plus other terms and conditions related to the competition. The programs that went into making the ‘secret agent’ puzzle are now available as a free download called Crypto. zip from the Explorer-16 project page.
NOT TOO EZ There are complexities to grapple with in getting a multi-language system to function using the vocabulary building method which has been implemented for the sake of structural programming and file use. But then, Explorer-16 is a microcontroller challenge in itself, especially once you are beyond the demos, so let’s tackle the complexities. English, Dutch and German being Germanic languages, they share common features in respect of accentuation, sentence construction and morphology. French being a Romance language is a little more tricky as it requires more logical constructs in the source code to be developed but surprisingly is more efficient in terms of total words required.
guage prefix to allow the correct file to be selected. As an example, DE100.dat would be the German language file for one hundred. When constructing your sound samples and saving them, this requirement should be noted as it effectively limits the short file name to six rather than eight characters.
MPLAB/VSM SIMULATION #4 For this month’s final instalment, Microchip and Labcenter have created yet another free demo for you to run on your PC —. Like the previous three demos, it works even if you do not actually have an Explorer-16 Value Pack. Demo4.zip to be released as a free download with this magazine article again shows the respective products PIC24F and Proteus VSM interlocking seamlessly. Demo4 is shown in action in the screendump in Figure 1. For the simulation, an additional DIP switch has been added to the design file which does not exist on the Explorer-16 hardware! This is added as an aid to simulation and, ultimately, if a PCB were being generated from the
schematic/PCB design and simulation capability from within the same design file. Add to this the debug capability afforded by the MPLAB and Proteus VSM combination and we have a very powerful tool indeed. The DIP switches are added to allow the batch mode simulation to occur and hence the speech output to be generated. Since batch mode is a mixed mode simulation the user has no ability to input and perform such operations as a button press. Therefore some additional stimulus is needed to allow the code to interpret the desired user operation. This method has already been put to use in the original Explorer-16 speech design in Demo2 which uses a stimulus input to simulate pressing the S4 button to initiate sampling the ADC and generation of the relevant output. In much the same way the DIP switch is used to override the function of the S3S6 buttons and provide the language selection. The default language being English, it is however left as an exercise for the user if they wish to change the default state.
CONSTRAINTS To help with resource usage across the system, individual files have been limited to 4 k on the flash (CF card) media (see Part 3). This can obviously be extended if larger phrases are recorded as a whole, however the buffering on the MCU side would become more complex. For ease of understanding, the buffering method has been kept simple since we use small sound bites of <4 k for the vocabulary. This provides a sensible file size relative to available RAM on the MCU and minimises code complexity. This also eases streaming of data from the flash media. Where more RAM is available, larger file sizes can be used, or buffering the data. Also, the system should ensure the file is left open on the card. The format for the overall vocabulary is similar to that of the original English language variant, but uses a lan-
4/2007 - elektor electronics
Figure 2. PICtail CF/MMC board and a sample of a Sandisk SD flash card (not included in AC164122).
simulation files, the DIP switch can be excluded from the board, in much the same way as the virtual DVM would also need to be excluded. This is one of the powerful features of the VSM environment since it allows for this dual
59
HANDS-ON PIC24F DESIGN SERIES
IN HARDWARE… If you wish to try the operation in hardware, you need to plug in both the PICtail Audio Plus board and the CF Card board (on the Explorer-16 development board. The latter is available from Microchip Direct as item no. AC164122 (PICTail board for SD & MMC cards), see Figure 2. You will need to solder in the second PICtail bus connector on the dev board. The connector is available from www.samtec.com, or from Digikey, part number MEC1-160-02-SD-A. The complete hardware setup is pictured in Figure 3. By the way, the right-angle pinheader fitted on Microchip PICtail daughterboards is to allow them to work with 18F devices on the standard PICtail board. Here at Elektor we decided to cut off the pins because they are dangerously close to the JTAG connector on the Explorer-16 development board. The card edge connector on the PICtail CF/MMC board fits the blank section in either the second or third segment of the high-density bus connector on the dev board. This is to allow it to operate with either SPI1 or SPI2. The FAT software uses SPI1. The language would be selected by the relevant key press whilst a reset is performed. This should then keep the desired language state until a different language option is required. Again, this could be modified to make use of the LCD or Serial Terminal Feature. In this case however we have opted for a simplified operation to prove the concept.
A GUIDE TO CREATING YOUR OWN SOUND FILES The step-by-step action of creating the sound files for the speaking thermometer is complex as well as specialised. That’s why we decided to outline it in a free supplementary article that may be found on the Explorer-16 project page on the Elektor website. Look in the Free Downloads Area, section Part 4. The pdf document is well worth obtaining for budding programmers interested in sound sampling, imitating Chemical Brothers and what have u. It should be noted that for the external media cards we can omit the step performed with the MPFS utility. Instead, the FATUtil utility, described in another free download with this month’s instalment, will be used to add the compressed ADPCM (.dat) files to the binary image of the card in the Proteus design folder. In cases where
60
CRYPTO PUZZLE
HOW THEY DID IT
Elektor readers are smart readers. Here’s how one of them – who shall remain anonymous – solved the Explorer-16 Crypto Puzzle. Mind you, it’s just one of many approaches to cracking the code. We were impressed. 1. Wrote the bin file of the CF image onto an SD card (no CF cards available here) 2. Read the SDcard using card reader, then I noticed two files: ENCODE.C and SECRET.DAT 3. Programmed this: // Store the character into the buffer using a simple // xor encryption scheme buffer[pos++] = c ^ mask; mask++; 4. Decrypt is done basically the same way as encode buffer[pos++] = c ^ mask; mask++; 5. Applied Winhex and selected the content of secret.dat. Saved as a C array, see xorc.txt next i used c++ paste the array using a for loop unsigned char data[1130] = { 0x56, 0x67, 0x6F, 0x68, 0x25, 0x62, 0x68, 0x66, 0x6C, 0x2B, 0x06, 0x06, 0x20, 0x04, 0x56, 0x7F, 0x64, ........ outFile = fopen(“c:\xor.txt”, “w+b”); for (i = 0; i < 1130; i++) { fputc((data[i]^(i+1)), outFile); } fclose(outFile); Explorer board used to combine the databanks to fit the large array (1130), then connect an SDcard connector to the dspic. First read the file using fopen secret.dat, then next overwrite this file on the SDcard with the converted array contents using fwrite character or similar (basically the same as fputc does). fopen secret.dat. Read the contents to array using fread character for (i = 0; i < 1130; i++) { data[i]=fread; //asuming fread will point to next character each time when calling } fclose fopen secret.dat for (i = 0; i < 1130; i++) { fputc((data[i]^(i+1)); } fclose; The solution took some time to find because in my case the workaround with sdcard.c is needed (I still have limited experience using Proteus). Well done! You have successfully deciphered the secret message stored on the compact flash card. A prize will be awarded for the first 12 correct solutions. To enter the competition you must email [email protected] with the following a) A brief description of the method you used to extract the secret message, including any code you used. b) Your contact details include name, physical address telephone number and email address. Entered solutions will be judged to be valid or otherwise at the sole discretion of Microchip Technology. All solutions will be acknowledged with an indication of whether they were valid or not, and whether you were among the first 12 correct entries. By entering the competition you agree that you may be contacted by employees of Elektor, Microchip or Labcenter Electronics for research and marketing purposes. However, you may be assured that your details will NOT be passed to any other parties. You also agree that your solution may be published by Elektor either in print on their Website.
elektor electronics - 4/2007
the files are added to an actual media card for use with the hardware, you simply copy the .dat files to the card. The limitation imposed is that all files must be in the root directory on the media card as the present demo code has no support implemented for folder navigation. Also, it should be duly noted that the FAT16 code is released in beta format to help support these articles and may be subject to future changes. At the time of writing, the code is not officially supported by the standard Microchip support network, which goes to show Elektor once again being in the forefront of microcontroller technology. Once the relevant code is released as a full library, the normal support will be fully available. In the interim period, support or questions can be funnelled via the Explorer-16 topic on the Elektor forum.
LOOSE ENDS
Figure 3. Audio Plus board and CF/MMC board plugged on to the PICtail bus of the Explorer-16 development board.
A few ‘niggling details need to go in print specially for those who do not follow the updates and messages published on the Explorer-16 project page, and the Elektor forum. • When redeeming the C30 discount Coupon in the Explorer-16 Value Pack via www.microchipdirect.com (select your national flag), near the end of the ordering procedure for C30 Compiler you are asked to enter a Voucher Reference Number. Omit ‘ELEKTOR’ and the final digit. • The centre pin of the supply connector on the Explorer-16 dev board is the positive supply (9-15 VDC unregulated). • Labcenter have special offers for a number of their simulation modules for Proteus VSM, see www.labcenter. co.uk/products/elektoroffer.htm. • Spare PIC24F/H and dsPIC33 PIMs are available at www.microchipdirect.com (select your national flag). • There is no way you can run the demos and simulations on a ZX81 or a Windows 98 PC.
tions of a simulated microcontroller system at zero cost to the user. Look out for more from this winning combination in the future. Finally, we would like to express our thanks to several experts at Microchip Technology and Labcenter Electronics who have burned their midnight oil to bring you this unique series of articles with a CD-ROM and lots of free software thrown in ‘for your pleasure’.
CONCLUSION Hopefully this four-instalment article has provided an insight into some of the capabilities and tasks which can be achieved on the PIC24 micro. As already intimated in previous instalments, there is much more to offer. The series has also highlighted an excellent combined tool package in MPLAB and Proteus VSM. This has allowed us to provide high functionality demonstra-
4/2007 - elektor electronics
Where not indicated, trademarks (™) and copyrights (©) of Microchip Technology acknowledged for their PIC, dsPIC, MPLAB products.
Project news, free downloads & updates for this are available from the Explorer-16 project page at www.elektor-electronics.co.uk/explorer-16 and the ‘Explorer-16’ topic on the Forum at http://www.elektor-electronics.co.uk/default. aspx?tabid=29&view=topics&forumid=22
(060280-IV)
Explorer-16 Value Pack Elektor’s Explorer-16 Value Pack consists of four components packaged together in a single box:
1. 2. 3. 4.
Explorer-16 Demo Board PIC Kit 2 Starter Kit Audio PICtail Plus daughterboard MPLAB C30 20% Discount Voucher
SOL OUTD
The pack is available for £ 122.90 (€ 179.00 / US$ 232.50) from the Elektor SHOP, see www.elektor-electronics.co.uk or the SHOP pages in this issue. Labcenter Electronics have listed several Proteus VSM offers for Elektor readers following the Explorer-16 article series. Have a look at www.labcenter.co.uk/products/elektoroffer.htm.
61
HANDS-ON MODDING & TWEAKING
Electronic Badge Michael Gaus & Thijs Beckers
The market for electronic gadgets thrives like never before. Can we still make something nice ourselves? Yes of course! In this month’s Modding & Tweaking article we use a mobile phone display to dynamically show images. Mobile, illuminated and very eye-catching as a name badge or case mod.
The standard pin or clip-on badges are well-known by now. They are almost a necessary evil when visiting exhibitions and the like. But why not make it into something nice? That is how the following project was born. Using an LCD from an older model mobile phone this is certain to be a success.
MANY COLOURS The displays in mobile phones are getting better all the time. In the past there was only black and white, these days the colours seem to jump off the screen. We could of course use the latest and greatest display, but that will unfortunately hurt our wallet a lot. A little bit less will work just as well, for example the display from a Siemens C60 we got from E-bay for 7 quid or so (Figure 2). That’s more like it! The display with the riveting part number LM15GFNZ07 has a resolution of 101 by 80 pixels and can display 4096 colours. After a little experimenting we discovered that the LCD operates with an SPI bus. Once we knew this, we realised we could use an AVR microcontroller type ATMega8, to drive the display. The only thing that remained to be provided was some sort of medium to store the pictures to be displayed. For this we decided to use an SD memory card (MMC can also be used; it has the same dimensions and pinout). The AVR micro reads the files from the memory card and shows them on the display. Multiple bitmaps are shown one after the other in a slide show. The amount of time that each image is displayed is adjustable.
HEART OF SILICON
Figure 2. The C60 display from Siemens. There is no way you could make this yourself for just over a fiver...
62
In the schematic (Figure 1) we see that only eight discrete components are used. The other two components are ICs. The heart of the circuit is the AVR-microcontroller of course, its program memory of 4096 words is for 99.8% full. There are only 14 bytes spare. For a future model we keep the pin-compatible ATMega168 already in mind. This one is via the reset output also easy to debug. To regulate and condition the power supply voltage for the microcontroller we use a low-drop voltage regulator from Analog Devices, the ADP 3303. Hint: using the samples-program from Analog Devices you can have this IC delivered to your door at no cost. The LEDs for the LCD backlight are connected directly to the 4.5 V input voltage via R1 and R2.
elektor - 4/2007
470n
NR
GND
/ERR
J4
10k
29
R3 V+
6
470n
ADP3303AR-3.0 GND
J3
C2
GND
8 7 20 18 21
VCC C1 100n
4 3 6 5
GND
19 22
VCC GND
GND
R5
IC1 RESET XTAL2 XTAL1 AREF AVCC AGND VCC GND VCC2 GND2 ADC6 ADC7
VCC
(SCK)PB5 (MISO)PB4 (MOSI)PB3 (SS)PB2 (OC1)PB1 (ICP)PB0 (ADC5)PC5 (ADC4)PC4 (ADC3)PC3 (ADC2)PC2 (ADC1)PC1 (ADC0)PC0 (AIN1)PD7 (AIN0)PD6 (T1)PD5 (T0)PD4 (INT1)PD3 (INT0)PD2 (TXD)PD1 (RXD)PD0
ATMEGA8_TQFP
17 16 15 14 13 12
VCC
10k
4
3
R4
C3
IN1 IN2
VCC
1 2
OUT1 OUT2
SD_SOCKET
7 8
/SD
1 2 3 4 5 6 7
V+
IC2
J2
5
/SD_CS SD_DI SD_GND SD_VCC SD_CLK SD_GND SD_DO
Mobile phone LCD with slide show
*
J1 J1X 1 2 3 4 5 6 7 8 9 10
R1 150Ω
28 27 26 25 24 23
V+
R2 150Ω
LCD
/LCD_CS /LCD_RESET LCD_RS LCD_CLK LCD_DATA LCD_VCC LCD_GND LCD_LED1_A LCD_LED_K LCD_LED2_A LM15SGFNZ07
GND
11 10 9 2 1 32 31 30
VCC = 3,0 V V+ = 4,5 V S1 GND
075043 - 11
Figure 2. The C60 display from Siemens. There is no way you could make this yourself for just over a fiver...
Figure 3. Our prototype. The display is fitted on the other side.
4/2007 - elektor
Figure 4. Wires with reducing lengths make threading easier.
63
HANDS-ON MODDING & TWEAKING
To get the circuit to work it is of course necessary to program the AVR. The source code in HEX-format can be downloaded from the Elektor Electronics website (see month of publication). On the SD or MMC card there has to be a configuration file indicating how long each picture is to be displayed. Although the file is just a text file containing only the time in milliseconds, we have zipped it together with the HEX file for convenience.
PRELIMINARY WORK
Figure 5. The LCD certainly works well.
The BMP files need to conform to a few requirements. Firstly, the dimensions: 101 pixels horizontal and 80 vertical. The colour depth has to be 16.7 million. In this way, every bitmap file, including the header, is exactly 24,374 bytes in size. The microcontroller takes the first four bits of each of the colours (red, green and blue). The image has to be stored upside down (i.e., mirror it horizontally first). The reason for this is the way a BMP is stored, namely ‘from bottom to top’. By storing the picture reversed (‘normal’) the task of reading the file and displaying it by the AVR has been made much easier. The memory card has to be formatted in FAT-16 format. This can be done with a standard card reader. This format limits the number of files that can be stored in the root directory to 512. Taking into account the config file and since no directory structure is supported a maximum of 511 pictures can be stored on the memory card. This is sufficient for the time being. The files are also not allowed to be fragmented. By first formatting the card and then copying all the BMP files in one go you can prevent this from happening. The images are displayed in the same order as they are stored on the SD card. The file name has to be in DOS 8.3 format. Long file names are not supported.
CONSTRUCTION WORK Because the badge was going to be worn by colleagues at the Embedded 2007 exhibition, we quickly designed a small PCB (Figure 3). The design of a proper PCB we leave up to you. When mounting the parts it is best to start with the ATMega8. Followed by the memory card holder after which the other parts can be fitted. Note the wire link which is shown on the schematic as R5. To attach the display it is easiest to first connect copper wires to it (see Figure 4). Cut the wires to different lengths so that they are easier to thread through the holes in the board. A small piece of double-sided tape holds the display in place on the front of the circuit board (Figure 5). Seeing that the circuit is to be worn as a badge, the power supply consists of three batteries, which brings the power supply voltage to 4.5 V. The regulator turns that into 3 V for the processor. Once we have checked this, we can program the AVR micro. For this we use an ISP (In System Programming). This can be done in one of two ways: 1. solder wires to the programming pins of the ATMega8 (MOSI, MISO, SCK, RESET, VCC and GND) and connect these with the corresponding pins of an AVR-ISP from Atmel; 2. make an SD adapter (see inset). Figure 6. The fusebits in the AVR micro must be set correctly of course.
64
Before programming, pay careful attention to the fuse bit setting (see Figure 6).
elektor - 4/2007
SD programming adapter A Transflash-to-SD adapter can easily be modified into an SD programming adapter. The contact pins are simply connected to the (6-way) plug of the Atmel AVR-ISP In-System Programmer, for example. To do this, carefully cut the adapter open so that the connecting pins for the Transflash card holder are accessible. Then connect the pins to a small PCB into which the ISP header is soldered. This PCB can be glued to the adapter.
The correct connections are: SD DI ➔ MOSI SD DO ➔ MISO SD CLK ➔ SCK SD VCC ➔ VCC SD GND ➔ GND A test clip is connected to the reset pin. This can then be easily connected to the reset pin of the ATMega8 (or R3). You could make a small wire loop at the appropriate side of R3 to make this easier.
The end product is something to behold! It is of course not necessary to use the display just as a name tag. It could also be used as an original case mod. For the really smart guys among you who thought of making a movie with 511 pictures, each displayed for 50 ms, we have bad news. The AVR is unfortunately not fast enough for this. (075043-I)
Figure 7. The AVR micro generates a test image when the circuit is turned on for the first time.
PRACTICAL WORK
It’s a good idea to test the circuit first without an SD card. By the way, when connecting the battery observe the correct polarity because there is no reverse-polarity protection. After switching on, the display shows four coloured bars, white, red, green and blue, the firmware version and the text ‘No SD card’ (Figure 7). If this is all working properly then disconnect the batteries and insert the SD card (never insert or remove the SD card when the circuit is powered). Once the battery is reconnected, the four coloured bars appear again for a short time, after which the slide show starts. To adjust the display contrast, S1 has to be held depressed while the power is turned on. A menu will appear where you can select the contrast adjustment (Figure 8). With a brief push on S1 (< 500 ms) you can scroll through the menu. To select an item S1 needs to be pushed for longer than 500 ms.
4/2007 - elektor
Figure 8. The AVR micro even controls the contrast adjustment.
65
HANDS-ON
CLOCKS
Very Simple Clock Reworking a design from 1971 Martien Schot
Way back in 1971 the Dutch edition of Elektor published a ‘Hebinck Clock’. That original article was in two parts and was nearly ten pages long in total. These days we can do the same and more with fewer parts — this ‘very simple clock’ comprises about 20 parts while its 35 year older counterpart required nearly 100.
Electronics moves with the times. Over the years the options available change and there are ever different solutions to realising a certain concept. It is often the case that the amount of integration is increased as much as is possible. A good example is this Very Simple Clock. This clock is based on the Hebinck-clock that was published on the May and June 1971 issues of Elektor Netherlands (the design was never published in the English-language edition, which first appeared in 1975).
Old times The Hebinck clock back then was built with TTL logic combined with transistors. The time was indicated with little bicycle light bulbs. For many this was the introduction to integrated TTL
66
technology. Now, more than 35 years later, we present the same way of indicating the time, but using modern electronics instead. The Very Simple Clock obtains its name from the simplicity of the circuit. Notwithstanding the DCF77 receiver module, the number of components is very modest. DCF77 is a timecode transmitter near Frankfurt in Germany. The station transmits CET timecode signals at 77.5 kHz and has a range of about 2,000 km. Returning to the present project, the complexity in the year 2006 is no longer in hardware but in the software.
Simple The schematic (Figure 1) consists of the power supply, the microcontroller
and the display. The power supply is 8 V AC. This is easily obtained from a simple mains power-adaptor. This voltage, connected to K1, is then rectified (B1) and subsequently regulated with a 7805 (IC2). We used a PIC16F628 for the microcontroller. This is clocked at 16 MHz with a quartz crystal (X1). For the display we will now obviously use LEDs, instead of the bicycle light bulbs. The choice of colour is up to you, but selecting different coloured LEDs for the hours and minutes makes reading the clock easier. Use LEDs with a high light output so that it is still easy to read the clock during the day in bright sunlight. The purpose of resistors R1 through R8 is to limit the current. Resistor R9 serves as the pull-up resistor for the open-collector output of the DCF77 receiver module.
elektor electronics - 4/2007
+5V
K1
IC2 +5V
7805 B1 C7 R9
C3
C5
C6
C4
220μ 25V
100n
100n
47μ 16V
100n
10k
14
MCLR
12
RB6
IC1 RA4
11
RB5
10
RB4
2
RA2
RB1
RA3
RB0
OSC1 16
8 7 6
OSC2 15
X1
C2 22p
9
RB2
5
R1
R2
R4
R5
R6
R7
R8
C1
5 min
22p
16MHz
10 min
D1
D2
45 min
D9
Operation
D17
1 min
D25
15 min 20 min 25 min
D3
50 min
D10
5h
The Very Simple Clock is based mostly on software. This consists of an interrupt routine and a main program running in an endless loop (for the source code see www.elektor.com). The complete flowchart for the program is also available as a free download.
R3
100 Ω
1
PIC16F628
100 Ω
RA1
100 Ω
18
RB3
100 Ω
RA0
100 Ω
17
100 Ω
3
13
RB7
100 Ω
4
B40C1500
100 Ω
The component overlay in Figure 2 shows that LEDs D1 through D12 are intended to indicate the minutes. D13 to D24 indicate the hours. Fit the microcontroller in a socket, so that it is much easier to carry out a software-update, should the need arise. If you place the LEDs a little higher above the board it will be easier to position them on an optional front panel with could also have hour and minute numerals. The ‘resolution’ of the clock with LEDs D1 to D24 amounts to 5 minutes. LEDs D25 to D28 are intended to indicate the minutes in between. The number of LEDs that are lit indicate the number of minutes that have to be added to the main ‘dial’. As an example, Figure 3 shows 10:12. The DCF function ensures that the clock always indicates the correct time. Daylight Saving time is automatically corrected for.
6h
D18
2 min
D26
55 min
D11
7h
D19
35 min
40 min
D4
D5
D6
D7
D8
0 min
1h
2h
3h
4h
D12
D13
D14
D15
D16
8h
9h
D20
3 min
30 min
10 h
D21
11 h
D22
D23
12 h
D24
4 min
D27
D28 060350 - 11
Figure 1. The schematic of the Very Simple Clock clearly shows the origin of its name.
COMPONENTS LIST 060295-1
moc.rotkele.www
D12 D11
1-592060 rotkelE )C(
D28
D1
D24
D27 D13
Capacitors C1,C2 = 22pF C3 = 220μF 25V radial C4 = 47μF 16V radial C5,C6,C7 = 100nF
D26
D23
D10
D25 D2 D14
D22
+
Semiconductors D1-D24 = LED, 5mm, high intensity D25-D28 = LED, 3mm, high intensity B1 = B40C1500R (round case ) (40V piv, 1.5A) IC1 = PIC16F628-20/P, programmed, order code 060350-41 IC2 = 7805
X1
C2 C1
D9
D21
R9
T
C7 R1 R2 R3 R4
~ ~ B1
IC1
Resistors R1-R8 = 100Ω R9 = 10kΩ
D15
D3
R8 R7 R6 R5 D16
D20
D4
D8
Miscellaneous DCF receiver module, Conrad Electronics # 641138. K1 = 2-way PCB terminal block, lead pitch 5mm X1 = 16MHz quartz crystal PCB, ref. 060350-1 from ThePCBShop PIC source and hex code files, free download # 060350-11 from www.elektor.com
4/2007 - elektor electronics
D17 D19
C3 C6
D5
D7
C5 IC2
D18 D6
C4
Figure 2. The component overlay for the double-sided PCB for this clock. The PCB layouts can be downloaded free from the Elektor Electronics website.
67
HANDS-ON
CLOCKS
The interrupt routine deals with the following tasks: • counting the rising edges from the DCF77 receiver module for the fault indication; • the fault indication itself; • the internal binary clock; • decoding the time information so that the correct LEDs can be turned on and • multiplexing the LED outputs. The main program is responsible for the following tasks: • copying the binary code to the internal clock if the parity is correct and 59 seconds have been counted in the past minute; • read the DCF77 information (BCD code and parity); • checking the parity and of course • converting the received BCD code to binary. Every 2 ms an interrupt is generated by Tmr0. This is the source for the binary registers for the seconds, minutes and hours of the internal clock. The clock will therefore also work in the absence of a DCF77 signal (up to one hour). When a valid signal has been received, the registers for hours and minutes are filled with the DCF77 time and the seconds register is set to zero.
DCF77 seconds pulses were received in one minute. If over a period of one hour not a single correct minute was received, the clock will switch back to the fault indication (LEDs D25 to D28 will flash again). (060350-I)
DCF77 DCF77 is a timecode transmitter operating at 77.5 kHz in the long-wave band (VLF). DCF is the callsign for this transmitter; the letters mean Deutschland (D), long-wave (C) and Frankfurt (F). The number 77 indicates the frequency of 77.5 kHz at which the transmitter broadcasts. The transmitter is actually in Mainflingen near Frankfurt and transmits a complete timecode/date string every minute. It can be received over an area with a radius of about 2000 km using fairly basic antennas.
Usage For the DCF77 receiver a simple implementation from Conrad Electronics was selected. With this module we use the non-inverting output (pin 3 that is). The power supply is connected to pins 1 and 2. For more information we refer you to the datasheet from Conrad Electronics. After the power supply is turned on, all the LEDs will light one by one. This lets you check that all LEDs are connected properly and that the PCB has been assembled correctly. LEDs D25 to D28 can be used to find the optimum orientation of the antenna for the DCFmodule. D25 and D27 light up when a DCF77 signal is received, D26 and D28 are on when the signal has stopped. This means that the LEDs have to flash in pairs for a good reception. The frequency is 1 Hz. After a maximum of 1 minute and 59 seconds the clock will jump to the correct time. If this doesn’t happen then the antenna is not oriented correctly or the signal strength of DCF77 is too low. In addition, the clock checks the parity of the minutes and hours, and if 59
68
12 +4 +3 +2 +1
9
3
6 060350 - 12
Figure 3. The time is now 10:12 according to the Very Simple Clock.
elektor electronics - 4/2007
Take out a free subscription to E-weekly now Do you want to stay up to date with electronics and computer technology? Always looking for useful hints, tips and interesting offers? Subscribe now to E-weekly, the free Elektor Electronics Newsletter. Your benefits: The latest news on electronics in your own mailbox each friday Free access to the News Archive on the Elektor website You’re authorized to post replies and new topics in our forum
Register today on www.elektor-electronics.co.uk/newsletter
4/2007 - elektor electronics
69
HANDS-ON
POWER SUPPLIES
A Simple Mains Inverter 12 V DC in, 230 V AC out
Reinhardt Weber ([email protected])
Circuits that convert a DC supply into a 50 Hz AC supply are called inverters. Commercial units are notable for their small size, high efficiency and high power output. A simpler approach using a standard mains transformer is however more than adequate to power a TV set and satellite receiver from a 12 V vehicle battery. The task of converting an alternating voltage to a higher or lower voltage is most often performed by a transformer; it offers good efficiency and provides galvanic isolation between the two voltages. Generating a higher voltage level from a DC source is not quite so simple, before we can use any form of transformer it is first necessary to use a circuit which converts DC into AC.
BACK TO BASICS There are basically two configurations used for mains inverter designs: - direct conversion using a 50 Hz mains transformer; - conversion using a switch mode inverter. The direct conversion principle shown in Figure 1 switches a low voltage DC
70
supply through the low voltage winding of a standard mains transformer. The switch configuration steers the current alternately in one direction and then the other through the winding. A 50 Hz switching signal produces a high voltage 50 Hz square wave AC output, the voltage level is governed simply by the ‘turns ratio’ of the mains transformer. This approach has the advantage of simplicity; all the electronics are confined to the low voltage side of the circuit but the main drawback is the size and weight of the transformer. Designs of inverters with ratings greater than around 200 W begin to get quite cumbersome. Converters using the switch-mode principle (Figure 2) interrupt or switch the DC input voltage passing through a transformer winding. The switching
frequency used is much higher, generally in the region of 30 to 100 kHz which allows the transformer design to be much smaller and lighter. The transformer high voltage output also alternates at the same switching frequency so it is necessary to first rectify it and then use some fairly complex electronics including four semiconductor switches in a bridge configuration to convert the high voltage DC into a 50 Hz AC output. The drawbacks of this design are firstly that the high frequency (HF) transformer is not a standard off-the-shelf component; it will need to be specially made using a ferrite core. The high frequency switching waveforms also produce substantial levels of EMI (Electro Magnetic Interference) which must be suppressed with filters. All-in-all this type of inverter is not an ideal construction project for a newcomer to electronics. The inverter design suggested here uses a standard mains transformer switched by a 50 Hz signal derived from a crystal oscillator. The frequency accuracy ensures that any mains equipment with a built-in clock (or time switch) will keep good time when it is powered by this unit.
elektor electronics - 4/2007
I
I
230VAC
230VAC
12VDC
12VDC
STRAIGHTFORWARD
4/2007 - elektor electronics
12V 50Hz
060171 - 11
Figure 1. A simple inverter using a mains transformer. Four semiconductor switches in a bridge configuration produce an AC signal in the low voltage winding of a mains transformer by alternately reversing the low voltage DC source.
D
I
I
30kHz
230VAC
50Hz
12VDC
The inverter circuit diagram is shown in Figure 3 and is quite straightforward; there are no traps to catch out the unwary constructor. The integrated circuit IC1 (74HC4060) is a binary counter with an integral oscillator. A 3.2768 MHz crystal connected across the oscillator inputs produces a divided-down square wave signal of 200 Hz at output Q14 of the counter chip. The 74HC112 JK flip flop (IC2) performs a divide-by-two function on this signal while the second half of this chip divides the frequency by two once again to produce a 50 Hz square wave at pin 5 together with an inverted version at pin 6 (i.e. phase shifted by 180°). The four MOSFETs V1 to V4 are configured in a so-called H bridge configuration with the low voltage transformer winding forming the central arm of the bridge. Transformers with two low voltage 6 V windings can also be used if the two windings are connected in series to form a single 12 V winding. Similarly a transformer with two independent 12 V low voltage windings can be used if these two windings are connected in parallel. In both cases ensure correct phasing of the winding connections. Power MOSFETs have a relatively high input (gate) capacitance of a few nF, which slows down their maximum switching rate. The driver stage using transistors Q1 and Q2 has a low impedance output to help overcome this capacitance and speed up switching times. The drive signals to transistors Q1 and Q2 are derived from the complementary outputs (Q and Q) of IC2A. The oscillator can stop running when the supply battery voltage falls too low so capacitors CE2 and CE3 provide AC coupling of the control signals to Q1 and Q2. The pull-up resistors R8 and R9 then ensure that both Q1 and Q2 become conducting, turning off V1and V2 which holds the ends of the transformer winding at the same potential so that there is no path available for destructive current to flow through the winding and MOSFETs.
C
230VAC
230VAC
12V
060171 - 12
Figure 2. High power inverters switch at high frequency. The high voltage is rectified and smoothed, then converted to a 50 Hz AC mains voltage using high-voltage semiconductor switches in a bridge configuration.
RESULTS The oscilloscope screen shot in Figure 4 shows current and voltage waveforms at the output of the transformer when it is driving a resistive load (a 60 W mains lamp). Using a fully charged 12 V car battery (14 V terminal voltage) as a power source the input current was 4.9 A giving a power consumption of 67 W. Power in the load was measured at 54 W (215 V at 0.25 A) which yields an operating efficiency of around 80%, not bad for such a simple design! Losses incurred in the transformer and switching transistors mean that the output voltage does not quite reach 230 V but is within the supply tolerance of the majority of electrical appliances. An 11 V mains transformer would
help compensate for the voltage losses but these are not widely available. A standard 12 V toroidal mains transformer can however be modified; these generally have the low voltage winding wound over the top of the mains winding so it is a relatively easy job to take off a few turns (around 10 %) to produce an 11 V secondary winding. The MOSFET heatsinks specified allow the use of a transformer with a rating up to around 150 W. Larger heatsinks must be used if a higher power transformer is required (the MOSFET data sheet indicates that they can switch 50 A max). The half-eurocard sized PCB layout shown in Figure 4 is, like the circuit, also quite straightforward. Fit the two wire links to the board before the rest
71
HANDS-ON
POWER SUPPLIES
Components list Resistors R1 = 2MΩ2 R2,R8,R9 = 10kΩ R3, R5 = 100kΩ R4, R6 = 220Ω R10 = 22Ω
Capacitors C1 = 47pF C2 = 27pF C3, C4 = 100nF CE 1 = 4700μF CE2,CE3 = 100μF
Semiconductors IC1 = 74HC4060 IC2 = 74HC112 Q1,Q2 = BC547 V1,V2 = IRF4905 V3,V4 = IRF3205 ZD1 = 10V /0.5W (zener diode)
Miscellaneous PL1,PL2 = 2-way PCB terminal block XT1 = 3.2768MHz quartz crystal PCB, ref. 060171-1 from The PCBShop 060171 - 13
Figure 3. The circuit uses a crystal oscillator to give an accurate and stable 50 Hz operating frequency.
of the components are mounted. The ICs can be mounted to the board using sockets. Each MOSFET has its own heatsink so it is possible to mount
72
them without any form of electrical insulating gaskets provided that the heatsinks are never allowed to make electrical contact with any other part of the circuit during operation (it sometimes pays to be pessimistic; Murphy’s law states whatever can go wrong will go wrong so its probably safer to fit insulation). The two terminal blocks used for connecting the battery and transformer should be the correct size for
Figure 4. Component placement on the single sided PCB.
the cables used. Ensure that the cable to the battery is of sufficient cross-sectional area to handle the input current to the inverter and also be sure to fit an in-line fuse between the inverter and battery. A rating of 15 A (slow) should be sufficient for operation of the unit up to around 150 watts. (060171-I)
elektor electronics - 4/2007
“Elektor? Prescribed reading for our R&D staff because that’s where we need professional guidance for microcontroller technology.” – Frank Hawkes, 39, development engineer –
Electronics at all the right levels Secure a head start in electronics with a subscription! Advantages to subscribers: Cheaper than 11 issues from the newsstand Subscribers get up to 40% discount on special Elektor products As a welcome gift you get a free 1GB MP3 player worth £ 34.50
+
me elco er, w 1 in- 3 play E 3P FRE 1GB M k and gift: SB Stic order c U e Re Voic
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-electronics.co.uk/subs Tel. +44 (0) 208 261 4509 Or use the subscription order form near the end of the magazine.
the world-leading network for electronics
HANDS-ON INSIDE OUT
Miniature Rotating Magnetic Field Generator PC fan analysed Harry Baggen
These days most PCs contain several fans that help cool the CPU, graphics processor, motherboard chipset and the rest of the electronics. At first sight such a fan may appear to have a simple construction, but there is a lot of control electronics working behind the scenes as well.
nics labs to give you an insight of their construction. The inside of such a modern fan (called a DC brushless motor) consists of a number of stacked metal sheets, which make up four poles, each of which has a coil wound round it (Figure 1). On the rotor (the rotating part with the blades) is a circular magnet that has four north/south poles divided evenly around its circumference. If we now generate a rotating magnetic field in the four coils using an electronic circuit powered by the PC’s DC supply, the rotor will turn with a specific number of revs. To detect the instantaneous position of the north/south poles of the rotor-magnet a Hall sensor, which reacts to the changing magnetic field, is mounted close to the magnet. This signal is used to drive the coils in pairs at just the right time to make the fan turn at the required speed. Thanks to the high level of integration these days it is possible to put all the driver electronics including the hall sensor into a single four-pin package, as you can see in Figure 2. Several years ago you still needed a handful of components for this, as shown in the photo of an older model in Figure 3.
74
Figure 1. The PCB inside the fan has four poles with coils that are driven by a rotating magnetic field generator.
ALL IN A SINGLE IC
The modern-day fan is a low-key part in a case that contains super-fast processors, memory and other high-tech chips. Even so, the manufacturers of these fans have incorporated a lot of electronics to provide them with several fail-safe mechanisms and a longer lifespan. Motors using a commutator and brushes (lots of wear!) haven’t been used for this purpose for a long time! We have dismantled several PC fans in the Elektor Electro-
In Figure 4 you can see the internal block diagram of the 4-pin IC used in this fan. In this case it is an ATS276 made by Anachip, but there are many other similar ICs available from other manufacturers. Inside the IC is a voltage regulator (Reg.), which provides the internal circuit with a stable supply voltage. The Hall sensor’s output is fed to a differential amplifier (Amp) with a hysteresis circuit, which drives the two transistors for the coils. This is a fairly basic IC. There are also more intelligent versions that can detect when the rotor stalls, provide
elektor electronics - 4/2007
Hall-sensor A Hall sensor operates using the so-called Hall effect. This was discovered in 1879 by the American physicist Edwin Hall. When a current flows through a magnetic field, a potential difference is created at right angles to the magnetic field. The strength of the magnetic field can be determined by measuring this potential difference. A Hall element consists of a thin sheet of semiconductor material, which has a current forced through it. When there is a magnetic field at right angles to the sheet it causes a change in direction of the driving current. This creates a change in concentration of the charge carriers, which is perpendicular to the current flow. This potential difference is called the Hall voltage. In the production of Hall elements use is made of materials such as indium antimonide (InSb) and indium arsenide (InAs). B
a
B
b
c
I
I
I
UH
UH
UH 070022- 12
Figure 2. Calling it a rotating magnetic field generator seems to be an overstatement: all the electronics and the Hall sensor are in a 4-pin IC. Apart from an electrolytic capacitor no other components are required.
1
VCC DO
2
REG.
Hall Plate DOB
Amp
3
GND
4 070022 - 11
Figure 4. Internal block diagram of the IC used in our fan. The coils are driven directly by the IC, with currents up to 0.4 A.
Figure 3. For a comparison we opened up an older fan. The drive electronics and sensor are all discrete components.
an output signal of the revs (usually found on CPU and motherboard chipset fans) and which also have thermal protection. The weakest point of a PC fan is often not the control electronics but the bearing. Cheaper fans usually have a simple sleeve bearing that can wear out fairly quickly and introduce some play to the rotor. More expensive (and better) fans make use of ball bearings. In the last few years special lubricants and techniques have been introduced to make the fans run almost noiselessly and give them a longer lifespan. (070022)
4/2007 - elektor electronics
75
INFOTAINMENT RETRONICS
Adjustable high-voltage power supply (1961) this sleeping beauty, no output voltage was obtained from, or indicated by, the 8619. As it turned out, a 150 mA fuse had blown and after replacement the instrument worked properly. A regulated, adjustable supply is nothing special, but try to find one for high voltages required in valve equipment and you’ll find that they are rarer than hens’
Jan Buiting
A small mistake I made when I collected this instrument from a kind reader clearing out his shack (owing to emigration) was to think that the unit was very heavy. In fact, it weighs just over 13 kg and is easily carried by its chrome-plated handles. The mistake is not uncommon. Just combine these hints: (1) a 19-inch case with dull grey lacquer, (2) ‘Power Supply’ printed on the front panel and (3) large valves visible through a mesh cover, and you will easily understand why Americans call this type of equipment a ‘boat-anchor’. According to the manual, the Van der Heem type 8619 power supply can be used to supply a stabilised DC voltage of low source impedance, for powering experimental set-ups and calibration of instruments and numerous other applications in laboratory and industry. The stabilized voltage supplied by the 8619 is continuously adjustable in three ranges: 0-35 V, 20-190 V and 180-350 V, at a current of 150 mA maximum on all ranges. Unstabilised voltages of 245 V, 375 V and 540 V are also available. Furthermore the instrument supplies two valve filament voltages, 6.3 VAC and 4 VAC, and a continuously adjustable negative voltage with range of 0 to –40 V. The instrument is built to professional standards in a 22-cm high 19-inch case finished in matt grey lacquer typical of highend lab instruments sold in the 1960s. The front panel has wander sockets, knobs with arrow pointers, rocker switches and a moving-coil meter with combined V / mA scales. Everything has very solid look and feel.
Having blown the dust off I was pretty confident the 8619 would work so I gave it a ‘soft start’ to prevent the electrolytic capacitors coming to grief. The trick with vintage valve equipment having gathered dust for years is to always use an adjustable mains transformer to allow the equip-
ment to operate at, say, 50-75% of the nominal mains voltage for a number of hours. This will enable any dried out high-voltage electrolytics in the equipment to ‘reform’ and valves to come alive in a gentle, controlled manner. Despite good patience and a gentle approach in waking up
teeth. Not surprisingly, the 8619 has valves inside and the good news is that dead common types are used like the EL34 (6CA7), EF94 (6AU6), OA2 and 85A2. The simplified circuit of the regulator section shows 7 resistors (including a potentiometer and a preset) forming a voltage divider between the reference voltage (–85 V) and the stabilised output voltage. The preset is for calibration and the pot allows the desired output voltage to be set. The control grid of the EF94 amplifier valve is connected to a tap on the voltage divider. Due to the high loop gain and the high negative feedback ratio, the EF94 creates a constant potential difference with respect to the common rail. Consequently, the output voltage is determined by the dividing ratio effectively set on the divider chain by the pot. Our thanks are due to Mr. Cor de Boer for putting this rare instrument at our disposal. (075036-I)
Retronics is a monthly column covering vintage electronics including legendary Elektor designs. Contributions, suggestions and requests are welcomed; please send an email to [email protected], subject: Retronics EE.
76
elektor electronics - 4/2007
HEXADOKU INFOTAINMENT
Hexadoku
Participate! Please send your solution (the numbers in the grey boxes) by email to:
[email protected] Subject: hexadoku 04-2007. Alternatively, by fax or post to:
Puzzle with an electronic touch
Elektor Electronics Hexadoku Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom.
Here’s another Hexadoku puzzle that hopefully will keep you busy for a few hours with
Fax (+44)(0)208 2614447
the soldering iron switched off. Once again, three E-blocks Professional Starter kits
The closing date is 1 May 2007.
and three Elektor SHOP vouchers are up for grabs for those who manage to solve the puzzle. The instructions for this puzzle are straightforward. In the diagram composed of 16 x 16 boxes, enter numbers such that all hexadecimal numbers 0 through F (that’s 0-9 and A-F) occur once only in each row, once in each column and in each of the 4x4 boxes (marked by the thicker black lines). A number of clues are given in the puzzle and these determine
F 3 D
8 5
2 0
The competition is not open to employees of Segment b.v., its business partners and/or associated publishing houses.
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.
Prize winners
The puzzle is also available as a free download from our website (Magazine → 2007 → April).
The E-blocks Starter Kit Professional goes to:
Roy Turner (UK)
Don Allen (UK).
Congratulations everybody!
The solution of the January 2007 Hexadoku is: 9BC24.
An Elektor SHOP voucher worth £35.00 goes to: Adam Burdeniuk (AUS), Tuomo Hyyrönmäki (FIN),
A C 8 5 1 6 1 2 9 F B F C B 8 D 2 4 9 E 7 9 E F 0 1 4 D 3 0 B 4 A A 8 0 7 7 5 6 6 9 C A D
5 3 E F 9 C 9 0 3 6 D 8 3 8 6 1 A 4 E 9 7 8 E C F 1 B A C D 5 3 0 9 7 6 2 A F C B 8 9 2 5 4 F 8 5 7 D 3 9 E 5 F D 4 3 A 6 5 9 0 1
Solve Hexadoku and win! Correct solutions received enter a prize draw for an
E-blocks Starter Kit Professional worth £248.55
and three Elektor Electronics SHOP Vouchers worth £35.00 each. We believe these prizes should encourage all our readers to participate!
(c) PZZL.com
4/2007 - elektuur
77
ELEKTORSHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1932 564999 Fax 0044 (0) 1932 564998 ATC SEMITEC LTD
FIRST TECHNOLOGY TRANSFER LTD.
NEW WAVE CONCEPTS
www.atcsemitec.co.uk 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: 01606 871680 Fax: 01606 872938
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 PIC16, PIC18, PIC24, dsPIC microcontrollers • Foundation / Intermediate
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
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 £15.00.
BAEC http://baec.tripod.com "The British Amateur Electronics Club Archive Website. Archiving extracts from 140+ Newsletters from 19662002. Currently have interesting and useful selected articles from 12 Newsletters. Also a section about built electronics projects with schematics and photos. Plus useful info., downloads and links. NO ADVERTS!"
BETA LAYOUT www.pcb-pool.com Beta layout Ltd Awardwinning site in both English and German offers prototype PCBs at a fraction of the cost of the usual manufacturer’s prices.
EASYSYNC http://www.easysync.co.uk EasySync Ltd sells a wide range of single and multiport 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
78
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
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 Advanced Qualifications). Also Technical Management and Languages.
MODular ElecTRONics www.modetron.com • Plug and Program • FREE application s/w • Hobbyist ease-of-use • Professional finish with enclosure and LEXAN faceplate • We will design and brand your custom application • Growing range of PSU’s, i/o modules, displays and microcontrollers
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
PCB WORLD http://www.pcbworld.org.uk World-class site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 846159 for details. Prompt service.
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
SOURCEBOOST TECHNOLOGIES http://www.sourceboost.com Next generation C compiler and development products at highly affordable prices: • C, C++, and Basic compilers for PIC12, PIC16, PIC18 • Modern IDE, with PIC simulator, source level debugger and virtual devices. • RTOS for PICmicro. • PIC based controller and Development boards. • Download and try for Free from http://www.sourceboost.com
SYTRONIC TECHNOLOGY LTD www.m2mtelemetry.com Supplier of wireless modules and accessories for remote monitoring M2M applications. • GSM/GPRS TCP/IP modules • Embedded GSM/GPRS modem • Development Kits • GPS modules • GSM/GPS antennas • Adapter cables Online ordering facilities. Tel: 01728 685802
elektor electronics - 4/2007
products and services directory ULTRALEDS http://www.ultraleds.co.uk tel: 0871 7110413 Large range of low cost Ultra bright leds and Led related lighting products. Major credit cards taken online with same day depatch.
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 adress and a 30-word description
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.
Visual Basic
• 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!
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............................................................................................................. .......................................................................................................................................................... .......................................................................................................................................................... .......................................................................................................................................................... ..........................................................................................................................................................
ISBN 0-905705-68-8 476 pages £27.50 / US$ 51.50
for Electronics Engineering Applications This book is targeted towards those people that want to control existing or home made hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the toolset it offers, items such as serial communications, printer ports, bitbanging, ISA, USB and Ethernet interfacing and the remote control of test equipment over the GPIB bus are covered in great detail. Each topic is accompanied by clear, ready to run code. Where necessary, schematics are provided that will get your projects up to speed in no time. This book discusses tools like Debug to find hardware addresses, setting up remote communication using TCP/IP and UDP sockets, writing your own internet servers and even connecting your own block of hardware over USB or Ethernet and controlling it from Visual Basic. All examples are ready to compile using Visual Basic 5.0, 6.0, NET or 2005. Extensive coverage is given on the differences between what could be called Visual Basic Classic and Visual basic .NET / 2005.
Order now using the Order Form in the Readers Services section in this issue. Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 (0) 208 261 4509
See also www.elektor-electronics.co.uk
4/2007 - elektor electronics
79
80 . 1 7 £1
ant w you r e tev make a h w to
M r AR C fo piler), r u o om rd, y of Cc Kit cop l. full D boa a M c E R es (in r, a L yA clud rse e Eas ndle in rs cou gramm oard. u e b o l l b r h o p This ocontr ARM Switc a r s c k i d m -bloc d an r E an D boa a LC
.80 1 7 £1
.00 6 6 £1 nal
e, oard, war b soft a LED e od r, c e P e w m e o l it fr gram d a rK es F r te clud ultipro ard an n a i t e o m S dl B tch b r. bun s US i le This -block d, a Sw ontrol c r E o a r n o a mic Db a LC 6F877 1 PIC
sio
es rof
.00 9 9 £2
If you are a beginner then we suggest you start with one of our E-blocks Starter Kits. These have everything you need for your first project. If you need to learn how to program in C for AVR, PIC, or ARM, or you want to connect your system to the internet, or develop CAN bus communication systems, then we have the right starter kit for you.
ing ms: ir yth syste B mult e v s e S u , s U b A d e r yC clud CAN ocks boa Eas ndle in evelop wo E-bl a LCD nd u , t b rd od e, sa This need t oftwar ED boa board . s you code s rs, a L o CAN troller n e w w t o o m l , c F d icro gram oar pro itch b 877 m w 16F S a PIC two
it NK
You’ll save a massive 30% discount w.r.t. individual items! If you want to make up your own kit then it is also easy: just select the items you need for your project from the list below.
£ 89.20 £ 77.65 £ 117.80 £ 33.50 £ 117.95 £ 104.50 £ 71.95 £ 58.50 £ 14.65 £ 19.30 £ 14.65 £ 14.65 £ 35.95 £ 20.50 £ 19.30
RS232 board Screw terminal board Sensor interface Switch board USB multiprogrammer X-10 home automation board
80 . 1 7 £1 rs s py olle k a co ocontr E-bloc , s e r rd c d n i a u a l o inc icro m piler), ED b Eas e l L d m com er, a bun r PIC d This ur C fo l. full C gramm ard an o c o o of se (in ultipr itch b ller. o r cou icro m d, a Sw ocontr r r m c a i C I o P D b 77 m a LC C16F8 I P a
IC yP
Our range of more than 40 hardware circuit blocks, 6 CD-ROMs, 50 sensors and a host of accessories and support materials, means that whatever you want to make, you can make it with E-blocks.
Modules ARM programmer AVR multiprogrammer Bluetooth board CAN board CPLD board FPGA daughter board Internet board IR/IRDA transmitter receiver Keypad LCD board LED board Patch board Power board Prototype board Quad 7-segment display
, r iler) C fo comp d, r u r C o ull boa f y of Kit s a cop e (incl. , a LED R r s V e r e yA cou mm clud Eas ndle in trollers tiprogra oard. u l b b u on h This microc AVR m Switc a s R k d V c n A o rd a E-bl an D boa C L a
£ £ £ £ £ £
29.95 14.65 14.65 14.65 77.30 15.95
Software (single user) Assembly for PICmicro MCUs £ 117.90 C for ARM microcontrollers £ 118.00 C for AVR microcontrollers £ 118.00 C for PIC microcontrollers £ 118.00 Flowcode for PICmicro MCUs v3 (pro version) £ 118.00 Programmable Logic Techniques £ 117.90
Kit
W
NE
50 . 2 3 £2 to , eed u n ftware rd, o y o a t g s o i n b i e ED tK rd r yth cod rne eve : Flow er, a L et boa e t s e n n s I m r d y nclu system rogram an Inte Eas le i und ternet multip board, ller. b This lop in s USB witch contro e dev -block rd, a S micro E 7 an D boa 6F87 C 1 L C I a aP and
Ordering Use the order form at the back or go to www.elektor-electronics.co.uk (shop). E-blocks will be shipped after receipt of payment. Prices are exclusive of postage.
Free downloads available on www.elektor-electronics.co.uk/eblocks!
Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Telephone +44 208 261 4509 Brentford TW8 9HH Fax +44 208 261 4447 Email: [email protected] United Kingdom
Order now using the Order Form in the Readers Services section in this issue.
More information on www.elektor-electronics.co.uk
CD-ROM BESTSELLERS
1
Elektor 2006
This CD-ROM contains all editorial articles published in Elektor Electronics Volume 2006. Using the supplied Acrobat Reader program, articles are presented in the same layout as originally found in the magazine. All free, printed, supplements our readers got last year, like the Visual Basic, C and i-TRIXX booklets are also contained on the CD. The Elektor Volume 2006 CD-ROM has a rather different look and feel than previous editions. It’s gone through a makeover in more than one way!
NEW
Visual Basic for Electronics Engineering Applications This book is targeted towards those people that want to control existing or home made hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the toolset it offers are discussed in detail. Each topic is accompanied by clear, ready to ISBN 978-0-905705-68-2 run code, and where necessary, schematics 476 Pages are provided that will get your projects up to £27.50 (US$ 51.50) speed in no time.
Microcontroller Basics
ISBN 978-90-5381-207-5 | £16.25 (US$ 28.75)
USB TOOLBOX
2
This CD-ROM contains technical data about the USB interface. It also includes a large collection of data sheets for specific USB components from a wide range of manufacturers. There are two ways to incorporate a USB interface in a microcontroller circuit: add a USB controller to an existing circuit, or use a microcontroller with an integrated USB interface. Included on this CD-ROM are USB Basic Facts, several useful design tools for hardware and software, and all Elektor Electronics articles on the subject of USB. ISBN 978-90-5381-212-9 | £18.95 (US$ 34.95)
Home Automation This CD-ROM provides an overview of what manufacturers offer today in the field of Home Networking, both wired and wireless. The CD-ROM contains specifications, standards and protocols of commercially available bus and network systems. For developers, there are datasheets of specific components and various items with application data. End-users and hobbyists will find ready-made applications that can be used immediately.
3
ISBN 978-90-5381-195-5 | £12.95 (US$ 22.90)
Microcontrollers have become an indispensable part of modern electronics. They make things possible that vastly exceed what could be done previously. Innumerable applications show that almost nothing is impossible. There’s thus every reason to learn more about them. This book offers more than just a basic introduction. It clearly explains ISBN 978-0-905705-67-5 the technology using various microcontroller 230 Pages circuits and programs written in several different £18.70 (US$ 33.70) programming languages. In the course of the book, the reader gradually develops increased competence in converting his or her ideas into microcontroller circuitry.
BESTSELLING BOOKS Top-5 1 Visual Basic for Electronics Engineering Applications ISBN 978-0-905705-68-2 £27.50 (US$ 51.50)
2 Microcontroller Basics ISBN 978-0-905705-67-5 £18.70 (US$ 33.70)
3 PC-Interfaces under Windows ISBN 978-0-905705-65-1 £25.95 (US$ 52.00)
4 Modern High-end Valve Amplifiers ISBN 978-0-905705-63-7 £25.95 (US$ 52.00)
5 308 Circuits
ISBN 978-0-905705-66-8 £18.20 (US$ 37.00)
More bestsellers on www.elektor-electronics.co.uk
Order o www.elektor-el Order now using the Order Form in the Readers Services section in this issue.
Wireless USB in miniature
SpYder Discovery Kit
(March 2007)
For Freescale MC9RS08KA, MC9S08QD, MC9S08QG and MC9S08SH microcontrollers (March 2007)
iDwarf -168 Transmitter module (built & tested)
Contains USB Programmer/Debugger BDM, CD-ROM and one MC9S08 8-pin PDIP microcontroller.
050402-91
£ 24.10 / US$ 45.45
iDwarf Node Board (built & tested)
060296-91
Normal retail price: £ 20
ELEKTOR PRICE: £ 6.45 / $ 12.70
050402-91
£ 17.20 / US$ 32.45
FREE WITH EVERY ELEKTOR KIT OR MODULE! iDwarf Hub Board (built & tested)
Order an Elektor kit or module and receive a free SpYder Discovery Kit. Act fast as the offer is limited to stocks.
050402-93
£ 17.20 / US$ 32.45
Elektor Kits & Modules are listed on www.elektor-electronics.co.uk/kits
No. 364 APRIL 2007 Battery Charge-n-Check 050073-1 050073-2 050073-11 050073-41
PCB, bare, main board PCB, bare, display board CD-ROM, project software ST7FMC2S4, programmed
No. 362 FEBRUARY 2007 … 3, 2, 1 Takeoff! 10.30 10.30 5.20 16.90
19.50 19.50 9.75 31.85
g-Force on LEDs 060297-71 PCB set, incl. 2 MMA7260 sensors, BDM cable parts 060297-11 CD-ROM, project software
10.00 5.20
18.85 9.75
Programmer for Freescale 68HC(9)08 060263-1
PCB, bare
www.thepcbshop.com
A Simple Mains Inverter 060171-1
PCB, bare
www.thepcbshop.com
Very Simple Clock 060350-1
PCB, bare
www.thepcbshop.com
E-blocks Light Chaser Squared 075032-1
PCB, bare
www.thepcbshop.com
No. 363 MARCH 2007 Attack of the SpYder 060296-91 SpYder Discovery Kit
12.70
10.00 5.20 8.95
18.85 9.75 16.85
Wireless USB in Miniature 050402-1 050402-91 050402-92 050402-93
PCB, bare, iDwarf prototyping board iDwarf -168 Transmitter module (built & tested) iDwarf Node Board (built & tested) iDwarf Hub Board (built & tested)
8.30 24.10 17.20 17.20
15.60 45.45 32.45 32.45
Mobile Phone LCD for PC 060184-1 PCB, bare 060184-11 CD-ROM, project software 060184-41 ATmega16-16PC, programmed
www.thepcbshop.com 5.20 9.75 8.95 16.85
Scale Deposit Fighter 070001-1
PCB, bare
Transmitter PCB, bare Receiver PCB, bare
www.thepcbshop.com www.thepcbshop.com
MP3 Preamp 060237-1
PCB, bare
www.thepcbshop.com
A Telling Way of Telling the Time 050311-1 PCB, bare 050311-31 CPLD, programmed
www.thepcbshop.com 35.50 66.95
FPGA Course (9) 060025-9-11 CD-ROM, course software incl. source code
5.20
9.75
Explorer-16 Value Pack 060280-91 Four components packaged together in a single box
122.90 232.50
No. 361 JANUARY 2007 Sputnik Time Machine 050018-1 PCB 050018-11 CD-ROM, project software (incl. source code) 050018-41 AT89C2051, programmed
www.thepcbshop.com 5.20 9.75 3.40 6.45
Very Simple Clock 6.45
AVR drives USB 060276-1 PCB, bare 060276-11 CD-ROM, project software incl. source code 060276-41 ATmega32-16PC, programmed
050238-1 050238-2
www.thepcbshop.com
060350-1 PCB 060350-11 CD-ROM, project software (incl. source code) 060350-41 PIC16F628-20, programmed
www.thepcbshop.com 5.20 9.75 5.50 10.35
FPGA Course (8) 060025-8-1 Software (incl. source code)
5.20
9.75
No. 360 DECEMBER 2006 Shortwave Capture 030417-1 PCB, bare (receiver board) 030417-2 PCB, bare (control & display boards) 030417-41 AT90S8515-8PC, programmed
www.thepcbshop.com www.thepcbshop.com 11.40 21.45
No. 359 NOVEMBER 2006 USB Stick with ARM and RS232 060006-1 060006-41 060006-91 060006-81
PCB, bare AT91SAM7S64, programmed Assembled & tested board CD-ROM, all project software
11.00 20.75 27.60 51.95 79.90 149.95 5.20 9.75
Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email: [email protected]
nline at ectronics.co.uk Due to practical constraints, final illustrations and specifications may differ from published designs. Prices subject to change. See www.elektor-electronics.co.uk for up to date information.
Kits & Modules
USB Stick with ARM and RS232
Elektor RFID Reader (September 2006)
(November 2006)
Ready-built and tested PCB with USB port for connection to the PC. Including USB cable; not including display and enclosure.
Assembled and tested board
- Read and write 13.56 MHz RFID cards - MIFARE and ISO 14443-A compatible - Programmable
060006-91
£ 79.90 / $ 149.95
060132-91
£ 41.50 / $ 77.95 GameBoy ElectroCardioGraph
LC display
(October 2006)
£ 7.25 / $ 13.65
030451-72
Matching enclosure PCB, ready built and tested
060132-71
£ 8.90 / $ 16.85 050280-91
CD-ROM (all project software)
£ 55.20 / $ 103.95
060132-81
£ 5.20 / $ 9.75 No. 358 OCTOBER 2006 PIC In-Circuit Debugger/Programmer 050348-1 PCB 050348-41 PIC16F877, programmed 050348-71 Kit, incl. PCB, controller, all parts
Easy Home Control 5.20 17.90 34.50
9.75 33.75 64.95
GBECG – Gameboy ElectroCardioGraph 050280-91 PCB, ready built and tested
55.20 103.95
ECG using a Sound Card 040479-1 PCB 040479-81 CD-ROM, all project software
5.20 5.20
9.75 9.75
PCB, ready assembled & tested, with USB cable Standard back-lit LC display Matching enclosure CD-ROM, all project software
41.50 7.25 8.90 5.20
77.95 13.65 16.85 9.75
5.20 8.90
9.75 16.85
5.20 5.50
9.75 10.35
Experimental RFID Reader 060221-11 Disk, all project software 060221-41 ATmega16, programmed
DiSEqC Monitor 040398-11 Disk, PIC source & hex code 040398-41 PIC16F628A-20/P, programmed
5.20 6.90
9.75 12.95
5.20 10.30 22.70
9.75 19.40 42.85
5.20 16.50
9.75 31.00
5.20 6.90
9.75 12.95
No. 356 JULY/AUGUST 2006 RC Servo Tester/Exerciser 040172-11 Disk, project software 040172-41 PIC16F84(A), programmed 040172-71 Kit, incl. PCB, controller, all parts
LED Thermometer 030190-11 Disk, project software 030190-41 PIC16F873-20/SP, programmed
Toothbrush Timer 050146-11 Disk, project software 050146-41 AT90S2313-10PC, programmed
9.75 19.40
050259-11 Disk, project software 050259-41 AT90S2313, programmed
5.20 6.90
9.75 12.95
5.20 10.30
9.75 19.40
1-Wire Thermometer with LCD 060090-11 Disk, project software 060090-41 PIC16F84A-04CP, programmed
GBPLC - Gameboy PLC 11.70 22.00 11.00 20.75 84.95 159.95
GBPLC - I2C I/O Box 060098-1 PCB, bare 060098-91 Ready-built and tested board
17.90 33.75 84.95 159.95
Binary Clock 020390-11 Disk, project software 020390-41 PIC6C54-04/P, programmed
5.20 8.05
9.75 15.10
11.70
22.00
8.20 5.20 16.90
15.55 9.75 31.85
050176-72 Kit of parts, incl. 050176-1, 050176-2, 050176-42, all components, 24.80 excl. LCD and Case 28.80 050176-73 LCD, 4x20 characters with backlight
46.70 54.50
No. 355 JUNE 2006 FM Stereo Test Transmitter 050268-1
PCB
Network Cable Analyser
USB/DMX512 Converter 060012-11 Disk, all project software 060012-41 PIC16C745, programmed
5.20 10.30
Universal LCD Module
050190-1+2 PCBs, bare, GBPLC Module & Programming Interface 050190-51 Programmed PAL, EEPROM and Flash IC 050190-91 Ready-built and tested GBPLC Module and Programming Interface
No. 357 SEPTEMBER 2006 Elektor RFID Reader 060132-91 030451-72 060132-71 060132-81
050233-11 Disk, project software 050233-41 PIC16F84, programmed
050302-1 PCB 050302-11 Disk, PIC source code 050302-41 PIC16F874-20/P
No. 354 MAY 2006 Onboard OBD-2 Analyser
Products for older projects (if available) may be found on our website www.elektor-electronics.co.uk home construction = fun and added value
INFO & MARKET
SNEAK PREVIEW Software-defined Radio with USB The concept of software-defined radio (SDR) enables excellent reception of radio stations with a minimum of electronic circuitry to build. This is due to all signal processing being done in software. Our project like no other demonstrates the sheer scope and power of SDR: tuning range 150 kHz through 30 MHz; for AM, DRM, SSB and CW. The receiver (or what’s left of it) is powered as well as tuned ‘over USB’ (i.e., by the PC). Its output signal is applied to the soundcard for software-driven demodulation. The software offers continuously variable bandwidth and an accurate S meter.
Universal JTAG Programmer Programmable logic of the CPLD, EPLD, uPSD or MSPS variety is extremely powerful but unfortunately not exchangeable in terms of the programmer you need. The good news is that a cross-platform programmer connection exists called JTAG (joint test action group) that allows all these ICs to be ‘burned’ in-circuit. Our JTAG programmer can be built in various configurations to make it compatible with CPLD and EPLD (Altera, Xilinx), PSD, uPSD / DSM (STMicroelectronics) and MSP430 (Texas Instruments).
RC Transmitter to USB Joystick Emulator Over the years there have been a fair number of designs published enabling a radio-control (RC) transmitter to interface with a personal computer running flight simulator software. Having such an interface enables budding aircraft pilots to hone their skills using a simulation program, rather than aviating their pride and joy into the nearby landscape. The circuit is based on a 16C745 PIC clocked at 6 MHz or an 18F2550 clocked at 8 MHz.
Also…
ELF Reception; Magnetometer/Seismograph; R8C Competition Winner; RDS Test Transmitter; E-blocks Graphic Display; Hexadoku.
RESERVE YOUR COPY NOW! UK mainland subscribers will receive the magazine between 21 and 24 April 2007.
The May 2007 issue goes on sale on Thursday 26 April 2007 (UK distribution only). Article titles and magazine contents subject to change, please check www.elektor-electronics.co.uk.
NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Elektor Electronics 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 Electronics is published on the third Thursday of each month, except in July. Distribution S.O.R. by Seymour (NS).
.elektor-electronics.co.uk www.elektor-electronics.co.uk www.elektor-electronics.co
Elektor Electronics 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 downloads, circuit boards, programmed ICs and corrections and updates if applicable. Complete magazine issues may also be downloaded. In the Elektor Electronics 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 Electronics website: •Electronics news and Elektor announcements •Readers Forum •PCB, software and e-magazine downloads •Surveys and polls •FAQ, Author Guidelines and Contact 84
elektor electronics - 4/2007
04-2007
Order Form
Please supply the following. For PCBs, front panel foils, EPROMs, PALs, GALs, microcontrollers and diskettes, state the part number and description; for books, state the full title; for photocopies of articles, state full name of article and month and year of publication. PLEASE USE BLOCK CAPITALS.
Price each
Description
Qty.
Total
METHOD OF PAYMENT
SpYder Discovery Kit Explorer-16 Value Pack
EVERY ULE WITH FRETEOR KIT OR MOD £ ELEK
NEW NEW
CD-ROM Elektor 2006
(see reverse before ticking as appropriate)
6.45
Cheque
£ 16.25
(UK-resident customers ONLY)
Giro transfer
CD-ROM USB Toolbox
£ 18.95
Visual Basic for Electronics Engineering Applications
£ 27.50 Expiry date: ................................................. Verification code: ......................................... SWITCH ONLY:
Start date: .................................................... Issue number: .............................................. 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
Email
Date
–
– 2007
Signature
04-2007
*USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.O. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: [email protected]
✁
EL04
Order Form
Elektor Electronics (Publishing)
Tel.: +44 208 261 4509 Fax: +44 208 261 4447 www.elektor-electronics.co.uk. [email protected]
Tel.
Subscription
Please send this order form to * (see reverse for conditions)
Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom
Address + Post code
✁
Bank transfer
£ 122.90
Name
✁
Order Code
Yes, I am taking out an annual subscription to Elektor Electronics and receive a free 1GB MP3 player.
METHOD OF PAYMENT (see reverse before ticking as appropriate)
Bank transfer Cheque (UK-resident customers ONLY)
Giro transfer
I would like: Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Elektor Volume 2007 CD-ROM) cribers who have not held a subscription * Offer available to Subscribers to Elektor Electronics during the last 12 months. Offer subject to availability. See reverse for rates and conditions.
Expiry date: ................................................. Verification code: ......................................... SWITCH ONLY:
Start date: .................................................... Name
Issue number: ..............................................
Address + Post code Please send this order form to
Elektor Electronics (Publishing)
Tel.
Email
Date * cross out what is not applicable EL04
–
– 2007
Signature
Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 208 261 4509 Fax: +44 208 261 4447 www.elektor-electronics.co.uk. [email protected]
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. On-line ordering: http://www.elektor-electronics.co.uk 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: UK: £4.00 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 (Standard) or £12.00 (Priority)
HOW TO PAY All orders must be accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff. Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. 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 (Publishing) / Segment b.v.. 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 (Publishing) / Segment b.v. 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, Access, MasterCard, JCBCard and Switch cards 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 Electronics 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 Electronics (Publishing) 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 Electronics (Publishing) 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 Electronics (Publishing) 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 Electronics (Publishing) other than to supply goods as described or, at the option of Elektor Electronics (Publishing), 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 Electronics (Publishing) shall be determined in all respects by the laws of England. January 2007
SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION
United Kingdom Surface Mail Rest of the World USA & Canada Airmail Rest of the World USA & Canada
Standard £41.90
Plus £48.80
£54.50 US$ 95.50
£61.40 US$106.50
£68.90 US$120.00
£75.80 US$131.00
HOW TO PAY
SUBSCRIPTION CONDITIONS
Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. 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.
The standard subscription order period is twelve months. If a permanent change of address during the subscription period means that copies have to be despatched by a more expensive service, no extra charge will be made. Conversely, no refund will be made, nor expiry date extended, if a change of address allows the use of a cheaper service. Student applications, which qualify for a 20% (twenty per cent) reduction in current rates, must be supported by evidence of studentship signed by the head of the college, school or university faculty. A standard Student Subscription costs £33.50, a Student SubscriptionPlus costs £40.40 (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% (twentyfive 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.
Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. 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 (Publishing) / Segment b.v. 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, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security.
January 2007
Elektor Electronics (Publishing) Regus Brentford • 1000 Great West Road Brentford TW8 9HH • United Kingdom
Order now using the Order Form in the Readers Services section in this issue.
ELEKTOR AUDIO BOOKS
Telephone +44 (0) 208 261 4509 Fax +44 (0) 208 261 4447 Email: [email protected]
3 must-haves for all audio-enthusiasts!
Build your own Audio Valve Amplifiers
Modern High-end Valve Amplifiers
Build your own High-End Audio Equipment
To many people, the thermionic valve or electron tube is history. However, whether it is nostalgia, interest in the technical parameters, the appeal of a gleaming amplifier chassis with softly glowing valves or perhaps the firm conviction that the sound of a valve cannot be bettered, it is a fact that the valve is making a come-back. This book contains, apart from construction projects for preamplifiers, power amplifiers, and amplifiers for musical instruments, information on the operation of electron tubes, while the first chapter gives a short history of the valve.
Valve amplifiers are regarded by many to be the ne plus ultra when it comes to processing audio signals. The combination of classical technology and modern components has resulted in a revival of the valve amplifier. The use of toroidal-core output transformers, developed by the author over the past 15 years, has contributed to this revival. This book explains the whys and wherefores of toroidal output transformers at various technical levels and offers innovative solutions for achieving perfect audio quality.
The name high-end equipment is a good indication of the prices charged for it. For those who cannot, or will not, pay these high prices, there is a solution offered in this book: build your own at considerable cost savings. This book is aimed not only at this sector of the market, but also at the many enthusiasts who want to be able to experiment and to make their own modifications to their high-end equipment. Contents include solid-state and valve preamplifiers and power amplifiers, active crossover filters, an active subwoofer, a headphone amplifier and more.
ISBN 0 905705 39 4 253 Pages £15.55 (US$31.00)
ISBN 0 905705 63 7 264 Pages 25.95 (US$52.00)
ISBN 0 905705 40 8 262 Pages £15.55 (US$31.00)
INDEX OF ADVERTISERS ATC Semitec Ltd, Showcase . . . . . . . . . .www.atcsemitec.co.uk . . . . . . . . . . . . . . . . . . .78
Nurve Networks . . . . . . . . . . . . . . . . . . . .www.xgamestation.com . . . . . . . . . . . . . . . . . .69
Avit Research, Showcase . . . . . . . . . . . . .www.avitresearch.co.uk . . . . . . . . . . . . . . . . . .78
Paltronix . . . . . . . . . . . . . . . . . . . . . . . . .www.paltronix.com . . . . . . . . . . . . . . . . . . . . . .31
BAEC, Showcase . . . . . . . . . . . . . . . . . . .http://baec.tripod.com . . . . . . . . . . . . . . . . . . .78
PCB World, Showcase . . . . . . . . . . . . . . .www.pcbworld.org.uk . . . . . . . . . . . . . . . . . . . .78
Beta Layout, Showcase . . . . . . . . . . . . . .www.pcb-pool.com . . . . . . . . . . . . . . . . . . .45, 78
Pico . . . . . . . . . . . . . . . . . . . . . . . . . . . . .www.picotech.com . . . . . . . . . . . . . . . . . . . . . .39
Bitscope Designs . . . . . . . . . . . . . . . . . .www.bitscope.com . . . . . . . . . . . . . . . . . . . . . . .3
Quasar Electronics . . . . . . . . . . . . . . . . . .www.quasarelectronics.com . . . . . . . . . . . . . . .44
Cricklewood . . . . . . . . . . . . . . . . . . . . . . .www.cctvcentre.co.uk . . . . . . . . . . . . . . . . . . . .45
Robot Electronics, Showcase . . . . . . . . . .www.robot-electronics.co.uk . . . . . . . . . . . . . .78
Easysync, Showcase . . . . . . . . . . . . . . . .www.easysync.co.uk . . . . . . . . . . . . . . . . . . . . .78
Scantool . . . . . . . . . . . . . . . . . . . . . . . . .www.ElmScan5.com/elektor . . . . . . . . . . . . . . .69
Elnec, Showcase . . . . . . . . . . . . . . . . . . .www.elnec.com . . . . . . . . . . . . . . . . . . . . . . . .78
Schaeffer AG . . . . . . . . . . . . . . . . . . . . . .www.schaeffer-ag.de . . . . . . . . . . . . . . . . . . . . .7
Eurocircuits . . . . . . . . . . . . . . . . . . . . . . .www.eurocircuits.com . . . . . . . . . . . . . . . . . . .69
Showcase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78, 79
First Technology Transfer Ltd, Showcase .www.ftt.co.uk . . . . . . . . . . . . . . . . . . . . . . . . . .78
SourceBoost Technologies, Showcase . . .www.sourceboost.com . . . . . . . . . . . . . . . . . . .78
Future Technology Devices, Showcase . . .www.ftdichip.com . . . . . . . . . . . . . . . . . . . . . . .78
Sytronic Technology Ltd, Showcase . . . . .www.m2mtelemetry.com . . . . . . . . . . . . . . . . .78
Jaycar Electronics . . . . . . . . . . . . . . . . . .www.jaycarelectronics.co.uk . . . . . . . . . . . . . . . .2
Ultraleds, Showcase . . . . . . . . . . . . . . . .www.ultraleds.co.uk . . . . . . . . . . . . . . . . . . . . .79
JB Systems, Showcase . . . . . . . . . . . . . .www.modetron.com . . . . . . . . . . . . . . . . . . . . .78
USB Instruments, Showcase . . . . . . . . . .www.usb-instruments.com . . . . . . . . . . . . . . . .79
Labcenter . . . . . . . . . . . . . . . . . . . . . . . .www.labcenter.co.uk . . . . . . . . . . . . . . . . . . . . .88
Virtins Technology, Showcase . . . . . . . . .www.virtins.com . . . . . . . . . . . . . . . . . . . . . . . .79
London Electronics College, Showcase . .www.lec.org.uk . . . . . . . . . . . . . . . . . . . . . . . . .78 Mikro Elektronika . . . . . . . . . . . . . . . . . . .www.mikroe.com . . . . . . . . . . . . . . . . . . . . . . . .7 MQP Electronics, Showcase . . . . . . . . . .www.mqp.com . . . . . . . . . . . . . . . . . . . . . . . . .78 New Wave Concepts, Showcase . . . . . . .www.new-wave-concepts.com . . . . . . . . . . . . .78 Newbury Electronics . . . . . . . . . . . . . . . .www.newburyelectronics.co.uk . . . . . . . . . . . . .69 Number One Systems . . . . . . . . . . . . . . .www.numberone.com . . . . . . . . . . . . . . . . . . . .39
Advertising space for the issue of 21 May 2007 may be reserved not later than 24 April 2007 with Huson International Media – Cambridge House – Gogmore Lane – Chertsey, Surrey KT16 9AP – England – Telephone 01932 564 999 – Fax 01932 564998 – e-mail: [email protected] to whom all correspondence, copy instructions and artwork should be addressed.