July/August 2005 £5.50 www. eleklQr-electmnics.co.uk 9 770268 451913 1 Get Your FREE Pounds Sterling Priced Catalogue - all 400+ pages! in st fill out the catalogue request form at www, jaycarelectronics.co.uk/elekt or Check our website! Browse our website www.|aycaF electro nics.co.uk All of our 6,000+ products with search facilities, * 128-bit secure on-line ordering - safe & secure, * Over 8,500 product datasheets & application notes, ■ And we r re from Australia, so you can trust us! * Postage and Packing includes airmail to the UK JUST ONE OF OUR MANY GREAT PRE-BUILT & TESTED PRODUCTS! Vibrating Pillow Alarm Clock XC-Q252 £7,75 + post and packing Tliis ingenious alarm clack just slips under your pillow, and vibrates to wake you up instead oF the usual loud beeps. It means you don't have to disturb your partner, ^ and still has the option of a beeping alarm. A large screen also displays calendar information and temperature. Midi/PC Based Theremin Synthesiser Kit KC-5410 £52.75 + post and packing Many thousands of people are enjoying playing our traditional Theremin synth, but this new design blows that out of the water! Ft actually interfaces with a MIDI accessible synthesiser or a PC with a sound card. Tills allows it to play up to 120 different instrument selections, in 15 types by 8 variations. That is alot of sounds! These notes are then changed in pitch by moving your hand between the antenna and plate, lust like the traditional theremin. See our website for a full list of great features. The kit includes the circuit board, machined and printed front panels, all electronic parts, and dear english instructions. Theremin Synthesiser Kit KC-5295 £17.50 + post & packing The Theremin is a weird musical instrument that was invented early last century but is still used today. The Beach Boys' classic hit "Good Vibrations r featured a Theremin. By moving your hand between the antenna and nietal plate, you create weird sound effects like in those scary movies! Kit includes a machined, silk- screened, and pre-drilled case, circuit board, all electronic components, and clear English instructions. 50MHz Frequency Meter Kit with LCD Display KC- 5369 £22. SO + post & pa , ckin g If you want a great value frequency meter. i*-- 9VDC wall adaptor required (Maplin f=MG80B £5.99). then this project is for you. it features autoranging operation for ease of use, switching between its three ranges. High resolution of 0.1 Ha up to !50Hz, 1 Hz between 150Hz and 16MHz, and 10Hz above 16MHz. It can be powered by a 9V battery or wall adaptor (not included) and the case measures just £ 1/8 x 2 5/8 x 1 '■ Kit includes laser cut & silk screened case, circuit board, electronic components, & clear English instructions. We Stock.. Power Products & Accessories Audio & Visual Equipment & Accessories Computer & Telecoms Accessories Home and Car Alarms & Surveillance Equipment Lighting Products & Fuel Mixture Display Kit for Cars KC-519S £4.95 + post & packing Using this simple kit will give you a goad Indication of how rich or loan your car's engine is running, it uses the factory EGO (exhaust, gas, oxygen) sensor to indicate the fuel mixture on a series of LEDs. If your engine does not have an EGO sensor, one can be obtained from an automotive junk yard. Kit includes circuit board, all electronic components, and dear English instructions. ■^11 T IfiTnTrr. Get the Video Quality You Paid For With Our Doctor Video Kit KC-5390 £31.95 +■ post and packing Copy protection is put in place on videos and DVDs for a good reason, but this robs you of the true high quality reproduction that it is capable of. Get the quality you paid far and strip out these annoying signals! it supports composite and 5-video signals and can be configured for NTSC or PAL format. Kit includes case, circuit board, all electronic components, and clear English instructions. Note: Some SMD soldering required. f 3 Gadgets & Unique Caution- During ii%n-A conditioning this unit removes copyright protection. Piracy ts a ■crime-, & Jayrar Electronics takes no f&jponsibiJiiy for its potential for unlawful use. LiXI Log on to www.jaycarelectronics.co.uk/elektor for your FREE catalogue! 0800 032 7241 (Monday - Friday Q9.0D to 17.30 GMT + 10 hours only). For those that want to write: 100 SiJverwater Rd Silverwater NSW 212B Sydney AUSTRALIA New B ; Spice Version 5 has all the power and functions you expect from a professional Spice package, but without the high cost; * Real design flexibility with over 30,000 models, unlimited circuit size and a huge range of new virtual instruments • New Circuit Wizard saves time by auto-generating many designs for you • Sweep all parameters for any component and simulation type with the powerful new Scenario Editor * Live Circuit feature allows values to be adjusted while simulations are running, displaying the results in real time Professional standard Spice simulation for just £229 + VAT. Plus educational and multi-user licence discounts available and FREE comprehensive telephone technical support. Try the full version completely free for 30 days. www.spice-software.com Tel: 01603 872331 Research House, Norwich Road, Eastgate Norwich. NR10 4HA. Fax: 01603 879010 Email info@lookmg.co.uk (^Research 1 2 Vehicle Diagnostics using OBD-2 J he OBD interface has been standardised m the EU under the name EOBD, and is manda- tory on all newly- registered cars, both petrol and diesel. At the same time, the number of differ- ent protocols used for transferring data has risen from three to five, with the CAN bus protocol becoming more and more suc- cessful High time For an up fo date backgrounder on OBD-2, 8 OBD-2 Analyser odem cars are jam-packed Iwiwith electronics. That's great until something goes wrong. Then you're at the mercy of the dealer. At least until now, because in many cases you can use the EOBD adapter described here to track down the problem yourself. Chip Tuning MjiX? wading the way 01 mm OBD ® r 1 Audio, Video & 3 V Headphone Amplifier Audio Click/Plop Suppressor Compact 200 W Output Stage DVI Interface MP3 Adaptor f&r TV Precision Headphone Amplifier Simple Microphone Preamplifier for Radio Amaleurs Slave Flash with Red-Eye Reduction THD: Saltan Key versus MFB Tosiink Repeater/Splitter Universal I/O for Power Amps Valve Sound Converter Video Sync Generator Computers. Microcontrollers, Internet Comparing Signed Integers Dual Oscillator for uCs Gigabit Crossover Cable Hard Drive Switch Minimalist Microcontroller MSP430 Programmer PC IrDA Port PCI Express PiC PWM Controller Resistor Colour Band Decoder Searching for Components Swapping without o Buffer USB for the Xbox Home & Garden C an a car ever be powerful enough? As far as we're con- cerned, 'more is better'. Here we investigate how chip tuning (after all, we are an electronics maga^ zine) can Improve the perfor- mance of our sacred cow. Our testbed is a BMW 320d and we've also made use of the OBD2 analyser in this issue. The results, as it turned out, ore worth the effort! 1 2-V Dimmer An Electronic Watering Can Code Lock with One Button EE-temal Blinker Energy-Saving Switch Fridge Thermostat Garage Timer Mobile Phone Operated Code Lock On-demand WC Fan Plant Growth Corrector Proximity Switch Reflection Light Barrier with Delay Remote Control Blocker Remote Control Extension using RF RF Remote Control Extender: Receiver Telephone Line Indicator Telephone Line Watchdog 71 40 60 112 82 121 92 106 119 34 94 118 63 44 122 33 55 37 45 78 125 1 10 45 73 52 67 68 120 90 105 38 66 46 36 91 115 42 52 56 96 98 78 44 Volume 3 1 July/August 2005 no. 34S Hobby & Modellin Carriage Detection for Model Railway 79 CCO Metal Defector 1 1 3 Converting a DCM Motor 48 I FT639 One-Chip Servo Controller 32 LED Flasher for 230 V 91 Long Delay Stop Switch 76 Noise Suppression for R/C Receivers 104 Servo Points Actuator 72 Two- Cell LED Torch 54 Power Supplies & Batteries Balancing LiPo Cells 1 14 Converter 1C with Integrated Schottky Diode 56 Discharge Circuit 43 Efficient Current Source For High-power LEDs 1 30 Extension for LiPo Charger 86 Gentle Battery Regulator 43 High Voltage Regulator 101 Improved DECT Battery Charger 80 Low-cost LiPo Charger 69 Low-Cost Step-Down Converter with Wide Input Voltage Range } 03 Low'drop Regulator with Indicator 131 Micropower Voltage Regulator 46 Negative-Output Switching Regulator 47 Overcurrent Cutout Switches 39 fjpr -y. Phantom Supply from Batteries 50 Prof ec t i on for Vo I ta ge Reg u I a to rs 62 Simple Overcurrent Indicator 1 31 Solar-Powered SLA Battery Maintenance 83 Stable USB Power Supply 1 29 Step-up Converter for 20 LEDs 1 23 Three-Component Li-Ion Charger 87 Transformerless 5-volf Power Supply 77 USB Power Booster 1 22 RF [radio) IR Testing with a Digital Camera Passive 9 fh -order Elliptical Filter Simple Coble Tester Simple Oscillator / Pipe Locator Simple Short-Circuit Detection Simulator far Bridge Measurements Trar^istor Dip Meter Miscellaneous Electronics 1 :80Q Oscillator 9-in-l Logic Glue / Level Translators Adjustable Duty Cycle Bidirectional I^C Level Shifter Bridge- Rectifier LED Indicator 41 126 99 40 51 89 87 81 93 128 64 129 D1L / SOIC / TSSOP Experimenting Boards70 Extended Timer Range for the 555 65 Filter-based 50-Hz Sinewave Oscillator 75 Luxeon LEDs 64 Modifying Stnpboard for SO Packages 95 Navigator Assistant 1 32 Optical Mixer 35 RDM Pulse Generator 1 02 Resistor-programmable Temperature Switch 1 24 Simple Stepper Motor Driver 85 Simple Window Comparator 84 Virtual Prototyping Board 57 PLUS! articles and regulars Mailbox 8 New Products 1 0 ■ v Vehicle Diagnostics using OBD-2 1 2 OBD-2 Analyser 1 8 Chip Tuning 24 Signal Wizard v,2 from UMtST (review) 28 Guizz'Away 134 Elektor SHOP 1 38 Sneak P revi ew 1 40 Short-Wave Regenerative Receiver for AM and DRM 80 Short-Wave Converter 1 07 Medium- Wave Modulator 74 Short-Wave Superregenerotive Receiver 73 DRM Direct Mixer Using an EF95/ 6AK5 54 DRM Double Superhet Receiver using an EF95/6AK5 88 Test & Measurement 1 MHz Frequency Counter 100 Cable Tester 53 Cheap Dor-Mode bargraph Display 97 Digital VU Meter 70 mm mm C • r \ ■ . * '• T ’ ■ Jm 72ilS y ; il/i^itiyU; r/M ::• iSk’v;^ N US $450 X (OK £235 approx) d 2: m$0Jm Djyliu r.J 2 ks jj Uiihjii^ r^EJj-tlmu nudl^-irunUvilUlii tlJfjiiiJJ il uf ^ huii'jiL U ilsss ii Li^F mill iii-ii /uiB life Hii=f lii I VVmifiJ ii^JyiJv fijjiia Utrs- f'ju aa/i avau ]uifi: il uud run, E II 4, U: u^iLilib uhurd 1 Hub fur * ill Vr ■ 1 iur m i iiiml |ifs uul uiniim^J zzu 7 v jr ijdhrd nd siuiifiJu M In ikkjii, iV/ii subuiuul ■ u^yjiHlu/i, l^i f/uiu -ii! libU ifo i umJ ^uri tmmixiM jilun fur Vm/u illas; leff Ui M ers . ivJraj u/jur supply liJiLj nil u Siiljjy iii tl'j.2 M|v uuud (uuiv^buii Fur mure information inuil: in fo^auii I t!j .cu 1 1 1 and ardurlti{j Information at: v;v/.v.Qauliy.cLni!/3ufjpIfora/aanf/ai{jiml , *viaurdH.hlni lektor lectronics Volume 3 J , Number 345 t July/August 2005 I5SK 0268 r 45 9 Bektor Electronics aims at inspiring people to master electronics at any personal leva! by presenting construction projects and spotting developments in electronics and Information technology - : ' : e i i ■ __ 1 ..i - - : - - r ■ m. 13 unbridge VA£s TN5 7WT En^and. Tel:: (-1-44) (0)1580 200657, fcx: (+44) (0)1580 200616 .. Err si: =:■=. m^k&stir* nco.uv. ' — ' - - _ — ' ' = .. i; : ~ T--.j'=“ _ :r : : :■ i ' ::i E - : : : m: _ ie iee. E-:e_e :■ : ■ HI Safer B fecfrarecs ss ptibfebed 1 1 times a y ear v.nh a doufcte fbr july & Acgizst- Sub strip dons Wodtfysrafe Su&>saip6c5rs Seswe lid.. Urst 4, G&fcs fteed farm, fesrtiey Road, Ikehursl 7N5 THE. Telephone: (-r 44) (0)1 580 200657. fee (4 44) (0)1 580 2006 i 6 Eusd: Avai-iv.v,:: _: - ■ ■ . . . H'.VfrE .e~ ire : ..:ei - i:: - Head OFTice Segment b-v. BO. Box 75 NL- 6 t 907 i 3 Seek Telatoe: (-5-31) 46 4369444, fee (4-31 ) 46 4370 (6 1 f iz~ ~ - a: Distribution: :i t 6 Wwwtpji Sliest, L o nd o n W 1 P 3LD, Eh^and UK Advertising Huson IntemEBona] Meda, Gamferioge House, Gogftsore fere. Chaise/, Surrey KT i 6 9Af! En^rid, Hfep^cr^: -44 (0)1932 564999, fee -44 (0)1932 56499a : arH-r-z i~zi l ::et;i: =: i : ---■I-- I ' 1 C_ ZL 'Ll InttrnarionaJ Editor rl=i Here's :- " ::: ^ Editor: jar S=a-t."£ . . International edftorta! staff: B-H££C- “ e 5 -:-e I - n ’ - - !■= i_-=r. j=r; r; oe G 1 fi .=sd&rsdo'f D eslgn s tiff: C210x ARMee Development System Dear Editor I've discovered that some code lines for LEDiesi program printed in the article an the LPC2 1 Ox ARMee Board (April 2005) do not work as expected due to notation errors. After same experimenta- tion 1 was successful in obtain- ing code that does work, 1 would gladly offer it to your readers. arm-elf-gcc ~c ledtst -c arm-elf -gcc -Tlpc2l06-rom. Id -nos tart files -Wl, -nos to lib -s -o ledtst boot.s ledtst.o arm-elf — ob jcopy —out put -tar get ibex ledtst ledtst , hex Mobile fefephone masts near schools (2) Dear Editor — mobile telephone masts ore just another bogey- man the tabloids can fill space with. They put out very little power (a few watts), and that diminishes with inverse square of distance. By the time it reaches people, it Is miniscule. People probably get more RF from phones right up against their heads. But of course people don't want to abandon those. Radio amateurs often have much higher RF output than phone masts, and as far as I know nobody hos ever demonised them. If ! remember correctly, phones do turn up the power to reach the nearest mast, so having a mast near a school may well mean that kid's phones don't hove to transmit os loud. People often fail to perceive risks in perspective. Diarrhea and malaria for example dwarf any man-made causes of death. Kryten (on EE Forum) You seem to forget that radiation from the masis (and DECT base stations) is present around the clock, 365 days a year. The effects of long-term exposure to tow-level SHF radiation are not known (yet). Also, GSM/UMTS radiation is TDMA-puIsed at about 200-250 Hz which is well within the response of the human brain and nervous system. I'm curious to see what Elekfor has on the subject In the June issue. Their website pall [now removed) showed that the major- ity of respondents worried about the effects of mobile phone radiation (see p. 20-22, June 2005, Ed.) Gonio (on EE Forum) This discussion may be continued on our website Forum under the topic r Radiation o health hazard 1 [ hope this is of use to other readers having experienced similar problems with the printed code. Arne Crouwels (Belgium) The author/designer, Tony Dixon, replies: I've looked into the prob- lem and Arne is correct There are a couple of typos in the com- mand listing given in the article, tor which t apologise. Please feel free to pom Arne's corrected ver- sion and give him full credit. Black Box for Model airplanes Dear jan — even though I am into R/C electric model planes I om not at oil on electronic buff. However, I do hope you, or someone else con come up with some advice on how to approach the subject: telemetry for RC model airplanes. Over the last few years several 'Black Boxes', 'Flight Data Recorders , 'RC Logs 1 — call it whatever you like — have been available on the market for model airplanes. You can either get the readouis in real time or stored on the onboard data logger I guess it s colled. This is simply a matter of how much you will pay. However, l believe it is much more challenging to see if you can create something on your own. I have a book called Fun- dame n tab of Radio Telemetry by Marvin Tepper from 1959, [no typo) and I know very well that much has happened since then, so she book is more nos- talgic. For RC electrically powered model planes weight is of course a vital factor. Maybe you could run an oriicle or explain how these small 'black boxes work. I imagine it should be possible for an ama- teur like me to create some- thing usable — call it a poor man's telemetry system'. Besides, I am sure many others like me would like to know how these gadgets work. By the way I just read the arti- cle about Super Lithium Batter- ies and the Simple LiPo charger. Excellent stuff. Torben Back Sorensen (Denmark) Our resident R/C modelling enthusiasts Giei Dots ana Paul Goes sens may fake up the a rej- ect bur fa he ab^e to do so they would appreciate the in out and suggestions of other readers. This discussion may be contin- ued in our on-line Forum so have a look there . 3 e’sMer tkriranta- 7-8/2005 Keep 'm separated Dear Editor — within the April 2004 edition of Elektor Elec- tronics, the high-end pre-ampli- fier specif] cotton for channel separation at 20kHz is 62dB. This seems much lower than the other channel separation figure and cross talk figures. From the FGA231 1 datasheet I am microprocessor teeth with the Elektor 5C/MP projects bock in ] 9 78 and they were responsi- ble for shaping my subsequent career path. I was then an apprentice with BT and I had built Unde Clive Sinclair's MK 1 4 kit but what I ■van ted was a real computer riente, its still In service to this day which I find very satisfy- ing, Ten more years at BT fob lowed until I eventually broke away to start an assembly busi- ness of my own and now it s me that advertises in Elektor. So thank you Elektor — you truly svere an inspiration to me and others. As a result of the MPU revolution which then led to the BBC Micro we had for a time a huge lead in program- ming capability in this couniry. I fear not for much longer though — my own kids ore software users now not cre- ators. What we need is an SC /MR for the 2 1 sf century! Peter Allgood (UK) How about our 8958251 Flash Micro Board Fe*e r ? So far about 3, COO or these have been sold and the project conies complete with a programming course r For the more ambitious microcon- tr a tier tans I'd soonest venturi no W w h_r MailBox Terms - Puc cation o: wader's cot sspon- dence is at the discretion of trie Editor. Y; 2 vr points expressed by corres- pond ants are not necessary those of the Editor or Pubteher. - CQ"sepor C5r.ct — z .• ce translated or edited for length c amy and sty //hen repty ng la Majrhox correspondence p England out into ARM land with our LFC21Cx ARMee Development System (also in April 2005. no coincidence as the issue focused on microcontrollers 1 978-2005). unable to determine if this is a device specification, or the design implementation specifi- cation limit for the 62 dB fig- ure. If possible, would you be able fo confirm if this is o design implementation or (C specification limit ? Thanks. Richard Shadbolf (UK), Our in -house audio designer Ton Giesberts rep ties: the measure- ments of the F re- Am pt i fier v ve re mode on the device os o whole. In this case the lower channel separation at higher frequencies is mainly caused by the input relays. But the rest of the circuitry Ivdring. FCB placing of the con- nectors and the FGA23 1 I PA) at so determines the overall chan- nel separation. Fond memories of SC/MP Dear jan — having only just started reading E/ettor again after many years I was amazed by your editorial men- tioning the SC/MP and the Retronics article [both m the April 2005 issue), I cut my with SASIC and o proper VDU. My friend struggled with the Practical Electronics Motorola 6800 system which was complex and expensive. Then (discovered Elektor which seemed just a bit different to the UK magazines — interest- ing projects and best of oil superb PCBs that really looked good. I built the SC/MP micro project ond the teletypewriter — nearly frying myself in the process when I tried connect- ing composite video info the back of a TV set and hit the EHT instead... I added the BASIC interpreter (integer arithmetic only — how we rejoiced!). But crucially for me, it all worked - — eventually. The fun for me was in the building, not the using, so I moved on to the legendary Z8G. The net result of all this was to cause me to change career at BT into R&D where my first job as a newly qualified technician was to design the microprocessor cir- cuits for a major BT project for the emergency services. Draw- ing heavily on my Elektor expe- 7-8 * 200S - e; rkrtroniis 9 INFO & MARKET NEWS & NEW PRODUCTS UN controlled alternator voltage regulator International Rectifier recently introduced the loco II interconnect network |UN)-control!ed alterno- tor-regulafor for next-generation vehicles. IRs solution is claimed to optimize performance In intel- ligent automotive charging sys- tems for increased efficiency and improved fuel economy. Intelligent vehicular charging sys^ terns ore used when dynamic control or the alternator output and torque is desired for optimal battery charging, electrical sys- tem power management and alternator-engine interaction. Dynamic alternator control enables improved electrical sys- tem efficiency and reduces engine idle speed for greater fuel economy. The IR Uncontrolled alternator regulator is assembled using thick-film hybrid technology for reliable high temperature opera- tion and excellent parametric sta- bility over the entire operating temperature range of -40=C to 15CEC. The hybrid circuit can be customized to the application to optimize performance and relia- bility and cor. be assembled into a custom housing with an insert- moulded lead-frame specifically designed for flame-soldering or heavy wire banding. Thick-film technology also enables precise loser trimming of discrete resistors so that patented current sensing technology can be used to achieve the highest tolerance capability in She industry. International Redtfier, European Regional Centre, 439/44S Gadstone Road, Whyteleafe, Surrey CR3 OBL Tel +44 (0)208645 8003 mmlricam "-S Record temperature Bt humidity with dew diligence World's smallest Ethernet controller The EL-USB-2 is reportedly the world's first standalone humidity & temperature data logger with direct USB interface. The unit is capable of recording relative humidity from 0 to I0Q%RH, temperature from -35 1 to +8G Z C and calculating dew point. Configuration of the unit is sim- ple. After installing the software supplied with the unit, simply insert the logger Into the com- puter's USB port and choose the required sampling rate, set high and low alarms for each param- eter, and set the logger start time. Once configured, the EL- USB-2 can be removed from the computer and log independently. The waterproof plastic casing allows use of fhe logger in hos- tile environments if required. Two LEDs indicate when the unit is logging, when on alarm level has been reached, when the bat- tery needs replacing or 'when the device has reached full memory capacity (32,000 readings). To download data, the user recon- nects the unit to the USB part. A graphing utility In the software plots and displays relative humidity, temperature and dew point along with the time and dote for each reading. Data can also be imported into many industry standard spreadsheet packages. The EbUSB-2 Is available immedi- ately from Lascar Electronics at a price of £49.00. Lascar Electronics Limited, Module Hose, Wliileparish, Salisbury, Wilt- shire 5 PS 231 TeL 1+44} (0)1794 884567, Fax (+44) (0)1794 884616. internet: va vw. I n s car el &c t ran its . co m Microchip recently announced the ENC28J60 — the world's first 28-pin stand-alone Ethernet controller — which provides o low-pi ncaunt, cost-effective, easy- to-use solution for remote com- 10 ebUor etectroniti - 7-3/2005 NEWS & NEW PRODUCTS If A ™ 1 I l* M ' 4 municotion between embedded explications and local or global networks. Designers who require commu- nicotions for remote control or monitoring are often faced with the complexity of large-foot- print expensive Ethernet con- trol! ers that ore tailored for per- sonal-computing systems. While most Ethernet controllers come in greater than 30-pin packages, the IEEE 802.3-cam- pliant ENC28J60 offers compa- rable features in a 28-pin pack- age. The ENC28J60 Ethernet controller employs the industry- standard SPI“ V serial interface, which only requires four lines to interface to a hast microcon- troller. These features, com- bined with Microchip s free TCP/IP software stack for PIC 1 8 microcontrollers, provide the smallest who! e-product Ether- net solution for embedded applications. By adding Ethernet connectivity to an embedded system, micro- controllers can distribute data over a network and can be controlled remotely. Ethernet's infrastructure, performance, interoperability, scalability and ease of development have made it a standard choice For embedded application commu- nications, such as within the growing VoIP market. Supporting development fools include the PJQailTM Ethernet Interface board (part # AC 1641 21), designed to ease development with the ENC28J6Q Ethernet controller, it plugs into a selection of Microchip's standard P1CDEM TjV demonstration beards and is expected fo be available soon. Microchip's free TCP/IP stack, which is designed for oil PIC 1 8 host 8-bit microcontrollers, is available now for download fro m Microchip's web site. Infor- mation on a third-party stack for all PIC 1 6 host 8-bit microcon- trollers can also be found there Package options include 28-pin SPDIF, SOIC SSOP and QFN. . 0 S 7 C 9 I- j Microchip Ltd., Microchip House, 505 Eksdaie Road, Wokingham RG41 5TU. Tel (+44)(0)1 18 921 5869. Fax [+44) (0)118 921 5820* www.micTorhfp^toni Tiny, low-power temperature sensors Microchip recently introduced two temperature sensors that offer ! aw cost, a small SC-70 package and law current con- sumption of 6 microamps (typi- cal), making them an attractive alternative to thermistors. The MCP9700 and MCP97G1 tem- perature sensors provide a com- plete solution for thermal protec- tion temperature measurement or thermal calibration. The low power consumption of 6 microamps (typical) is less than mosl or the thermal sensor ICs on the market, enabling longer bat- tery life and reducing self-heating for better accuracy. The linear ouiput slope of the MCP97G1 ts 19.53 millivolts per degree Cel- sius while the MCP9700 output is TO millivolts per degree Cel- sius. Overall Temperature error is +/- 4 degrees Celsius (maximum) from 0 degrees Celsius io 70 degrees Celsius. 1 6-bif dsPlC digital signal con- trollers. The extremely small SC- 70 package [40 percent smaller than a SOT-23 package) and the elimination of externa! compo- nents results in o more compact board layout. The MCP9700 and MCP9701 temperature sensors are available today for sampling and volume production. For additional informa- tion visit the Microchip Web site, .i~j- -. [he low output impedance allows direct connection to an analog to-digita I converter input, without the need for buffering amplifiers. The devices are ideal for use with Microchip's 8-bit PIC Microchip LttL, Micro chip House, 505 Eksdole Rood, Wokingham RG4I 5TU* TeL (+44) (0)118 921 5869. fax (+44) (0)118 921 5820. www. microchip, com Coldfire suite supports Freescale MCF547x/8x chips Crossware, a leading embedded software tools developer, has enhanced its Cofdrire- Develop- ment Suite by adding support far Freescale Semiconductor's MCF547x and MCF548x Cold- Eire microprocessors. The MCF547x and MCF548x are high speed microprocessors based on ihe advanced V4e Cold Fire Core. All microproces- sors in the range have o wide range of connectivity peripherals, a memory management unit, a duo! precision floating paint unit (FPU) and an enhanced multiply and accumulate unit (eMAQ . The Crossware Suile includes a separate C header file for each microprocessor in ihe range. This ensures thot the developer has access only to the structures that are relevant to the chosen micro- processor and cannot therefore inadvertently write code for a peripheral that the chosen micro- processor does not have. The Crossware C compiler gen- erates code that takes full advan- tage of the FPU and the Cross- ware simulator fully simulates both the FPU, including FPU exceptions, and the eMAC. This enables developers to run code that uses these units both with and without hardware. Crossware's FrreFly USB BDM (background debug mode) inter- face has also been enhanced to handle features that are specific to Freescale' 1 s System-on ■Modu le (SOM) Fire Engine boords for these chips. This Includes the programming of Intel's advanced K3 Stratafiash memory chips. Crosswtffe Products/ Old Post House/ Silver Street, Utfogton, Roystorv Hefts, SG8 DQL Tel: + 44 (0) 1763 853500, Fax; + 44 (0) 1 763 853330. wvm. q Qssware.com I;:-- I t TO 05- cleklor detfrciiics 11 Electronic diagnosis systems have been used in vehicles for almost as long as digital engine management units — some twenty years now. In order to monitor vehicle exhaust emissions more effectively, GBD (on- board diagnosis) systems have been mandatory in the USA since 1988. In 1995 the more highly- developed OBD- 2 standard was introduced. Tills uni- fied diagnostic interface, standard- ised across manufacturers, was used by the EU Commission as the basis for an EU directive, the effect of which is to oblige European manufac- turers to Incorporate a unified, acces- sible diagnostic interface, to make major pans of their existing diagno- sis systems compatible with one another, and to publish information about them. The EOBD (European on- board diagnosis) system has been mandatory in the EU on all newly- developed models since 2000 for petrol engines and since 2003 for diesel engines. One year later, EOBD became mandatory on first registra- tion for all vehicles (from I January 2001 for petrol engines, 1 January 2004 for diesel engines). 0BD-2 Diagnostics connector The requirements- for EOBD are mostly included in the ISO standards listed in Table 1. ISO 15031-3 mandates a 16- pin socket which, in contrast to earlier systems, mu si now be hue d near the driver’s seat rather than in the engine compartment. It may be located, for example, below the dashboard. behind a flap in the central console, or even under the ashtray. Since this type of connector was already used by some manufacturers for the diagnostics sys- tem (for example, by VW and Audi since 1993), the presence of the con- nector by Itself is no guarantee that the interface conforms to the EOBD stan- aSSfig - — c-f : - a 1 We published a do-it-yourself vehicle di Elektor Electronics back in October and Noveml it turned out to be! Since then, the interface has b( the name EOBD, and is mandatory on all newly-regii At the same time, the number of different protoi has risen from three to five, with the CAf more and more succes One connector daid. If the vehicle was hist registered before the deadlines mentioned above, it may be necessary to make enquiries of the manufacturer or look on the Internet. Some of the pins of the EOBD socket (Figure 1) may not he present. The actual number of pins depends on which protocols are used (see the next section). That is not to say, however, that pins not listed in the pinout charts (Table 2) will necessarily be absent. It can happen that a manufacturer will use these pins for dedicated functions which do not form part of the EOBD standard. Protocols The electronics in a modern car con- sists of a network of microcomputer systems connected together over a bus, called, in automotive engineering circles, "electronic control units', or ECUs. More complex systems such as engine management, ASS, ESP and airbags, each have their own ECU. Of 12 dektor etatranics - 7-3/2005 - ^ i K \'?V = - - *- N>, v IcV? Jig fi ' -. . , % ... -•- i .* < . »v* . - - - 1 -*. h igosis system in * ei2002 and very successful eistandardised in the EU under ted cars, both petrol and diesel, oiused for transferring data . h protocol becoming course, not all manufacturers use the same (serial) bus system to connect their ECUs together; a variety of bus systems can even coexist within one vehicle. When the OBD-2 diagnostics interface standard was drawn up the most widespread bus protocols in use at the time were considered: these were, in the United States* the PWM protocol used by Ford and the VPWM protocol used by General Motors. PWM stands for 'pulse width modulation' and VPWM for variable pulse width modulation 1 . European and Asian man- ufacturers preferred the relatively sim- ple ISO 9141-2 protocol which is simi- lar to that handled by a UART. We described only these three protocols in the article on OBD-2 in Elektor Elec- tronics in October 2002. Since then two further protocols have been added: the KWP2QQ0 protocol* a derivative of the ISO 9141-2 standard (KWP stands for ‘Key Word Protocol' )* and our old friend the CAN protocol, which has only sur- prisingly recently started to become popular in diagnostics systems. As the footnote to Table 1 hints* the simpler serial protocols according to ISO 9141- 2 and ISO 14230-4 (KWP2Q00) will only be permitted in the USA until the end of 2007, and worldwide the CAN pro- tocol is being used for the diagnostic socket on practically all new models. Table 3 gives an overview of the five protocols which you might (still) Table 1 Binding ISO stmdards to E0BD ISO 9141-2 Communication link* ISO 1 1519-4 Low speed serial data communication^ ISO 14230-4 Keyv/ord protocol 2000* ISO 15765-4 CAN-Requiremenls for emission-related systems ISO 1 503 1 -3 Diagnostic connector ISO 15031-4 Test tool characteristics ISO 15031-5 Diagnostic services ISO 15031-6 Emission related fault codes (DTC) ISO 15031-7 Data link security ’not permitted in the USA from 1 January 2008. Table 2 Connector pins standardised inO Pin 2 Pin 4 Pin 5 Pin 6 Pin 7 Pin 10 Pin 14 Pin 15 Pin 16 lBD-2 j-1 850 bus + Vehicle ground Signal ground CAN high p-2284) ISO 91412 K output J-1 850 bus - CAN low p-2284) ISO 9141-2 L output Battery positive Figure 1. The 16-pin OBD-2 diagnostics socket [source' Gerhard Muller). 7 -S /2005 - eklciDr tlsdnmta PROTOCOLS encounter today on an QBD-2 diagnos- tics socket. A comprehensive overview of the protocols, organised by manu- facturer and model, is available on Ger- hard Muller's OBD-2 website [1] (in German with machine translation into English available). Gerhard Muller is the author of the OBD articles in Elektor Electronics in 2002. Getting to grips The complexity of the circuit required to access the OBD-2 or EOBD port depends on which protocol it is possi- ble {or necessary) to use. In the sim- plest case, the ISO 9141-2 protocol, a straightforward level- shifting circuit is all that is needed. The high level is defined as greater than 0,8 V B and the low level as less than 0.2 V B . where SAE J2D12 Fault Code System F 0 X X X Error code 1- fuel / air measurement 2- fuel inject 3- ignilion failures 4- agereaat t emissions 5- idle and speed check 6- vehicle computer 7- transmission 8* transmission 0 SAE J2012 defined 8 m an ufa c t u re r d elin ed P powertrain ItransmissionJ Figure 2. Standard fault cades according to SAE 2012 (source: Gerhard Muller]. is the car's battery voltage. A circuit to convert these levels to RS232 (with galvanic isolation!) is available on Jeff Noxon's website [2]. Using this simple interface it is possible to connect a PC, ideally a notebook, to the OBD-2 socket via its RS232 port. Everything else, from initialisation, baud rate setting and communication with the ECUs, to testing, processing and displaying the data codes etc., must then be carded out using suitable software in the PC, In the case of the ISO 9141-2 protocol a diagnostics program called VAG-COM is available, with the great advantage that there is a shareware version offer- ing a relatively wide range of functions that can be downloaded over the hit er- ne! [3J, As you may have guessed from the name of the program, it is designed to be used with vehicles made by the Tie CAIJUlji (Contribution by Bulent Ozen) The Controller Area Network connects together o number of peered units (called nodes) using a twowlre bus. The CAN protocol was developed by Bosch in 1983 for use in vehicles. ISO 1 1 898 defines the physical characteristics of CAN ond interference, which tends Eo affect the two wires equally is rejected. This Is called common made rejection. The CAN high and CAN lav/ signals carry ihe inverted and non-in verted serial data signal. Open-collector drivers are used (PNP to drive the CAN-H signal to Vqq and NPM to drive the CAN-L signal to GND] which means that multiple devices can be connected to the bus In parallel without caus- ing short-circuits when bus conflicts occur. The bus state svhere the CAN-H and CANT signals carry dif- ferent voltage levels Is called the "dominant state {with a volt- many other bus protocols including for example, PROFI8U5. There are many IGs available to meet this specification, includ- ing the PC A82C25G from Philips, One of the ways used to help protect against interference is Eo transmit a bit on two wires simultaneously using voltage swings in opposite direc- tions: a so-called differential signal. Since the logic level is encoded by the voltage difference between the two wires, age difference of greater than 3,5 VJ; the state where the lev- els are approximately the some [the difference is less ihon 1 ,5 V) Is called the recessive" state. According to the defini- tion of CAN, the dominant state corresponds ta a logic zero: If one node applies o logic zero to the bus, it overrides a logic one applied by another node. The bus between the nodes thus in effect provides a wired-AND connection. 14 elrkfcr d*di®nks - 7*8/2005 Volkswagen- Audi group. Since this manufacturer has been using the ISO 9141-2 protocol since around 1993, the software also works with older models from VW and Audi whose data trans- fer format is not compatible with OBD- 2, Unfortunately VAG-COM will nor work until cars from other manufactur- ers which are OBD-2 compatible. A simple level shifter is not enough to run diagnostics on ah OBD-2 compati- ble cars, tn order to make the software running on the PC independent of the bus protocol used by the car, a micro- controller is needed in the OBD-2-to- RS232 interface to perform the neces- sary conversion to and from the car's protocol. This intelligent OBD-2 inter- face is able to decode the results it reads out and deliver them to the PC in plain ASCII characters. In the simplest case a terminal program is all we need on the PC; the user will then have to search out the various fault and sensor code tables available on the Internet in order to fathom the meaning of the received ASCII strings. Fortunately there is a Windows program av ailab le for this purpose [4|, which offers a wide range of functions even in its shareware version. OBD-2-compatibIe solutions The OBD-2 interface published in Elek- toT Electronics in November 2002 used a preprogrammed microcontroller made by a Canadian company, but could only be used with cars that use the ISO 9141-2 protocol. The VAG- COM approach has the advantage over this of being independent of any man- ufacturer. It is also suitable for use with any OBD-2 -compatible car that uses the ISO 9141-2 protocol, which, at that time, was the case for most of the more modern cars from European and Japanese manufacturers. The new OBD-2 Analyser presented in this issue uses a T89C51 microcon- Format of o CAN message There are two different identifier lengths available, giving rise io two types of frame: • Standard frame (1 1-bit identifier] O Extended frame [29-bit identifier) A message needs to be formatted in a particular way far transmission on the CAN bus. The packet is called o 'frame'* A frame consists of seven fields: 0 Start of frame • Message Identifier Four different combinations of identifier length ond bus speed • Control bits are used In EOBD: • Data [0 to 8 byres) • Check bits • Acknowledge bit 0 End of Frame 1 1-bit identifier at 250 kb/s 1 1-bit identifier at 500 kb/s 29-bit identifier at 250 kb/s 29-bit identifier at 500 kb/s In the single frame case the byte also indicates Hie number of bytes in the data field that are actually used. S o F ArhitraUon Fitter It Bit Identifier Control Field DLC 3 2 10 Da in Field CRC Acknowledge EOF Intermission Reid Reid Field Field user data, 0 - 8 bytes 15-brtCRC checksum ACK Slot EOF 7 Bits 3 Bits r r T Q r R E 0 C ACK FI Delimiter C Delimits Formal of a standard frame in arcordante with CAN Specification 2.0 A. 07 DF 02 ui DD CRC EOBD request far speed sensor reading (1 1 -bit identifier) 07 EG 03 41 OD \Y — n CRC EOBD reply containing speed sensor reading (1 1-bit identifier) 18 DU 33 F! 02 til 0D CRC EOBD request for speed sensor reading (29-bit identifier) IS DA | Fl Y\ 03 41 0D W CRC EOBD reply containing speed sensor readme] [29-bit identifier) 7 8/2005 - eSektor slidionfcs 15 PROTOCOLS troller with firmware developed by Ozen Eiektronik from Turkey [B] which is currently the nsc plus ultra in its field: it supports all five protocols (see Table 3)! This OBD-2 analyser is thus the first EGBD interlace using a micro- controller that also supports the CAN protocol. In view of the migration of manufacturers to the CAN protocol, this support is essential for a future- proof system. In most cases using the OBD-2 analyser in conjunction with a note- book will be the most powerful as well as the most cost-effective and appro- priate solution. A stand-alone OBD analyser with built-in LCD has the advantage that it can easily be used while on the move, and it can even be installed permanently. Commercial hand-held OBD analysers are, how- ever, still rather costly, although some hobbyists have built their own. Functions available In recent years OBD-2 has evolved in more than just the protocol used. The range of diagnostic facilities available over the standardised interface has increased considerably. It is certainly no longer the case (if it has really ever been the case) that OBD-2 can only be used for reading out data related to exhaust gases. Legislators have so far only required an OBD-2 or EOBD con- nection for control units associated with the power train. Other systems such as ABS, climate control etc., are left to the whim of the manufacturer: they can offer diagnostics over OBD-2 or they can use their own protocols instead, and take advantage of pins of the OBD-2 socket which are not reserved in the standard. Some manu- facturers already make vehicles where all the control units are on an OBD-2 compatible network. The extended OBD-2 standard covers all currently- used control units as well as those expected in future, so in principle the diagnostics for the entire vehicle can be carried out over OBD-2 or EOBD, The E'u Competition Commissioner could therefore consider the possibility of further extending the EOBD stan- dard to cover all control units associ- ated with vehicle maintenance. The range of functions available is chiefly determined by the nine test modes in the standard: 01 - gives real-time data 02 - gives the so-called ‘freeze frame' data 03 - gives fault codes 04 - erases fault codes and stored val- ues 05 - gives the self-test results for the Lambda probes 06 - gives the self-test results for sys- tems that are not continuously moni- tored 07 - gives the self-test results for sys- tems that are continuously monitored 08 - dedicated control mode 09 - vehicle data request: information such as software version and VTN (vehicle identification number) Many further test modes are specified in the standardised extension (accord- ing to SAE J2190). Provision is also made for future expansion and for manufacturer-specific uses. The num- ber of standardised fault codes has also increased significantly, including a large number of manufacturer-spe- cific fault codes. Manufacturers are required to define their own fault codes in relation to the standardised codes, although it is frequently not possible to deduce their meaning with- out the manufacturer's documentation. Full and shareware versions of diag- nostics software are often differenti- ated by the number of fault codes they understand, 0BD-3 The next generation of technology, OBD -3, is already on the horizon in the USA., In the name of 'Homeland Secu- rity’ data protection is taking a back seat and surveillance is now in the driving seat: OBD -3 reportedly will secretly and silently transmit its data to a central monitoring station by mobile radio or satellite. Digital reprints of these articles may be obtained from www.elektor-electronics.co.uk Table 3 0BD-2/E0BD protocols Web links: [1] Gerd Muller's OBD-2 site: YAvw.obd-2 ,de [2] Js ff Noxon's VAG Interface: wyyw.Dlanetfall .com / jeff/obdii / [3] VAG-COM: www. ro s s-tec h . c o m / [4] OBD-2 diagnostics program: v/ww. sc a n too 1. n et / [5] Ozen Eiektronik: yaw. o ze n e S e k trg n i k . co m / 1 1, 1509141-2 #2. KWP2G00 • 3. J1850-PWM #4, J1850-VPWM • 5. CAN-BUS Further reading: 1* Car Diagnosis Systems, Efektor Electronics October 2002, p_ 50 + 2* Vehicle Diagnostics Adopter, Elektor Electronics November 2002, p. 24 and December 2002, 82, 3* Controller Area Network (CAN) pads 1-5, Elektor Electronics September 1999 through January 2000. 16 SERIAL COMMUNICATIONS SPECIALISTS Test and Measurement Solutions featured products NETCOM-813 S Port RS232/RS422/RS485 model £350 0S1M12 Oscilloscope / Datalogger 2 1 MS.'s Input Channels + wavsFann generator output £125 NETCOM Ethernet- Serial Servers NelCom are industrial strength, network based serial device servers for connecting RS232, RS422 and RS485 serial devices directly to a 10/ 100Mbps Ethernet network running TCP/IP. Netcom can control 1 or more serial devices located virtually anywhere (via Ethernet or Internet). NelCom can be configured over Driver Panels, WEB Browser, Serial Port, Telnet or SNMP and serves as a transparent serial channel without platform and distance limitation. Housed in a sturdy metal enclosure including DIN rail mount, one to eight port models are available. 19in rack-mount versions with internal switch mode PSU can also be supplied. priced from £85 (' NelCom 111 ) USB Instruments - PC Oscilloscopes & Logic Analyzers Our range of PC Instruments may be budget priced but have a wealth of features normally only found in more expensive instrumentation. Our DS1M12 and PS40M10 oscilloscopes have sophisticated digital triggering including delayed timebase and come with our EasyScope oscilloscope / spectrum analyzer / voltage and frequency display application software and our EasyLogger data logging software. We also provide Windows DLLs and code examples for 3rd party software interfacing to our scopes. Our ANTS and ANTI 6 Logic Analyzers feature 8/16 capture channels of data at a blazing 500 MS/S sample rate in a compact enclosure. priced from £125 ( D31M12 & ANTS ) 1 to 16 port USB to Serial Adapters With over 16 different models available, we probably stock the widest range of USB Serial Adapters available anywhere. We offer converter cables, multi-port enclosure style models in metal and plastic, also rack mount units such as Ihe USB-16COM-RM opposite. Serial interfaces supported include RS232, RS422 and RS485. We also supply opto-isolated RS422 and RS485 versions for refaibte long distance communications. All our USB Serial products are based on Ihe premium chipsets and drivers from UK company FTdl for superior compatibility, performance and technical support across Windows, MAC-OS and Linux platforms. priced from £20 ( US232B/LC laptop Companion j PCI Serial Cards Discover our great value for money range of mulii-port PCI serial cards. Supporting from two to eight ports, Ihe range includes RS232. RS422, RS485 and opto-isolated versions. Our 4 port and 8 port models can connect through external cables or the innova live wall mounting COMBOX. EasySync Ltd 373 Scotland Street, Glasgow G5 BQB, United Kingdom Tel : 0141 418 0181 / Fax : 0141 418 0110 Web : blip :/Avww.easysync .eo.uk E-Mail : sales@easysync.co . uk " Prices shown exclude PP and VAT where applicable 7 - 3/2 005 - ekklor efertionks 17 DIAGNOSIS If you're like most of us, you occasion- ally notice that there's something not quite right with your car. When all sorts of little lights go on E it s pretty clear that there's something wrong. In some cases your car even starts to talk to you and simply refuses to shut up. There can also be a vague sort of prob- lem that is very difficult to describe to the mechanic. And although the serv- ice light indicates that something isnt right, it doesn't give you any sign of what it might be. That means you have to make an appointment with the garage. Besides all this, many car owners would simply like to know more about everything that is happening in their cars. The problem is how to figure that out in all the jumble of electronics. The information must be there, but how can you get you hands ou it? Fortunately European legislation lends us a bit of a helping hand here. Car manufacturers are now required to pro- vide access to all sorts of data about the engine and the trouble conditions. Readers of Elektor Electronics can use the adapter described here to easily read out a lot of useful information. Will it work with my car? In principle* it's all very simple. All cars with petrol engines made from 2001 onwards, and all cars with diesel engines made from 2004 onwards, must be fitted with a standardized EOBD interface. The parameters and values that can be read out via the EOBD connector are also standar diz ed. Unfortunately, the manufacturers could not agree on the protocol to be used for data transfer with the result that there are five different protocols. The adapter described here can read all five proto- cols. You don't have to know which protocol your car uses, because the adapter figures that out on its own. What can you read out? The European standard divides the data into groups, which are also called 'services'. The first four sendees are presently available, and they are also constantly being modified and extended. Modern cars are jam-packed with elecironics. That's great until some- thing goes wrong, lien you're at the mercy of the dealer. At least until now, because in many cases you can use i lie EOBD adapter described here to track down the p oblem yourself. B. Ozen (Ozen Elektronik) In Service Mode 1, yon can read out the values measured by various sensors Naturally you can only read the values from the sensors that are actually fitted in your car. Some examples of sensor values are motor ipm ? driving speed, calculated engine power (based on air consumption), cooling water tempera- ture, and turbocharge pressure. In Service Mode 2, you can retrieve stored data (which is called Freeze Brame' data). That generally consists of engine data stored while the car is underway so it can be analysed after- wards io determine whether the meas- ured values stayed within the stipu- lated limits (including the environmen- tal limits). Sendee Mode 3 contains the trouble codes (DTC), Thousands of trouble codes have already been denned, and new ones are constantly being added. Here the manufacturers have a lot of freedom with regard to nr akin g the codes publicly available. You can find a more complete list at www.obd- codes.com. That list is still constantly being enlarged. Refer to the links at the end of the article for more information. Finally Sendee Mode 4 simply allows the trouble codes in Service Mode 3 to be reset. Be careful here: all of the codes will be deleted! If despite your troubles you have to take your car to the garage for sendee later on, the mechanic will not be able to see which trouble codes have occurred if you have deleted them. What you need Nowadays nothing works without soft- ware and a computer, so you'll need a PC (desktop or notebook) and a pro- gram that can deal with the codes. No 18 elrklor eleEfronlts- 7-B/2005 special require- ments axe placed on the computer, as Jong as it has a standard serial port. If your computer only has a USB port, you can use a USB-to-R3232 adapter. As regards the software, there are var- ious options. The first option is a simple program called MOByDic Computer Interface. It actually amounts to little more than a terminal emulator program that you can use to send and receive codes. The advantage of this program is that the Delphi source code is available on the author 1 s website, so you can adapt it to your own purposes. It can be down- loaded for free horn www.ozene!ek- tronik.com. If you simply register and log in (no charge), you can download 'mOByDic Computer Interface Version 1.2b 1 from the Downloads page. Another option is the Scanmaster pro- gram. It provides a well-organised graphic interface (see Figure 1), Scan- master can be downloaded from www.wgsoft.de or the author's web- site www.ozeneldktronik.coni, The nice thing about this program is that it translates the codes into intelligible texts, which makes things a lot easier to understand. It will shortly also be available in non-freeware 'professional' version. The professional version will be more extensive and will include many more trouble codes. Hardware Toe EOBD interface adapter is built on a printed circuit board that is available by itself from Elektor Electronics Reader Services or as part of a com- plete construction kit. The assembled board enables the computer to under- stand the signals provided by the EOBD connector in your car. Besides converting the signals on the EOBD lines to RS232 levels, this also requires matching the protocols to each other. It shouldn't come as any surprise that 7-8/2005 - ctAiof detfronFts 19 DIAGNOSIS Figure 2. Schematic diagram of the EOBD adapter. Note: fit either C7 or IC7. a microcontroller (T89C51) is used for the latter task {see Figure 2). If would exceed the scope of this article to folly describe the five protocols that the adapter can process, so here we s ll limit ourselves to saying that they differ quite significantly from each other. In any case, you don't need to know any- thing about the protocols to be able to use the adapter successfully. Incidentally, it appears that within a few years practically all car manufac- turers will change over to the more standardized CAN bus protocol. That will make things a lot easier from a technical perspective, because it means that the EOBD interface will simply become another node in a net- work. For readers who would like to know more, the entire CAN bus was described extensively in the Septem- ber through November 1999 issues of Elekrior Electronics. Thanks to its built-in CAN controller, the T39C51 microcontroller can com- municate with all of the EOBD proto- cols. The external 16-MHz clock signal is doubled internally. That means the chip works at 32 MHz. IC7 generates the reset signal and monitors the 5-V supply voltage, which is derived horn the battery voltage by a 7805. It's pos- sible {and less expensive) to replace IC7 by capacitor C7. The microcon- troller drives two low-current (5 mA max.) LEDs that act as state indicators. The serial interface is provided by the well-known Maxim MAX232, so the signal transfer with the PC takes place using nicely standardized RS232 levels. A different part of the hardware is used for each protocol. For the I S 09 1 4 1 -2/KWP2 00 0 prof o c ol t trans i s - tors T3 and T4 provide level adjust- ment. According to the ISO standard, each of the two data lines must be fit- ted with a 510-Q load resistor. The ISO signals are transmitted via the transis- tors. A comparator (IC2b) is used to receive the ISO signals. The reference input is connected to half the batter/ voltage (V bat ). The microcontroller's internal pull-up resistor provides an adequate load for the open-collector output of the comparator. In the case of the J1850-PWM protocol, T1 and T2 are used to transmit the dif- ferential signal. The received differential signal is processed by the comparator to yield the RX-PWM signal, R7 and R8 tickle i efictronics - 7-B/200S Figure 3. The circuit hoard is quite densely populated. That Is made necessary by the various signal conversion options. protect the comparator inputs against excess voltages on the JI850 bus. The signal voltage required by the J1850-VPWM standard is provided by a standard 7808 voltage regulator. A reference voltage of 3.9 V is also nec- essary for transmitting and receiving data. During transmission, the TTL level is raised to 7.25 V by the com- parator and the combination of T5 and D5. R23 acts as a standard load resis- tor. During reception, the VPWM signal is converted back to TTL levels by using comparator IC2d to compare it with the 3.9-V reference voltage. The internal CAN controller of the T89C51 is connected to a PCA82C 250/51, which in turn drives the CAN bus. R3, R4, Cl 1 and C12 suppress reflections on the CAN bus. The required baud rate of 250 or 500 kbaud is gener- ated by the internal CAN controller in combination with the Identifier. The FCA82C251 is functionally identi- cal to the PCA82C25G but suitable for use with 24 V. If you work with lorries P you should use the PCA82C251 ver- sion. If you only plan to use the adapter with passenger cars, the PCA82C250 is suitable. If you find the American transistor numbers strange, you can use the European BC546R in place of the 2N3904 if you fit it rotated by 180 degrees. A BC4556B can be used in place of the 2N3906, again rotated by 180 degrees. In case of doubt, consult the relevant transistor data sheets to be certain. The printed circuit board, whose lay- out is shown in Figure 3, fits exactly in the specified Hammond enclosure. You only have to make cutouts for the con- nectors at the two ends. The board is held in place between the lid and the vertical ribs of the enclosures without any additional fixing hardware. Initial use The EOBD interface has two DBS con- nectors: one male and one female. Con- nect the female connector to the serial port of a PC using an RS232 extension cable. Be sure to use a 1:1 cable for this, not a null-modem cable. The other DBS connector is connected using a special cable that has a female DB9 connector at one end and a male OBD plug at the other end (see Fig- ure 4). The most convenient solution is to buy this cable along with the PCS. It is specially made for this application. Connect the OBD plug to the OBD service connector in your car. Note: be sure to connect the OBD plug after all other connections have been made, due to the risk of static charges (see the inset). It may take a bit of searching to find the OBD connector in your car. but according to the EU standard it should be within 1 meter of the driver's seat. Naturally, that means it can always be under the bonnet. If you can read a bit of German, there’s a handy website at www. obd-2.de/tech_dtc .html. It Iden- tifies the location of the connector for many different types of cars. The circuit is powered from the car. That means that the red LED (power indicator) should light up as soon as you switch on the ignition. After this, the adapter automatically searches for the right protocol. That is indicated by an irregular bli nk ing of the yellow LED. As soon as the protocol has been found, the green LED lights up. If no valid protocol is found, the green LED remains off and after a while the yel- low LED will start blinking regularly at a 3-second interval. That means that no communication is possible. After the green LED on the adapter has lit up as a sign that communica- tion has been successfully established, you can start the desired PC program, Here we assume that you are using the S c anm a st er pro g ram . Imm ed lately after being starred, the program starts to look for the adapter. You may have to configure the correct COM port and baud rate (9600), If you click on 7-6/2G05 - skktor cfertionics 21 DIAGNOSIS Figure 4. Signal connections In the OBD-fo-seriol cable. 'Update 1 at the lower left, the data will appear on the screen (see Figure 1). Now you're ready to use the program. Don't forget to click on Read/ in the 'Sensor Data' menu, since otherwise everything will stay at zero (see Fig- ure 5). Although the mOByDic Computer Interface program does not present the data in such a nice graphic form, it does allow the measured data to be shown in the form of a chart. That gives a very clear picture of measure- ments made over a length of tame, Finally, we'd like to note that wireless data readout is also possible, A Blue- tooth adapter for the serial port is available, and it can be used to link the OBD interface adapter to the PC with- out using a cable. In any case, we hope you enjoy building the adapter and using it to measure data. COMPONENTS LIST Resistors: R1 ( R2= Ik Q R3,R4 = 100Q R5,R9,R15,R16,R21,R25 = 4kn7 R6,R7,R8,R10 r Rl I ,R14,R17 r R22,R2 3 = 1 QkQ R12 R13 = 510Q R] 8 = Mq] R19 - 3LQ9 R20 = 3kD R24 = m Capacitors: Cl C4 = lOpF 16V radial C5,C6 = 27pF C7= luF 16V* C8,C9,C10,C 13,04,0 5 = lOOnF Cl 1,02 = 560pF Semiconductors: D1 = LED. high efficiency, green D2 = LED, high efficiency, yellow D6 = LED. hiah efficiency, red D3 = 1N400I D4,D5 = 1N4148 11,15 = 2N3906 T2 .13,14 = 2N3904 [Cl - T89C5 1 CC02UA, programmed, Publishers' order code 050092-41 * * or from www.oz&nelekironikxam; ref. tyoe OE90C2600 [C2 = LM339 in DELI 4 case 1C 3 - PCA82C251 of PCA82C25G, in D3L8 case 1C4 = MAX232., m DILI 6 case [C5 = LM7S05C, in TO220 case 1C6 - LM78GBC, in TO220 case IC7 = ZSH560C, in TD92 case * Figure 5. Data can be read out in tabular form (using "Table data" at the upper left) or graphic farm. Miscellaneous: K1 - 9-way sub-D seeker (female), angled pins, PCB mount K2 ~ 99'Way sub-D plug (male) angled pins, PCB mourn JP1 - 2 -way 5IL ptnheader XI = I 6MHz quartz crystal, 32pF parallel capacitance 28-way PLCC socket Case: Hammond type 159 IB K5232 extension cabEe, nan crossed., (1:1) male-tofemale Adapter cable, female DB9 to OBD wired according to Figure 4. Available ready-mode. Publishers order cade 050092-72 PCB, Publishers order code 050092-1 ** A complete kit of parts is available from the Publishers; order code 050092-71 ** Content of kit: • PCB @ programmed microcontroller ® all other parts • OBD-fChDB9 adapter cab'e • Case • mount either C7 or IC7 • * see Elektar SHOP pages or v avw, e I e ktcr-e lectro n ics . c o . uk 22 drklor electronics - 7-8/2005 Static charges The adapter is not electrically isolated. That would have made the circuit quite a bit more complicated, and it would require a sepa- rate power supply. The OBD plug has two ground pins (4 and 5) that are somewhat longer than the other pins, so the ground con- nection is always made first to allow any potential difference to be equalized before contact is established between the signal lines. However, if you think there is a large potential difference you should always neutralise the potential difference before connecting the plug. The best way to do that is touch the circuit or PC (for example, by firmly grasping the metal shell of the DB9 plug) and then touch the car with your other hand to equalize the potential. In this case your body acts as a conductive link between the PC and the car. Do not connect the plug until after you have equalised the potential. Links www.oieneiektrontk.com www.obdi tdiocj.com (This wtbsite will be entirely dedicated fa iFie EOBD a dopier. It wrs no! quite ready when this artTcJe was will ten, but it is intended to bs (jperoltend when lbs article uppers in print.) The following websites (among others) provide information about OBD error codes: www.obd-2.de/tech dtc.html www.troublecodes.net/Techn teal For additional information/ see: www.elmelectronics.com www.obd- 2 .de wwWxScantoof.net www.sae.orcr www.r50.org 21 ? CAR TUNING These parameters protect the engine from overheating and limit the car's top speed. We leave the protection untouched, but increase the top speed by 10 km/h. 100 108 SI 100 100 1QD 100 100 221 0 0 0 0 The torque limiter. This graph is changed significantly, but within reason. The 'driver's wish' controls how the engine reacts to the accelerator pedal. The turbo pressure is increased a bit os well 3SH I Site I « JOE - \ ZU& t * mii 4 1SX 1 . I UK I : 5TK 4 MS I ■mu m { Jc E -rr - s ,*r ■ r. m IJ I f r ;-C ' . ■ " " x \ / III / / /tp? 3$*" >^?S/ / / -a- ■- More power t Chip Tuning Tnijs Schoonbrood In the past carburettors and distributors ruled the roost, but nowadays mainly injectors and sensors are Found under the bonnet. The biggest difference between then and now is the way In which the engine is controlled. In o traditional system the carburettor 'automatically' con- trolled the fuel-mixture depending an the pressure and the size of the nozzles. A sophisticated mechanical system with centrifugal and vacuum advance continuously adjusted the ignition timing according to the revs and the engine food. It's all very different these days: the engine manage- ment system is in total control. An e/ecfronic control unit ('ECU') receives information from sensors regard- ing the state oF the engine. This includes the revs, the engine temperature, the ambleni temperature, the posi- tion of the accelerator, the angle of the camshaft and the turbo pressure. The ECU controls the timing and the length of the fuel injection on ihe basis of this informa- tion. is ihe engine still cold? Then more fuel is injected because part of the fuel condenses on the cylinder walls of a cold engine. Has the driver put the 'pedal to the metal'? The engine management system can then temporarily increase the turbo pressure, or just ignore Its guidelines for economical driving so the car becomes more responsive. The ECU has a type of mint database on board that con- tains numbers for the Ideal amount of fuel, the right time for fuel injection and, far petrol engines, optimal Ignition timings. And all these numbers are available for various conditions. But ore these numbers as good as possible? Manufactur- ers have to keep a large range of criteria In mind. For example, every engine has to have a similar perform- ance despite small variations In its construction or when a less than optimal fuel is used. They also have to stay below certain emission and consumption levels. On top of this the manufacturers often include large safety mar- gins, The resulting set of parameters in a standard ECU is therefore a compromise, which the manufacturer feels is right far the International market. This does however leave some room for fine-tuning,, which is exactly what we'll do next. 0BD and chip tuning The parameters For the ECU (the professional iuner calls these maps') are stored in an EPROM or Flash memory. These memory chips can be easily read, copied and modified using a universal programmer. Wish the inEro 24 dsktor clertTorilc - 7-8/2005 Can a car ever be powerful enough? As far as we're concerned, 'more is better' Here we investigate how chip tuning (after all, we are an electronics magazine) can improve the performance of our sacred cow. Our testbed is a BMW from an reader and we've also made use of the OBD2 analyser that is elsewhere in this won't give anything away yet, but the results are worth the effort! enthusiastic issue. We ductian of OBD (On Board Diagnostics) it become even simpler to read the ECU memory, since you no longer had to gain physical access to the memory. In the first case we tolk about chip tuning, in the second it's colled OBD tuning. Although the names are different, they effectively refer to the some procedure: modifying the ECU parameters to relune the engine. ECUs are usually built round a microprocessor. Apart from the parameter tables, the memory also contains a program. This software can interpolate the values from the parameter tables and also deals with the stream of information coming from the sensors. For our objectives there is no need to modify the program and it is even undesirable. In ony case, it is often only possible to gain access to the program with an EPROM programmer; it's not possible vlo the OBD. Do-it-yourself? Many electronics hobbyists probably already have access to the required hardware (EPROM programmer] or they can build it themselves (OBD interface). But you need more than just the hardware to successfully tune a car, such as an mndepm knowledge of engines. Which parameters con be modified and what values are sore to use? Changing values by trial and error can have disas- trous consequences, so only attempt this when you are absolutely sure what you're doing. First %ve have to find out the memory addresses of the parameter tables. For obvious reasons, the manufacturers are nor very forth- coming with this information, which is often subject to change os svelL Fortunately there are companies that pro- vide such information. It is also possible to examine the memory yourself, but this requires a lor of patience and experience, IF you decide to go ahead with chip tuning you should take a look ot www. dims port.com, the web- site of the Italian Dimensions Sport, this company sup- plies software whereby the addresses for the parameter tables are supplied as separate modules. You therefore only pay for the type of car that you want to retune. The parameters are also shown in a graphical format, which mokes it easier to make the modifications. It is outside the scope of this article to show you exactly which parameters should be modified; this is best left to the engine specialist, A number of parameters, such as the speed and rev limiters, are fairly obvious, but even here you should hold back a little. Are the tuned parameters to your liking? They con then be written to the EPROM, but not before a new checksum has been calculated. If you only change the parameters A took inside a modem ECU. The BMW is prepared for the rolling road. 7 -8/200 5 - elektor elect resits 25 TUNING A spatial sensor extracts the rpms of the engine from the vibrations. On the rolling road we increase the speed until the rev limiter kicks in. On aur v/ay to 220 km/h. xgmt. fp - : "l J -«— . We retune the tar via the OBD. Powebox There ore other ways than OBD/chlp tuning to improve engine performance. One of these is via the use of so-called 'powerbox- es'. These are small modules that are placed In the signal path between the sensors and the ECU. By changing the signals the performance increases and the engine management can remain unchanged. The advantage of powerboxes is their relatively low cost. You normally fit the modules in your car yourself. They are usually supplied with adapters so that the original wiring loam can stoy intact. When you lake your car to the denier, or you need to sell it, you can remove the powerbox in no lime. A powerbox is generally not as goad as real chip tuning because such a module can only alter the Information going into the ECU. the ECU will think that the memory is faulty. In that case, the party-lights on the dashboard will probably come on and the car won't start. Goad quality tuning software knows how fo calculate the checksum and where to store it, so that you don't need fo concern yourself with these trivialities. In practice We colled in the help of a professional to demonstrate the potential of chip tuning. The subject of our test is o jet- black BMW 320d belonging to an Elektor reader. Mark Verhaeven from Engine Management Systems had the honour of converting this sports car into a true power- house. First Mark connects a laptop to the BMW via a special OBD interface and reads the current values of the tables. His software already knows the addresses of all relevant characteristics and it displays these in both numerical and graphical formats. The first table we look at is the fakrenvunsch. This is used to translate between the position of the accelerator pedal and the amount of fuel. BMW has chosen the values for this table to give a smooth ride. The more the pedal is pushed down, the more torque is produced by the engine. The relationship between the two is normally about linear So when the pedal is pushed down halfway the engine will produce half the amount of power possi- ble. If the table is adjusted so that half the torque is pro duced when the pedal is only a third of the way down, the car reacts more quickly to the accelerator pedal. Don't overdo this though; otherwise the cor becomes undrivable because the accelerator would turn into an on/off switch. The amount of fuel that was determined by the above method isn't injected without further ado; there ore a few other tables that introduce restrictions. The most important of these is the torque limiter. Limiter? That implies a tuning possibility! And it turns out that these values can be adjusted as well. Mark explains: "At certain revs this engine con produce more torque than the gearbox and driveshoft can cope with. The limiter normally has a very large safety margin. With this BMW it's quite possible to increase ihe power □ bit without causing any damage/ We now know how much diesel has to be injected. The fuel pump supplies fuel at a constant pressure to the injec- tors. Since the pressure is constant, the engine manage- ment can only adjust the amount of injected fuel by changing the Injection times. Note that this involves two variables: the time at which the injectors open and the length of time they re open for. 26 si skiur electronics - 7-8/ 2005 li could report a turbo pressure to the ECU that is lower thon the real value. This causes the wastegnte, which protects the engine against a high pressure, to open a hit later. This unsubtle trick works with petrol engines because the electronics will automatically increase the fuel injection at a higher pressure. This does cause an extra strain on the engine, so it J s not a very nice tuning technique. This won't work with diesel engines, which run with a lean fuei/air mixture. Powerboxes for these engines make the fuel pump work border, causing more fuel to be Injected for the same opening times. This puts a greater stress on the fuel system and causes faster wear and tear. Another trick is to leave the injec- tors open a bit longer. This over- comes the disadvantage of extra wear, hut It Increases the chance of black exhaust fumes, especially when the powerbox doesn't receive information for the engine revs. It is better to get your car chipped by a competent tuner than to install a powerbox, even though it's cheaper y o u u u y o y But when is the right time to inject? Not too late, other- wise you can't inject enough fuel or the engine starts smoking. But certainly not too early either because the diesel could ignite too early. This would cause knocking of the engine and could even damage it To increase the amount of fuel injected we open the injec- tors for a longer period and also open them slightly ear- lier. OBD/chip tuning is different from for example, most powerboxes because the injectors are not only left open for longer but they re also opened earlier. Finding the right settings for the opening and dosing of the injectors is an important aspect of the art of tuning and Is best left to the professionals. As to the question if there are more parameters that restrict the engine, Mark answers: "Certainly. This, for example, is the speed limiter. The standard car won't go faster than 2] j km/h, but this Is easily changed. And this table shows another interesting restriction: when the engine heats up as o result of heavy loading, the ECU automatically cuts back the power o little bit. This could be changed as well, but I d rather leave it alone/ 1 Rolling road Up to now it s all been theory, but hos our BMW really gained extra power? And if so, how much extra acceler- ation can we expect when we pull away from traffic lights? We decide to get some exact figures and send the BMW for a rolling road test. Far comparative measurements we first need to see how the standard car performs and we load the standard tables back into the ECU. The results are as expected: the 320d delivers 140 bhp. This is a little bit more than the quoted 136 bhp, but it's nothing to write home about. The maximum torque was 318 Nm. The tuner connects his equipment to the OBD Interface and reprograms the ECU with the modiFied tables. We re curious what the results are. They meet our expectations and the meter now shows over 1 55 bhpl We fry a few other settings and manage to get a maximum power of nearly 160 bhp. There is a considerable increase in torque as well. In the end, the BMW has nearly 380 Nm, which is an increase of about 20 percent. The chip iunlng has cer- tainly borne fruit. We then take the car out onto the open rood to see if the performance Increase is dearly noticeable in practice. And It certainly Is: the beomerhas, especially at medium and higher revs, a noticeable Increase in acceleration and it shoots art into the distance. This makes us wonder why we didn't stick a chilli up its tailpipe before ... We saw □ 20% improvement in torque with our BMW 320d. This brings the 'pleasure to drive feeling to life. With thanks to: The BMW in rhis article was modified by: Engine Management Systems De Flammert 1021, 5854 NA Nieuw-Bergen, The Netherlands Tel: (+31) 485 343191 - Fax: (+31) 485 343181 Web: www.ems-funrng.nl The rolling rood test was performed by: Van Kronenburg Autosport Spanrpot Cost 19, 5667 KT Geldrop, The Netherlands Tel: (+31) 40 2854064 - Fax: (+31) 40 2867765 Web: www.van-kronenburg.ni 7-B/2005 - thktar dcCliG&ia 27 REVIEW COPY Filter designing is a competence and taken very seriously in audio and measurement and control technology. The associated theory is massive, most textbooks concentrating on analogue approaches. Thanks to a tremendous increase in computing power of today's chips, the art of fil- ter design is shifting to the digital domain. However, converting an analogue filter to digital is not too easy, and that is why Manchester University have released Signal Wizard, a hard- ware/software suite to help the budding designer get to grips with DSP-based filters. The Signal Wizard package is, in a way, a virtual breadboard for digitally implemented filters, no! forgetting that the kit may also be used for a suitably devel- oped stand-alone application. The latter may turn out to be great solution for one-offs and low-volume applications. The cir- cuit board in the package con- tains, among others, a Freescale DSP chip, a Flash memory and the required 24-bit D/A and A/D converters. There's also a programmer link in the Form of an RS232 connector. The audio connections on the board are cinch (RCA 'Line') sockets and a cineh-fo-jack adapter cord is sup- plied, as well as a mains adapter and on RS232 coble. Although the hardware outfit Is pretty comprehensive. It needs a software complement. Software The software ihal comes with Signal Wizard is capable of first defining filters in various ways. Next, if will generate □ filter pro- gram for the DSP chip and allow the chip to be actually pro- grammed. All this is possible without deep knowledge or DSPs and/or digital filters. Having launched the software and set up the SW hardware we re ready for take ofP. It is just possible you will get a num- ber of error reports like 'not a floating paint value'. In that case you will need to change the San- 28 efektor dedrarJu- 7-8/2005 guage seeing of your Windows operating system. This is best done by changing the Country settings in Control Panels. Select US/UK settings, Le,, the point (.] for the decimal and the comma ( r ) for the thousands separator. This may be just the other way around in some other European countries. The UK/US settings will prevent further error reports from appearing. DSP program is created contain- ing all relevant filter coefficients. All it takes is one more mouse dick and the software is actually programmed into the DSP chip on the SW board. Conclusion Signal Wizard is excellent if you want to develop skills in design- ing digital fillers fas/. The great thing about it is that filters can ZIU! . V-J ■ hcj ^ H fi ti L J [ ^ ^ i IL A vu I III 1 1 \ w [ E in : :±- uni;.’.!: rzc iin wi TUtfUr^h SA xjstj ii ii ipi i St Jm-y czl i rc: h-i _i± s’ r i- r L^-trf Biir. h* r.:: k-/ r - Liw-iis ■ z =r‘." - r i-rc=s- • t*Jf#|a4E - -t rJ z‘ l — Jzze I - -- 1 CC Ts 1 i 1 ■ ,z Ifi When reading up the subject of digital filters you'll soon stum- hie on the terms FIR and HR, FIR stands for Finite Impulse Response and HR, for Infinite Impulse Response. Great, but what does it all mean? Any filter has Its awn characteristic response to a pulse applied to its input As soon os we know the impulse response we are in a position to calculate back towards the filter's amplitude and phase behaviour. The reverse also applies — if we ensure that our 'transfer function' exhibits a certain response at the output we have in fact created a filter. This property is exploited with a FIR filter. Each sample is separately considered as a pulse and allowed to cause a response at the output, with the value of the input sample determining the level. The pulse response may comprise just TO consecutive samples, but equally well, several thousands! The formula for a FIR filter is Us V'r “ ,-K r~ ftKl Vie He. tgpc ■ sdK *_ 1“ ”T| ^ '.n j _jran lt: - - • - * Lr** ! . Jli-! ! •_rf> S L>t- " Lsdr. =- " 1 l.li..- 1 r l - 1L&K h*i l ™ _-3m± I c— £ -f Lz£z an L =“ iMC H4i > * >JTfl I ™ -1 - _ ~~1 f '~ f=u Fh i= J - -1 j fet-jZGrl — ] fW y[n| ss x[n|*cO + x[rt-T]*cl x[n-N]*cN • • • sun WL mA The Pilfer Design Interface win- dow allows us to design our own filters. The first selection we need to moke Is between FIR or HR filter (see insei). Independent of the way we wish to implement the filter, it is now possible to design simple filters, Chebychev or Butter worth filters. All of this is remarkably simple. FIR fillers offer some more options like accurately defining the desired frequency response, whereupon ihe soft- ware will compute the neces- sary coefficients. Testing During the design phase the fil- ter's transfer function is conve- niently shown in the "Graphical interface window. The graph is constantly updated on every change in the design window, providing o very quick way to check the response of the filter to changes you're making. As scon as you're finished tweaking the filter response, a e -- 1-1=3* *^§3™ V also be tested in practice, allow- ing a designer to see what's □head of him/her while experi- menting with all the bells and whistles of digital filters. For everyone else who's keen on delving deeper, there is no alternative to stort [or continue) studying digital filter theory. For- tunately, Signal Wizard offers plenty of power and options to achieve above average results in audio signal processing and filtering. to . Signal Wiz aid was developed by ins School of Electrical Engineering at UHiST {University or Manchester Institute for Science ond Technology). It is marketer! by Wig, www.saelig.com/S u d pliers/ ezfir/ s Tqayit 1 . izard2.bfm. email ^fs'gi-sr^-con . Y/a ore grateful to Mr Patrick Gaydecfci of UMIST for supplying □ review sample of Signal Y/izard 2 and assisting with Ins review. where yfn] is the output signal at Instant V, x[n] the input signal at instant V, the impulse response (from 0 to N] mid N the number of samples In the pulse response. Of course, an HR filter also has a certain impulse response, hut compared with the FIR variant these are a hit harder to read from the coefficients* The reason is that feedback is used in an HR filter. Mathematically an UR filter may be described as Y[nJ = ai>[n-T]*a 2 *y[fi-2] a k *y|n-k] + bo*x[n] + bi*x[rt-1] «»» bfc*x[n-k] which dearly shows that the output signal Y is fed hack to the input. The advantage of an HR filter is thot a reasonable filter may he created with just a few coefficients, where a FIR variant may require a worrying number of these. Also, an HR filter requires less computing power than an FIR equivalent An FIR filter, on the other hand, is not only easier to design but may also achieve absolutely flat phase response thanks to the pulse response being entirely subject to defining, FIR fitters are also unconditionally stable while their HIR counterparts when poorly designed are prone to instability and, in the worst case, oscillation effects 7-B/2005 - fbkfor ebclrattki 29 QUASAR electronics Quasar Electronics Limited FQ Box 6935, Bishops S tort ford CM 23 4WP, United Kingdom Tel: 0B7Q24G 182S Fax: 0870 460 1045 E-maii: sales@quasarelectronlcs.com Web: wv/w.QuasarEiectromcsxom Postage & Packing Options (Up to 2Kg cress ,.e gr:; UK Standard 3-7 Day Delivery - £3 95 UK Mainland Next Day Delivery * £3.95 Europe (EUJ - £6 92 Rest of World - £9 95 ’Order online for reduced price UK Postage! We accept all major credit/de bit 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 kite, projects, modules and publications. Discounts for bulk quantities. <: CREDIT CARD SALES W Q V Gal Plugged In! Motor Drivers/Cont rollers 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. NEW! Bidirectional DC Motor Controller Controls the speed of most common DC motors (rated up to 32V DC; 5 A) in both the forward and re- verse direction. The range of control is from fully OFF to fully ON in both directions, Tne direction and speed are controlled using a single potentiometer. Screw terminal block for connections. Kit Order Code: 3166KT - £14,95 Assembled Order Code; AS3166 - £24.95 DC Motor Speed Controller (5A/100V) Control the speed of almost any common DC motor rated up to 1G0V/5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-1 5VDC. Box sup- plied. Dimensions (mm): 60\A/x1G0Lx6QH, Kit Order Cede; 3067KT - £11.95 Assembled Order Code: AS3GS7 - £19,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 direc- tion control. Operates in stand-alone or PC- controlled mode. Up to six 31 79 driver boards can be connected to a single parallel port. Supply: 9V DC. PCB: 00x50mm. Kit Order Code: 31 79KT - £9.95 Assembled Order Code: AS3179 - £16,95 Assembled Order Code: A$31 13 - £24,95 NEW! Bipolar Stepper Motor Driver Drive any bi polar stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply; 8-3 QV DC. PCB; 75x35mm. Kit Order Code: 31 58KT - £12.95 Assembled Order Code: AS3158 -£26.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix)* Controllers & Loggers Here are just a few r of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for ail units: Order Code PSU445 £8.95 Rolling Code 4-Channel UHF Remote State -of-the-Ait. High security. 4 channels. Momentary or iatohlnn rRlav nutnut Range “ f-' ■>, wjj ,,-m i vt i n 4 ca n he j^ami bv one Rx (kit in- but more avail- anse separately). 4 indicator LED s_ Rx: PCB 77x85mm, 12VDC/6mA (standby). Two and Ten channel versions also available . Krt Order Code: 31 80KT - £41,95 Assembled Order Code: AS31 80 -£49.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. C C Continuously logs up separate sensors located 2QQm+ from board. Wide range of free software appli- cations for storings using data. PCB just 38x38mm, Powered by PC. Includes one DS1S2Q sensor and four header cables. Kit Order Code: 31 45KT - £19,95 Assembled Order Code: AS3145 - £26.95 Additional OS 1820 Sensors -£3.95 each 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 satiable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout, Includes plastic case. Not BT ap- proved. 130x1 10x3 Dm m. Power 12VDC. Kit Order Code: 31 4QKT- £39.95 Assembled Order Code: AS31 40 - £49.95 Serial Isolated J/O Module Computer controlled 8- channel relay board. mains rated relay outputs. 4 isolated inputs. Useful in a variety of control and sensing applications. Controlled via serial port for programming (using our new Win- dows interface, terminal emulator or batch files). Includes plastic case 13Qx1G0x3Cmm. Power Supply: 12VDC/500mA. Kit Order Code: 3103KT - £54.95 Assembled Order Code: AS3108 -£64.95 Infrared RC Relay Board Individually control 12 on- board relays with included irifrafflH remote control unit. Toggle or momentary. 15m+ range. 112x122mm, Supply: 12VDC/0,5A Kit Order Code; 3142KT- £41.95 Assembled Order Code: AS31 42 - £5 1.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. Prog ramm er Ac c ess oh es; 40-pin Wide ZJF socket (Z1F40W) £15.00 18V DC Power supply (PSUQ10) £19.95 Leads: Parallel (LDC136) £4.95 / Serial (LDC441) £4.95 / USB (LDCG44) £2.95 NEW! USB 'All-Flash 1 PIC Programmer USB PIC programmer for all Flash' devices. No external power supply making it truly portable. Supplied with box and Wi n do w s Software. ZIF Socket and USB Plug A-B lead not ind. Kit Order Code: 31 23KT - £34.95 Assembled Order Code: AS3128 - £44.95 Enhanced ' PI CALL" ISP PtC Programmer Will program virtually ALL 8 1 to 40 pin PICs plus a range jj of ATMEL AVR, SCENIX Jjt SX and EEPROM 24C de- ^ vices. Also supports In Sys- tem Programming (ISP) for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super fast bulk programming. Available in assembled format with ZIF socket only. Assembled Order Code: AS3144ZIF - £64.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program. 4 LED s display the status. ZIF sockets not included. Supply: 16-15VDC. Kit Order Code: 31 23KT - £29.95 Assembled Order Coda: AS3123 -£34.95 NEW! USB & Serial Port PIC Programmer USS/Serfa! connection, Header p cable for ICSP. Free Windows 4 software. See website for PICs i supported. ZIF Socket USB Plug A-B lead extra. Supply: 1 8VDC. Kit Order Code: 31 49CKT - £34.95 Assembled Order Code: AS31 490 - £49.95 Secure Online Ordering Facilities Full Product Listing, Descriptions & Photos Kit Documentation & Software Downloads MikroElektronika MICROCONTROLLER DEVELOPMENT TOOLS from Breadboarding Systems Make PiCmicro® development easy with the EasyPIC2 - only £99! The MikroElektronika EasyPIC2 Development Board combines a versatile developmentexperiment board with a built-in USB programmer. With its wealth of on-board I/O devices and support for virtually all 8, 14, 18. 28 and 40-pin PICmicro 3 microcontrollers in the 12F, 16F and 18F families, we’re certain you won’t find a more versatile high quality board at such a low price. The EasyPIC2 Development Board is supplied with USB programming/power cable, programming software and useful example programs. Also available are similar boards for the 8051. AVR and dsPIC, each at the same great price of £99 including UK delivery and VAT — please telephone or see our website for further details. EasyPIC2 Development Board features: • High quality development/experiment board with built-in USB programmer. • Programming software compatible with Windows operating systems including 2000 and XP. • Comes with a PIC16F877A microcontroller but compatible with virtually all 8, 14, 18, 28 and 40- pin PiCmicro' devices in the 12F, 16F and 18F families. • On-board I/O devices including switches, LEDs, seven-segment displays, potentiometers and RS- 232 interface, • Provision for easy fitting of optional LCD display and DS1820 temperature sensor. • All I/O iines available for off-board expansion. • Wide range of optional add-on boards available including ADC, DAC, EEPROM, Compact Flash, RTC, RS-485, CAN and IrDA. • Powered from your PC’s USB port or optional mains adapter, • Supplied with example programs written in assembly language, BASIC, C and Pascal, • Supplied with Microchip Technology’s MPLAB development software and demonstration versions of MikroElektronika’s MikroBASIC. MikroC and MikroPasca! compilers. Learn about microcontrollers with our EasyPIC2 Starter Pack - just £149! We've taken the EasyPIC2 Development Board and added a 16x2 character LCD display, matrix keypad. DS1820 temperature sensor, RS-232 serial communications cable, various different PiCmicro 4 ' microcontrollers and our own easy-to-follow microcontroller tutorial to form a complete and self-contained Starter Pack— everything you need to learn about and experiment with microcontrollers! With this pack you will quickly become proficient in microcontroller programming and interfacing. Please see our website for list of covered topics. Please visit our website for details of other MikroElektronika products We stock the full range of MikroElektronika development boards and compilers for PiCmicro. AVR, 8051. PSoC and dsPIC microcontrollers. Products may be ordered on-line at www.breadboarding.co.uk or by telephoning 0845 226 9451 using all major credit and debit cards. Our prices include delivery within the UK and VAT. Call 0845 226 9451 or order online at www.breadhoarding.co.uk FT639 One-Chip Servo Controller Luc Lemmens To beginners In electronics, servos hove a great appeal, probably because you can do lots of real-life Things' with them. However, long faces soon appear and pages are turned when a servo control hos to be designed and built. Even If that can be done with the good old 555 chip and a handful of parts, the next objection From fhe new generation is that ‘it ain't comp uf er*9V 1N4002 IC-l.F z 5 —4 M 13 C5 104 1 04 = 74HCUQ4 4j7 UW S3V 25V II I - M G5-JC+15 - U 34 elcktor dadftmits - 7-8/2QD5 for ihe interne! adjustment of the transmit- ter modules. The required power supply voltage amounts to o minimum oF 9 V and can be provided by a moins adapter. A panel mount socket can be fitted in the enclosure (that you con choose yourself) to suit [he plug on the moins adopter. A printed circuit board has been designed for the circuit that contains all the compo- nents, Two pins ore provided to connect the power supply. LEO Dl indicates that the power supply is present. The current consumption without optical signal is 1 03 mA. When the cables are connected and with a frequency of 48 kHz the cur- rent is 70 mA. This is because the trans- mitter modules will now turn the internal LEDs on and off [when there are no COMPONENTS LIST Resistors: R1 r R2 = 2LQ2 R3,R5 = 407 R4,R6 = 8k02 R 7 = 1 k 05 Capacitors: C1-C5 = IQQnF C6,C8 = 47pF 25V redial C 7 ^ 4uF7 63V rodial cables connected, the LEDs are on contin- uously). At 96 kHz the current is about 3 or 4 mA higher. An FFT [fast Fourier transform) analysis Inductors; LI ,L2 - 4/uH Semiconductors: D 1 - bv, '-current LED, red D2 = 1 N4O02 1C1 = TORX1 73 IC2JC3 = TOTXI73 1C4 = 74HCU04 IC5 = 7805 PCB, ref. 054005-1 from The PCBShop shows that the noise floor with a 16-bit PCM signal is about 40 to 45 d8 higher compared to a 24-bit PCM signal. Optical Mixer Peler Lay Mixing signals at different Frequencies is common practice in many areas of elec- tronics. Audio systems, communications systems and radio systems are typical application areas. With conventional frequency mixers, feedback capacitance can cause the sig- nal sources to be affected by the output signal, thus making supplementary filter circuits necessary. The signals from the individual signal sources can also affect each other, Jn an optical mixer, LEDs or laser diodes are used to first convert ihe signals to be mixed into optical signals. The light beams are then aimed at a shared pho- tosensor (a light-sensitive resistor, photo- diode. phototransEstor, or photovoltaic cell). The current in the output circuit is [bus controlled by the mixed input signals, so signal from the photosensor is the sum of the input signals. The amount of Feed- back capacitance can be made quite small, depending an the construction. Another benefit is that the input and out- put circuits have separate grounds, which can be electrically connected if necessary. This operating principle directly encour- ages experimentation. Additional input stages can be added to act on the shared photosensor. If the receiver signal is applied to a component with a curved characteristic, such as a diode, this pro- duces amplitude modulation, which can be used in a heterodyne receiver. IF the dif- ference between the frequencies of the two ill! ^u 2 R 3 +Lh Input signal voltages: u j f fj ) = 0 ^ sin (to ] t+q> | ) uity = U2 5 * n l f#> 2 t+( ?2l Voltage across ihe photosensor: u D3 ~ J + k^sfhtco^t^} Key: U](F|) first input signal at frequency f s second input signal at frequency % up3 receiver signal generated by superposition of the two input signals k] , 1^2 optoelectronic coupling factors (empirically determined] input signals is small, a beat effect occurs. ing to [he frequency range ihai is used. The components must be selected accord- 7-8/20D5 - ehktor ebdiofliti 35 Mobile Phone Operated Code Lock *5Y © ]C9 (p IC9 = 4C3l to iC9.B 54 \Q9 A 1 s IC9.C re rrr i r - • nr •m Trrr r ^rr rrr in TIT ■ 5 I ■ IT! vlg I £ 1 - 1 {lit E 1 it [O I ? l±l °iVi 1 1*1 - 52 n | : ■=] = ITI V o 1 ; I iii ■ c Ic 1 ! Ill i | D | O ■: 3 Ifllali III i F 1 |3 14 2 ts 1 ( 7 4 3 £ 14 2 15 1 £ 7-15 5 5 |it 2 t£ T £ 7 4 3 ■ ? 3 [a 2 i£ t e 7 4 5 5 □ 12345* 755 0 i JC z: ^ c 1. *■ Cl lion Hh < 1 — •€) ua r lc\ ® 0 XL rl T.' \ F1 13_ 1 2 tXnJ 3 C4 If 1 II © *T AST CSC HX ICB see □ 4047 cx a n=r AST = 57 ! — -T f S3DG77 - 1 1 Heikki Kailiola Suitcase number wheels and doorslde keypads have evolved from well-known code locks, to hot topics now mainly due to Dan Brown's bestseller novel The doVinci Cede . The main ideas behind the leak described here ore minimum obtrusiveness and min- imum user interface. A typical code leek Is operated with a four-digit secret code and the lock can be opened by presenting this cade. The lock described here has no buttons or keypad at all, a small hale or other hiding place tor the microphone capsule is enough. Nowadays practically everyone has a keypad m the pocket — it's on your mobile phone! The lock listens to mobile phone keytones (DTMF tones] and responds to the valid, pre-set Four digit code. No visible interface Is needed as the microphone capsule con be located behind a small hole. Note that the mobile is used 'off-line', so no phone expenses are involved. Efectret microphone M is connected via transistor amplifier stage T1 to the Input pin (2] of DTMF-receiver/decoder 1C 7. The decoder's four-digit output word [on pins 11, 12 f 1 3, 14] and valid digit present' Flag (pin 15) are connected to two shift registers, 1C 1 and IC2. A rising edge on pin )5 of the 8870 chip trig- gers each shift register to read its input cade and shift it by one increment. Shift register outputs are connected to BCD to Decimal-converters type 4028 (IC3TC6). The register status is shown as a high signal level at certain pins of DIP switches S1-S4. Depending on the switch settings, one combination causes High 36 eltJclof electronics - 7-8 '2005 levels ot all AND gate inputs and the lock is opened For a moment. Due to the operation of the shift registers, the latest input digit appears on O's outputs. So if the desired code is, for example, 2748, SI contact 2 , S2 com tact 7, S3 contact 4 and 54 contact 8 ore closed. When four digits in sequence match with the code set by the switches, relay RE 1 is activated For o user-defined time. Upon o rising edge on input pin 8, monostable multivibrator (MMV) 1C8 pulls pin 10 high for a moment, activating relay Rel via transistor T2. The duration of active time con be adjusted with the preset between pins 2 and 3. A green LED can be con- nected across the relay coil to indicate lock opening. The minimum distance from the micro- phone is about 20 cm. D5Q777-; Minimalist Microcontroller Christoph Fritz They say that things were always better in the old days, although perhaps they were not thinking of microcontrollers ond their complex support circuitry. In the ATmega8, microcontroller specialists Atmel have introduced a device that lets you construct a prototype circuit using just two resistors and one potentiometer in addition to the microcontroller chip. Not even a crystal is required: on infernal 8 MHz oscillator provides the clock. We thus have o four-component circuit that is a powerful ond practical development kit; not only that, it can be programmed directly from the parallel port of any PC without additional hardware Incredible] The circuit shown offers a number of I/O pins and an A/D converter input; not only that, it is ready to be connected to a com- mercially-available liquid crystal display. The whole thing con be built on a simple prototyping board, and no heroic solder- ing skills ore required. Software, in the form of a C compiler (AVR-GCC under Linux or WinAVR under Windows) is available for free on the Inter- net. Example applications, expansion ideas, programming tools and code col- lections ore also widely available. And, since the circuit is so simple, it con easily be modified to use other Types of microcon- troller from Atmel: just take a look at the relevant data sheets and determine which pins are used for the various functions. ■14221*3 Links: Introduction to development tools . for Linux etc.: ■VV-'V. iv c-' anu,.; r a, C‘- be • " - uai TTisrall fools, r ■ tm! for Windows: ■'Sw.v.Gvrtrscks.n e e. shov/tco i s . p h p?Too 1 1 D- 376 -f5V +5V 0 ftl fij D converter Oo^ 0 ... t5V i2£> n 21 25_ 25 27 £3_ 1 R2 St AVCC vec IC1 FCQfADCO* FDC^rtXC) PCT(ADCl) FOlfTXDj ; PC-J(ADC2> FDTjjlHTOj PC3JADC3J P03fiMT1( FC^JIIKWSOA) F B4 : ; XC K/TQji PC5EADC&SCL) FEJ;(Tl) PC£-flE5ET) HJGfAINO) PD ABtl J ATmegaa-P PB1X1CP) PBUOCIA} F3S^S*DC1B) AKEF PS3{MQSlt}C2j FS-tfUSSOr Ffi^S-CK? AG^D XTAU XTAL2 G>iP 22 I 3 w X fi- ll IS 11 14 15 J6 17 ' r 1? LCD 1 f LC DISPLAY HD 447 S 0 V / G2S 200C2C _ O Era a a — ta - s > > 14 13 12 "! , °l 3 I s f K1 XZh tJISO KST +SV u 1" tUfitSU - IS Pro cyan AVRIib [examples and libraries): h ::C-: JPOpH .e -'iUr TS-; , ed- "cejdea z-.-r i:.~ b index, him JIAG-Hardware: http:/ /Qvr.ooenchip.om/bQotice WinAVR; http:.- '.v n a vr.s o u r c s f o rae.net 7-8/2005 - dektor electronic 37 Energy- saving Switch Helmut Kraus Lights do not always need to be on at full power. Often it would be useful to be able fo turn oft the more powerful lights to achieve softer illumi- nation, but this requires an instal- lation with two separately* switch- able cir- cuits which always able. Er the effort of chasing out chan- nels and reptasfenng for a complete new circuit is too much then this circuit might help. Normal operation of the light switch gives gentle illumination (LAI j. For more light, simply turn the switch off and then immediately (within ] s) on again. The circuit returns to the genile light set- ting w hen switched off for mare than 3 s. There is no need to replace the light switch with a dual version: simply insert this circuit between switch and lamp. avail- How does it work? Almost immediately after switch-on, fast-acting miniature relay RE2 pulls in, since it is connected directly after the bridge rectifier. Its nor- mally-dosed contact then isolates RE] from the supply, and thus current flows to LAI via REl's normally-closed con- tact. RET does not hove time fo pul! in os It is a power relay and thus relatively slow. Its response is also slowed down by the time constant of R1 and Ch If the current through the light switch is briefly interrupted, RE2 drops out imme- diately. There is enough energy stored In Cl to activate RE1 , which then holds itself pulled In via a second, normally- open, contact. If current starts to flow cgain through the light switch within 1 $, LA2 will light. To switch LAI back on it Is necessary fo furn the light switch off for more than 3 s, so shat C 1 can discharge via R2 and RE 1 . The printed circuit board can be built Into a well Insulating plastic enclosure or be incor- porated into a light fitting if there Is suf- ficient space. Caution: the printed circuit board is connected directly fo the mams-powered lighting circuit Every precaution mast be taken to prevent touching any component or tracks, which carry dangerous voltages. The circuit must be built into a well insulated ABS plastic enclosure. 38 eJektor detfrunics- 7-8/2005 COMPONENTS LIST Resistors: R1 = 100Q R2 = 680H Capacitor: Cl - 4700pF 25 V Semiconductors; D1 ,D2 - 1N4001 Miscellaneous; Kl,K2,K3 - 2'\vay PCB terminal block, lead pitch 7,5 mm PI = fuse 4AT [time lag) with PCB mount holder TR1 - mains transformer, 12V@ 1.5 VA, short-circuit proof, PCB mount B1 = B80C1400, round case [60V piy, 1 ,4A] Rcl - power relay, 12V r 2 x c/o. PCB mount Rt2 = miniature re Joy 12 V, 2 x c/o, PCB mount ELEKTOR 230V - 50Hz No. D40159 F = 4A T Overcurrent Cutout Switches + MAX47xx to load >+2V= CM C-'JT G',I3 2 FLAG E - HWI5 - It o /VT A X 1 SV\ jjci cljt|T a AAAWAA 7][W w E fi AAAXIAA 7| CHIT GUT ^ o A/ 1/1XI/V1 tiXX47S5 MAX47B7 i OH G#» (7 MAX*785- JilAX47£3 3 c*[T VAX4769 MAX479I MAX4793 T] fCCg cl'l'3 [7 UAJ47S4 ( 3 3 i§i ov sera sera sOT2i S-O'tj C4421 i - : 1 Gregor Kleine Overcurrent sensors using external low- resistance sense resistors ore Fairly com* mon. However, the members of a new family of ICs from Maxim [www.maxim- ic.com) feature an infernal sensor resis- tor and a switch far disconnecting the load if the current limit is exceeded. The members of this 1C family are listed in the table. There ore two sorts of overcurrent switches in the family. The types listed in ihe Latching column store any occur- rence of an overcurrent condition and indicate i! at ihe FLAG output until they are switched off and then on again by o pulse on the ON Input. The types in the Auto-Retry' column automatically attempt to reconnect the load after a delay time. When ihe delay time expires, they check whether an overcurrent recurs, and if nec- essary they immediately switch off again. The auto-retry types do not have a /F [AG output. They switch an for approximately 40 ms every 300 ms (typical) to measure She current. During this 40-ms blanking time', the 1C checks whether the current is less than the selected limit level. The torch- ing types have the some time delay before the switch opens and the FLAG output is asserted. The FLAG ouiput can act as sig- nal for a microcontroller or simply drive an LED, In the latter cose, the input voltage 7-8/2005 - Ekktor dedronks 39 . latching Auto-Retry mitt, limit max. Limit Package MAX 4785 MAX 4786 50 mA 120 mA SC70 MAX 4787 MAX 4788 100 mA 240 mA SC70 MAX 4789 MAX 4790 200 mA 300 mA SC70 MAX 4791 MAX 4792 250 mA 375 mA SOT23/143 MAX 4793 MAX 4 794 300 mA 450 mA SOT23/1 43 must be greater than the forward voltage of the LED. ftl must be dimensioned for the desired current through the LED, Capacitors C i and C2 provide decou- pling and prevent False triggering of the 1C by spurious voltage spikes. The MAX47xx family of ICs operates over a supply voltage range of +2.3-5.5 V, The ICs have undervoltage lockout (UVLO) and reliably switch off when the current exceeds the type-specific limit, even if the current flows in the reverse direction (from the load to the input). The table indicates the possible range of the overcurrent threshold for each type. For instance, a given MAX2791 might switch off at a current as low as 250 mA. How- ever, other examples oF the same type will not switch off until the current reaches 350 mA. The same threshold values apply fa reverse currents. An overtemper- ature cutout circuit protects the 1C against thermal destruction. The latching types come in a 5-pin SMD package, while the auto-retry types without a /FLAG output manage with only four pins. The 50-mA and 100-mA versions fit into the tiny SC70 package. The types for higher current levels require an SOT23 or SOTI43 package. There are also other Maxim ICs with sim- itar functions, such as the MAX4795-MAX4798 series with typical cutoff thresholds of 450 mA and 500 mA. Finally, there are the MAX4772 and MAX4773, which have a program- mable threshold that can be set to 200 mA or 500 mA using a Select input. However, the 1C types mentioned in this paragraph require a different circuit arrangement than what is shown here. Simple Oscillator / Pipe Locator Rev. Thomas Scarborough Sometimes the need arises to construct a really simple oscillator. This could hardly be simpler than the circuit shown here, which uses just three components, and offers five separate octaves, beginning around Middle C [Stage 1 4). Octave # 5 is missing, due to the famous [or infa- mous] missing Stage 1 1 of the 4060B 1C. We might call this a Colpitis 1' oscillator, without the 'C\ Due to the reactance of the lGOiiH inductor and the propagation delay of the internal oscillator, oscillation is set up around 5 MHz. When this is divided down, Stage 14 approaches the frequency of Middle C [Middle C = 261.626 Hz), Stages 13, 12, 10, and 9 provide higher octaves, with Stages 8 to 4 being in the region of ultrasound. If the oscillator's output is taken to the aerial of a Medium Wave Radio, U may serve as the search coil of a Pipe locator, with a range of about 50 mm. This is tuned by finding o suitable hetero* dyne [beat note] on the medium wave band. In that case, piezo sounder Bzl is omitted. The Simple Oscillator / Pipe Locator draws around 7 mA from o 9- 1 2 V DC source. Audio Click/Pop Suppo°essor Gregor Kleins Audio amplifier circuits with a single sup- ply voltage hove output coupling capaci- tors that produce audible clicking or pop ping sounds when the supply voltage is switched on, since they must be initially charged to holF the supply voltage. Simi- larly, a clicking or popping noise can be produced by the discharge current when She supply is switched off. The capacitance (C cj? ) of the output capacitors cannot be reduced, sines It determines the lower limit of the Frequency range. The process of establishing the DC operating point in upstream amplifier stages also generates switetaon and swltcfvaff noises. For head- phone outputs In particular, this can be remedied using an 8-pin 1C from Maxim [www. mQxim-ic.com ). the MAX9890, which can be connected between the out- put stage and the output capacitors to such press irritating clicks and pops. The secret of the MAX989G is that it changes the shape of the charging cur- rent for the output capacitors from an abrupt (and thus audible) step to an apti- 40 dekl&f ebrti&nics - 7-8/2005 mtsed S-s hoped curve that has such a low frequency that ft does not produce any audible sound. After the capacitor has been charged, two integrated sv/ifches □re enabled to connect the audio ampli- fier outputs to the already charged cou- pling capacitors. When the supply volt- age is switched off, these switches open immediately and the coupling capacitors discharge slowly via internal 220-kQ resistors. There is also an undervoltage detector that opens the switches if the sup- ply voltage is less than +2,5 V. A shut- down input (/SHDN, pin 2] allows the headphone output to be selectively dis- abled. Inside ins JC, the Startup and Shut- down Control section controls the switches and the Ramp Up and Ramp Down Con- trol section controls capacitor charging and discharging. Capacitor Q^y generates a switching time delay after the supply voltage is applied. During the switch-off process, it powers the internal circuitry responsible for discharging the coupling capacitors. A 100-nF capacitor is adequate for this purpose. The switch-on delay is 200 ms (MAX9890A) or 330 ms (MAX9890B}. The A version is adequate for coupling capacitors up to 100 |jF f with the B ver- +2V7...-r5V5 Speakers or Headphones ft sion being preferred for capacitors up to 220 pF. Wiih coupling capacitor values larger than this, switch-on noises may still be audible under certain conditions. The MAX9890 operates over a supply volt- age range of +2.7-5, 5 V, draws only around 20 pA of current, and is specifically protected against electrostatic discharges up to ±8 kV. The input voltage on INL and INR must lie between 0 V and the supply voltage level. Click and pop suppression is 36 dB. The additional distortion factor is specified by the manufacturer as 0.003 % (THD+M) for a 32-Q headphone load. The power supply rejection ratio is typically 100 dB, The 1C is available in two differ- ent 5MD packages; the pinout shown here is far the TDFM package. :4'4£Vi? 'T;:: ---c-' m-ic.com/ en/ds / MAX989Q.pdf IR Testing with a Digital Camera Dirk Gehrke If a device fails to respond to on if? remote control unit, the problem is often in the remote control, and it usually means that the batteries are deed. If the remotely con- trolled device still doesn't respond to the IR remote control after the batteries have been replaced, you're faced with the ques- tion of whether the remote control is not sending a signal or the device Isn't receiv- ing it properly. After checking for trivial errors, such as Incorrectly fitted or defec- tive batteries, the next thing you should check is whether the remote control trans- mits a signal. In the past, you would have needed on IR tester or a special IR detector card [as shown in the photo] for this. Nowadays you can use a digital camera [still or video), which is commonly avail- able in most households. That's because ihe CCD chip is sensitive to infrared as well as visible light, which allows pictures to be token at night to o certain extent. If you switch on the camera and the dis- play aim the remote control unit toward the camera, and press one of the but- tons on the remote control, you should see a blinking fight coming from the IR LED. !f the LED remains dark, you con safely assume that the remote control unit is defective. (G4C44S-1) 7-8/2DD5 - tfaktor electronics 41 Rev. Thomas Scarborough This circuit is for on unusually sensitive and stable proximity alarm which may be built at very low cost If the negative ter- minal is grounded, it will detect the pres- ence of a hand at more than 200mm. If it is nof grounded, this range Is reduced to about one-third. The Proximity Switch emils a loud, falling siren when a body is detected within its range. A wide range of metal objects may be used for the sensor, including a metal plate, a doorknob, tin Foil, a set of bur- glar bars — even a complete bicycle. Mot only this, but any metal object which comes within range of the sensor, Itself becomes a sensor. For example, if a tin foil sensor is mounted underneath a fable,, metal items on top of the table, such as cutlery, or a dinner service, become sen- sors themselves. The touch plate connected to She free end of R 1 detects She electric field surrounding the human body, and ihis is of a relatively constant value and can therefore be reli- ably picked up. R1 is not strictly neces- sary, but serves as some measure of pro- tection against static charge on the bedy If the sensor should be touched directly. As a body approaches the sensor, the value of C 1 effectively increases, causing COMPONENTS LIST Resistors; Rt - IGkQ R2 = 4kO 7 R3 = ikn R4 = 47kQ R5 - 47kO P1,P2 = 1 OGkQ muliitum cermet, horizontal Capacitors: C1,C2 - 22pF C3 = 22|jF 40V radial C4 = 10nF C5 - IOOjjF 25V radial Semiconductors; D1 - 1N4148 D2 = LEO. red ECI - 4093 Miscellaneous: BZ1 = AC buzzer PCB, ref. 0402 1 9-1 , from The PCBShop the frequency of oscillator IC1 .A to drop. Consequently capacitor C2 has more time to discharge through P2, with the result that the inputs at 1C 1 .B go Low, ond the output goes High. As the output goes High, so C3 is charged through LED D2. D2 serves a dual purpose —namely as a visual indication of detection, and to lower the maximum charge on C3, thus facilitating a sharper distinction between High and Low states of capacitor C3. The value of R4 is chosen to enable C3 to discharge relatively quickly as pulses through 02 are no longer sufficient to maintain its charge. The value of C3 may be increased for o longer sounding of the *9V.„+12V 42 cleklar electronics - 7-8/2005 siren, with o slight reduction in responsive- ness at the sensor. When C3 goes High, this triggers siren IC1.C and 1C1.D, the two NAND gates drive piezo sounder XI in push-pull fashion, thereby greatly increasing its volume. If a piezo tweeter is used here, the volume will be sufficient to moke one s ears sing. The current consumption of the circuit is so low a small 9-V alkaline PP3 battery would last for about one month. As bat- tery voltage falls, so sensitivity drops off slightly with the result ihat P] may require occasional readjustment to maintain max- imum sensitivity. On the down side of low cost, the hysteresis properties of the 4093 used in the circuit are critical to operation, adjustment ond stability of the detector In some coses, particularly with extremely high sensitivity settings, it will be found that the circuit is best powered from a reg- ulated voltage source. The PCB has an extra ground terminal to enable it to be easily connected to a large earthing sys- tem. Current consumption was measured at 3.5 mA stand-by or 7 mA with the buzzer activated. Usually, only PI will require adjustment. P2 is used in place of o standard resistor in order to match temperature coefficients. and thus to enhance stability. P2 should be adjusted ro around 50 k r and left that shat setting. The circuit is ideally adjusted so that 02 ceases to light when no body is near the sensor. Multi turn presets must be used for PI and P2. Since the piezo sounder is the part of the circuit which is least affected by body presence, a switch may be inserted in one of its leads io switch the alarm on and off after D2 has been used to check adjustment. Make sure that ihere is o secure connection between the circuit and any metal sensor which is used. Discharge Circuit Gregor Kleine The author encountered a problem with a microcontroller system in which the +5 V supply voltage did not decay to 0 V suffi- ciently quickly after being switched off. A certain residual voltage remained., and it declined only very slowly As a result, cer- tain system components could not perform □ dean reset if the power was quickly switched on again. To remedy this problem, a very simple cir- cuit was used to discharge the +5-V sup- ply It consists of two resistors and a type Si9945 dual MOSFET from Vishay Sili- canix f wv av.v i s h q y, c o m / mo s f el si . These MOSFETs switch fully on at a threshold gate voltage between -f 1 V and +3 V. MOSFET T2 connects discharge resistor R2 for the +5-V supply line to ground if the voltage on its gate exceeds the thresh- old voltage. When the +5-V supply is switched off, the first MOSFET |Tlj, whose gate is con- nected to the +5-V supply voltage, no longer connects pull-up resistor PI to ground, so ihe standby voltage is applied fq the gate of T2 via fi I . This requires the standby voltage to remain available for ot least as long os it takes to discharge the +5-V supply even when the system is switched off. R2 is dimensioned to avoid exceed ing the 0,25-W continuous power rating of a type 1 206 5MD resistor. It may be neces- sary to change the component value For use in other applications. The circuit can be constructed very com- pactly, since the dual MOSFET is housed in an SOO SMD package, but it can also ■r12V {Standby) be built using "ordinary' individual EE is, such as the BS170. 4:414: "t o / wy/w. vis hav.com /doc?7Q 758 ©entle Battery Regulator Wolfgang Zeiller This small but very effective circuit protects a lead-acid battery (12-V solar battery or cor battery) against overcharging by a solar module when the incident light is too bright or lasts too long. It does so by ener- gising a fan, starting at a low speed when the voltage is approximately 13,8 V ond rising to full speed when the voltage exceeds 14.4 V (full-charge voltage). The threshold voltage (13,8 V] is the sum of the Zener diode voltage (12 V), the voltage across the IR diode [1 .1 V), and the base- emitter voltage of the 2N3055 (0.7 V). In contrast to circuits using relays or 1C amplifiers, the circuit has a gradual switching characteristic, which avoids relay chatter ond the constant switching on and off near the switching poini pro- duced by a 'hard'' switching point. The circuit does not draw any current at oil (auto power-off) below 1 3 V, Pay attention to the polarisation oF the Zener and IR diodes when building ihe circuit. The transistor must be fitted to a heat sink, since it becomes hot when the fan is not fully energised [at voltages just below 14 V), A galvanised bracket from a D3Y shop forms an adequate heat sink. The indicated component values are for 7-8/2005 - debtor electronics 43 a 10-W solar module. If o higher-power module is used, □ motor with higher rated power must also be used. The cir- cuit takes advantage of the positive tem- perature coefficient of the lamp filament. The filament resistance is low at low volt- ages and increases as the voltage rises. This reduces the speed of the fan to avoid generating an annoying noise level. The lamp also provides o form of finger protection. If you stick your finger Into the fan blade, the lamp immediately takes over the majority ot the power dis- sipation and lights brightly. This consid- erably reduces the torque of the fan. An ordinary 10-W or 2G-W car headlight (or two 2 5 W headlights in parallel) can be used far the lamp. Don't fry to replace the LED by two ] N40G1 diodes or the [ike, replace the ZPY1 2 by a ZFY1 3, or fit a series resistor tt for the LED. That would make the 'on' region too large. Dick Sleeman Circuits have been published on earlier occasions that keep an eye on the tele- phone line. This simple circuit dees if with very few components and is completely passive. The operating principle is simplicity itself. The circuit is connected in series with one of the two signal lines. It dees not matter which one of these two is used. When the telephone receiver is lifted off the hook, or the modem makes o connection, a volt- age will appear across the four diodes. This voltage is used to drive the duoLED. Depending on the direction of the current. Telephone Line Watchdog either the red or the green part of the duoLED will light up. In some countries, the polarity of the tele- phone line voltage is reversed after a few seconds. This does not matter with this cir- cuit since o duoLED has been used. Depending on the polarity of the line, the current will flow through either one branch or the other. The 22-Q resistor is used as a current limiter, so that both colours are about the same brightness. The duoLED can be ordered bom, among others, Conrad Electronics (port number 1 83652). You con, of course, also use another, similar LED. For the diodes use the ubiquitous 1N4148* 147: EC- ' Co ripe r i n g Signed Integers Paul Goossens Every once in o while it is necessary to compare two signed integers with each other. Unfortunately, same programming languages do not support signed integers. This problem presented itself v/ith a design in Veritog. This language nos a direct method of comparing two unsigned integers. With comparing we mean deter- mining whether integer A is more ihan or less then integer 8, or equal. After some thought for on efficient solu- tion we found the following; By inverting the MSB (Most Significant Bit) of both signed integers, both can be com- pared as unsigned integers with the cor- rect result. "How can this be?", you will ask. The solution is simple. The difference between an unsigned inte- ger and a signed integer is that the MSB of an unsigned integer has a value of 2 n , while that same MiSB of o signed integer has the value -2 r \ With positive numbers nothing special happens, that means, the value is the same whether they are treated as signed or unsigned. With a negative number (where the M$B= ] and is therefore significant) the value increases by 2~2 a {instead of -2 r ^ [ the weight of the MSB becomes 2 r - 1 )« By inverting the MSB, 2 r ~* is added to both negative and positive numbers. A necessary condition is that ihe 44 Ehklor electronics - 7-8/2005 MSB of □ signed value is equal fo ' 1 J (thus indicating □ negative value) and zero for an unsigned value. In Inis way the relative difference between the two numbers remains exacily the same. In the example you can see clearly that after the operation the value of each has been increased by exactly 128, provided they are both con- sidered as unsigned integers. This is inde- pendent on whether the original integer was positive ar negative. Now both num- bers can be compared as unsigned inte- gers with [of course) the correct result! 7 6 5 4 3 2 1 0 -128 64 32 16 8 4 2 1 signed 128 64 32 16 8 4 2 1 unsigned Example: 1001 1 ] 00 = signed -100 inverting MSB: 0001 1100 = unsigned 28 00 001 111= signed 15 10001 111= signed 1 43 Resistor Colour Band Decoder Carlos Alberto Gonzales Despite claims to she contrary by the nan- initiated, electronics is still very much an exact science, so unless your memory is rock-solid you can not afford to make a mistake in reading a resistor value from the colour bands found on the device. So why not use the computer for the job? The program supplied by the author comes as an Excel spreadsheet that does all the colour-fo-value converting for you in response to a few mouse clicks. The program is extremely simple to use. Just click on the various colours to pur them on the virtual resistor. Check the colour band structure against the real resistor on a board, on the floor or in the spares allsorts" drawer. The win- dow below the colour bonds will indi- cate the resistor s E series, nominal, high/low values and tolerance. The program supports the E6 and El 2 through El 92 series. The program may be obtained free of charge from wwv/.elekfar- efeciromcs.co.uk as archive file 040203-1 Kzip (July/ August 2005). - r Rsstetor Color Code : :r : l I Rfi: E-Li ±-iZ E-I4 E-4S E-I9Z E =' ; " - -■ -= = Vllue R = IflOfl dimj U - ■ £ ■ -l : = ' I E E L~ r ■ I V ^ uft R min = Rmis= 1^5 . ■ if- a r: = III cv ■ : 2fM on Cta 4 Sawd Sr^s Caoporm vmcn Tfi Scidsr Lease Tn £^f Ceai Cnpcnel MSP430 roc rammer Dirk Gehrke For many applications, programming a microcontroller after it has been soldered to the circuit board in the target application is more convenient than using a separate programmer. With the Texas Instruments M5P43GF1 1x1, this can be done quite easily using the JTAG pins. The Flash Emulation Kit makes it very easy fo develop programs for the MSP430, debug the programs and program them - into the microcontroller However,, proto- type testing usually reveals a need for minor improvements to the software. The MSP430 has a JTAG port that con be enabled by applying a High level to the 04D 1 S 3-11 7-8/2005 - efektof electronics 45 TEST pin. The registers, RAM ond Flash memory con be read and written via this interface. Nolurally, inis feature can also be used in the target application. How- ever, it $ important to bear in mind (hot ihe associated pins have dual functions. Far in-circuit programming, you will need a 20-way SOJ test clip [available from 3M r for example] that con grip ihe pins of the SO 1C package in the soldered-in state. A total of eight pins must be con- nected to the Hash Emulation Kir to allow the microcontroller to be prog rammed.. It's important to ensure that a High level is applied to the /RSI pin for the duration of the programming process, and o sup- plementary 30-kQ resistor must be con- nected to the TEST pin fa ensure a well- defined Law level. References and software [1] IAR Embedded Workbench Kickstart Version 3 Rev. D Document ID; slucOSOd .zip [2] MSP430F1 I X[1 ) Flash Emulation Tool (US $49) 3] MSP-FET430 Flash Emulation Too! h ttp: // foe us. ti xo m/l it/ ug /s Egu 1 38 a / sloul 3Sa.pdf| [4] http. v 3 ~ .cc ". Reinirald Oesterhaus This circuit was developed to power an AVR microcontroller from a 12 V lead- acid battery. The regulator itself drawls only 14 uA. Of course, there ore dedi- cated ICs, far example from Linear Tech- nology or Maxim, which can be used, but these can be very hard to get hold of and are frequently only available in SMD packages these days. These difficulties are simply ond quickly avoided using this discrete circuit. The series regulator component is the widefy-available type B5 1 70 FET. When power is applied it is driven on via Rll. When the output voltage reaches 5.1 V, T2 starts to conduct ond limits any further rise in the ouiput voltage by pulling down the voltage on the gate of TI . The output %'olfage con be calculated as follows; Micropower Voltage Regulator u g ur = ! u led + u be) x + E2] / R4 where we can set at 1 .6 V and U BE at 0.5 V. The temperature coefficients of Ul£[) and U^i: can also be incorporated into the formula. The circuit Is so simple that of course someone has thought of it before. The author's efforts have turned up an example in a collection of reference circuits dating from 1 967; the example is very similar to this circuit, although it used germanium transistors and of course there was no FET. The voltage reference was a Zener diode, and the circuit was designed For currents of up to 10 A. Perhaps Elektor Electronics readers will be able to find even earlier examples of two-transistor regulators using this principle? . Uiii 0 © Rt BS170 TI S UOUT 1 Hl 1R2 R3 ^ 7 12 BC54EC 01 © LED is red © i BS17Q i R4 ■© £}E:-331 - 11 Garage Timer Daniel Lomilzky and Mikolajaak Tyrone The circuit described here is a testament to the ingenuity of two young designers from a specialist technical secondary school. The garage timer' began as a school electronics project and has now made it all the way to publico lion In our Summer Circuits special issue of Efek/or Electronics, The circuit demonstrates that the application possibilities for the 555 and 556 timer ICs are by no means exhausted. So what exactly is a 'garage timer'? When the light switch in the garage is pressed, the light in the garage comes on for two minutes. Also, one minute and rony-five seconds after the switch is pressed, ihe outside light also comes on for a period of one minute. The tinner cir- cuit is thus really two separate timers. Although the circuit for the interior light timer is relatively straightforward, the exte^ rior light timer has to deo! with two time intervals. First the 105 second oeriod must expire; then the exterior light is switched an, and after a further 60 sec- onds the light is turned off. To realise this sequence of events, a type 556 duo! timer device, a derivative of the 555, is used. The first of the two timers triggers the sec- ond after o period of 105 seconds. The second timer is then active for 60 sec- onds, and it is this timer that controls the exterior light. The interior light timer is trig- gered at the same moment as the dual timer. In this case a simple 555 suffices, with an output active for just two minutes from the time when the switch is pressed. Push-button $1 takes over the role of the wall-mounted light switch, while S2 Is pro- vided to allow power to be removed from 46 elector dfcfronla - 7-8/2005 *sv the whole circuit if necessary. The circuit could be used In any application where a process must be run For a set period after a certain delay has expired. For the school project the two garage lights are simulated using two LEDs, This will present no obstacle to experienced hobbyists, who will be able to extend the circuit, for example using relays, to con- trol proper lightbufbs. The principles of operation of type 555 and 556 rimers have been described in detail previously in E/efcfor Electronics , bur we shall say a few words about the functions of 1C la, IClb and IC2, When SI is pressed (assuming 52 is dosed!) she trigger inputs of both 1C la and 1C2 are shorted to ground, and so the voltage at these inputs (pins 6 and 2 respectively) Falls to 0 V. The outputs of (Cl a and IC2 then go to logic 1, and D2 (the interior light) illuminates. Capacitors Cl and C8 now start to charge via Pi and R2 , and R8 and P3 respectively. When the voltage on CB reaches two thirds of the supply voltage, which happens after 1 20 seconds, the output of IC2 r which is connected as a monostable multivibrator, goes low, D2 then gees out. This accounts For the inte- rior light function. Like. vise, 1 05 seconds after SI is closed,, the voltage on Cl reaches two thirds of the supply vcliage and the output of 1C 1 a goes low. Thanks to C4, the frigaer input of IClb now receives a brief pulse to ground, exactly as !C 1 a was triggered by 31 . The second monostable, formed by 1C 1 b, is thus triggered. Its pulse duration is set at one minute, determined by C5, R5 and P2, D1 thus lights for one minute. Potentiometers PI, P2 and P3 allow the various time intervals to be adjusted to o certain extent. If considerably shorter or longer limes are wanted, suitable changes should be made to the values of Cl, C5 and C8, The period oF the mono- stable is given by the formula T = LI RC where I is the period in seconds, R the total resistance in ohms, and C the capac- itance in farads, N egi a ti v@ - Ou tput Switching Regulator Gregor Kleilte afive voltages. In many coses, it's thus necessary to use o switching regula- There are only a limited number of switch- tar that was actually designed for o posi- ing regulators designed to generate neg- five voltage in a modified circuit configu- ration that makes It suitable for generat- ing a negative output voltage. The circuit shown in Figure 1 uses the familiar LM2 575 step-down regulator 2 04342a - 12 7-9/2005 - dEktoF electronic 47 from National Semiconductor hvww. notional com) . This circuit converts a positive-voltage step-down regulator into a negative-voltage step-up regulator. It converts an input voltage between -5 V and -1 2 V into a regulated -1 2-V output voltage. Note that the output capacitor must be larger than in the standard circuit for a positive output voltage. The switched current through the storage choke is also somewhat higher. Some examples of suit- able storage chokes for this circuit are the PE-53113 from Pulse (y ay. puls eenq . c o m I and the D033G8P- 153 from Coilcraft ( vw av . co ilcraft comL The LM 25 75 -xx is available in versions for output voltages of 3.3V, 5 V, 12 V and 1 5 V, so various negative output volt- ages are also possible. However, you must pay attention to the input voltage of the regulator circuit. If the Input voltage is more neaative than -12 V (be., V jrt < -1 2 V), the output voltage will not be regulated ond will be lower than the desired -12 V. The IM2575 1C will not be damaged by such operating condi- tions as long as Its maximum rated input voltage or 40 V is not exceeded. High- voltage (HV) types that can withstand up to 60 V ore also available. Although the standard LM2575 applica- tion circuit includes circuit limiting, in this circuit the output current flows via the diode and choke if ihe output is shorted, so the circuit is not short-circuit proof. This can be remedied by using a Multifuse (PTC) or a normal fuse. Th ere Is also an adjustable version of the regulator with the type designation LM2575-ADJ (Figure 2). This version lacks the internal voltage divider of the fixed-voltage versions, so an external volt- age divider must be connected to the feedback (F8) pin. The voltage divider must be dimensioned to produce a volt- age of 1.23 V ot the FB pin with the desired output voltage. The formula for calculating the output voltage is: Vo* - 1.23 Vx[1 +|R1 +R2]1 The electrolytic capacitors at the input and output must be rated for the voltages pres- ent at these locations. Converting a DCM Motor Karel Walraven We recently bought a train set made by o renowned company and just couldn't resist looking inside the locomotive. Although it aid have an electronic decoder, the DCM motor was already available 35 (!) years ago. It is most likely that this motor is used due 1o financial constraints, because Mdrklin [as you probably guessed) also has a modern 5- pole motor as part of its range. Inciden- tally, they have recently introduced a brushless model. The DCM motor used in our locomotive is still an old-fashioned 3-pole series motor with an electromagnet to provide motive power. The new 5-pole motor has a per- manent magnet. We therefore wondered if we couldn't improve the driving charac- teristics if we powered ihe field winding separately, using □ bridge rectifier ond a 27 LI current limiting resistor. This would effectively create a permanent magnet. The result was that the driving characteris- tics Improved at lower speeds, but the ini- tial acceleration remained the same. But a constant 0.5 A flows through the wind- ing which seems wasteful of the (limited) track power. A small circuit can reduce this current to Jess than half, making this technique more acceptable. The field winding has to be disconnected from the rest [3 wires). A freewheeling diode (D 1 , Schottky) is then connected across the whole winding. The centre tap of the winding is no longer used. When FET II turns on, the current through the 3AT4-3 BAT35 rv “ ■fi I 12V.. .16V PBYR745 SB530 IRFS2G BU210 BUZ1G0 054007 - V t winding increases from zero until it reaches about 0.5 A. At this current the voltage drop across R4-R7 becomes greater than the reference voltage across 02 and the opamp will turn off the FET. The current through the winding continues flowing via D1, gradually reducing in strength. When the current has fallen about 10% (due to hysteresis coused by R3), 1C 1 will turn on T1 again. The cur- rent will increase again to 0.5 A and the FET is iurned off again. This goes an con- tinuously. The current through the field winding is fairly constant, creating a goad imitation of a permanent magnet. The nice thing about this circuit is that the total current consumption Is only about 0.2 A, whereas the current flow through the winding is a continuous 0.5 A. We made this modification because we wanted to convert the locomotive for use with a DCC decoder. A new controller is needed in any case, because the polarity on the rotor winding has to be reversed to change its dlreciion of rotation. In the original motor this was done by using the other half of ihe winding. There is also o good nonelectrical alter- native: put a permanent magnet in the motor. But we didn't have a suitable mag- net, whereas all electronic parts could be picked straight from the spares box. rs±yj7-Z 48 etekl&i electronics - 7-8/2005 \j4 VI research www. a vi trese a rch . co . u k USB to T FL Serial Cable S : rn]>!e and Easy to give USB support to your designs Coonsets direcUy to nucTOOonttoQer UART or I/O pens ------ ■ _ - ■ - £. 55 □ =srs je, All cficurtry integrated tfita sleek, raemftfed USB plug -■ ' r 3r = > J\ er d - - . 5 u pc t _ v in PC a -.-.St's ex a m p:e ;:2Er i --T,;c''5' • Species Prise of only 29.59 tftciud^g VAT AVIT Research also supply: bC Bus Tool - Allows your PC to monitor and control ins PC Bus - - : j: d : - . t i _c ■ n k 5 Sw^cbsltefcrf'; www.avitresearch.co.uk ■ lnfo@avitresearch.co.uk i 3 id s 0870 741 3636 4 Servicing Your Complete Prototype Needs O ftrfcftpss a< 3 fraction of m ms/ G 7ctj/j tfg a^tf setup / nek tfe tf O >^y Mtf itfi/r D frtf I.ta, 35pfflCt/ ffllSaMRE fWOCAfllT UffV O Industry s O Rjt'OiY up senes wn$ O CAM f GAB cormiting + Tooting -5- PtiOtQpIolS T MF £29.89 < SScfSr>g rs*3s ray wa/y A^ce = €.'49 > P \ ■ mwK 1 t L 7 WtfrBtoCtewij o/jan ..oo-® 8 ’ 89 Simply sand jwf files and order OHUHt WWW. PC8- POOL COM :r: K oread uC'iitfc pfltrm E ,c=r- - 55 PicoScope 3000 Series PC Oscilloscopes^ The PicoScope 3000 series oscilloscopes are the latest offerings from the market leader in PC oscilloscopes combining high bandwidths with large buffer memories. Using the latest advances in electronics! the oscilloscopes connect to the USB pert of arty modern PC making fell use of the PCs 1 processing capabilities, large screens and familiar graphical user interfaces. High performance; TOGS/s sampling rate & 200MHz bandwidth 1MB buffer memory High speed USB 2.0 interface Advanced display & trigger modes Compact & portable Supplied with PicoScope & PicoLog software Tel: 01480 396395 www.picotech.com/scope276 Tet Itnofot;y l imited 7 E 2035 ■ s!s5cior tl=clr&ruG 49 I Phantom Supply from Batteries is to wind them at the same time. You Ton Giesberls Professional (directional) microphones often require a phantom supply of 48 V. This is fed via the signal lines to the micro phone and has to be of a high quality. A portable supply can be made with 32 AA-celts in series, but that isn't very user friendly. This circuit requires just four AA- cells (or five rechargeable 1.2 V cells). We decided to use a standard push-pull converter, which is easy lo drive and which has a predictable output voltage. Another advantage is that no complex feedback mechanism is required. For the design of the circuit we start with the assumption that we have o fresh set of batteries. We then induce a voltage in the secondary winding that is a bit higher than we need, so that well still have a high enough voltage to drive the linear voltage regulator 'when the battery volt- age starts to drop (refer to the circuit in Figure I). II are F2 are turned on and off by an astable multivibrator. We've used a 4047 low-power multi vibrator for this, which has been configured to run in an astable freerunning mode. The complementary Q outputs have a guaranteed duty-cycle of 50'=. thereby preventing a DC current from flowing through the transformer. The core could otherwise become saturated, which results in a short-circuit between 6 V and ground. This could be fatal for the FETs. The oscillator is set by R ] /C 1 to run at a frequency of about 80 kldz. R2/R3 and D1/D2 make T! and T2 conduct a little later and turn off a little foster, guarantee- ing a dead-time and avoiding a short-cir- cuit situation. We measured the on+esist- □nce of the BSI 70 and found it was only 0.5 Q, which isn't bad for this type of FEI You can of course use other FETs, as long as they have a low on-resistance. For the transformer we used a somewhat larger toroidal core with a high A factor. This not only reduces the leakage Induc- tance, but it also keeps the number of windings small. Our final choice was a 1X25/ 1 5/1 0-3 E5 made by Ferroxcube, which has dimensions of about 25x10 mm. This makes the construction of the transformer o lot easier. The sec- ondary winding is wound first: 77 turns of o 0.5 mm dio, enamelled copper wire (ECW). !r you wind this carefully youll find that it fits on one layer and that 3 meters is mare than enough. The best way to keep the two primary windings identical should take two 30 cm lengths of 0.8 mm dia. ECW and wind these seven times round the core, on the apposite side to the secondary connections. The centre rap is made by connecting the inner two wires together. In this way we get two pri- mary windings of seven turns each. The output voltage of ¥R 1 is rectified by o full-wave rectifier, which is made with fast diodes due to the high frequency involved. C4 suppresses the worst of the RF noise and this Is followed by an extra fil- ter (L1/C5/C6) that reduces the remain- ing ripple. The output provides a dean voltage to regulator IC2, It is best to use an LM317HV for the regulator, since it has been designed to cope with a higher voltage between the input and output. The LM3 1 7 that we used in our prototype I C2 tCOn all C 3 l fiV J It 0 Rt In 4 osc © AST AST -7 O 1C1 4047 Q RH fiST RCC -T RET — > i; 4- -# ft ■ text OEizu - n 50 deklor elcrtranlts - 7-8/2005 i worked olf right, but it wouldn't have been happy with a short at the output since the voltage drop would then be greater than the permitted 40 V. If you ensure that a short cannot occur, through the use of the usual 6k8 I resistors in the signal lines, then the current drawn per microphone will never exceed 14 mA and you can still use on ordinary LM3 1 7. D7 and D8 protect the LM3 1 7 from a short at the input. There is virtually no ripple to speak oh Any remaining noise lies above 1 60 kHz, and ihis won t be a problem in most applications. The circuit can provide enough current to power three microphones at the same time [although that may depend on the types used). When the input voltage dropped to 5. 1 V the current consumption was about 270 mA. The reference volt- age sometimes deviates a little from its correct value. In that case you should adjust R4 to make the output voltage equal to 48 V. The equation far this is: R4 = (48 -V^e) / (V re j/ R5+50uA), To minimise interference (remember that we're dealing with a switched-mode sup- ply) this circuit should be housed in an earthed metal enclosure. S ple Short-Core u it Detection Koref Wairaven This circuit is suitable in every situation where over-current protection ts required. Here we give an example from the model train world. Every seasoned model train enthusiast knows that there is nothing worse than having to find the cause of a short-circuit. On a small mad el railway with one loco motive it is obviously fairly easy, but on large layouts all locomotives stand still when there is a short and then you hove to check each one in turn to find the culprit. If the track is divided into sections then we can use this super simple circuit to make our lives o lot easier, A multifuss is inserted into one of the sup- ply lines far each af the sections. (A mul- tifuse is also called a multiswiich, polyfuse or polyswitch, depending an the manu- facturer]. This is a type of fuse that cools down and conducts normally again once the short has been removed. The advantage is that only the section with the short becomes isolated. All the other locomotives in the other sections continue to move. The stationary locomo- tive Is in principle the culprit, but it's quite likely that several locomotives aren't mov- ing since not all of them would be travel- ling in the first place. For this reason we connect an LED indicator across each mul- tifuse, making it clear which section caused the problem. You can choose any colour LED, but we recommend that you use low-current types that emit a lot of light at only a few mA. The value of the current limiting resistor may be changed to give an acceptable LED brightness. As long as she current is small the resist- ance af the multifuse is also low and there will bareiy be a voltage drop. At high cur- M dt Model ^max (V) ’hold Ifrip Initio! resistance (£2) Max. time to trip ? f ■ : | E3 Max. KA) 1 Ms) MF-R005 60 0.05 0.10 7.3 11.1 0.5 5,0 MF-R010 60 0.10 0.20 2.50 4.50 0.5 4,0 MF-R017 60 0.17 0,34 2.00 3.20 0.85 3,0 MF-R020 60 0.20 0.40 1.50 2.84 1.0 2.2 MF-R025 60 0.25 0.50 1.00 1.95 1.25 2.5 MF-R030 60 0.30 0.60 0.76 1.36 1.5 3,0 MF-R040 60 0.40 0,80 0.52 0.86 2.0 3.8 MF-R050 60 0.50 1.00 0.41 0.77 2,5 4.0 MF-R065 60 0.65 ? .30 0.27 0.48 325 5.3 MF-R075 60 0.75 1.50 0,18 0.40 3,75 6.3 MF-R090 60 0.90 1 .80 0,14 0.31 4,5 7.2 MF-R090-0-9 30 0,90 1.80 0,07 0.12 4.5 5.9 MF-R110 30 1. 10 2,20 0.10 0.18 5.5 6.6 MF-R135 30 1.35 2.70 0.065 0.115 6,75 7.3 MF-R160 30 1.60 3.20 0.0 55 0.105 8,0 8.0 MF-R185 = 30 1.85 3.70 0,040 0.07 9.25 8.7 MF-R250 30 2,50 5.00 0.025 0.048 1 2.5 10.3 7-8/2005 - eUktc-r eleciiania 51 rente fhe resistance increases, which causes a voltage drop across the multifuse that is large enough to light up the LED. As we don't know the direction of the cur- rent flow [the train could he moving either forwards or backwards and digital con- trols use on alternating current] we con- nected two LEDs in parallel with opposite polarities. Multibuses are available for many differ- ent trip currents. Choose a value that is slightly higher than the maximum current consumption of a locomotive in a section. The table below shows ihe characteristics of several types from the MF-R series made by Bourns. [Roychem is another welhknown manufacturer of polys witches.) Ijicid the current at which the multifuse still conducts normally, is the short-cir- cuit current. JKC2-I Goswin Vissdiers This circuit can be used to check, for example, whether the door of a refriger- ator has been properly dosed. An LED sends out a beam of light, which, if the door b closed, is reflected. An optical sen- sor [CNY70J then detects the amount of light. If the sensor does not receive the right amount of light, the buzzer will sound after about a minute. When the door is closed (and the CNY70 receives enough light again), the buzzer turns off. The power supply for the circuit requires about 12 mA at 12 V + Potentiometer PI adjusts the sensitivity of the sensor. The sensor works reliably from g distance of one centimetre. If the current through the LED is increased, the distance can be increased a little. The delay can be adjusted with C3. C4 provides extra fil- tering for the reference voltage. The Reflection Light Barrier with »eiay +12V buzzer would otherwise switch on with a chirping" sound. The well-known NE555 is used to drive ihe buzzer. The buzzer is driven with o duty cycle of 2:1, which improves the audibility. Swapping Without a Buffer Paul Goossens Most programmers will have their own library of commonly used snippets of code. One task that appears very often is the exchange of the contents of two vari- ables. The code for this usually looks as follows: int c; c=a; a-b; b=e; Table 1. A B initial state *> 10101010 11001100 As A A B ■=£> 01100110 11001100 B = A A B => 01100110 10101010 A = A A B — ► 11001100 10101010 There doesn't appear to be anything wrong with this, but It does make use of a third variable and this takes up more memory. In general, modern processors tend to hove enough memory on board, but it never harms being economical with the available memory. Another way in which the variables can be exchanged is shown below: a=a^b; b=a^b; a=a A b; If isn't Immediately obvious that the con- tents of the two variables are exchanged. 52 eleStfflr electronics - 7-B/2005 XOR truth table Inl In2 Output OOO Oil 10 1 110 However, the operation of this code is really quite simple. We make use of the Boolean law that o A b A o = b, where the ' A ' symbol stands for a bitwise exctusive~ar (XOR] . One consequence of this law h that when we know that the content of register A is the XOR of two variables, where the value or one is known, we can recover the value of the unknown variable by XORing register A with the known value. It shouldn't come of much of a surprise that many encryption systems make use af this technique. We can imagine that it may still not be clear how the XOR routine works, so we've shown in the Table what each siep of the program does. It should now be clear that at the end of the cade the contents of variables o and b have been exchanged. You could try this yourself with pen and paper. You'll find that it works with any values for a and b. Cable Tester ifwe Reiser Microcontroller-based circuits for testing cables, sometimes in conjunction with a PC, are easy to use and very flexible, for the hobbyist, however, the complication of such devices is nor justified. The circuit described here is an economical but nev- ertheless easy toHunderstand tester for cables with up to ten conductors. The basic idea far the cable tester is to apply a different voltage to each conduc- tor In the cable at one end. The voltage seen at the other end of the cable is indi- cated by light-emitting diodes. The eight reference voltages are generated using o row of nine LEDs connected in series (D 1 to D9). The first and and the tenth conduc- tors are connected to the positive and negative terminals of the power supply respectively. The LEDs are powered from a constant current source, which allows us to dispense with the current-limiting series resistor that would otherwise be necessary. Far the constant current source we use a type LM3 1 7 voltage regulator R 1 is selected using the formula Urf- 1.25 V/R1 to produce a current of 5 mA. This part of the circuit farms the transmitter end of the cable tester. The conductors af the cable under test can be connected to the trans- mitter in any order. The receiver consists of five LEDs whose connections are taken directly from terminal black X3. If the cor- responding points in the two parts of the circuit are wired to one another using o working cable, all the LEDs on bath receiver and transmitter sides will light. If there is a fault in the cable, the following situations are possible. 1C1 64D371 -11 Two LEDs opposite one another fail to light: two conductors are crossed or shorted. Only the LED on the transmitter side lights: one or both of the conductors in the pair is broken. One of the even-numbered LEDs on the transmitter side (D2, D4, D6 or D8) fails io light: there is a short between the outer conductors of the neighbouring pairs. Several neighbouring LEDs fail to light: the conductor corresponding io the first unlit LED Is crossed with the one corre- sponding to the Iasi unlit LED, or they are shorted. If all LEDs light on both sides, there is still a chance that two pairs might be inter- changed. Buttons 31 to 55 can be used to test this: the same LED should extinguish on each side when the button is pressed. If the wrong LED goes out on the receiver side, a pair must be swapped over. Mare complicated effects can result from 7-B/200S - etekfor t Isclfoftks 53 combinotions or these five faults. Different colours of LED hove different for- ward voltage drops, and so the same type of LED should be used throughout. The required current con be put into the formula to calculate R 1 r which can then Burkhard Kamka This hybrid DRM receiver with a single valve and a single transistor features good large-signal stability. The EP95 (US equivalent: 6AK5) acts as a mixer with ihe oscillator signal being injected via the screen grid. The crystal oscillator is built around a single transistor. The entire cir- cuit operates from a 6-V supply. The receiver achieves a signal-tonoise ratio of up to 24 dB For DRM signals. That means the valve can hold its own ogainst on NE6 1 2 1C mixer The component values shown in the schematic hove been selected for the RTL2 DRM channel at 5990 kHz. That allows an inexpensive 6-MHz crystal to be used. The input circuit is built using a fixed inductor. Two trimmer capacitors allow the antenna matching to be optimised. The operating point is set by the value of ihe cathode resistor. The grid bias and Wolfgang Zeiller ft sometimes comes as a bit of a shock the first time you need to replace ihe batter- ies in an LED torch and find that they ore not the usual supermarket grade alkaline batteries but in fact expensive Lithium cells. The torch may have been a give- away or on advertising promo but now you discover that the cost of a replace- ment battery is more than the torch is worth. Before you consign the torch to the waste bin take a look at this circuit. It uses a classic two-transistor astable multivibra- tor configuration to drive the LEDs via a transformer from two standard 1 .5 V alka- 54 be altered if necessary. Of course, these remarks do not apply to the power indi- cator LED (D 15). The LM3 1 7 used for the constant current source can only deliver ihe calculated current if its input voltage Is at least about 3 V higher than (he volt- input impedance can be increased by increasing ihe value of ihe cathode resis- tor. However, good results can also be age required at its output. The load volt- age depends on the number of LEDs in the transmitter and on their forward volt- age drop. For nine red LEDs at least 20 V is required. achieved with the cathode connected directfy to ground. Two-Cell L m teirdii dcktofcbrlronits - 7-8/2005 DRM Direct Mixer Using an EF95/6AK5 EF95/6AK5 +5V — © 22_ }25cKz 25V line batteries. The operating principle of the multivibrator has been well docu- mented and with the components speci- fied here it produces a square wove our- put with a frequency of around 800 Hz. This signal is used to drive a small trans- former with its output across two LEDs connected in series. Conrad Electronics supplied the transformer used in the orig- inal circuit The windings have a 1 :5 ratio. The complete specification is avail- able on the (German) company website alvA-Av.conrod.de part no. 516236. It isn't essential to use the same transformer so any similar model with the same spec- ification will be acceptable. The LEDs are driven by an alternating volt- age and they will only conduct in the holt of the waveform when they are forward biased. Try reversing both LEDs to see if they light more brightly. Moke sure that the transformer is fitted correctly; useanohm- meter to check the resistance of the pri- mary and secondary' windings if you ore unsure which is which. The food imped- ance far the left hand transistor is formed by L in series with the 1 N40Q2 diode. The inductance of L isn't critical and can be reduced to 3.3 mH if necessary. The impedance of the transformer secondary winding ensures that □ resistor is nor required in series with the LEDs. Unlike fil- ament type light sources white LEDs ore manufactured with a built-in reflector that directs the light forward so an additional external reflector or lens glass is not required. The LEDs can be mounted sa that both beams point at the same spot or they can be angled to give a wider area or illu- mination depending on your needs. Cur- rent consumption of the circuit is approxi- mately 50 mA and the design is even capable of producing a useful light output when the battery voltage nos fallen to 1 V. The circuit can be powered either by two AAA or AA size alkaline cells connected in series or alternatively with two recharge- able NiMH cells. : 4 iL- -- Mv® ® "®®;: Dieter Bruno w Readers of Elekior Electronics who have both a PC and children face a particular problem. Since the young tend not to be too circumspect in their surfing habits, parents files are in permanent danger of being infected with viruses or deleted. There is also the risk of children or their friends gaining unauthorised access to files not intended for their eyes. Perhaps a separate PC for the children would take up too much space or is ruled out for pedagogical reasons; in that cose, the solution is to install two separate hard drives in the PC, one for ihe children and one for the adults. Ideally the two hard drives will each carry their own operating system and have their own software installed. As long cs things are arranged so that the children can only boot their own drive, the parents' data will remain secure. All that is required, besides o second drive is a specially-designed hard drive switch. This can be achieved, as has already been described in Elektor Electron- ics, by switching the two drives between master and slave modes using the IDE cable, and only activating the master drive in the BIOS. However, the IT skills of chil- dren should not be underestimated: the BIOS Is easily changed back. The solution described here is a bit more secure. Both drives are bootable and configured as masters. One is connected to IDE bus 1 , and the other to IDE bus 2. The power sup- ply voltages [e ] 2 V and +5 V} ore how- ever, only applied to one drive at o time. In principle, o simple double-pole changeover switch would do the [ob, but that has the disadvantage that it is possi- ble to forget to reset the switch to child mode after use, especially if the switch is hidden. A better solution is to have to press a (hidden) button during boat to put the machine Into parent mode. We will now see how this is done. If the button is not pressed when the PC is switched on, then, after a short delay of about 0.7 s (determined by R1 , Cl , D2 and the base-emitter junction threshold volt- age of the Darlington pair formed by T1 andT2) RE2 pulls In. RE 1 remains unener- gised and hence the children's drive con- nected to K2 is active. Subsequent!'/ press- ing 51 has no effect since RE1 has been isolated by ihe contacts of RE2. If the secret button Is pressed, either briefly or continuously, during the 0.7 s sensitive period after the computer is switched on r RE 1 pulls in Immediately and holds itself in this state. D3 now pre- vents RE2 being subsequently activated. Since the contacts of RE 1 have changed over, the PC now boois from the parents' drive. It is impossible to forget to return the computer to child made, since the computer will always start up in this mode if the secret button is not pressed. A 12 V miniature relay with contacts rated for 1 00 mA is suitable for RE2. The 7-8/2005 - dektor tffrlnmks 55 contacts of RE 1 should be rated For the currents taken by a typical hard disk drive (say 2 A to 3 A], A key switch can be used instead of a secret button as o last resort against resourceful children, since the circuit will continue to operate cor- rectly if SI is left in parent mode perma- nently while the computer is on. Remote Control Blocker Paul Go os sens This circuit was designed to block signals from infrared remote controls. This will prove very useful if your children have the tendency to switch channels all the time. It Is also effective when your children aren't permitted to watch TV as o punish- ment. Putting the TV on standby and put- ting the remote control out of action can be enough in this case. The way in which we do this is very straightforward. Two IP LEDs continuously transmit infrared light with c frequency that can be set between 32 and 41 kHz. Most remote controls work at a frequency of 36 kHz or 38 kHz. The disruption of the remoie control occurs as fallows. The 'automatic gain' of the IR receiver in TVs, CD players, home cinema systems, etc. reduces the gain of the receiver due to ihe strong signal from the IR LEDs. Any IR signals from a remote control are then too weak to be detected by the receiver. Hence the equipment no *9V 2 * 1N4148 [ m R3 — I aco.: | C-5-JQ23 - It longer 'sees'' the remote control! The oscillator is built around a standard NE555. This drives a buffer stage, which provides the current to the two LEDs. Setting up this circuit is very easy. Point the IR LEDs towards ihe device that needs its remote control blocked. Then pick up the remote control and try it out. If it still functions you should adjust the frequency of the circuit until the remote control stops working. This circuit is obviously only effective against remote controls that use IR light] -:4LI j- . Converter 1C with Integrated Schottky Diode Gregor Kfeine Conventional step-up switching regulator ICs need ot least one external Schottky diode and hove the disadvantage that there Is no effective output shorkrircuit cur- rent limiting. This means that very large currents can flow via coil L and Schottky diode D, Such currents can overload upstream components or destroy circuit board tracks. This situation is now remedied by the new LT3464 step-up switching regulator from Linear Technology (www.lineor-coml in on 8'pin SOT23 package. Not only does it have on integrated Schottky diode, it a iso hos an infernal switching transistor that isolates ihe output From the input volicge in 56 e^ktor ebrlronia ■ 7-8/2005 the shutdown mode. The switching tran- sistor also has short-circuit current limiting that becomes effective at around 25 mA. The I C operates with input voltages between +2.3 V and +1 0 V and can sup- ply an output voltage as high as +34 V. The amount of output current that can be drawn increases as the input voltage increases, for example, the maximum out- put current is 1 5 mA with an Input voltage of +9 V and an output voltage of +20 V. A quite common application is generating + 12 V from a+5-V source, far which the maximum output current is 20 mA. The output voltage is regulated via the Feedback pin [pin 2J, with the voltage being determined by resistors R1 and R2 according to the formulas Voui= 1.25 Vx {1 + [R2 + R1]J R2 — R 1 x[[V our + 1.25 V]-]} Voltage divider R1/R2 can also be con- nected to the CAP pin (pin 5} ahead of the switching transistor. This avoids hav- -r2V3...-i-10V LOH32CU470K V, N A7.H m YTN SW CA? _ CTRL iz - r«-:\ !-► Control < Wi 4 ^ LT3464 i -* OUT | F3 > Vour -© max + 34 V * 2 - 2S.73V T l-J Vou? = 1.2S*(l +^|) I -© Ra=m.( v ^-i) £44017- 13 ing on open-loop condition when the out- put is switched off, but it reduces the accu- racy of the output voltage setting. The cir- cuit shown here generates a voltage spike when the 1C is switched back on, since the feedback loop drives up the voltage an the CAP pin svhen the loop is open. A Mu rata type LQH32CN470K coil (47 pH) is used here as a storage choke due to its very compact construction. Other types of storage chokes in the range of 1 0- 1 00 pH con also be used. The input capacitor, the capacitor con- nected to the CAP pin (pin 5j, and the capacitor connected to the OUT pin [pin 3] ore multilayer ceramic types [X5R and X7R), Virtual Prototyping Boa YETluAliQjudbchird - 1 C: V\r Dgrsn iFEIsi Wirfiul 13 liVWiTptesMI^SCHi i.- - 'J-STO" j^rcD-. “ipt U B £ f? * -• ^ gift ■ ^ ^ [rass EtadtBtq |VfO0 Hrtg fc + i ^ h ^ ^ ^ £* J G»U h j Paul Goossens It is often very useful to test a small circuit betore designing the printed circuit board. Often a small piece of prototyp- ing board, also known os breadboard, perfbaard or vercbcord,. is used for this. An alternative approach is to use simula- tion software. This is usually faster and more convenient IF the circuit doesn't work as expected, then such software makes It very easy to try something different. Most of in e software available for this pur- pose is pretty expensive. However, there ore fortunately also a number of freeware programs ova liable. On of those is 'Virtual Breadboard'. This program can be downloaded from www. muvium.com. This software allows for the simulation of digital circuits. A library with a number of standard parts Is also provided. A small disadvantage is that the ICs ore shown as they appear in reality, instead of a schematic block that indicates which func- tions each 1C has. What is very practical however Is that the simulator can also simulate Pl'C-micrccon- frollers and the BASIC-stamp. This allows not only the hardware to be tested, but the software as well. Reprogramming is done in no time. You only need fo load the new HEX file and can test immediately. This program is not as extensive as the expensive, professional software pack- ages, of course, but If you would like to test some small circuits (possibly including a PIC microcontroller or BASIC Stamp) then It is certainly worth It fo check ihis program out! 7-8/2QD5 - sfsklw electronics 57 GIANT 10” 7 SEGMENT DISPLA YS|j IC’s -TRANSISTORS - DIODES Visit our website 1 w\*/w, distel.co.uk | I 1 rHE ORIGINAL SUR THIS MONTH'S SELECTION FROM PLI OUR US WO VAST EVER NDERLAND! CHANGING STOCKS s Surplus always 1 wanted for eashi ! Gl-“ bii x enscfes is to t-cng to yz^ these N i [7 setznsrf dgta' dsptojS e: e now sffordabte pnfa£ rit ID ' character gr.es cxc&ctccsi res o- sc-iiT,- 2: erg ossnoes and erahei 5 re^z cf geol-cs- -Cr5 r cur ro secra baocira digital clocks, ccletv tera, event limera e:z. As the '.to ts ara a sanp-'s etaJuifcsJtdHjJ rfe-ice arrf operas ton 12 V DC, -'"Ot ivitznng ■.■a sA-tres r: ; : " 2 :*■ -C "'.3. te used to -DOtoZ) snge or rrutpe dais. Urjfes ssufE resgra 'Z=ra Rave"" memory '/mcfi girac *■ srrolnes 2B5.gr-,. Far gn excellent DlY practical article. bc-b tra t H tey issue of ■Everyday & Practice! Etectroracs 1 magazine kteal School f Ccfege cw> ic + n aurJ - ■" rvj-fc riMAr — — ■ — — — — — . . ■ j . - - - _ sinjctSon project Suppled r- odoc «FE eonrforr c c~o era ,-,-t. ■’=,■= Less Bran 30% only £29.95 6 or 41 £99.00 ,o, of makers pnee ! (gteFWM Crae-PHffi THE AMAZING TELEBOX TV SOUND & VIDEO TUNER CABLE CQUPAJ&LE T Convens your colour manrlor into a QUALITY COLOUR TVJJ : _ 8 TtLEBOX s ar. =273:^.^ ’_,v -rr^ed rr^ns [Cvfaract mL m~=; r.rg *1 stecctncs read, - pug rro a test rf '.“oc-o irtr/rars or A' 1 , equrpmers ,<,h L h 3E fitted wHi a oorrposss i <’deo orSCART pput The video txSd rrJ ska pug dr&coy ^Li' me^ vefco r&pcrJas. a tow Tig receftferj of TV OBSOLETE - SHORT SUPPLY - BULK 10,000,000 items EX STOCK Ftf MA J OR SA VWGS CALL or see web site vww.cftstel.co.uk COMPUTER MONITOR SPECIALS Legacy products High spec genuine multysync, CGA, EGA, VGA, SVGA IrLtouiHshJ FA3415ETKL 14' SVGA Multisync mtotr rrxfttor &ie D- 2 B ett pteh tie Sid rasajjron tflDMit 7 RS A\-=yL cty lj rci-3 sows xrrBur.cr tj 3. rot' cf corrpufera TMHxflng IBM PC’s in CGA, EGA. VGA A SVGA modes, BBC. COMMODORE rdLsm #V tmg3 ‘^01- ARCHFMEDES 2nd APPLE. V.2~ , faztoray fscepfete, text awdvig sa LOW RADIATION I^PR specScatipr. For/ guaranteed. m LXCEILELT iiir Ji20 'inniiQir. T"i 5, EJssb £4 75 VGA C3b r >$ tor [2 M PC Enciucied. Only £129 (E) Ex'sma.' caifes tor othar tgpos cf cornptrArs avaElaWe - CALL Generic LOW COST SVGA Monitors We choose the m$ke r which indudes Compaq. W»*tt xrfa^-lJITcoIXr fee.^sbn Kmes. TELEBOX N!3 cc->=£-_ aly aJ s^.’sbn fs?jenoes VHFand L JHF ncSucCng the HYPERSAtJO 35 used by most cab’s TV operators. Sdes hr desktop computor video sys- tems i ” - z-azin r -y=-_z^ ~ir d-.-,r -A'- 32-22" ":r marias wUxiisound - an fategra 4 v*sz auoo smpre-' 2 _ c ■: , . , i -.'.-g HR SLrio pravcao 25 sz'rad E^tq rav - fejfy TELE B QX S T far composte video input type monitor- £36.55 TELEBOX STL as ST cut T -r.2d vr.to int^jral speaker £39.50 TELE B OX M B .ktnlbband VHFiliHF/Csi^&Tlypefbaml tuner £69 .9 5 Fcf overseas PAL versons state 5.5 or 5 mHz sound speaficsEca *For cabJe / hypertsnd signal recepton TeSefeo* WB sbeu’d be corv- necied to a cabfe type service. Shipping on aJJ T-eiebax's, cole (B} State of the art PAL :LK sgea UHF TV tuner module wdh composite IV pp video &. NIC AM hi I st oaq sound CHjtiiiits. Itticro fiSectronics 2 cr; erve sma:! FC3 zv, y 73 = t60 * 52 mm enalite ful tot^ig corSroi via a simple 3 wire link to an tBAt pc type computer, Sitpp&etf compteto with simple working program 222 dC4 .-2-to2=- Reqitres ^12V & + SV DC to operate: BRAND NEW - Order as MY00. Only £39 95 cods (B) Sue w T .vw r Q fisisLco.uk da ia_my00.htm for picture + full details HARD DISK DRIVES 2%" - 14 * 2: A TOSHIBA VK‘C22V_A l . sGb lap toft 12.5 mm Hi Ne iV T59.95 - ' - ' TOSHIBA MK431 3I,!AT 4.3Gb laptop (Bi mm H ) Ne,v £105.00 2' T TOSHIBA MK6422M.AV 61Go laotop (13-7 mm H) New £9B DO 2^*TOSHrBA LIK1S14GAV 18 Gb laptop (12 mm HJ New £ 149.95 2'A" to 3Yi CDrtvBrskm Jdl for Pc's, etirtjptata with connecters £15.95 3' C OL! FAQ 3 1 3 , ■J i 5-B2 ' : '5 L r 9 c b U LT. S C S?3 New £ 1 99.00 £59 95 £59.95 £69.00 £49,00 £49.95 £09.95 £69.95 £9900 E195-DG £99,00 £195,00 £345.00 cable s. Standard RTBQ0 day i luarsntea. 14" £59.00 a:der TDS4 15" £69.00 □rder TG21 17" £79.00 order TJ66 Supplied in good used condition. Shipping code (D) VIDEO MONITORS PHILIPS HCS35 ;:v.e 2= CVzzlz e.:- 2 i: .5 v. ^ - cotour monitor with fegjh RGB and slandard composite" 15,625 Khz video inputs , 2 SCART socket 222 separate £"'2rr-2 lazte. !--egr2 sudto power 2mp and speaker for alt audio visual uses Wi coarved d:ira£5 to Amiga and Atari BBC ccmputers. Wa^ for aS video monitoring I security appiicaSpffii ,■, ;b direct connecilon to most colour cameras High qu2^ty witJi many features such as From concealed flap controls, VCR correction button etc Good tBfid amcShon - fiiHy tested - guarantee j nnluf'QQ flfl C menasnffis: V. T4” jt Hi 2K' x 1 5' R D un ■ I a * U V , PHILIPS HCS31 Utoe comped 9 T ootour vkfeo monitor wttti stan- dard composite 15.625 Khz video i np_t . a SCART social ‘las' For aD irpOntofing / security appikssflons. High QtiiSy, ffit-equlpmenl fl% tested a gnaranle&d (jpossato mtoer screen bums). In attrac- tive sgusiE Hack piasbs case irsas . -r. .710" x HHT x t3^4' D 240 VAC m=T^ powered. Only £79.00 pi FUJJ FK-3Tr9-25 2C : mb V.FM 1 ‘R?e 3W CONNER CP3024 20 mb ICE bF for eatv,) RFE 3! T CONNER CP 3044 40 mb ICE bE (or equ;v.) RFE 2' z + QUANTUM 40 S Pra drive 1 2m 2 SCSI I F *is:, Rr~ 5V.* MINISCRIBE 342520ntoMFM LiF|cr epuiv ) RFE 5 1* SEAGATE ST-23BR 30 mb RLL 1/F Refurti 5%” CDC 94205-51 40mb HH MFM IF RFE teslsd 5’ HP 9754S 850 Mb ECS^ RFE tested T HP C39t0 2 Gbyte =C3 : rij#t?ranri2f RFE tested c ' M EC D2246 fit? Vb S D ; -teria de . A'e n 1 S’ FUJITSU M2322K IGOkfa SMD l/F RFE tested 5’ FU JJTSU M2392K 2 Gb SktD IF RFE tested Afany aiflef floppy & H drives , IDE, SCSI. ESDI efc from stock, see we&S/fe tor toff sto ck list. Shipping on all drives is code (C) INDUSTRIAL COMPUTERS i tny Showbox s zss hi ustnai 4D 335 PC system meesuring Ofl^ (mm) 266 w X 83 h X 272 d. Ed°.=1 fo^ dedicated control appfa catitms running DOS. Linux or even Windows i Steel cg gv n. con- bz -5 £- :a .' -C cl L z T 2 '/,'ati =SL. 2 2 g :: 5 - ci- ,- J'= ■ m-iz-z. ^ -= a bi-Sto ---’ puterwm S MByte NQM VOLATILE soBd state TBs k On ChfaT RAMOISK. System comprises Rocky 31B « PC 104) S3C ISA card with 40MHz AU 35GSX CPU, 72 pin SIMM stot win 16 f.'bvte AAII BIOS, banery^fcseked up real time clock. 2x9 pin D 16*50 Krisl ports. EPPJECP printer pork mini DIN keyboard con- ^::: J := = =,=•=- :■::: r -- -. 2-0 z- .e= to 52E VE.ci cap-ac ... v,a:z~zzz r “e: a-b '14 - si'irst “-2 5 MByte j stote 'disk on a chaff has own BIOS, and can be Fdlske-d 1 GO's of applications inc: fTnFw fqq nn Tir&'.veb. rc'iuiisrs- robotics etc Unly tyy.UU u TEST EQUIPMENT & SPECIAL INTEREST ITEMS MIT3UBU3HI FA3445ETKL 1.4’ !fhJ. spec SVGA m^nbnfs FAR NELL OhdCFV DC ^ 50 Arr^H, bench Poarar Supplies FA RN EL L AP3080 0-3GV DC © BO Amps, bench Slippy KtN GSHUL CZ4 03 ■ 1 9- t-Z V .2 GC 200 Amps - ti E‘. r ; ' 1 k iV u 400_KW - 400 Hz 3 phase power sources - ex stock IBM 6230 Type 1. Token ring base mat tfriver Wayne Ke rr RA200 Audio fret ssi HP6i36A cpt 020 3 IQ ’.‘Hz tz f-e gEr5: r =;cv GPiB Eto HP A1, AD 8 pen HPGL hgti speed drum OvDttora - from HP DRAFT MASTER 1 8 pen hjgb speed ptofier EG+G Brookdeal 950 35C Press’ ;n 32^. n 2~p Kerthley 590 CV cspsdtor , v^'tage analyser Ratal 1CR40 d^s- 40 charts' ■.c-I-ce recorder s H 5:sm Fiskors 45KVA 3 ph On Line UPS - New batteries Em era, an API 30 25KVA todustriai spec.UPS Mann Tally MT6-55 h zh sp=id 3a pnntoi Intel SBC 4S6T33SE ‘i r u : 485 sratem EM". Rsm £245 £995 £1650 £395D £POA £760 £2500 £49 £69 £89 £39 £POA £45 £550 £250 £POA £4500 £1550 £3750 £POA £1600 £475 £PQA £7900 £550 £750 £1800 £FOA £3750 £4500 £1499 £2200 £945 HP6Q30A Q-2 &QV DC @ 17 Amps bencfi pqw sr supply to [el SBC 466,11 2 5C0E Enhanced M-uHibiis (MSA) H&w Nikon HFX-11 (Eph^hot) excciuTn oorttral unit PHILIPS PM 551 8 pro. 1 . i-.-tt'. certoraip.' Motorola WE =_:• =: = ”£ i Zz-zz~u-^ ^ y. 5-£ Trio 0-1 3 vd= r sar. metered 30 amp bench PSU. New Fujitsu M3Q41R 60-0 LPM r g- s«=3 band printer Fujitsu M 304 ID cOQ LPM printer with net^rork interface Siemens K4400 64Kb to ' 4GV2 derrux enra.y^r Perkin Elmer 299 B tnfrarucf spectrophotomstor Parkin EfmEr 597 In 'rare; spe-sriop ri otenra to ? VG Electron Era 1035 TELETEXT Dsoodtog Margin Meter LightB and 60 output h sb spec 2u rradc mount Video VDA's Sekonic SD 150H Ifl chartnd digitol Hybrid chart recorder EAK 2633 Mcjopbens pem zran TayTor Hobson Ta. j surf amp 1 ~sr recorder ADC 55200 Carter! dioxide gas detector t monitor BBC AM2G/3 PPM Metor (Entosl Turner) + drive etoctmmcs ANRfTSU 9 6 54 A Optical DC-2.5G/h wavetorm nrc-n Iicr ANRJTSU MLS3A npbsal pc-rter meter ANRITSU F =re ep: ; chars cterisLri test set R&S FTDZ ljjsI sound unit R&S SBUF^EI .'.5 '-2ri madu : stor ^VJLTRON 653 OB 12.4 . 20GHz RF s*eep generator TEK, 2445 1 50 ?. f Hz 4 trace ci-c Tsccee TEK 2465 2 CO Jrifiz 3C-3 MHz CSC osedpe rack rrc^nt TEK ID £380 40&Mha digital realtime + disk drive. FFT etc TEK TDS524A 50G ) 4 hz d cite! re elms - cc r zct cls&ta v e to HP35S5A Opt el 20Hztn -0 f.thz.sjp”Erirum £“hse: PHILIPS PW1730 10 £0KV XRAY generate' a accessories VAR1ACS - Large renge from stock - call or sea our w&bs CLAUDE LYONS 12A 24£;\ s zza-z? vet. re zs CLAUDE LYONS 1G0A 24Q.4 tsv 3 prase auto. \-o± raz= £1950 £1150 £1450 £1250 EPOA £550 £1950 £1250 £2950 £580 £3500 £3250 £495 £1935 £300 £750 £1450 £75 £5650 £9 39 £FOA £650 £775 £5759 £1250 £1955 £2900 £5100 £3950 EPOA ite £325 £2900 v4®. 19" RACK CABINETS Europe’s Largest Stocks of quality rack cabinets, enclosures and accessories. Over 1000 Racks from stock This months special 33 / 42 / 47 U - High Quality 4 AU steel Rack Cabinets % Vszto by Eurocraft Enclosures Lid to ir>5 hlghcsi pos- sible spec, razk fea totes all steel coristruction with removatrie s-de front arid back cccrs Front srs back doors are hinged for easy access a^.o a locks b-'B Alto fr.ra secure 5 lever birrel locks ; za frent deer .s constructed cciiz e as ed itod a to a "designer style' smoked acrylic from psne: ta enable stotus mdicelors to be seen through the panel, yet remain unobtrusive, internal y the rack features fa . slotted rein* forced veritoai f.rir-d members to take the heavi- est of 19" rack equipmcnL ms hvo mavat- e .e .. .^i ■ o stTijL^ i^xtr^jB avails b e ere n r s punched tor i^Lerd 'cage nuts' A mains dis- tribution pane! irtema y mc-u"” L &d to toe tcricT mar, provides S x IEC 3 poi Eitfo sockets and 1 x 13 amp 3 pin switched utility socket Ovsra vent Sort is prthided by fu8y touvered beck daejr and dddibto skmrved tep sectiofl with tep and side fatrais. Trie top panel may be rembirad for fitting of Integral fans to the sub plate etc. Other features teriude: fitted castors and Poor levelere, prepunched utSty panel st krwer rear for cebto f connector access etc: Suppled In excel tent, siightiy used cohdrbim with keys. Colour Royal bfue. some grey ava 'st'e - C AL^ ■ Can be s zz p'led n many oih er cortS ccra: cr.s 33U Order as EC44 External dimensions mrre=1625H x 635 p x (£4' H x 25 T cu3 v: Dx23 3 , -i. Only ) 42 U _ Order as DT20 External dimensions x 635D x &93 .7 {TBS O x 23m VV ) Only n X 47U Order as RV36 EcSljie Zimcrstors mm=2235H x 6350 x 803 W. (69’ H x 25’ D x 23L’ \Y ) Oniy £410 Call for shipping quotation COLOUR CCD CAMERAS Y/ftXi Undoubted Li a mirccto of modern tochnotogy & z-zr sze: s tuv.ng pca,e w f A quality product fea- te-tog a fa iV cased COLOUR CCD camera at a g'-e sway rnre ! Lin.:! features fa stoto: grit ssFSrig far ^ use rn low tight & high light s p pi tea lions. A 10 rnm fxsa Atoe sngle tons gr. r as excelient focus jf and resolution frorr. c-csa up tc- mng r=".g~ The composite video output w' I -o-rszt to any zz -:,:_. e - = - to- =- Tv' ..a SCART socket) anc mest -'ioec reccrdara. Lin,! runs from 12V DC so ‘deal far security 5 portnblG applies' bans where mains penver not e. s eit'e. Uverafl dimensions 6fi mm vtiide x 117 deep x 43 high. Suppled BRAND NEW & fuSy guaranteed A^th user data, KXTs of apptica- todtog Security, Hams Video, Web TV, Web Cams ate, etc. Oder as LK33 QNL Y £79. 00 or 2 for £149,00 (S) u^r r ir j h SOFTWARE SPECIALS NT4 Workstation, comolete with sen/ice pack 3 and licence - OEM packaged. ONLY £89,00 =? EH CARTA 95 - CDRO.U, Not the EaicsL - hut at (his price l £7.95 DOS 5,0 g n 3*A* dkks wflh concise boolcs cM QBasac . Windows for Workgroups 3.1 lx Dos 6.22 on 3.5” disks Windows 95 CDRDM Only - No Liaonce - WordPerfect 6 far COS supf nn 3 T L disks in — anua' trig charges far software ts code B £14.95 £55.69 £19 95 £24-95 SOLID STATE LASERS , 5 = = ra=. D.-tor s = ii- r ==e : -_-s 5 ZZ =: ap^mx 50 mA. OrigirvaSy mada for continuous use in Industrial bar- cooe scartners , (he laser es mounted m a ramovab!# soSd abanmium btock, which functiafis as a hestsmk and fwid optical mount Dims of = =:■: F.ra :I v, ■. zl z x fa ^ -isrra ra ^:.. r ^5 -z,e r ten- persfars sfMjtik?ATi, current coirimt, tos&r Ok opput and cated TTL ON / OFF. hteny uses for exparknenfol optics, comms & Lgnishcws etc. Supc -Eri cc-mp’s!3 wto datasheet Order ssTuSI OA/Ly£24,95 (A) DC POWER SUPPLIES Virtually every type of power supply you can imagine.Over 10,000 Power Supplies Ex Stock - Call or see our weis site. RELAYS - 200,000 FROM STOCK Sa*‘- by chon^ng yaurrext relay 't- curAfassfye Stocks cavsririg types such ss \* ~tary Ocfa; Cisdi-a. Hemsticauv Sea =i Camnanrai Cri^te cJora. ; ~a De.% Reel Tfa-ra-n ;Vefie-s Sr j Stefa Printed Mounting etc . CALL z' see our web sit? iYww.disteI.CQ.uk far ,—a r s ^ r 'c -raster;. Vary cLso = fa :.dss frtrr stook. S3 ’.fa fFfh -fi ***> t (it iik« ■ * i < i • t ta a at * i a * a *• iaa ta *« • * > a mm a a i»i t a i »mi > ii a * a a car a * a * a * it * * a . t a * a*pt aaa a a a a a * aaa LEC IRON ICS- ALL MAIL TO Dept EK. 29 / 35 Osborne Rd Thornton Heath Surrey CR7 8PD, UK Open Mon - Fri 9.00 - 5:30 18 Million Items On Line Now 1 Secure Ordering, Pictures, Information Vnsign www.distel.co.uk Seoy-t Ste ema/f = adminididistoico.uk ALL ^ ENQUIRIES 0208 653 3333 FAX 0208 653 8888 it am 1 VISA -J ft 26 T C = *3 “*_ 'L 1 '* - e ri"' = ~. v " :; '=’-- r e "- to C - — ■ -c~ r. >:•. ■_ - l ' 3 :»••.= --ze ixcu: .:>■■■=■■ e r.c.tefaz ra — j--. - f-.-' Sirn-- sviLDai - rnrmum amrf order £100. Oeajss c?,w £1 00 ara sjpeci to .'.cr-toc dsv s ae^rarrjz 5: “ ^ -- ‘ -£ j : gyp 5SSP2HS t F FCALL. *fc« scxnt 5 ^ CALL AT 055d5 a^fued ra i s Ccndiri rs cf Sdfe wrixto car fej _ ~ :•■ u^ia-^yz to' -y. i^ys A rrara-ra=^ ;:■■ = -l,~ ra z.^:E -.tots rasr-.-DZ ” Gross sce-^-^c-E .-.tocto =n-- ry.--. - ~ — c . ■= -• CC'^s“!Fnces:pnu ^:ccs A 731 “^-..-, vs.:* J ^,-ese" ; Zaoa, Eoxc.'.’:; 2X2 £ i j E iit n Screen Dispiay Project A Versatile, Programmable, Low Cost* Ratform for Vi deo T ext Projects, - * PIC 16 F 625 microcontroller uSD * Fully programmable £ Demo software avaifable * I/O lines for sensor interface ^ RS 232 serial interface £ PAL or NTSC compatible ^ Enclosure option avertable www.STV5730A.co —MO ' ■ £ / ^ ; on Drsigrir.' the XOS CercioJ*: And P»h 5urohr IrKiodcdl XEameStation WWW. Ph: 925.736-2095 nriM '--.--A LL 4 « I— j L-J m j.zi 1j .a— . z □ UPF13RT@NUFFVZ: a NET Ci *34336 U£A £z J* - - : . Tnii-i : '.; _T liJ Cf -- Ti i> iv F-*gafa || Vata IL_ SOFTWARE OFFICIAL DISTRIBUTOR jcm ; otfio ds Tjnls £V€S V^xjow KA-p 4 Ji ~ £ -s * fr • ■ V « i « # * * yt c *r.T a2 ” -jji : t * » - P . - * P « * * , * * 3 U *0 i i!m 166 ,h io.tr- c . h> 0 - 5 - 7 - - - - - - ■■ ... * , 2 * j 2 L‘t Zi~ i J}ec 2 043 244 u^_ -4 -:r?51T3L. h:- < analog *6^ A =2 2 ■:- T A"z f*«rf 4 rrT*ff * uVI S ION] I ndustry-Stan dard WorTcbench For Microcontrollers * Options Wizard for Tool Configuration * Customisable Editor h vision0 * Source Browser * CPU & Peripheral Simulation > Complete integration with emulators h Dedicatedhigh-optimisationCcompilers * Microcontroller language extensions h Classroom training, see website for dates With free hands-on user guides and manuals Download your trial compiler version from: www.hitex.co.uk HiSiJs; [U\! Ltd Teh 024. 3066 Entai L sal k© h itex-cnjul: hitex Fax : 024 76 % H 31 U t ¥ £ to P M £ H I TO G L 5 ►'» eb: vv.v,v.hite-* w uV £5 - ICQal /’E/2005 - risJElCT EladrC-niK 59 Compact 200 W Output Stage Ton Giesberfs There is no doubt that this small power amp packs a punch. It is capable of deliv- ering □ healthy 200 W into 4 Q, Into 8 o it can still output 1 25 W [see Figure 2], These large power outputs are made pos- sible through the use of Darlington tran- sistors made by Sonken, the SAP16N and its opposite number, the SAP16P (in our prototype we used their predecessors, the 5AP15N and ? r because the SAP 16 versions were not available at that time). These power transistors hove an emitter resistor built in, as well as a diode for tem- perature compensation. Because of this, the whole emitter follower stage has just two components [and a preset for setting the quiescent current, shown in the circuit in Figure 1). One small disadvantage is that the tran- sistors have to ope rote at a re la rive I y low 1 60 deSclor electronics - 7-0/2005 * quiescent current, according fro the datasheet This causes an increase in dis- tortion and a reduction in bandwidth. The current through the diodes has to be set io 2 ,5 m A, when the quiescent current will be 40 mA. This has the advantage that the driver transistors (T9, TIO) do not need heat sinks, which helps to keep the circuit small. The amplifier is or a standard design and doesn't require much explanation. The input is formed by two differential ampli- fiers (Tl , T2), which are each followed by o buffer transistor [T9,. I ! 0). T9 and T1 0 together moke a push-pul! stage that drives the output transistors. For T] and T2 we've used special com- plementary dual transistors mode by Toshiba. These, along with the driver tran- sistors, have been used previously in the High-End Power Amp in the March 2005 issue. The driver transistors are a comple- mentary pair made by Sanyo, which have been designed specifically for these applications. Compensation in the amplifier is provided by R7/C2, R12/C3, R2I/C6, R22/C7 and R26/C8. The dual transistors are protected by D1 to D4. The output induc- tor consists of 8 turns of 1 .5 mm diame- ter enamelled copper wire (ECW). Since the current through the diodes is just 2.5 mA, the operating point of T9 and 110 has to be set precisely. This operat- ing point is determined purely by the operating point of the differential input amplifiers. Since the ambient temperature affects the operating point, any potential drift in the operating point of T9 and T10 is compensated for by the current sources of the differential amplifiers. The voltage drop across D5 (06) ond the bose^mltter voltage of T4 fTT) determine the current through P] (P2) and R 1 3 [R 1 6). T4 (IT) controls the voltage at the base of T3 [T6J ond creates a constant current that is independent from the sup- Specifications Input sensitivity input impedance Sine-wave power 80 40 Bandwidth Slew rate Signal/noise ratio THD+noise Damping factor 1 V eff io kn 1 25 W, THD+N = 1 % 200 W, THD+N = 1 % 135 kHz (1 W/8U) 20 V/ns 101 cJB (1 W/8 £1, 22 Hz to 22 kHz) 104 dBA 0.014 % all kHz (60 W/3QJ >700 (1 kHz) >400 {20 kHz] Ulllll ■urn E25£ sail MI1II nniifii 0.05 0.02 0.01 O.DOS 1m 2m 5m 20m 100m 500m 12 5 10 20 50 200 P [W] Into SQ - 12 ply voltage. Since the voltage across D 5 |D6J and T4 (T7) depends on the temper- ature, the voltage at the base of T10 (T9) has been temperature-compensated as well as possible, T3 ond T4 (T6 ond 17) are fed by o simple constant current source built around JFET T5 (T8), which makes the differential amplifier around T2 (T1 ) even less dependent on the supply voltage. R 1 4 (R 1 7 ] restricts the maximum voltage across T5 [IS), which may not exceed 30 V. According to the datasheet the JFET current should be about 0,5 mA, but in practice a deviation of up to 50% is possible. The actual value is not critical but the voltage across the JFET must COMPONENTS LIST Resistors; R 1 , R 1 9 — 4700 R2, R22 = 10kO R3 r R4, R8, R9 = 470 R5, R6, R10, fill, R] 5, R1 8 = 2k02 R7 r R12 = 2200 R1 3, R16 = 1k02 R14, R17 = 39kQ R20, R21 = 15kQ R23, R24 - 1G0Q R25 = IkO R26, R27 = 10O 1W PI ,P2 h P 3 - 2500 preset Capacitors? Cl ,C2,C3 - InF C4, C 5 — 1 Our 63V radial C6 = 47pF C 7 - 220pF C8 = 33nF C9, Cl] - IQOQuF 63V radial C10 r Cl 2 - IGQnF Inductors: LI = 8 rums 1.5mm dia. ECW, inside diameter 1 Omm. Semiconductors: Dl-06 = 1N4148 Tl = 2SC3381 (Toshiba) [Hui[zer; Segor Electronics] T2 = 25A1349 (Toshiba) [Huijzer; Segor Electronics) T3,T4J9 = 2SA1209 (Sanyo) [Farnell # 4103841) T5, 18 = BF245A T6, T7, FlO = 2SC291 1 (Sanyo) (Farnell # 410-3853) Tl 1 - SAP16N (Sanken) or SAP15N (Farnell # 4103749) T 1 2 = SAP 1 6P (So n ken) or SAP i 5P (Farnell# 410-3750) Miscellaneous; K1-K5 “ 2-woy spade terminal, PCB mount, vertical Heatsink <0,5 K/W Mica washers for II 1 en Tl 2, e.g., Conrad Electronics # 1 89049, 4 wire links on PCS PCB ref. 054008-1 from The PCBShcp 7*8/2005 - eteklor electronics 61 always stay below the maximum value (also take Into account any possible mains voltage variations). If you do need to reduce the voltage, that should be done by lowering the value of R1 5 (Ri8), This causes the voltage across R14 (R17J to increase and hence the voltage across the JFET will drop. PI and P2 are required to compensate for various tolerances. With the input open circuit you should set the output to zero, while keeping the current through T9 and T 1 0 as dose as possible to 2.5 mA. This can be measured across R23 and R24. It is not a problem if the current is a few tenths of □ mA more than this. The quiescent current is set by P3. In the reference design o 200 fi preset is used. We have put this together using o (stan- dard) preset of 250 £1 in parallel with a 1 kO resistor. An incidental advantage of this parallel resistor is that it limits any pos- sible current spikes when the wiper of the potentiometer makes a bad contact during the adjustment of the quiescent current. This amplifier provides o good opportu- nity to experiment with the Sanken tran- sistors. If you wont to use the output stoge in a complete power amplifier (refer to the print layout in Figure 3], you will need to add an input decoupling capacitor, a power-on delay with a relay for the loud- speaker and a beefy power supply. The input decoupling capacitor is certainly a necessity, since the offset is determined by the various tolerances and differences between the complementary transistors. In our prototype the input offset was 6.3 mV for o 0 V output voltage. This is amplified by a factor of 33, which would result in an output offset of over 200 mV if ihe input was shorted by For example, a volume control. Elsewhere in this Issue is a design for a small board,, which contains an input decoupling capacitor (MKT or MKP) and a relay with a power-on delay. r - " : -i Ton Giesberts People often forget that many voltage reg- ulator ICs hove an upper limit (usually 35 V) on the inpul voltage they can han- dle. That applies primarily to types with a fixed output voltage. Adjustable voltage regulators also have a maximum voltage specification, in that cose between the input ond output (commonly 40 V). The input voltage must thus be limited to that level in a fault situation in which the out- put is shorted. This circuit shows a way to allow such regulators to be used in situations with higher input voltages. Although ihe solu- Protection for TWta@i@ fion consists of an additional three com- ponents, it is simple and can be built using commonly available components. The voltage across the regulator is limited by the combination or 1 1 and zener diode D1 to a value that allows the regu- lator to work properly with loads up to the maximum rated load. RI provides an adequate operating current for D1 and the bias current for TI . It's a good idea to use a Darlington type for TI in order to keep the value of RI reasonably high. The current through D1 is only 10 mA with on input voltage of 60 V. Naturally, we also measured what the circuit does when no load Is connected. Surprisingly enough, the nominal output voltage of 5.02 V increased to only 5.10 V (with a 6Q-V input voltage] . In our experiments, we used a BDV65B 62 clsktor Ebd ranks - 7-8/2005 for T I and a value of 4.7 kQ for R1 . if you want to ensure that [he circuit is truly short-circuit proof with an input voltage of 60 V, you must use a transistor that remains within its safe operating area at the maximum input voltage with the short- circuit current of the regulator [which can exceed 2 A), The BDV65B and TIP 142 do not meet this requirement. The maxi- mum voltage For the BDV65B is actually 40 V r and for the TIP 142 is 50 V. If the transistor breaks down, the regulator will oho break down. We verified that exper- imentally. One possibility is to add SOA protection for T1 , but that amounts to protecting ihe protection. Another option is to relax the requirements. For that purpose, R1 must provide enough current to ensure that T1 receives sufficient current in the event of a short circuit to keep the voltage across TJ lower, but that doesn't make a lot of difference in practice, and it also increases the minimum load. Besides that, it should be evident that adequate cool- ing for T1 and IC1 must be provided according to the lead Ripple suppression is only marginally affected by the protection circuit, since the input is already well stabilised by T1 . but the current through D1 does flow through the output. The presence of C2 must also be taken into account. In this circuit, with an adjustable voltage regulator such as the LM3 1 7 arid an output voltage greater than 40 V, C2 will cause the voltage to be briefly higher than 40 V in the event of □ short circuit, which can also cause the 1C to be damaged. In that cose, it will be necessary to find a different solution or use a different type of voltage regulator. Video Sync Generator K1 Paul Goossens All video signals include synchronisation signals, which help the television set keep the horizontal and vertical deflection syn- chronous with the picture. For experimen- tal purposes, it con be handy to build a generator for these synchronisation sig- nals. Synchronisation signals have o rather complicated structure. If s not easy to gen- erate them accurately using analogue cir- cuitry. By contrast, a design based on a CPID is a lot easier, this design uses the experimenter's board described in the May 2004 issue ( Design Your Own 1C). The hardware extension for this genera- tor is shown in Figure 1 . The extension could hardly be simpler. The 20-way con- nector must be connected to connector K3 of the experimenter's board by a flat coble. The synchronisation signals on pin 4 are routed to the output connector via voltage divider R1/R2. R1 and R2 perform two tasks in this cir- cuit. First, they provide the correct output impedance of 75 Q r Second, they reduce the signal amplitude from around 4 V to 0.6 V. If the circuit is connected to a tele- vision set with an input impedance of 75 17 the maximum output voltage will be only 0.3 V, which complies with the specifications for the CVBS signal!. As you've surely guessed by now, the majority of the design is contained in ihe CPLD. We generated [his design in Guar- ds 4.2. The tap-le vel schematic is shown in Figure 2. As can clearly be seen from that diagram the design consists of three separate sections. In combination with the crystal on the circuit board, ihe inverter at ihe bottom provides the clock signal. The crystal must generate o frequency of 1 0 MHz for this circuit. If a different crys- tal is already fitted, ii must be replaced by o 1 0-MHz type. The clock signal finds its way back into the circuit via another input at the top left. It ensures [hat both parts of the circuit operate synchronously. The section named 'sync_stoie' keeps track of which part of the video signal is being generated. Here it should be remarked that each video line is divided into two parts in this circuit. Thai is done because ihe synchronisation signal occurs oi twice the normal role during ihe verti- cal retrace interval. The 'width' output indicated how long ihe output signal should remain low. Asser- tion of the 'endline' input indicates fo the subcircuit that ihe current portion of the video signal is ready and the next portion of the video signal con be processed. The 'sync_state' block then produces the asso- ciated value at the output. The final block bears the revealing name 'pwm_] Obit'. As its name suggests, this sec- lion [which is actually implemented as carl of the program code) generates a pulse on the output whose width is equal to the value of width'. This PWM counts from 0 to 3 1 9, which corresponds to a total duration of 32 ps (half of one video line) at a clock fre- quency of 10 MHz. This period is divided into 320 intervals of 0.1 ps each. The PWM sets the 'endline output high during the next-fo-last interval. You might expect that this signal would be active during ihe Final interval of the period, but making ii active one interval earlier gives ihe 7-&/2QQ5- deklor eietf routs 63 sync_state block of least one dock cycle \o generate a new width' value. Naturally, the design riles For the 1C can be downloaded tram the Elekfar Elec ton- ics website (www.elekfor- eiectronics.co.uk). The File number is 054021-1 l*zip. After compilation, the final result uses 65 macrocells. The number of macrocells can be reduced by optimis- ing the overall code. For instance, there are several obvious places where the design can be made more efficient, but a Few somewhat less optimisations are also possible. Try it for yourself, and see how much you can optimise the design. Your efforts might just spark an interesting dis- cussion on our website Forum! Bidirectional l 2 C level Shifter Luc Lemmens In some cases 1 2 C signals need to be level-converted if they are exchanged between [sections of] logic systems oper- ating at different supply voltages. For example, one section of a circuit may work at 5 V while o newly added l-C device is happy at just 3.3 V. Without a suitable bidirectional level converter, sig- nals from the 5-V system may disrupt or even damage the 5DA/SCL inputs of !he 3.3-V device, while the other way around signals emitted by the lower voltage device may not be properly detected. As shown in the diagram, two nchannel enhancement MOSFETs inserted in the SDA and 5CL iines do the trick. Note that each voltage section has its own pull-up resistors Rp connected between the respec- tive supply rail [+3.3 V or +5 V] and the M05FET source or drain terminals. Both gates (g) are connected to the lowest sup- ply voltage, the sources [s] to the bus fines V CQ1 = 3V3. of the lower voltage section, and the drains (d) to the same of the higher volt- age section. The MOSFETs should have their source connected to the substrate — when in doubt check the datasheet. Other supply voltages than 3.3 V and 5 V may be applied, for example, 2 V and 10 V is perfectly feasible. In normal oper- ation VDD2 must be higher than or equal toVpDl. Source- Philips Semiconductors Application Note AN 97055. Wi+.: 1 l iLltS'S Karel Walraven It won't be very long before your new sit- ting ream lamp will last forever. While our parents had to replace the lamp at least once a year these days the energy-efficient lamps last five to ten times as Song. Our chil- dren will buy an LEO lamp once, which will keep working until their grove. Granted, what is written here is possibly a slight exaggeration, but that the development is in the direction of increased lifespan and higher efficiency is beyond dispute. The company Lumileds (from Agilent and Philips] has as its goal the development of LEDs that ore suitable for lighting. That is why they are available in various shades of white: 3200 K (warm white), 4100 K (commercial white) and 5500 K (coo! white). By combining multiple LEDs of dif- ferent brightness in one fitting, the differ- ent fittings will have equal brightness, even if you buy another new one years later. With respect to power output, there are models rated 1 W and 5 W, and when you read this, the range is quite likely la hove grown. Because the light output and life expectancy are strongly related to tem- perature. not only unmounted LEDs are available but also types Integrated with a heatsink. This series has the beautiful name of Luxeon Star LED, because the 64 Efrktof efeclromcs - 7-B/2a05 V F * Forward Voltage [Volts] G54042 - 12 heatsink has somewhat of a star shape. Because of 3he heatsink It is possible to use the Luxeon Star LED at the rated current with- out any additional measures. For the Watt type that is 350 mA DC. The current may be as high as 500 mA of the LED is multi- plexed, however the average value may net be higher than 350 mA. Don't use a switch- ing frequency of less than 1 kHz, otherwise she temperature or the chip varies too much. The 3-watt type can be driven with a maxi- mum of 1 A, also when multiplexing. If you are going to use the LEDs at these limits it is advisable to drive them with an electronically controlled current source, so that you can be sure that the limits are not exceeded. In general this is not necessary, since a slightly lower current does not reduce the brightness much. This is because the brightness reduces signifi- cantly when the temperature of the chip increases. This can be as much as 1 0 % per 20 degrees of junction temperature! It is therefore always a good idea to provide the LED with as much additional cooling as Is practicable, for example by mount- ing the heatsink an a thermally conducting pari of the fitting. We recommend that you choose o current which is a little less than the maximum value. A simple current lim- iting resistor is then all you need and addi- tional electronics is not required. For exam- ples and calculations see: star.com - ' rest s to r-ca icu I a torjo h d ™ ‘ i Note that the LED, in contrast to a halo gen bmp, requires DC. So in the event of □n AC power supply, apart from the resis- tor, it is also necessary to add a bridge rectifier between transformer and LEDI More information can be found in the Custom luxeon Design Guide, which can be downloaded bom: www. lum i I eds , com/pdfs/ AS 1 2 . PDF Extended Timer Range for the 555 Ton Gilberts Anyone who has designed circuits using the 555 timer chip will, at some iime have wished that it could be programmed for longer timing periods. Timing periods greater than a few minutes are difficult to achieve because component leakage cur- rents in large timing capacitors become significant. There is however no reason to opt for a purely digital solution just yet. The circuit shown here uses a 555 timer in the design but nevertheless achieves a timing interval of up to an hour! The trick here is to feed the timing capac- itor not with a constant voltage but with a pulsed dc voltage. The pulses ore derived from the unsmoothed low voltaae KJ output of the power supply bridge recti- fier. The power supply output is not refer- IN 4002 050064-11 enced to earth potential and the pulsing full wove rectified signal is fed to the base of T1 via resistor Rl. A IGO-Hz squore wave signal is produced on the collector of T 1 as the transistor switches. The positive half of this waveform 7-8/2005 - eltklar eltrirentcs 65 charges up the timing capacitor Cl via 02 and PI, Diode D2 prevents the charge on Cl from discharging through II when the square wave signal goes low. Pushbutton SI is used to start the tim- ing period. This method of charging uses relatively low component values far PI (2.2 MQ) and Cl '(100 to 200 pF) but achieves timing periods of up to an hour which is much longer than a standard 555 circuit configuration. :ei: Fridge Thermostat S15 Tony Beekman What to do when the thermostat in your fridge doesn't work any more? Get it repaired at (too) much expense or just buy a new one? It is reia lively simple ta make on electronic variation of a thermo- stat yourself while saving a considerable amount of money at the same time. How- even be careful when working with mains voltages. This voltage remains invisible and can sometimes be fatal! This design allows far Five temperatures to be selected with a rotary switch. By select- ing suitable values for the resistors (R1 to R7) r the temperatures at the various switch positions can be defined at construction time. With the resistance values shown here, the temperature can be adjusted to 16, 6.. 4 r 2 and -22 “C. 1 6~ C is an ideal temperature for the storage of wine r while 6, A, and 2 degrees are interesting for beer connoisseurs and the minus 22 ; degress position transforms the fridge into a large Freezer. Note far wine con’ nofsseurs: to prevent mould on the labels, it is necessary to place a moisture absorber or bag of silica gel in the fridge. The circuit is built around an old work- horse among apormps, the 741 . D1 pro- vides a stable reference voltage of 5 V across the entire resistor divider. PI allows adjustment of the voltage at the node of Rl and R2. To use the above- mentioned temperatures as setpoints this voltage needs to be adjusted to 2,89 V. D2 is a precision temperature sensor, which can be used from -40 to -rl OO c C. The voltage across this diode varies by i 0 mV per Kelvin. In this way D2 keeps an eye on the temperature in the fridge. The reference voltage derived from the voltage divider (selected with 51) is com- pared by SCI with the voltage across the temperature sensor. Based on this, the 741 switches, via the zero voltage cross- ing driver (IC2J, o Irioc that provides volt- age to the compressor motor. The zero voltage crossing 1C switches only at the zero crossings of the mains voltage, so that interference from the compressor motor is avoided when turning on. The power supply for the circuit is pro- vided by c simple bridge rectifier and fil- 66 elekfor ale [Ironies - 7 8/2005 tered with two electrolytic capacitors of 220 uF each. The design con also be used for countless other uses. You can, for example, make a thermostat For heating by swapping the inputs of the apamp. Keep in mind the safety requirements when building and mounting the circuit. USB for the Xbox Foul Goossens The Xbox is the well-known Microsoft game computer. The fact that the Xbox is based on PC technology should hardly be surprising, since Microsoft specialises in th I s e om p u te r a rch i tectu re. It's also not especially remarkable that if you open up on Xbox, youll find several well-known ICs from the PC world. In Fact, the Xbox is actually a PC. The malar differ- ence between the Xbox and a norma! PC is that the operating system is stored entirely in Flash memory and users can- not add any functionality to the system. There is also a protection system that pre- vents any software from being accepted if it does not have a digital signature from Microsoft. At least, that was the intention. Naturally, there are people who have cracked the Xbox protection system and use the Xbox os a PC to run Linux. We plan to publish more information about this in Elekior Electronics In the near future. The biggest problem with running Linux on an Xbox is that there Is no keyboard for the Xbox. That's what we want to remedy here. As usual with game computers, the Xbox has connectors for controllers (enhanced joysticks) for playing the games. The Xbox hos four such connecters on the front or the enclosure. They hove o form that is totally new' to us. After a bit of detective work. It turns out that the signals on these connectors are actually quite familiar: they're USB signals. Once you know that, it's easy to connect a keyboard to the Xbox. If you fit a stan- dard USB connector somewhere on the enclosure and wire it to the signal lines for one of the connectors, you can then conned a USB keyboard. Another benefit of this is that most types of USB memory sticks can be used by the Xbox as Xbox memory cords. USB memory sticks ore a lot less expensive than genuine Xbox memory cards. The wires to the connector ot the front can be clearly seen in Figure I. The yellow wire is not important for our purposes. C-54£5T- II The other wires are used for the actual USB signals. A nice detail is that Microsoft uses exactly the some colours for these wires os those specified in the USB standard, which makes them much easier to recognise. For the installation, you will some wire and a USB connector (Type A). Thai s the some type of connector as the USB con- nectors in a PC. Figure 2 shows an example of such a connector, along with the proper pin numbers. Find a place on the Xbox where the con- nector can be fitted. It's easy to make a hole in the case with a small hand-held router or a drill and a small file. Next, make connections between the four wires leading to the Xbox connector and the Table I. USB connections Pin 1 (red) : +5 V Pin 2 [white) : D- Ptn 3 (green) : D+ Pin 4 (block) : GND four terminals of the USB connector, as shown in Table 1. It's a good idea to check the connections before using the modified unit, in order to ensure that there aren't any shorts between the lines. As a second test, we recommend checking whether a voltage can be measured between pin 1 of the USB connector (-i-3.6 to 5 V) and pin 4 (ground) offer the Xbox power hos been switched on. If the test results are all OK, the USB connector Is ready for use. USB keyboards (and USB mice) are sup- ported by Xbox Linux, and some Xbox games also use a USB keyboard to make it easier to control the game and/or chat with other players. 7-8/2005 - elector elsdrcnlcs 67 1 2-V 3im ner John Dakfn A dimmer is quite unusual in □ caravan or on a boat. Here we describe how you can make one. So if you would like io be able io adjust the mood when you're entertaining friends and acquaintances, then ihl$ circuit enables you io do so. Designing a dimmer for ] 2 V is tricky business. The dimmers you find in your home are designed to operate from an AC voltage and use inis AC voltage as a fundamental characteristic for (heir opera- tion. Because we now have to start with ] 2 V DC, we hove to generate the AC voltage ourselves. We also have to keep in mind that we're dealing with battery- powered equipment and have to be fru- gal with energy. The circuit that we Finally arrived at con easily drive 6 lamps of 10 W each. Fewer are also possible, of course. In any case, the tolol current has to be smaller than 10 A. LI and SI can be adapted to suit a smaller current, if required, Nate that the whole circuit will also work from 6 V, IC1 is a dual timer. You could also use the old faithful NE556, but it draws o lit- tle more current, 1C la is wired as an astable multivibrator with o frequency of 1 80 Hz, 1C I b is configured as a mono- stable and is triggered, via D2. from the positive edge at the ouiput of 1C la. The length of the pulse that now appears at the output of 1C lb is dependant on the position of PI. IClb will be reset when- COMPONENT LIST Resistors: R1 = 1MH R2 = 47kQ R3 = 470kD R4 = 1 2kn R5 - 1 oon P \ = ] M Zl preset Capacitors: C1,C3,C5 - 1 OnF C2,C4 - 6nF8 C6= IGOuF 25V radial Semiconductors: D1,D2 = 1N4148 D3 = zener diode 15V /1.3V/ ever the output of 1C Jo goes lov/, inde- pendent of the pulse duration, set with T1 = 1RL2203, BUZ 10, 8UZ11,8UZ1QG or BUK455 * !C 1 - TS556CN (CMOS) or NE556N [not CMOS] Miscellaneous: LI = 3uH 9A suppressor coil * (e g., Fornell # 976-4 1 6) K1 = 2-way PC8 terminal block, lead pitch 5mm 51 = on /off switch, 10A PCB, ref. 030141-1 from The PCBShop 'see text 68 elcklor dertromis- 7-9/2005 PI, R4 and C4. This guarantees ih at the dimming is smooth, even when the bright- ness is set to maximum. The output of 1C 1 b (pin 9) drives the gate of MG5FET T 1 . When the duration of the pulses at the gate increases, the average time that the MOSFET is in conduction will □Iso increase, fn this way the brightness of the lamps is controlled, T] conducts □bout 96 % of the time when the bright- ness is set to maximum. In this configura- tion, this can never be 100 %, because the 4 % of the time that the FET does not conduct is necessary to charge C6. If the FET were to conduct with 100 % duty cycle, the power supply for the circuit would be effectively short-circuited. C6 allows the circuit to ride through the con- duction period of the FET. D1 ensures that the charge cannot leak away via the FET during the 'an' period. In the schematic, an 1RL2203N is indi- cated for T1 , but in principle you could use just about any power transistor (for example, BUK455, BUZ10, BUZ! 1 or BUZ 100). The IRL2203 does however have o very low 'on resistance (Rq$ on ) of only 7 mO and can switch 1 2-V loads up to 5 A without a heatsink, If you choose a different MOSFET (with higher ^DS On) or use the circuit in a 6-V system then you will likely need a heatsink. Using the IRL2203N wilh six lamps rated 12 V / 10 W, T1 dissipates only 170 mW. At 6 V and 1 0 A this becomes 680 mW. The circuit itself consumes about 0.35 mA at maximum brightness and about 1 .25 mA ai minimum. The power supply is derived from the power system via D1 ond C6. Zener diode D3 provides protection against volt- age surges. The main purpose of R5 Is to limit the current through D3, in the event it becomes active, LI reduces interference that could be caused by the fast switch- ing of the transistor. We have designed a small printed circuit board for the circuit. The construction is very simple. The PCB is quite compact in order to facilitate the replacement of exist- ing switches. Keep in mind that the CMOS-parts, 1C 1 and T1 , are sensitive to static electricity. Low-cost LiPo Cha rger The charging of Lithium-Polymer (LiPo) cells takes place very differently to that of the well known NiCd and NiMH cells. This aspect has previously been covered in Elektor Electronics. And this isn't the first LiPo charger that v/e've published, but it is undoubtedly the smallest! Chip manufacturer Infersrl has designed a LiPo charger 1C that requires a minimum of external components. Since the 1C itself is also extremely small (2x3 mm), the complete charger can be kept very small as well, this lets us design a charger that can easily be built into various pieces of equipment, especially when we use SMDs for all external components. For those of you who don't know how a LiPo cell should be charged, well give a short explanation. When the cell voltage is very low (<2_5 V), it should be charged using o small current (see Figure 1). This current is typically less than 0.1 C [where C is the nominal battery capacity]. When the voltage has risen sufficiently, but is still below 4,2 V, the cell is charged with □ constant current. Most UPo manufacturers specify a current of 1 C for this stage. The voltage across the cell may not exceed 4.2 V, so the charger has to keep an eye on this as well, At this constant voltage the current through the cell will slowly reduce while the charge in the cell increases. At the point when the cell voltage is 4.2 V and the charging current has dropped to 0. 1 C t the cell is about 80-90% charged, depending on the manufacturer. Most chargers decide at this point that the cell 2 is fully charged and switch to trickle Our charger works in exactly the same charging the cell. way. There are two parameters that can 7-8/2005 - e ! a k tor cLccfroriics 69 be adjusted in this charger which are the normal charging current and the trickle charge that flows when the cell is 'full'. In the circuit of Figure 2 resistor R1 sets ihe charging current to about 500 mA r and resistor R2 sets the trickle charge current to about 4 5 mA. R3, R4, D1 and D2 are optional in this design and provide the user with status information. D1 shows when ihe charg- mg process is busy and D2 indicates that the correct Input voltage Is present. If you want to use different maximum and minimum charge currents you should use the following formulae for R1 and R2; R1 - 12xKP //^ R2- 11x103//. min Keep in mind that the accuracy of the cur- rent source ot 500 mA is about 1 0%; this drops to about 30% at 50 mA. You should therefore be conservative In your choice of charging current so that you keep below the manufacturer's maximum recommended charging current : z - " D I L/SO I C/TSSO P Experimenting Boards Wolfgang Sfeimle Whenever you want to put a circuit together quickly, If will take too long to design a PCB for it first, in that cose the experimenting FCBs shown here are emi- nently suitable. Three variations ore available: 20-pin Dll package, 20-pin SOtC package and a Robin von Arem The circuit presented here has the same functionality as the renowned 20-pin TSSOP package. If you use an 1C with fewer pins, then you simply don't use some ot the solder pads. The remaining port of each PCB is filled with solder pads, which are arranged in groups or four. In between is a continuous capper pattern. By connecting Inis copper grid to ground,, the beards are also suit- able for RF designs. Digital: VU LM3914, an LED driver tho! can con- irol 10 LEDs. The circuit shown here can even drive 12 or them, with only 4 outputs, A necessary requirement is The layouts far the various PCBs are shown here ot a reduced scale. You can download the true scale layouts from the Eiekfor Electronics website (in pdf format). The file number is 040239- Kzip. They ore also available ready-made from EM- tcr Electronics (refer to SHOP pages or website) , the part numbers are 040289- 1 f -2 and -3, Meter that low-current LEDs are used. The audio signal is amplified by [half off on LM358 opamp. PI allows adjustment of the gain and therefore the sensitivity. 70 debar eleefrontes - 7-8/20D5 One input of the opomp is connected to ground so that only she positive half of the input signal is amplified and is effectively rectified at the same time. The combina- tion of R2/C4 then performs on averag- ing function after which the signal is con- verted to a digital value by the 8-bit ADC in the Afiinyl5L microcontroller. Subse- quently, the 12 LEDs are then contro'ied through o method colled charlieplexingh Switch SI selects between dot and bar made. The power supply is regulated with the usual 7805. The maximum current con- sumption amounts to 20 mA at 13.8 V. Power supply voltages of up to 30 V are not a problem, since the LV\358 can deal with a maximum of 33 V at least [a 7805 can typically deal with 35 V). The mini- mum voltage at which the circuit will oper- ate is around 7 V. The software can be downloaded in the Form of a hex file from our website of www.efektor-electronics.co.uk, The file number is 050 1 1 8" I .zip. After the code has been programmed into the ATtiny,. it is necessary the disable the external reset with the appropriate fuse. 101 since the reset pin in this circuit is used as an output. Those among you who would like to know more on the subject of charlieplex- ing □re referred to vAvwmoxim-ic.com. s ls&hs*: The chip is also available ready- programmed as no, Q501 1 8-4 T » Ton Giesberfs Many new devices require a headphone connection, but due to the high level of integration and miniaturisation there is usually little room left. The low supply volt- age and/or battery voltage also causes problems. If no special techniques are used, the output power and headroom are severely limited. The MAX44 1 0 made by Maxim over- comes these problems not just by virtue of its small size but also by including on internal supply inverter (charge-pump). This requires only two small externa! ceramic SMD capacitors (C6 and C7j, The supply voltage to the output stage is now symmetrical and the outputs are therefore relative to ground (no DC offset}. This gets round the need for large output capacitors to stop a DC voltage from reaching the headphones. A DC-coupled output can also be implemented using two bridge amplifiers, but virtually alf plugs for stereo headphones are asymmetric and use 3-pale connectors [common ground], which can't be connected to a bridge output. Each channel can be individually turned off (5HDNL and SHDNRJi by jumpers JP1 and jP2. During normal operation these two inputs should be connected to the 7'S/2005 - el-ektor ebdramts 71 positive supply. When bath channels are turned off the charge pump is also switched off and the current consumption drops to about 6 liA. The SC also has thermal and short-circuit protection built in. The 1C switches to standby mode when the supply voltage is too low and if has a circuit that prevents poweron ond off plops at the outputs. The recommended supply voltage is between 1,8 V and 3.6 V. The 1C con deliver about 80 mW per channel into a 16 Q load. The power supply should be able to output at least 200 mA, In practice this means that when you use a power supply that also powers other circuits, it should have at least 300 mA in reserve. The amplifiers are configured in inverting mode with a gain set by the ratio of two resistors [R3/R1 or R4/R2); the input impedance is determined by R1 and R2. Cl and C2 are required to decouple any possible DC-offset From the inputs. In the MAX4410 evaluation hit these are small tantalum capacitors, but we don't recom- mend these for use in audio applications. Plastic film types would be much beHer, although they take up much more room, HF decoupling is provided by 100 pp capacitors connected in parallel with R3 and R4. These set the bandwidth of the amplifiers to just over 1 50 kHz. The typi- cal distortion is 0,003%. For more details you should refer to the MAX44 1 0 datasheet. It is also worth looking at the datasheet for the associated evaluation kit. The choice of capacitors for decoupling etc., their positioning on the board and the overall layout are very critical and demand □ lot of attention. Furthermore, the 1 4-pin TSSOP package [with a pin spacing of 0.65 mm) and SMDs in 0402 packages make it very difficult to con- struct this circuit yourself. The 1C is also available in a (much more difficult to sol- der) UCSP 16 package (ball grid array, only 2.02 by 2.02 mm). Servo Points Actuator Karel Walravere Servos for mode! making can also be used for completely different purposes besides model airplanes, boats and cars. As an example, here a servo is used to operate a set of points for a model rail- way system. The paints are directly actu- ated by a length of steel wire connected to the servo arm, and they move quietly and smoothly, so the illusion is no longer spoiled by that irritating dick-clack sound. The voltage on ihe point tongues and nose is also switched over by the servo. As an example for DIY construction, we have designed two small PCBs that can be attached to a servo with a bit of glue. The larger board should be glued to the case of the servo, while the smaller (round) board should be glued to the arm. Several contact strips made from phosphor bronze must be soldered to the larger board. Phosphor bronze is a copper alloy with good spring characteristics. Almost all relay contacts arms are made from this material. It can be obtained from Conrad, among other sources, in the form of small sheets that can be cut or sawn into strips. Any desired switching scheme can be ere* aied by devising a suitable pattern of cop- 72 dektar dHtronics - 7-6/2005 per tracks. The actuator works as follows: in the straight-through state, one tongue and the nose are connected to rail B, When the points are moving, both tongues and the nose are floating, since there is o gap betv/een the segments with no copper. Just before the points reach the turn-out state, the other tongue and the nose pick up the voltage from rail A. Te PCB shown here is available through The PCBShop. :-V 'jjz~ Searching for Components Karel Walroven This is a tip we think you'll appreciate: the large mail-order firms have a lot of infor- mation on their sites that can be quite handy even if you never order anything from them. As an exomple we con men- tion YAvw.Farnelf.com. If you're looking For a certain component, you con simply use the search menu to retrieve its most important characteristics and immediately see whether it is still generally available and approximately what ft costs. The full data sheet is also usually available. If the component is no longer available or you're looking tor an alternative for some reason, you can use the 'find sim- ilar products by attributes' function to find several similar products. You con refine your choice in several steps until you finally end up with the components wiih the desired properties. You canT get the some type of results on a manufac- turer's site, because such sites are usu- ally limited to the manufacturer $ own products, while a dealer also shov/s 1 -eulfti Gfiti n’ l > zt-.rir- Ietj £ ft a- i: & ~ A * Z £ ft* I ViFARNELL mone 325!^ ■04£ * WiCJ^T (.0511 U rK£MJ TS,-Z£TT^ Ssosi?! Foe * r 5-Si Df {Art ■u-EfTrj - nn i Tnr Ii-ruF sirt^fM-Ttr - ' lilVPi/y -w 1 *. Ll'^I mtiz^cr r-.ui. rT .«- A1 k -jni : u ■ =ir:MEHEET r PTTpf - Titi -Iff- KT4 LB Liwm i * ■ If 1 Hi -azz 2zi l QUA. A 1***5 “ fnlilr! if ’ J- J~ ^=r. T?-J5; U. J - -fl UTff ” S -f- 3 b- 1} ! 3X r "S-Cfle-M : -rrr — 7fprr*^-r r rr competitive products and you can directly compare their availability and prices. That means you can make things a lot easier for yourself, since it takes time to check out all the manufacturer sites, with the added risk that even IF you find a suitable component if may turn out to not be available unless you plan to buy 100,000 at the same time. lort-Wave Superregenerative Receiver Burkhart! Kalnka Superregenerative receivers are char- acterised by their high sensitivity. The purpose of this experiment is to deter- mine whether they are also suitable for short-wave rodio. Superregenerative receivers are relatively easy to build. You start by building a RF oscillator for the desired frequency. The only difference between a superregen era- five receiver and an oscillator is in the base circuit. Instead of using a voltage divider, here we use a single, relatively high-resistance base resistor [100 k Q to ] MQ). Superregenerative oscillation occurs when the amplitude af the oscilla- tion is sufficient to couse a strong nega- tive charge to be applied repeatedly to the base. If the regeneration frequency is audible, adjust the values of the resistors and capacitors until if lies somewhere above 20 kHz, The optimum setting is when you hear a sirong hissing sound. The subsequent audio amplifier should have a low upper cutoff frequency to strongly attenuate the regeneration signal at its output while allowing signals in the audio band to pass through. This experimental circuit uses two tran- sistors. A Walkman headphone with two 32-Q earphones forms a suitable output device. The component values shown in the schematic diagram have proven to be suitable for the 1 0-20 MHz region. The coil consists of 27 turns wound on an AA battery serving as a winding form. The circuit produces a strong hiss- ing sound, which diminishes when a sta 7-0/2005 ’ ebktor electronics 73 tion is received. The radio is so sensitive that if does not require any anfenno fa be connected. The tuned circuit by itself is enough to receive a large number of European stations. The circuit is usable with a supply voltage of 3 V or more, although the audio volume is greater at 9 V + One of the major advantages of a superregenerative receiver is that weak and strong stations generate the same audio level, with the only difference being in the signal to noise ratio. That makes o volume control entirely unnec- essary. However there is also a specific drawback in the short-wove bands: inter- ference occurs fairly often if there is an adjacent station separated from the desired station by something close to the regeneration frequency. The sound qual- ity is often worse than with a simple 1 3V...SY ESGGSO - 11 regenerative receiver However, this is manual feedback adjustment, which can offset by the absence of the need For be difficult. - 0 : 9 ^; Medium-Wave Modulator Burkhard Kamkc If you insist on using □ valve radio and listening to medium-wave stations, you hove a problem: the existing broadcast- ers have only o limited number of records. Here there's only one remedy, which is to build your own medium-wave transmitter. After that, you con play your own CDs via the radio. The transmitter frequency is stabilised using □ 976-kHz ceramic resonator token from a I V remote control unit. Fine tuning is provided by the trimmer capacitor. If there's another station in the background, which will probably be weak, you con tune it to a heterodyne null, such as 98 i kHz. As an operator of a medium-wave transmitter, that s your obligation with respect to the frequency allocations. And that's despite the fact that the range of the transmitter is quite modest. The small ferrite coif in the transmitter couples directly into the ferrite rod antenna in the radio. The modulator is designed os an emitter follower that modulates the supply volt- age of the output amplifier. As the medium-wave bond is still mono, the two input channels are merged. The poten- tiometer can be adjusted to obtain the least distortion and the best sound: The RF amplifier stage has intentionally been kept modest to prevent any undesired radiation. The quality of the output signal L Q-\ lTr. hi a seif fat or can also be checked using an oscillo- scope. Clean amplitude modulation should be clearly visible. The medium-wave modulator can simply be placed on top of the radio. A signal from a CD player or other source can be ted in via o cable. Now you have a new, strong station on the radio in rhe medium- v/ave band, which is distinguished by good sound quality and the faci that it always plays what you wont to hear. 74 el&fctfif elctironits - 7-3 20QS Filter-based 50 Hz Sinewave Generator Myo Min When it comes to designing a reliable 50-Hz oscillator, the disadvantage of the good old Wien Bridge oscillator is the difficulty to adjust its own gain. If the gain is higher or lower than the opiimum value, the Wien Bridge often fails to work properly. The circuit shown here combines the func- tions or a low-pass filter and an integra- tor, presenting a novel approach to cre- ating a precision 50-Hz source with rela- tively low distortion. The circuit is free from any kind of gain setting network. Opamp 1C. IB and R3/C4/C5 act os an inverting integrator effectively converting the incoming sine wave [from 1C. 1 A} into a square wave with a good amount or harmonics. R4, D1 and D2 divide the square wave fa the desired level. For optimum switching speed, a matching number of series-con- nected low-power switching diodes like the ubiquitous 1N4148 may be used instead of the zener diodes. The output voltage is directly proportional to the zener diode values. The second opamp, IC.1A and its surrounding components Rl, Cl acts as a two-pole low-pass filter supplying the 50-Hz output signal via R5. Theoretically, the filter roll-off is at 24 Hz, which means the base frequency of 50 Hz is also attenuated to some degree. That Is not too serious as long as higher harmonics are properly attenuated. The COMPONENTS LIST Resistors: RCR2.R3 - 47kQ R4 = 4ki>7 R5 = 1 ooa Capacitors: C1,C2,C3,C6,C7 = lOQnF C4,C5 = InF C8,C9 = 47uF 25V radial Semiconductors: 01 ,02 ~ zener diode 5.6V 400 mW 1C1 = LF353DP Miscellaneous: PCB ref. 040093-1 from The PCBShop design with the compo- nent values shown here will supply an output voltage of 1 .24 V ol o fre- quency 49.6 Hz. Cur rent con- sumption was meas- ured at less than 5 mA, while the distor- tion was 3.7% when using an LF353 opamp. We performed an f FT (fast Fourier Trans- form) analysis on the generator's output signal. Even-numbered harmonics were found dearly less in level than their odd- numbered counterparts. This is caused by a slight asymmetry in the generator s inter- nal square wave. In our prototype, the rFT graph showed the 3 r ^ harmonic or a relatively high level of -29.2 dB; the 2 ra hor m A rt ir rl irJ m 1 1 «— h kii fin r n) II I.i — yjt .. R3 7 - 8/2005 - elekfor deri ranks 75 [Cl Robert Edlmger Presettable times far train stops in stations ore indispensable if you want to operate your model railway more or less realisti- cally according to a timetable. This circuit shows how a 555 timer con be used with a relatively small timing capacitor to gen- erate very long delay times os necessary by using o little trick (scarcely known among model railway electronic techni- cians): pulsed charging oF the timing net- work. Such long delays can be used in hidden yards with through tracks,, For instance. As the timer is designed for half-wave operation, it requires only a single lead to the transformer and one to the switchina u track or reed contact when used with a Mdrklin AC system (HO or H 1 ), The other lead can be connected to any desired grounding point for the common ground of the track ond lighting circuits. As seen from the outside, the timer acts as a monostable flip-flop. The output (pin 3) is low in the quiescent state. If a negative signal is applied to the trigger input (pin 2), the output goes high and C4 starts charging via R3 and R4. When the voltage on C4 reaches 2/3 of the supply voltage, it discharges via an inter- na! transistor connected to pin 7 to 1/3 of the supply voltage and the output (pin 3] goes low. The two threshold val- ues [1/3 and 2/3) are direct!/ propor- tional to the supply voltage. The duration of the output signal is independent of the supply voltage: f = 1 . 1 (R4 + R5j x C4 if the potentiometer is connected directly to the supply line (A and B joined]. The max- imum delay time that can be generated using the component values shown In the schematic diagram is 4.8 minutes. How- ever, it can be increased by a factor of approximately 10 if the timing network i$ charged using positive half-waves of She AC supply voltage (reduced to the 10-16-V level) instead of a constant DC voltage. The positive half-waves of the AC voltage reach the liming network via D2, the tran- sistor, and D3. Diode D3 prevents C4 from being discharged between the pulses. The total resistance of R4 and R5 should not be too high (no more than 10 MQ if possible), since electrolytic capacitors [such os are needed far C4j have significant leakage currents. Inciden- tally, the leakage current of aluminium electrolytic capacitors con be consider- ably reduced by using a supply voltage well below the rated voltage. Capacitor C6 is intended to suppress noise. It forms a filter network in combination with an Internal voltage-divider resistor. 3r a vehicle happens to remain standing over the reed switch so ihe magnet holds the contacts constantly closed, ihe timer will automatically be re triggered when the preset delay times out. In this case the relay armature will not release and the locomotive will come to the 'end of the line' in violation of the timetable. This problem can be reliably eliminated using R6, R7 and C5. This trigger circuit ensures that only one trigger pulse is gen- erated, regardless of how long the reed switch remains closed. RC network R8/C7 on the reset pin ensures that the timer behaves properly on ssvirch-an [which is far from being something to be token for granted with many versions of the 5 55 or 556 dual timer). Reed switches have several special char- acteristics that must be kept in mind when fitting them. The contact blades, which are made from a ferromagnetic material, assume opposite magnetic polarities under the influence of a magnetic field and attract each other. Here ihe position ond orientation of the magnet, the dis- tance between the magnet and the reed 76 eleklor dKfronlrs - 7-S/20D5 sv/itch r and me direction of motion of the magnet relative to the switch are impor- tant factors. The fragility or the glass hous- ing and the thermal stress from soldering (stay at least 3 mm away from the glass housing] require a heat sink to be used between the soldering point and the glass/metal seal. A suitable tweezers or flat-jawed pliers con be used far this pur- pose. if you need to bend the leads, use flat-jawed pliers to protect the glass/metal seal against mechanical stresses. Matching magnets in various sizes are available from toy merchants and elec- tronics mail-order firms. They should preferably be fitted underneath the loco- motive or carriage. However, She magnet can also be fitted on the side of o vehicle with a plastic body. In this case the reed switch can be hidden in a mast, bridge column or similar structure or placed in a tunnel, since the distance must be kept to iess than around 10 mm, even with a strong magnet. If fitting the circuit still pres- ents problems (especially with Mark! in Z- gauge Mini-Club) r one remedy is to gen- erate the trigger using a unicotar digital Hal! switch r such as the Siemens TIE 4 90 51 or Allegro UGN3120. To ovoid coupled-in interference, the stop timer should be fitted relatively close to the Hall sensor (use screened cable if nec- essary). Pay attention to the polarity of the magnet when fitting it to the bottom of the vehicle. With both types of sensors, the South pole must point toward the front face of ihe Holl 1C [the face with the type marking). The North pole is sometimes marked by □ dab of paint. Generally speaking, the polarity must be determined experimentally. Fitting the circuit is not a problem with Z- gauge and 1 -gauge tracks, since the dis- tance between the iron parts (rails) and ihe Hall switch is sufficiently large. In an HO system, some modifications must be made to the track bed of the Marktin metal track, Cuf a suitably sized window 1 between one wheel rail and the centre rail in order to prevent secondary mag- netic circuits from interfering with the operation of the sensor. Keep the distance between the magnet and the case of the Hall switch between 5 and 10 mm, depending on the strength of the magnet, to ensure reliable actuation. y±y.~.3^. Transformerless 5 -volt Power Supply Srd jan Jankovic and Branko Mifovonovic An increasing number of appliances draw a very small current from the power supply. If you need to design a mains- powered device, you could generally choose between □ linear and o switch- mods power supply. However, what if the appliance's total power consumption is very small? Transformer-based power sup- plies are bulky, white the switchers are generally made to provide greater current output, with a significant increase in com- plexity, problems involving PCB layout and, inherently, reduced reliability. Is it possible to create a simple, minimum- part-counr mains (230 VAC primary) power supply, without transformers or coils, capable of delivering about 1 00 mA at, say, 5 V? A general approach could be to employ a highly inefficient stabilizer that would rectify AC and, utilizing a zener diode to provide a 5.1 V output, dissipate all the excess from 5.1 Vto (230 xv 2) volts in a resis- tor. Even if the load would require only about 10 mA, the loss would be approx- imately 3 watts, so a significant heal dis- sipation would occur even for such a small power consumption. At 100 mA, the useless dissipation would go over 30 W, making this scheme completely unacceptable. Power conversion effi- ciency is not a major consideration here; CAUTION The circuit is not galvanically isolated from the mains. Touching any pur! of the circuit (of any circuitry it supplies power to) while m operation, is dangerous and can result in m electric shock! This circuit should not he built or used by individuals without proper knowledge of mains voltage procedures. Neither the authors nor Eiektor Electronics magazine con he held responsible for any harm or injury resulting from use, or mabiiity to use, the information presented in this article. instead, the basic problem is how to reduce heavy dissipation and protect the components from burning out. The circuit shown here is one of the sim- plest ways to achieve the above gaols in practice. A JVR varistor is used for over- voltage/surge protection. Voltage divider R1-R2 follows the rectified 230 V and, when it is high enough, T1 turns on and T3 cannot conduct. When the rectified voltage drops, T 1 turns off and T3 starts to conduct current into ihe reser- voir capacitor C 1 . The interception point (the moment when T1 turns off) is set by PI (usually set to about 3k3), which con- trols the total output current capacity of the power supply: reducing PI makes T1 7 - 8/2005 - eiektor dedpiuB 77 react later, stopping 13 later, so more current is supplied but with increased heat dissipation. Components T2 R3 and C2 Farm a typical J soft start' circuit to reduce current spikes — this is necessary in order to limit Cl's charging current when the power supply is initially turned on. At a given setting of PI, the output current through R5 is constant. Thus, food R4 takes as much current as it requires, white the rest goes through a zener diode, D5. Knowing the maximum current drown by the ioad allows adjust- ing PI to such a value as to provide a total current through R 5 just 5 to 6 mA over the maximum required by the load. In this way, unnecessary dissipation is much reduced, with zener stabilization function preserved. Zener diode D5 also protects C 1 from overvoltages, thus enabling le use of low-cost 16 V elec- trolytics. The current Row through R5 and D5, even when the lead is disconnected, prevents 13 s gate-source voltage from rising too much and causing damage to device, in addition, TI need not be a high-voltage transistor but its current gain should exceed 120 (e.g. BC546B, or even BC547C can be used). Te: : ephoine Lfitne Indicator Flemming Jensen C 240 i G - 11 IF, for some reason, you wish to chong Many busy indicators For use in tele- phone systems present undesirable load- ing of the telephone line. Some circuits are very simple Indeed to the extent of only loading the line when It is not in use. The downside is that a (usually green) LED lights when the line Is no/ occupied. The author feels that o LED should Rash when the line is actually in use by another exten- sion and that the circuit should present o minimal Scad or she line. The circuit shown here fulfills both requirements. We should however not forget to mention its only drawback: its needs to be powered from a battery or on energy -friendly battery elim- inator [a.k.a. wall cube or mains adapter}. IF a higbefficiency LED Is used then the cur- rent drain from the 9-volt supply will be so small that a standard (170-mAh) 9-V PP3 battery will last For months. Considering that the LED is powered at current of 2 mA by II r theoretically some 85 hours of 'LED an' time can be obtained. the Rash frequency or on/off ratio (duty cycle) then do feel tree to experiment with the values and rotio of R1 and R2. The effect will also depend an the brand oF the 4093 1C, its exact logic High/Low switching thresholds and hysteresis. The circuit is nor approved to BABT standards for connection to the public switched telephone net- work (PSTN)* Please check local/ national regulations. PC GsTM Luc Lemmens Many PC motherboards ; perhaps most of them in fact) are fitted with o connector for on Infrared communication port. That connector is generally not used, since IrDA never became truly successful and has probably already seen its best days. Still, quire □ few modern devices that can use this link to communicate with a PC are available, including printers, PDAs, mobile phones, and laptops. However, the link between the above-mentioned connector on the motherboard and the outside world, the IrDA interface, is not supplied with any motherboard and is usually not available in computer shops as an accessary. Fortunately, the necessary hardware is quite simple and most solder artists should find it dead easy to build if as a point-to-point' construction. Selection of the IrDA 1C is not critical, and just any about any type is suitable. However, you should check the size of the module when making your purchase,, because quite a few types ore so small that 78 clektsr efetlroflitt - 7-B/2D05 ■5 text K 1 ■O O- <3 a — G O' — -O t> — — -Q 0 - “ e to ci ic*0n [Cl p[p^ Hihar A. - zT’^e: ISC AGC 1 LOjJiC f Open Dnv?f :4 : . 1 1 they're difficutr fo solder. Noturally, ihe inter Face must be able to see outside, and it should preferably be fitted at ihe front of the computer. A cover plate for a free floppy-disk or CD drive bay is quite suitable for this purpose. IPs easy to remove from the cose, and It should be easy to make a neat opening in it for the interface. The connection to the motherboard is another story. Unfortunately, the mother* board manufacturers never agreed on a standard for this. That means youll have to consult your user s manual, and if that documentation Is no longer to be found, the manufacturers website can remedy the situation in 99% of the cases, since most manuals are available as downloads. Be careful: a mistake in the connection can cause serious damage to the mother- board., so check everything thoroughly and carefully before switching on the PC. The next step is to check the BIOS settings of the PC (to verify that the IrDA port is enabled) and install the drivers. Who! this involves varies from one PC to the next, and it also depends on the operating sys- tem, so there's no single recipe for it. If you aren't keen on figuring oil this out for yourself, you con try searching the Inter- net. A highly suitable site is www.infrara^ port.de, which clearly explains in Ger- man and English what you have to do and has all sorts of settings, drivers and patches, including supplementary expla- nations and experience with various types of motherboards. That's often what takes the most time in getting this serial inter- face to start talking. . 44 :: Carriage Detection for Model Railway Karel Walraven Model railway builders know oil about this: it is a troublesome job to get a block system to function properly. We present here a simple, reliable and cheap solu- tion on how to fit resistors between insu- lated wheels, as is used with the two-rail systems that operate a block detection sys- tem based on current consumption. A block, in this cose, is an isolated sec- tion of rail. It is considered occupied if a load is detected. The locomotive usually has at least some current consumption, even if it h just for the lights. Digital loco motives with o decoder always consume a Few milliamps, which is also sufficient for detection. To be able to defect the rolling stock, o little more effort is required. When a single carriage is accidentally left behind in a block, the defector has to be able fo sense this and indicate the block os occupied. In order fo achieve this, all axles of all carriages have to be fi^ ted with a small resistor, so that a small current can How. Carriages with internal lighting have addi- tional sliding contacts (on the wheels) and a small lomp or LED as load. However, it is much too complicated to Fit ail car- riages with additional sliding contacts. That is why if is usual for a resistor to be placed across the plastic insulating sleeve. One of the wheels is isolated with respect to the axle, otherwise the wheels would short circuit the roils. This is, of course, not the intention with o two-rail system. Axles with resistors are available read-made but are somewhat expensive. Usually an SMD or I /8-W type resistor is used, with o value ranging from about 4k7 to 10k. ft is mechanically mounted with a little (epoxy) glue and the actual electrical connection is made with conduc- tive glue (often containing silver particles}. This will usually last for years, but regular inspection Is required if carriages are sub- ject to rough handling. In addition, conduc- tive glue is expensive, nor always available and dries out after a while. We consider the following □ better method: grab the axle with small pliers and care- fully pull of the isolated wheel from the axle. Also remove the insulating sleeve. Cut a two cm piece of thin hook up wire and remove the individual strands. They have fo be fhin r no more than about 0. 1 mm. Put the wheel back on, but now with a 0. 1 -mm wire between axle and sleeve and appo- site that a 0. l-mm wire between sleeve and wheel. You now have created two connec- tions, With a little bit of dexterity you can 74, 2005 - elckfor elsct ranks 79 solder o resistor to those wires. Firs! prac- tise o litfie on □ Few eld axles, the example in the pictures isn't the newest model either! Don t forget to glue the resistor for AM and DRM Burkhart! Romka Is it possible to make a short-wave regen* erotive valve receiver so stable that it is even suitable for DRM? And is it possible to do this using a 6-V supply, so only a sin- gle voltage is necessary for the filament and anode supply? It looks like it might be possible with an EL95, which has good transconductance even at law anode volt* ages, although jt is actually an output- stage pentode instead of an RF valve. Besides that, it draws only a modest 200 mA of heater current. Everything can be operated from a small battery, which eliminates any problems with 50-Hz hum. The stability depends entirely on the tuned circuit. Consequently, a robust coil with 20 turns of 1.5 -mm wire was wound on a PVC pipe with a diameter of 18 mm. With short leads to the air-dielectric vari- able capacitor, this yields an unloaded Q factor considerably larger than 300. The schematic shows o regenerative receiver with feedback via the cathode. The amount of feedback is adjusted using the screen grid voltage. The audio signal across the anode resistor is coupled out via □ capacitor. No additional gain is Karel Walraven After buying a number of DECT tele- phones, we noticed that these became quite warm while charging. That surprised us, because the manufacturer wrote in the manual that the batteries had to be down, otherwise the thin wires will cer- tainly break after o short time. It is also possible to first solder the wires an an 5MD resistor and then reassemble the axle. Do it 'whichever way you personally find the easiest. Short-Wave Regenerative Receiver necessary, since the voltage level is suffi- cient for a direct connection to the Line input af a PC sound card. A screened cable should be used for this connection. A two-turn antenna coil is located af the bottom end of the tuned circuit. It provides very loose coupling to the antenna, which is important for good stability. Now it's time io see how it works in prac- tice. Despite the open construction, the fre- quency drift is less than 1 Hz per minute. That's the way it should be if you want to receive DRM. Quite strong feedback should be used, so the regenerative cir- cuit acts like a direct mixer or o self-oscil- lating mixer stage. Every strong DRM signal could be seen using DREAM and tuned to 12 kHz. A total of six different DRM frequencies could be received in the 40-m and 41-m bands. If no good DRM stations are avail- able, the receiver can also pick up AM transmitters. In this case, the amount af feedback should be reduced. The PC con be set aside for A/A reception, since all you need is a direct connection to an active PC speaker, J5C1CS-I Improved DECT Battery Charger charged for 14 hours. That would lead you to conclude that the batteries are charged af of the nominal capac- ity. But we had the feeling that the batter- ies were gening rather warm for such a small charging current. That is why we quickly reached for a screwdriver and explored the innards of the charging sta- tion. The accompanying schematic reveals what is going on. The batteries are 'simply' charged from a 9-V mains adopter. In series with the out- put are a diode and o resistor. A quick calculation shows that a current of about 80 efeklor electronics - 7*8/2005 1 60 mA will flow and mis v/as indeed She case when measured with a multimeter. Thai means that, far the AAA cells used here, rated at 650 mAh, She charging cur- rent isn't Vio C but Vi Cl This is rather high and certainly not goad for the life expectancy of the batteries. The remedy is simple: increase the value of the 25 Q series resistor so that the charging current will be less. We chose a value of 68 fl, resulting in a charging current of about 60 mA, You may ask what the purpose of the remainder of the circuit it. This is all required to turn on the LED which indi- cates when charging is taking place. Dur- ing charging, there is o voltage drop of about 4 V across R1 . II will ihen receive base current via R2 and the LED turns on. The resistor in series with the LED limits the LED current. The fact that the batteries are charged with an unregulated supply is no! such a problem. The mains voltage will vary +9V somewhat, but with a maintenance charge such as in this application it is not necessary to charge with an accurate constant current, provided that the current is not too high. For the curious, here is ihe calculation for the charging resistor: three cells are being charged. The charging voltage of a NiMH cell is about 1.4 V, The voltage drop across DI is about 0,7 V. That leaves a voltage across the resistor of: ^Timins adapter ” ^ ^ batter i^i — ^-^diods ” 4.1 V Therefore, there flows o current of 4. 1/25 = 1 64 mA. 1:800 Oscitficator Bernd Oehlerking Oscillators ore ten a penny, but this one has something special. Its frequency can be adjusted over a range of 800:1, it is voltage controlled, and it switches off automatically if the control voltage is less than approximately 0,6 V. As can be seen from the chart, the char- acteristic curve f = r(Uej Is approximately logarithmic. If the input voltage is less than 0.7 V, T1 and T3 are cut off. The capaci- tor then charges via the 1 Q-feW resistor The combination of the capacitor, the two Schmitt triggers and T2 form the actual oscillator circuit. However, T2 cannot dis- charge ihe capacitor, because T3 is cut off. In this store, a lav/ level is present at A 1 and a high level is present at A2. If the input voltage is increased, 13 starts con- ducting, This allows the capacitor fa be discharged via T2 r and the circuit starts to oscillate. If Ue is further increased, the capacitor receives an additional charging current via T1 and the 100-Q resistor. That causes the oscillator frequency ro increase. In situations where the duty cycle of the output signal is nai important (such as when the circuit is used as a dock gener- ator), this circuit can be used as a voltage- controlled oscillator (VCO) with a large frequency range and shutdown capability. 7-8/2005- eld, tor dfttrMia 81 MP3 Adapter for TV Ton Giesberfs Nowadays there are many ways in which you can listen to music. A portable MP3 player with headphones is often used while on the move. But when you need to stay in a hotel and would like to listen without headphones to your Favourite music in your hotel room, things become more difficult. Most hotel rooms have a TV, but rarely o music centre. We have designed a fairly compact adapter that lets you connect an MP3 player [or any other portable device} to the SCAR! socket of a TV. It is obvious that this will only work if the TV has a SCART socket! The board directly feeds the headphone signals to the correct SCART pins. If the TV only has mono sound, then the left input signal is probably used. The connec- t i o n between the adapter and TV is made with a SCART cable. It is best to moke your own lead for the connec- tion of the headphone signals. There are three pins on the board for the signal connections (L R ond ground). Unfortunately this alone is not enough in practice. Most TVs expect a correct video signal on an external connection; other- wise the input is turned off i muted). To get ki 82 efektor electronks - 7-8/2005 round this problem we used a program* mable logic device [ICl. an EPM7064 made by AfleraJ to generate a video sync signal. More detailed information can be found in the sync generator article else- where in this issue. It is sufficient to siafe that this 1C generates o sync signal according to the PAL/SECAM specifica- tion, Several outputs are conceded in par- allel to give a stronger output signal. Potential divider R5/R6 produces a sig- nal that is slightly bigger than a normal video signal [normally 30% of I V pp into 75 Q). The signal is now a bit under 0.5 Vpp info 75 Q. The output impedance of R5/R6 is /5 a which reduces reflec- tions should the cable be incorrectly ter- minated. ISP connector K2 has been included far those of you who would like to experiment with this circuit (see www.alterQ.com)* The TV can be automatically switched to an external source using ihe video-status signal (pin 8), Modern widescreen TVs use this signal to switch between two dis- play modes. A voltage between 9.5 and 12 V results in a 4:3 display and a volt- age between 4.5 and 7 V switches to a widescreen format. Jumper JP1 can be used to control this function of the TV. Far older TVs the jumper should be in the 4:3 position. In oil cases the display remains dark though, A supply voltage is required for IC1 as well as ihe video-status signal. This is pro- vided by a mains adapter with a sta- bilised 1 2 V output, preferably a modern switch -mode supply. Voltage regulator 1C2 provides a stable 5 V to JC1 and K2. LED D1 indicates that the circuit is powered up. The current consumption is mainly determined by 1C! and is about 80 mA. COMPONENTS LIST Resistors: R1 ,R2 = lkD E3,R4 = 2k!22 R5 = 270_Q R6 r R7 - 1 0011 R3 = IGOkQ R9 = 3kH3 Capacitors: Cl ,C2 = 22pF C3-C/ - 1 OOnF ceramic, lead pitch 5mm C8,C9 - 1 GliF 63V radial CIO -220uF 25V radial Inductor: LI = ] QllH Semiconductors: Dl = LED low-current 02 - I NA 002 iCl = EPM7064SLC44-10 PLC44 with socket [programmed. Publisher's order cade 054035*31 -) IC2 - 7805 Miscellaneous: JP1 - 3-way SIL header with jumper K1 = SC ART socket {female), PCB mount, angled •K2 = 0-way boxheader XI = 1 DM Hz q ear iz crystal PCS. Publisher's order code 054035-1 * Disk EPM7064 code : Publisher's order code 054035-1 1 * or Free Download T ' See Elektor SHOP pages or www. elekfo r-e [ ec fro n s cs .t a. u k Sola -powered SLA Battery Maintenance Myo Min This circuit was designed to 'baby-sit 1 SLA (sealed bad-acid or gel') batteries using freely available solar power. SLA baifer- ies suffer from relatively high infernal energy loss which is not normally a prob- lem until you go on holidays and discon- nect them from their trickle current charger. In some cases, the absence of trickle charging current may cause SLA batteries to go completely flat within o few weeks. The circuit shown here is intended to prevent this from happening. Two 3-volf solar panels, each shunted by a diode to bypass them when no elec- tricity is generated, power a MAX762 step-up voltage converter 1C. The '762 is the 15-volr-out version of ihe perhaps more familiar MAX761 [12 V out] and is used here to boost 6 V to 15 V. Cl and C2 are decoupling capacitors that suppress high ond low frequency spuri- ous components produced by the switch- mode regulator 1C Using Schottky diode D3 energy is stored in inductor LI in the form of a magnetic field. When pin 7 of ICl is open-circuited by the internal switching signal, the stored energy is diverted to the 15-volt output of the cir- cuit. The V-r {sense) input of the MAX762, pin B f is used to maintain the output voltage at 15 V. C4 and C5 serve to keep the ripple on the output voltage as small as possible* R 1 , LED D4 ond pushbutton SI allow you to check the 7-8/2005 - eiektar cferiror E to 33 presence or the 15-V output voltage. D5 □ no D6 reduce the 15-volts to about 13.6 V which is a frequently quoted nominal standby trickle charging voltage for SLA batteries. This corresponds well with the 1C s maximum, internally limited, output current of about ] 20 mA. The value of inductor 11 is not critical — 22 liH or 47 uH will also work fine. The coil has to be rated at 1 A though in view of the peak current through it. The switching frequency is about 300 kHz. A suggestion for a practical coil is type M from the WEPD series supplied by Wurth bvww.we-online.com). Remarkably, Wurth supply one-off inductors to individ- ual customers. At the time of writing, it ■vas possible, under certain conditions, D3 UF4D02 to obtain samples, or order small quanti- Maxim website at www.maxim-ic.com. ties, of the MAX762 1C through the :-;v- Gregor Klelne A window comparator that monitors whether its input voltage Uin lies within a defined voltage window can he built using only a tew components. The circuit shown in Figure 1 is a ver- sion that operates with complementary supply voltages. Two diode pairs are con- nected across the inputs of the comparator ;C and supplied with bios currents via R1 and R2. If the input of the circuit is open, the current flowing through diode pair D2a and D2b (whose common terminal is connected to ground) causes the invert- ing input of the comparator to be at +0.7 V and the non-inverting input to be at “0.7 V. The comparator output is thus at the “Ufc level, since the differential volt- age at the comparator input is negative. The differential voltage is equal to the volt- age on the non-inverting input minus the voltage on the inverting input. If a positive input voltage is applied, diode Dlb conducts and the voltage on the nan-inverting input rises. This voltage [S always 0.7 V lower than the input volt- age. Diode D2b is cut off if ihe input volt- age is positive. If the voltage at ihe circuit input rises to somewhat more than +1 -4 V the voltage on ihe non-inverting input will be slightly higher than the voltage an the inverting input, which is held to 0.7 V. The differential voltage between the comparator inputs will thus be posi- tive, and ihe comparator output will switch to the +11^ level. Simple Window domparcsfor 84 elikloi ebrtronics - 7-8/2005 The behaviour of the circuit is similar with a negative input voltage, with the differ- ence being that ihe roles of the two diodes are swapped. In this case, the non-inverting input of the comparator remains a r -0.7 V. If the input voltage drops below -1 .4 V r ihe differential volt- age between the comparator inputs again becomes positive, and the comparator output again switches to the +U^ level. Note that ihe Low" output level of ihe win- dow comparator is -life instead of ground, due to the complementary supply voltages. A version of the window comparator that works with a single supply voltage can be implemented by tying the common termi- nal of the diodes to a freely selectable intermediate voltage. The schematic dia- gram for such an arrangement is shown in Figure 2, where opamp 1C2 acts as a low-impedance source of reference volt- age U center . The voltage at the centre of the window can be adjusted to the desired value using the trimpot. The width of the voltage window is deter- mined by the diodes done and amounts to twice the forward voltage drop (0.7 V] of a single diode. The width of the window can easily be enlarged by connecting additional diodes in series wish D1 and D2. That can be done symmetrically, but it can also be done asymmetrically, such as by only wiring an additional diode in series with each of D 1 b and D2b. In the latter case, the window will not be sym- melric about voltage U CEnter (LL en _ re . ± 0.7 V), but will instead extend from ^center - 0.7 V to U cenfer + 1 .4 V, The circuit works with practically any type of comparator, such as the familiar LM399 or LF399 (low-power) quad com- parator 1C with supply voltages between =2 V and 8 V, IC2 in Figure 2 must be a raiko-rail type (such as the IM7301) that is rated for the same supply voltage range as ihe comparator. '4-; Simple Stepper iver Paul Goossens There is hardly any field in the world of electro-mechanics that has not found an application for the stepper motor They are used extensively in the world of model making and as actuators in remote con- trol equipment. In industry, picture scan- ners and printers are probably ihe most obvious devices that simply would not function without them, so no excuse is needed to include this very simple 4- phase stepper motor driver design in this collection of circuits. The circuit clack gen- erator is formed From two exclusive OR (XOR) gates 3C2A and IC2B together with Cl and PK A logic '0' on the ENA8LE input enables the clock generator and its output frequency is defined by: 1.4 PI Cl The output signal from the clock genera- tor is connected to the clock inputs of the two D-type flip-flops IC1.A and 1C KB. These two Rip flops are connected together In a ring to form a 2-bit shift reg- ister so that the Q output of IC1 .B is fed bock to the D input of 1C 1 .A and the Q output at 1C 1 .A is fed into ihe D input of 1C! .8. This configuration supplies the 4 phase impulses necessary to provide motor rotation. When the DIRECTION input is changed to logic zero 1C2C and IC2D operate as nominverfing gates, reversing the phase sequence of the out- put signals and making the motor spin in the opposite direction. The actual rotation direction will depend on the sense or the motor windings. ,5 IC3.B =1 - £ -1 ici JCt =4013 IC2 = 4030 Hi fb o i !> t y 0 ; < > c i c i i jJ K2 K3 jy P9 9] Suable m \Bcmoto Oo Oo + 12Vf7\ +U, C & i KO:*3 - tl Swapping the outer two coil connections on one of the windings will reverse ihe direction if this is necessary. With ihe components specified ihe circuit oscillates at a frequency of 10 Hz. The clack frequency can be adjusted between 0.2 and 100 Hz by substituting different values for PI and Cl. It is important io ensure that power drawn by the stepper motor is within the power handling capa- bility of the driver transistors Tl to T4. Diodes Di to D4 ore necessary to con- duct owoy the back-EMF produced each time a drive impulse to each of the motor coils is switched off. 7-B/20D5 - ekkta t Kdronks 35 Extension for U^o Charger The Simple Li Po Charger published in Elektor Electronics April 2005 is a small and handy circuit that allows you to quickly charge two or three UPo cells. Especially in the model construction world are UPo batteries used a lot these days, particularly model aeroplanes. It is usual to use a series connection of three cells with these models. Since working with these model aeroplanes usually happens in the Held, if would be nice if the batter- ies could be charged from o car battery. We therefore designed a voltage con- verter far the UPo charger concerned, which makes if passible to charge three cells in series. The voltage per cell increases while charging to a value of about 4.2 V r which gives a total voltage of 1 2.6 V. The converter, therefore, raises the j 2-V voltage from the car battery to 1 6.5 V, from which the LEPo charger can be powered, A step-up controller type WAX 1771 in combination with an external FET carries out the voltage conversion. The 1C oper- ates at a moderately high switching fre- quency of up to 300 kHz which means that quite a small coil can be used. Because the 1C uses pulse frequency mod- ulation (PFM) it combines the advantages COMPONENTS LIST Resistors: SI - 25 mO (e.g. Digikey # 2FR025- NO) R2 = 1 OGkQ R3 - 1 0k£i Capacitors: Cl C4,C8 = ] QQnF C2 C3 = 47uF 25V radio! C5,C7 - ] 00 uF 25V radial C6 = lOOpF ' Semiconductors: 01 = 31CQQ5 (e.g., Digikey # 31DG05-ND) tCl - MAXI 77 UC PA (e g., Digikey # MAX 1 77 IE PA- ND) 1 1 = (RFU370B (e.g., Digikey # IRFU370S-ND) Miscellaneous: K1,K2 = 2-way PCB terminal block, lead pitch 5mm LI = 47pH high current suppressor coil, (e.g, Digikey # M9839-ND] RGB,, ref. 054012-1 from The FCBShop 86 ebktor efecliDTiks - 7-8/20G5 of pulsewidth modulation (high efficiency at high bad) with very law infernal cur rent consumption (110 aA). The 1C is configured here in the so-called n on-bootstrapped mode, which means that it is powered from the input voltage (12 V). The output voltage is adjusted with voltage divider R2/R3. This can be set fo any required value, provided that the output voltage is greater than the input voltage. Finally, sense resistor R1 determines the maximum output current that the circuit can deliver. With the 25 mil value as indicated, this is 2.5 A. Transistor Dip Meter Burkhard Kalnka The dip meter consists of a tunable RF oscillator whose resonant circuit is held In the vicinity of a resonant circuit to be checked. If the frequencies o: the two cir- cuits match, the circuit being measured draws energy from the oscillator circuit. This con be measured. This type of meter is also called a grid dip meter', since it was originally built using a valve. The amplitude of the voltage on the tuned cir- cuit could be measured from the grid leak- age current. Such meters typically have a set of interchangeable coils and several frequency scales. A meter that can manage with o low volt- age of only 1 .5 V can be built using a cir- cuit with two transistors. In addition, a coil tap Is not required In this design. That makes if easy to connect many different coils fo cover o large number of fre- quency bands. If a sufficiently sensitive moving-coil meter is not available, an acoustic sig- nal can be used instead of a pointer dis- play. This involves a sound generator whose frequency increases when its input voltage rises. A resonance dip is then indicated by a falling tone. This acoustic indicator draws less current from the measurement rectifier than a moving-coil instrument. That allows the amplitude of the oscillation to be decreased slightly by reducing the emit- ter current. This increases the sensitivity, so the dip meter can measure resonant circuits at greater distances. -I.'.’r -. -250Y f . Bi Lt Three-component Li-ion Charger Gregor Kleine The LTC4054 from Linear Technology [wwwJinear-Coml is a very simple device for charging 4.2 V Li-ion batteries. This SMD 1C comes in a five-pin SOT-23 package and needs just two external components (the LED is not absolutely essential): o decoupling capacitor of at least 1 pF and a resistor connected to pin 5 (PROG) to set the charging current. The value of 1.62 kil shown here gives a chorging current I qzu of 600 mA when the device is in constant current mode. The formula •ceil = 1 000 ( v prog/Rprog1 where Vp£ CG = 1 V, gives the charging current in terms of Rp^QG. The device works from a supply voltage of between 4.25 V and 6.5 V and is therefore suitable for connection to a USB part an a computer. To avoid risk of dam- age to the cells, the charging process is divided into three stages. In the first stage, which is brief, a constant power is deliv- ered to the cell. In the next stage a con- stant current is delivered, and the cell volt- age rises linearly. Finally the devices 7-E ‘2005 - stator eledronlts 87 switches Jo a constant voltage mode, and the current drops off sharply. The LTC 4 05 4 goes into a high-impedance state when the input voltage foils below a set value to ensure that the battery does not get discharged. The CHARGE pin [pin 1 ] indicates the charging state. It is on open drain output which is pulled down to ground via a low impedance during charging, allowing an LED to be con- nected. The pin sinks approximately 20 pA to ground when the Lt-ion celt volt- age is between 2,9 V and 4.05 V: this is the standby state. If the cell voltage foils below 2.9 V, the LTC4054 begins charg- ing again, CHARGE goes into a high- impedance state if the input voltage is not at least 100 mV higher than the cell volt- -4V5,„*6V5 a = Constant Power b^ Constant Current c — Constant Voltage 0*5019 - 12 age. I he underwoltage lockout circuit is drawn from the cell. then activated, with fess than 2 pA being (l^hs-d iRM Double uperhet Receiver EF95/6AK5 f Using an EF95/6AK5 Burkhard Kainka This receiver arose from the desire to demonstrate that valves are fully capable c £ ho' ding their ov/n against modern semi- conductor devices. Valves often have bet- ter large-signal characteristics and less noise. The decisive difference is that the circuit must be designed with higher input and output impedances. This circuit is built using four EF95 (US equivalent: 6AK5) valves, since this type of valve is small and has proved to operate well with low onode voltages. All Fouf heaters are connected in series and oper- ated from a 24-V supply. That makes it attractive to use the some supply tor the anode voltage. The achievable gain is Fully adequate. The receiver is designed for the RTL DRM channel at 6095 kHz. It consists of two +24 V mixer stages with two crystal oscillators. A steep-edged ceramic filter (type CFW455F] with a bandwidth of 1 2 kHz provides good IF selectivity. Thanks to the high-impedance design of the circuit, the valves achieve a good overall gain level. The receiver performance is comparable to that of the Elektor Electronics DRM receiver design published in the March 2004 issue, ana it can even surpass the performance or the latter circuit with a short antenna, since the tuned input circuit elektor electronics - 7-B/200S 38 allows better matching to be obtained. The key difficulty Is obtaining a suitable crystal with a frequency of 6550 kHz. Old-style FT243 crystals with exactly this frequency ore available from American army radio units. However, it takes o bit of luck to obtain a crystal with exactly the right frequency. It's also possible to use a standard crystal with a frequency of 6553.6 kHz, which yields an IF that is 3.6 kHz too high. However, that should' n't be a problem if a relatively wide-band- w idlh ceramic filter Is used. One possibil- ity is the CFW455C, which has a band- width of 25 kHz. If the frequency of the second crystal oscillator remains unchanged, the DRM baseband signal will appear at around 9 kHz, approxi- mately 3 kHz below the nominal value. Nevertheless, the signal can easily be decoded by the DREAM software, since it does not depend on the signal being at 12 kHz. Another possibility would be to use ihe programmable crystal oscillator design published in the March 2005 issue of Elektor Electronics . Simulator for Srid Measurements Bernd Schaedler The arrangement of resistors shown here can be used to test bridge amplifiers with differential inputs. Such amplifiers are used in conjunction with strain gauges, for example, or In measuring inductances or capacitances. Because of their symmet- rica construction, bridges allow the tini- est variations In the quantity in question (for example, resistance] to be amplified without resorting to complex compensa- tion techniques. The circuit here simulates small variations in one of the resistors that forms the bridge, as happens in the example of strain gauges. Since only standard metal film resistors are used, it is suitable only for general testing of the connected amplifier. Strain gauges typically have a sensitivity of 2 mV/V. This means that if the supply voltage to the bridge is 1 0 V, the maximum variation in differential volt- age taken from the bridge to the differen- tial amplifier is 20 mV. The resistance of this circuit is rather greater than the 350 Q typical of strain gouges, but in practice this is not important. Calibrating the bridge simulator Ensure that the power supply voltages con- nected to the positive and negative supply inputs have exactly equal magnitude [+5.000 V and -5.000 V). Now connect o voltmeter between the negative output ond ground and adjust PI so that the meter reads as dose to 0 mV as possible. Now connect ihe voltmeter across the two outputs and set Si to "0 %\ Adjust P2 until the voltmeter reads as dose to 0 mV as possible. Finally, switch 51 to the '25 % r , '50 %\ 75 "b and 100 %' positions in turn and adjust the corresponding trimmer poten- tiometers P4 to P7 to obtain voltages of 5 mV, 10 mV, 1 5 mV and 20 mV res pec- variable +/- ir9V tively, with ihe voltmeter still connected between the positive and negative outputs. Once this calibration process has been carried out, you can now simulate a vary- ing bridge resistance by switching 51 with a differential amplifier connected across the positive and negative outputs. if the variable c-uipul is used instead of the positive output, the voltage can be varied continuously over ihe full positive and neg- ative range using potentiometer P3. Switch 52 allows the polarity of the sup™ ply voltage to be reversed. :c :cr-3- 1 7-8/2005- dektor electron its 89 Zorislov Mil jak The unusual feature of this code lock is that it con be operated with just one push- button. In situations where a tamper-prcof solution is required this circuit has a great financial advantage; only one robust pushbutton needs io be bought The dis- advantage of this solution is ihai It takes a little longer to enter the code. The operation of the code lock is as Fol- lows. After pressing the button, the PIC1 6F84 starts to count at □ rote of one hertz. The numbers are visible on the LED display. The button is released once the correct number is displayed* This operation is repeated for the other digits in the cade. The time between releasing the button and pressing it again for the next digit may not be more than 15 seconds. After the last digit, the fetter E (Enter) needs to be entered Jf the entered code is incorrect, the display will show an F (Fault) for 15 sec- COMPONENTS LIST Resistors; R1-R8, Rll = IkD R9 = 100Q RIG = 6kQ8 Capacitors; Cl - 1 00 nF Semiconductors: Di = LED, green, tow-cur rent D2 = 1N4J48 iCl = PIC16FB4 (programmed, order code 040481-41 'J LD1 = 7-segment display, red, common-anode (e.a. Kinobricrhf 5c56-1 1 SRWAj TI = BC547B Miscellaneous: j P 1 = 3 -way 5 1 L pinhea der wt! h jumper K1 = 3-way PCB terminal block. iead pitch 5mm Rel = relay. 5 V coil, (e.g. Omron G6A-234P-ST-U5DC5) S 1 = switch, 1 moke contact, tamper w r h pro or (see text] XI = 4MHz ceramic resonator PCS, ref. 040481-1 from The FCBShop Disk, source and hex code, order code 040481-1 1 * * see Elektor SHOP pages or w wv, elekfor-elecironics.co.uk 90 elektor elettnmKs - 7-8/2005 ends. If ihe code has been entered incor- redly three times in a row, the lock will block further input for 1 minute. During this time the display shows c flashing Th To otter fhe code, if is necessary to hold the button until the letter 'C appears (Change code). The display subsequently shows an o (Old code). Now enter the {valid) old cade, followed by an ET The PIC now asks for the new code by dis- playing an n [New cede]. Now enter fhe new code, also followed by ET The display now shows V (Confirm). Repeat entry of fhe new code [and once again an E as confirmaiion). The cede is now changed. A maximum of 1 0 digits can be used far fhe code. JP1 is used fo set whether fhe relay is energised or de-energised when the cor- rect code has been entered. You can use a standard 5-V regulated mains adapter far the power supply. LED Flasher for 230 V Matthias Haselberger The small circuit shown here could act as a power indicator for fhe 230 V mains supply and in terms of efficiency is the equal of classical neon bulbs. Nate first that the LED in this circuit flashes rather than lighting continuously, and is there- fore also suitable for applications where a flashing light is wanted tor decorative purposes or as a gimmick. Diode D1 rectifies the input voltage, and C 1 is charged by the rectified mains volt- age via R1 . When, offer a number of half- cycles of the mains, the voltage on Cl exceeds the breakover voltage of the diac D2, fhe diac conducts ana Cl discharges via R2 and light-emitting diode D3. This discharge results In a brief flash of light. A 470 jjF/40 V capacitor is suitable for Cl. For the diode a 1N4004 can be used, and R1 should have a value of 33 kQ, be rated at 0.6 W and be suit- able for use at 350 V. As an alternative, the value of 33 kQ can be made up from two [or more) resistors wired in series: for L Dl ©— M — 1 1 N 4004 ~lfi] Eil viVMi - 11 D1 © — M 1K40O4 2x JH414S 1 N ©" OS0315- 12 Caution: high voltage This circuit is connected directly to the mains, and it is therefore dangerous to touch any port of if* This goes for the LED itself as well. It is absolutely essential to build the circuit in m insulating touthproof plastic enclosure; see also the safely advice pages* example, 1 5 kQ -r 18 kQ or 2 x 1 0 kQ and I x 12 kQ. R2 should be 390 Q, The firing voltage of the diac should be 30 V. Using these values the LED flashes for 0.3 s every second. .... ; On-demand WC Fan Ton Giesberts in most WCs with an extractor the fan is connected to the lighting circuit and is switched on and ofr either in sympathy with the light or with a short delay. Since toilets are sometimes used for washing the hands or just for a quick look in ihe mir- ror, it is not always necessary to change the air In the smallest room in the house. The following circuit automatically deter- mines whether there really is any need to run the fan and reacts appropriately. No odour sensor is needed: we just employ o small contact that detects when ond for how long the toilet seat lid is lifted. IF the seat lid is left up for at least some preset- table minimum time t, , ihe fan is set run- ning far another presettable time * 2 - In the example shawm the contact h made using a small magnet on the lid and a reed switch mounted on the cistern. The rest is straightforward: 1C 2, the familiar 555 , forms a timer whose period can be adjusted up to approximately 10 to 12 minutes using P2. This determines the fan running time. There ore three CMOS 7-8/2005 - eh Suer ek ft ranks 91 +12V dosed shortly afterwards, before Cl has NAMD gates [type 4093] between the reed switch and the timer input which generate the required trigger signal When the lid is in the up' position the reed switch is closed. Capacitor Cl charges through PI until it reaches the point where the output or 1C la switches from logic I to logic 0. The output of 1C 1 b then gees to logic 1 * The edge of the 0-1 transition, passed through the RC network formed by C2 and R2, results in the out- put of 1C 1 c going to logic 0 for a second. This is taken to the trigger input on pin 2 of timer IC2, which in turn switches on the relay which causes the tan to run for the period of time determined by P2. The circuit is powered from a small trans- former with a secondary winding deliver- ing between approximately 8 V and 1 0 V. Do not forget to include □ suitable fuse on the primary side. The circuit around 1C lb and 1C 1 c ensures that the ran does not run continuously if the toilet seat lid is left up for an extended period. The time constant of PI and Cl is set so that the fan does not run as a result of lavatorial transactions of a more minor nature r where ihe lid is opened and then a chance to charge sufficiently to trigger the circuit. :5:05c -i Simple Micrc Preamplifier +Ub for Radio Amateurs Ludwig Libertin The technical demands on microphones used with radio equipment ore not strin- gent in terms of sound quality: a fre- quency response from around 50 Hz to 5 kHz is entirely adequate for speech. For fixed CB use or for radio amateurs sensi- tivity is a more important criterion, so that goad intelligibility con be achieved with- out always having to hold fhe microphone directly under your nose. Good micro- phones with extra built-in amplifiers con be bought, but, with the addition of o small preamplifier, an existing micro- phone will do just as well The project described here uses only a few discrete components and is very undemanding. With o supply voltage of between 1 .5 V and 2 V it draws a current of only about 0.8 mA. If you prefer not to use batteries, the adaptor circuit shown, which uses a 1 0 kQ resistor, three series- connected diodes and two 10 pF elec- trolytic smoothing capacitors, will readily generate fhe required voltage from the 13.8 V supply that is usually available. There is little that need be said about the amplifier itself* Either an ordinary dynamic microphone or a cheaper electret capsule type can be connected to the input. In the latter case a 1 kO resistor needs to be connected between the 1 .5 V supply volt- 92 elektar dcrtionics - 7-8/2QQ5 age and fhe positive input connection. The Impedance of the microphone and of the following stage in the radio apparatus are not of any great importance since the available gain of 32 dB [o factor of 40) is so great that only in rare cases does PI have to be set to its maximum position. With a frequency range from 70 Hz to □bout 7 kHz, low distortion, and small physical size, fhe preamplifier is ideal for retrofitting Into the enclosure of the radio equipment or into the base of a micro- phone stand. In case you are concerned about our somewhat cavalier attitude towards dis- tortion: for speech radio the 'Fi' does not need to be 'hi'. Quite the reverse, in fact: the harmonics involved in a few percent of distortion con actually improve intelli- gibility — it's not a bug , it's a feature/ 9-in-1 Logic Glue / Level Translators Dirk Gehrke Two logic devices from revered Texas Instruments, the SN74AUP1T97 and 98 are logic glue components In tiny 30T23 cases. As shown in the diagrams, both the AUP1T97 and its inverting counter- part the AUP1T98 can be configured os voltage level translators with nine differ- ent logic functions marked by Schmitt trig- ger inputs. Apart from their logic func- tion, these devices can also act os volt- age level translators between low-voltage logic systems, as follows: Nanostar 711 in euf at Vet 0* 0*j 1 .8 V 3.3 V 3.3 V j EISD O Q 2.5 V 3.3 V 3.3 V Vcc 1.8V 3.3 V 2.5 V 2.5 V 2.5 V 2.5 V Qg 00 J l Bottom View) An example of a level translator could be one converting from L8 V LVCMOS to SOT23/SC70 6 c Vcc 4 {Top View) 0501 IM1 3,3 V LVTTL or LVCMOS. The devices, soys Tl, ore tolerant to slow Input transitions and noisy signals. .Etui-: 157: 2- to- J Data Selector /MUX 08: 2-input AND Cate Vcc © 14+00/14+32: 2-lnput OWN AND Gate with One fin verted input Vcc © 1 6 2 $ 3 * Co* A- g- Ed Q'i, j Z M2 5ZZ - 1 6 2 5 3 A A b— A T 5 — ^ h _r != f A — 3 — !_s* U+ 02/14+08: 2-input AND/NOR Gate with One inverted input Vcc 32: 2- in put OR Gate AUP1T98 158: 2-to-l Data Seize tor/MUX with Inverted Output 14+02/14+08: 2-input NOR/AND Gate with One inverted input Vcc 14+00/14+32: 2-lnput N AND/OR Gate with One Inverted Input 02: 2-input NOR Gate 17: Noninvzrted Buffer A-^- j- 1 04/ 14: In verier v K 7-8/2005- elector electronics 93 IJ iii- i versa 1 0/0 for Power Amps Ton Giesberls This two-part circuit was designed as an addition to the Compact 200 W Output Stage in this issue. But it is also suitable for use with 1C amplifiers that don't have their own power-on delay. The circuit consists of an input stage (noth’ mg more than a resistor and capacitor) and a power-on delay with a relay for the amplifier output. A small PCB has been designed for the input signal. This board contains o phono socket, capacitor and a resistor that is con- nected directly across the input. This resis- tor keeps the input side of the capacitor at ground level* !t prevents any offset voltage at the amplifier input from appearing at the input of this circuit when there is no connection. This would otherwise cause a loud bang from the loudspeaker when a connection was mode. We have taken account of the larger size of MKP and MKT capacitors. There are several mount- ing hales on the board to enter for the var- ious sizes of capacitor. The maximum size is 1 8x27.5x3 1 .5 mm (WxHxL). To protect a loudspeaker from a DC off- set during the switch-on period o relay needs to be connected in series that turns on after a short delay. This circuit also makes use of the falling supply voltage of the amplifier when it is switched off. This concept also makes this circuit suitable to protect against overloads. The circuit itself is relatively straightfor- v/ard. MQSFET T! turns on relay RE I when the gate-source voltage rises above 2.5 V. The gate voltage is derived directly from the amplifier supply via potential divider R3/R4/P 1 . PI is used to adjust the exact level at which the relay turns on. 94 dekter electronics - 7-B/2005 This is also used to compensate for the tol- erance in the MOSFET threshold voltage. The relay operating voltage is limited to about 24 V by resistor R2. D2 restricts the voltage across T1 from rising above 24 V, stopping this voltage from rising too much when the relay is not actuated it olso keeps the voltage at 24 V when a relay with a higher coil resistance is used (see parts list). When a relay with a lower coll resistance is used, the value of R2 needs to be adjusted accordingly. To calculate the value for R2 you should fake the min- imum acceptable supply voltage, subtract 24 V and divide the result by the current through the relay. This value should then be rounded fo a value in the El 2 series. There is room on the PC& for a vertically mounted 5W resistor far R2 r so it's even possible to use □ 12V relay (D2 should then be changed to a 12V type as well). D1 protects T1 from induced vol Sages when the relay is turned off. The voltage at the gate only reaches its end value slowly COMPONENTS LIST Resistors: R1 = 270kfl R2 - lkQ2 R3,R4 ^ 1MQ P 1 = 25Gkil oresef Capacitors: C 1 - 4uF7 MECT or MKP (see text) C2 = 47nF C3 = IQjiF 63V radial Semiconductors: D1,D3 = 1N4148 due to the addition of D3 and C3. D3 prevents C3 from keeping the MOSFET conducting when the voltage drops. When the voltage has fallen below half She normal supply voltage, C3 starts to discharge via D4. In this way the switch- on delay Is at a maximum even when the D2 = zensr diode 24V 1 ,3W 04 = 1N4002 T1 = BS170 Miscellaneous: K1 = dnch socket, PCB mount, eg. Mo no cor / Monarch T-709G K2 r K3 = spade terminal, PCS mount, vertical, 2 pins RET = PCB relay 24 V/ 1 6 A [e.g. Omron G2R-C24, 1 ICO £1, or Schrack RT3 14024, 1440Q) PCB, ref. 05401 04 from The PCBShop power is turned off and an repeatedly. It should be clear that this circuit can only be used with amplifiers that are stable uniil the threshold voltage is reached and hence do not create an offset at the out- put before the relay turns off. Dirk Gehrke Th is technique for modifying standard predrilled prototyping stnpboard fperf- board' or verobaard') to accept SO 1C packages is intended to be used for inex- pensive breadboard constructions. It pro- vides an economical alternative to using special circuit boards that accept 50 packages and increase the lead spacing from 1 .27 mm to the 2.54 mm grief spac- ing. The standard dimensions of SO and plastic DIP packages are shown For com- parison in Figure 1 (with metric dimen- sions in parentheses). £ ,:?i ■:& Q.S15 0 2i ■$-jC5{p;3agt 0 package. Here ine green points and using a strip cutter and/or a utility knife, lines represent cuts that must be made the grid spacing of predrilled srripbeard is 2.54 mm. Predrilled sfripboord is available in various sizes with glass-epoxy or paper-phenolic substrate material. It is commonly sold in Eurocard format with dimensions of 100 x 1 60 mm To allow an 1C in a 50 package to be soldered to the predrilled stripboard. a utility knife is used to sepa- rate a section of a strip down the middle through the holes, thus reducing the grid spacing from 2.54 mm to 1.27 mm. After being prepared In this manner, the board can accept SO packages. Fig- ure 2 show s a diagram of simple exam- ple application using o TL50G1 in a SO 9 o o o o o o o o ooooooooooooo — oooooooooooooo oooooooooooooo 7-8/2005 - cl&klor dstfroniis 95 Extension usina R Transmitter Ton Giesberts We have, over the years, published numerous variations of remote control extenders in Eiekfor Electronics , but not yet one using RF. These days, transmit- and receive modules that operate on the well-known 433-MHz licence-free frequency are reasonably cheap and freely available at electronics stores. The circuit described here makes use of the transmitter/ receiver combina- tion available from Conrad Electronics, which stands our because of its low price. A disadvantage with this setup is the avail- able bandwidth. At 2 kHz this Is quite lim- ited, but still sufficient for our purpose. We assume that the RC 5 remote control system from Philips Is being used. It is now a little dated but still has many appli- cations, particularly for your own designs. The minimum pulse width of RC5 amounts to 0.89 ms. The maximum frequency is therefore 562 Hz [1/(20.89- Hh 3 )]. This still passes reasonably well through the RF link. However, at the receiver some pulse stretching is required. The transmitter is simplicity itself. iCl is on IR receiver for remote control systems, i re output signal is active low. The pulses at the output, with RC5, have a minimum length of 0,89 ms. The transmitter is acti- vated with an active high signal that is supplied by Tl. When ICl receives a pulse,, T1 will leave conduction and the transmitter is turned on via R2, The little transmitter module has 4 con- nections: ground power (3 to 12 V], data input and antenna output. The transmitter module is mounted on our PCB and connected with four pieces of wire. The overlay makes incorrect assem- bly just about impossible. You can use a piece of wire of about 15.5 cm long (1/4 A) as the antenna. Current consumption in the idle stale is about 4 mA and about 5.3 mA while transmitting. For the protection of ICl, a 5. il V zener diode is connected in paral- lel with its power supply connections. An excessive power supply voltage is then turned into heat via decoupling resistor R1 . That means that a power supply volt- age of up to 1 0 V can be connected to the circuit without any problems (with a COMPONENTS LIST Resistors: R1 - 10011 R2 = 4kQ7 Capacitors: Cl, C3 = lOOpF 10V radial C2 - ! OOnF ceramic Inductors: LI = 10pH Semiconductors: Di = zener diode 5V1 0.5W T] - 8C547B ICl - 5FH5 1 1 0-36 Miscellaneous: S 1 = miniature slide switch SX254 (Hartmann) (Conrad Electronics # 703062) or 3-way pinheader with jumper MODI = 433.92 MHz AM transmitter module tram Conrad Electronics set =? 130428 PCB, ref. 054013-1 from The PCBShcp 96 elefclor electronics - 7-8/2005 power rating of ot least 0.25 W for R 4], A disadvantage is that the circuit draws a linie less than 50 mA additional current. You can increase the value of Rl, of course, when the power supply voltage is always at the high end of the range. The transmitter module can deal with 3 to 1 2 V and that limits the maximum supply voltage to 12 V. According to the datasheet, the current consumption of IC 1 is 5 mA. In our pro- totypes the current consumption was actu- ally lower, less than 3 mA. Rl is then roughly (U-5. 1 j/3.5- 1 However, just to be sure, measure the voltage across the JR receiver and check that it is correct. You can use other devices for ICl, but keep in mind the current consumption and the pinout of the terminals. Another requirement is that the alternative IR- receiver has an active low output and an internal pull-up resistor. Cl, LI and C2 provide additional decoupling and C3 decouples the common power supply. In place of SI you could just fit a wire link or a 3 -way pin header with a jumper. The switch is really only useful when the cir- cuit is powered from batteries. It is likely that the circuit will be placed in a fixed location and a regulated mains adapter os a power supply is more appropriate. On the PCS there is enough space so that 1C1 can be fitted horizon- tally, The electrolytic capacitors can also be placed horizontally, so that the entire assembly can be quite thin, so that it can easily be mounted between, behind or in something. Cheap Dot-mode Bargraph Display Rev* Thomas Scarborough The five-stage linear dot-mode bargraph display shown in here has a number of distinct advantages, which may be sum- marized as: the resistor chain is fully customizable; IC 1 s high input impedance results in minima! loading an circuits; IC1 and 1C2 have a wide supply vall^ age range, between 3V and 15V If a higher supply voltage is used, all colour LEDs may he employed with a sin- gle ballast resistor R3. Four op-amp comparators are used to provide a five-stage output, as follows: os the voltage at the signal input rises, so the outputs of comparators ICl ,A to [CLD go High in succession. This creates the sequence at fC2's binary channel select ond output channels shown in the Table, The fast binary number in this sequence is created as 1C1.D goes High, thus pulling IC2 binary input 1 Low through TK In this way, five of the (IC2) 8-to-l analogue multiplexer/d emulfiplexer out- put channels are utilised to produce a five- stage linear dot-mode bargraph display. The signal input voltage required to switch ony one of ICl 's four outputs may be cal- culated by dividing the supply voltage by the values in the resistor chain. For exam- ple, if the supply voltage is 1 2 V, and all of the resistors in the chain are 10 kQ, then ICl .Cs output pin 8 (and IC2's out- put channel 6) will swing High as the volt- age of the signal input exceeds 12 Vx](R3+R4+R5] ^ (R1+R2+R3+R4+R5J1-7.2V The only aspect of the circuit which might require special clarification is II . T1 pulls JC2 s binary channel select input 1 Low by 43V.„+15V shorting It to 0 V, thus overriding IC1.B s output pin 7. This creates one additional binary input number [binary 101 ) for IC2, and adds a fifth stage to Ine bargraph. A logic MOSFET such as a BUZ! 1 or 1RF510 would also work in this position, and in this case Rl may be omitted. The LMC6484IN opamp indicated in the circuit diagram is a rail-to-rail type which may be difficult to source, if you use an old fashioned' opamp like the LM324, do remember that the input voltage may not exceed the supply voltage minus about 1 .5 volts. In the case of the TL074 fTL084), the reverse applies: ihe input volt- age must be comprised between 1 .5 volts and ihe supply rail level. This is called the common-mode range of the opamp — check the datasheets] Resistor R3 determines the LED current and may need to be adapted to match IC2 Channel Select IC2 Output Channel 2 1 0 0 00 0 1 00 4 1 1 0 6 i 1 1 7 [ i at 5 whatever LEDs you have available for the readout. Since the output current of 4000 series CMOS ICs needs to be observed, it is a good idea to use high-efficiency LEDs of the 2-mA class. The value of R3 is calculated from R3 = (V b - 2) volts / 3 where the result is in kilo-ohms. 7-8/2003- ebltfer eled ranks 97 RF Remote Control Extender: Receiver Ton Giesberts This circuit works together with a transmit- ter described elsewhere in this issue to term a remote-control extender. Due to its limited bandwidth, the output of the RF receiver module does not exactly repro- dues the original pulses from the IR receiver. That problem is remedied here by the circuit around T1 .. The modulator circuit for the data received from this stage is active low, so the primary func- tion of II is to invert the received signal. However, the stage built around T1 also acts as a pulse stretcher in order to restore the original pulse length. Capacitor C2, which is connected in parallel with PI r charges quickly The maximum current is limited by R3 to protect T1 . The discharge time is determined by PI and C2, and PI can be adjusted to compensate tor vari- ous deviations and tolerance errors. The timing should be matched to the RC5 code with PI set to approximately its midrange position. In practice, the pulse length also proved to be slightly depend- ent on the signal strength. T1 provides the reset signal for a 74HC4G60 1C [14-stage binary ripple counter with built-in oscillator). This counter restores the original modulation with g frequency of 36 kHz. Each received pulse starts ihe oscillator, and a frequency of exactly 36 kHz is present on pin 13 (division factor 2 v j if the crystal frequency is 1 8.432 MHz. Other oscilla- tor frequencies con also be selected using J 1 and various combinations ore possi- ble using other division factors (for 36 kHz, connect a jumper between pins 1 1 and 12 of Jl ). At frequencies below 1 2 MHz, C 5 must be replaced by a resis- tor with o value of 1-2.2 kn (fitted verti- cally). The main reason for including jl is to allow ihe remote control extender to be used with other modulation frequencies. The counter output drives a transistor stage (T2) with two IR diodes [type LD271 , but other types can olso be used). The current through LEDs D1 and D2 is limited to approximately 90 mA by RIB. R6 and R7 ore connected in parallel with D] and D2, respectively, to reduce ihe turn-off time. A normal LED (D3) is con- nected in parallel with the iR LEDs to pro- vide a supplementary visible indication of a transmitted signal (IR or RE). The circuit needs nice stiff 5-V supply, 98 deklor ^monies - 7-8/2005 which means that battery operation is not suitable [unless a hefty electrolytic capac- itor is connected across the supply termi- nals). LI and L2 ensure that the supply voltage far the receiver module is os dean as possible. The quiescent current con- sumption Es approximately 1 .3 mA, ond it increases to around 8 mA on average with a good received signal level. Assembling the circuit board (see Fig- ure 2) is straightforward. Naturally, o wire bridge can be used In place or jl if you only want to use a single IR code. The receiver module is supplied with quite long connection leads ond a pre-fiMed antenna. It's a good idea to shorten the antenna slightly. With our modules, the length was nearly I 8 cm. In practice, a length of 15.5 cm is more suitable at a frequency of 433.92 MHz. The circuit board is designed to allow the receiver module to be fitted to the board, but we chose to fit It next to the board (ofong its long axis]. That puts the receiver COMPONENTS LIST Resistors: R1 ,R2 = 10 Hi R3 - 47Q R4 = 1 M0 R 5 - 1 80 R6,R7 *= 1000 R8 = 47 QQ PI = lGkQ preset Capacitors: Cl, C7,C8 - sGOnF ceramic C2 = lOOnF MKT C3 C4 ^ 33pF C5 - 15pF C6 = 2 2 On F 25V radial C9 = lOOnF 10V radial a bit further away from the noise gener- ated by the IR LEDs and the counter, which reduces the interference to signal reception. The module leads are long enough for this. You will also have to Inductors: LI - 10uH L2 = 47jiH Semiconductors: D1,D2 - LD271 D3 - LED, red, high-efficiency T1 = BC547B T2 = BC639 IC1 = 74HC4060 Miscellaneous: j 1 = 1 4 [2x7] woy pinheader + 1 jumper XI = 1 8.432MHz quar \z crystal MODI - 433.92MHz: A M receiver {RX; module from sst r Conrad Electronics # 1 30428 PCS, ref. 05401 4-1 from The PCBShcp experiment with the orientation of the module and the antenna, since ihe arrangement proved fa be critical In prac- tice [the RF aspects, that is). Simple Cable Tester Bert Vink This cable tester allows you to quickly check audio cables for broken wires. Because of the low power supply volt- age, batteries can be used which makes the circuit portable, and therefore con be used on location. The design is very sim- ple and well organised: using the rotary switch, you select which conductor in ihe cable to test. The corresponding LED will light up as indication of the selected con- ductor. This is also an indication that the power supply voltage is present. If there is a break In the cable, or a loose con- nection, a second LED will light up cor- responding to the selected conductor. You can also see immediately if there is an internal short circuit when other than the corresponding LEDs light up os well. You can also test adapter ond splitter cables because of the presence of the dif- ferent connectors. Two standard AA- or AAA- batteries ore sufficient far the power supply. It is recommended to use good, lowHcurrent type LEDs. It is also □ good idea not to use the cheapest brand of con- nectors, otherwise there con be doubt as to the location of the fault. Is it the cable or the connector? 7-B/Z005 - elsktor dstfianits 99 1 MHz Frequency Counter H* Breifzke The XR 2206 function generator chip is a very popular device and forms the basts of many analogue function generator designs. A disadvantage of this chip is that in its most basic configuration the output frequency is adjusted manually by rotating on output frequency control knob and lining it up on a printed scale. Without a frequency counter its difficult to fell the value of the output frequency, especially at the high end of the scale. The frequency counter design presented here offers a low cost solution to this problem and achieves good accuracy. Power for the circuit is derived from the dc power supply or the existing function generator. The input signal to the counter is taken in parallel from the TTL ouiput of the XR22Q6. The frequency counter cir- cuit contains an Atmel AT90S2313 microcontroller together with an LCD dis- play. The frequency counter program is written in Baste. The fundamental components needed to build a frequency counter are a timer, which is used to time on accurate meas- urement window and a counter to count the number of transitions that the input signal makes during the measurement window period. The microcontroller con- tains two internal hardware counters of 8 and 16 bit length and these can be configured as either a timer or counter. Operating with o crystal frequency of 8.388608 MHz the counter achieves on accuracy of 1 Hz at I MHz or with a more readily available 4.194304 MHz crystal the accuracy will be 1 Hz with a 500 kHz input signal. The 1 6-bif counter is configured as the fre- quency counter and the input signal is connected to pin 9 at TTL logic levels. A 1 6-bit counter can only count to a maxi- mum value of 65536 so to extend its range the software keeps note of the num- ber of counter timer overflow interrupts that occur during the measurement win- dow. At the end of the measurement win- daw it multiplies this value by 65536 and adds if to the current value of the counter: F - interrupts x 65536 + Timer! The time base is generated by the 8-bit timer which together with a prescaler counts to 1024. Using the crystal! fre- quency from above the timer 0 overflow occurs at a frequency of 32 Hz. The measurement timing window is closed when 32 interrupts have been counted and the frequency of the input signal is calculated and displayed. The interrupt rate restricts the maximum Input to ! .5 MHz and at ihis frequency the display will exhibit a jitter of 4 Hz Le- the displayed frequency will "wander 1 by 4 Hz. All input frequencies below 200 kHz should not display any jitter. h i — C5 C4 1 J ■ LODI LC DISPLAY ? jr 15 t- g -t ^ ~ ^ = aaaaoDoaui ti A £ « Q — > > > 11 © RESET IC2 {5CK}PS7 FDv(RxD) (LltSO)FB& FD 1(7*0) (UQS0PS5 PDjjjfTO) F cl PD3(THT1) (OCi]PB3 FD4(TQ) FB2 PDSfn) (Ai filial (MNO)PBO AT90S2313 XTAL1 XTALZ m 19 15 17 16 14 15 13 14 13 12 12 ii | ta b 5 7 +5V -■ — © PI Ik r> l 030315 - 1 1 100 elrktor electronics -7’3/2DQ5 The program is written in AVR Sasic and is small enough to be compiled and downloaded to the microcontroller by the free demo version of the BASCOM AVR compiler [Download from: www, me selec.com). The single line LCD display interface is designed for a Hitachi 16x1 or compatible display. Preset R1 allows adjustment of the display contrast, 1C] provides a regulated 5 V for the microcontroller and display. The frequency counter accuracy depends on the precision of the crystal and its fre- quency stability together with capacitors Cl and C2. PAL crystals generally are produced to dose tolerances and exhibit low drift. During testing the crystal showed an offset of 60 ppm, which would produce a display error of 60 Hz on a 1 MHz signal. Adjustment of the capacitive loading [Cl and C2) on the crystal was able to 'puli' the crystal fre- quency and reduce the error to zero. At audio frequencies the counter measures to an accuracy of 1 Hz across the entire audio spectrum without ony need for circuit alignment, 1 ii r 2-4S- " COMPONENTS LIST Resistors: R1 - 10kQ PI = IkD preset Capacitors; Cl, C2 = 27pF C3 — 1 jjF / 1 6V radial C4, C6 = 1 GOnF Semiconductors: tCl = 7BL05 tC2 = AT9QS231 3-1 OPT programmed, order cads 030045-41 T Miscellaneous: XI =4.1 94304MHz or 8,3 88608MHz quartz crystal (see text) LCD! = LCD Module, I line, 16 characters PCB, ref. 030045-1 from The FCBShop Disk, oroject software, order code 030045-1 1 * or Free Downlead T see Elektor SHOP pages or www. e ! ektor-e lectron ics , co, u k III 0 jssjb ur trft r — ' . ,! V - Voltage Regulator Ton Giesberts The LR12 made by Supertax Inc. is a goad choice far applications where a supply voltage af more than 35 to 40 V needs to be stabilised. This small regulator can cope with input voltages af up to 100 V, when the output voltage can be adjusted between 1 ,2 and 88 V. A small disadvantage is that the input voltage needs to be at least 12 V more than the output voltage. The regulator keeps the voltage between the output and adjust pin constant at 1.2 V, With a potential divider the output voltoge can be set using the following equation: L2x(R2/Rl - l) + / cd -xR2. The circuit shows o standard application wh ere the LRI2 is used as a 5 V regula- tor. Cl decouples the input voltage. Its value and working voltage depend on the input voltage and the current consumption. The bypass capacitor (C2j is required fo keep ihe LR 1 2 stable. In coses where the voltage at the input may be smaller than at the output an extra protection diode is required, for example a 1 N40G4. The output current of the 1C needs to be at least 0.5 mA. In the circuit shown here the potential divider made by R1/R2 already draws 0.2 mA. This means that with a 5 V output the load resistor needs to be less than 16k5. If the resistance is higher, the total output current drops below the required value of 0.5 mA. The output current of the LR 1 2 r with a 12 V difference between input and out- put, is limited to 100 mA (max. dissipa- tion of a T092 packoge: 0.6 W at 25 = C). The ripple suppression is at least 50 dB, The current consumption of the 1C itself is very low ai only 5 to 15 uA. 7-8/2005 -elektor c'-fUema 101 PDM Pulse Generator +u Tek Jl_ • vt* MPosirao™ era Kious-Juergert Thiesler This pulse generator, which offers □ mark- space ratio that is adjustable in exponen- tially increasing steps, is a novel use far a familiar IC It can come in handy in a range of situations: for example, when testing the dynamic regulation character- istics of a power supply. In this test a load is applied to o power supply that draws a square-wove, rather than constant, cur- rent. An oscilloscope can then be used to check how quickly the regulator in the power supply responds and to observe any undesirable artefacts in the output such as overshoots or oscillation. A disad- vantage of such an arrangement is that the dynamic characteristics of the power supply are only measured at one average current, determined by the mark-space ratio of the current ond by its maximum value. Modern computers, for example, draw varying amounts of current depend- ing on what they are doing, and the cur- rent can vary over very short timescales. A modern PC power supply must therefore deliver accurate and stable voltages not only under high and intermediate load, but also at low load (in stand-by mode). The PDM pulse generator is ideal for this situation. As can be seen from the table. SI allows the mark-space ratio to be adjusted from 1:17 to 1:2. The frequency varies from 566 Hz to 302 Hz r making it suitable for testing PC power supplies. The variation in frequency with mork- space ratio is a consequence of how the circuit works. At the heart of the circuit is our old friend the CMOS 4060. This includes an RC oscillator circuit and a 14 bit binary counter. The basic clock frequency, which can be calculated using the formula shown, is around 77 kHz for the given values or R] and Cl . The space time is constant at around 1660 jjs. When the SC is reset, oil outpuis ore initially low. Consider now the voltage at the gate of II . If if were not for D1 , when Q7 goes high after the 1 28th clock pulse (the divide by-2 e output spends 128 dock periods low ond then 128 periods high) 1C I would be reset immediately via R3. II and therefore the load, would thus receive extremely short pulses with long pauses between. Because of the switch- ing speed of the IC, the width of the pulses would only be of the order of the ten nanoseconds. A low level via D 1 and SI , however, delays the resetting of the IC for exactly as many clock periods as it takes for the output selected by S I to go high. For example, if G3 is selected, this happens after o further eight periods. The cycle time is then I 28*8 dock periods, of which 128 dock periods are space and just eight ore mark. This gives a duty cycle, as shown in the fable of 8/1 36 or 1/17. If Q6 were used the pulse would be 0,5 x 2 7 = 64 clock periods wide with Rose! pulse Q 7 (junction A) Switch CLR pin Duly cycle Frequency 4 Period * Pulse width ‘ position connected ta cs percttloge cs a fracffca “ Hi V ps 1 03 5.9 S approx. 1/1? 566 1765 103 2 Q4 n V? ^ 1/9 535 1868 207 3 Q 5 20.0 S 1/5 480 2082 415 4 06 33 1/3 % 1/3 401 2495 830 5 GND 50.0 % 1/2 302 3320 m = measured la d in last digit - £££ text [duty cycle is mark lime as a pjoportion of period, o dimensionless quantity} 102 efektor electronics - 7-8/Z005 the some space period of 1 28 docks. The duty cycle in this case is 1/3. If the cath- ode of D1 is iied to ground, the 3C does nor receive a reset signal and so a sym- metrical square wave with o 1 28-clock mark and 128-clock space is produced. Tl functions as a power sw itch. Load R4 is chosen so that the maximum rated cur- rent of the power supply flows when II conducts. The average load on the power supply can be calculated using the duty cycle values given in the table. It should go without saying that the current drawn must be within the specification of the power supply, and that R4 must be capa- ble of the necessary power dissipation. At higher currents a heatsink is recom- mended for Tl . It can pass o maximum of 60 A and although if has a very lav/ resistance in ihe conducting state (just 1 8 mQ| if is no superconductor! At cur- rents above about 10 A it starts to get warm. The oscilloscope traces show the circuit operating ot one of the possible mark- space ratios. The upper trace is the basic dock an pin 1 ? of IC1, and the lower trace shows the signal at test point A, which has a duty cycle of 1/5. D45I03-1: Low- cost Step-down Converter R5 with Wide Input Voltage Range Dirk Gehrke The circuit described here is mostly aimed ot development engineers who are looking far an economical step-down converter which offers a wide input volt- age range. As a rule this type of circuit employs a step-down converter with inte- grated switching element. However, by using a more discrete solution it is possi- ble to reduce the total cost of the step- down converter, especially when manu- facturing in quantity. TheTL5001A is a low-cost PWM controller which is ideal far this project. The input voltage range far the step-down converter described here is from 8 V to 30 \ with on output voltage of 5 V and a maximum output current of 1 .5 A. When the input voltage is applied the PWM output of Cl is enabled, taking one end of the voltage divider formed by R I and R2 to ground potential. The cur- rent through the voltage divider will then be at mast 25 mA: this value is obtained by dividing the maximum input voltage i 30 V) minus the saturation voltage of the output driver (2 V] by the total resistance of the voltage divider (1 J kQ). II and T3 together form an NPN/PNP driver stage to charge the gate capacitance of Pchannel MOSFET T2 os quickly os pos- sible, and then,, at the turn-off point, dis- charge it again. The boseemitier junction of 13 goes into a conducting stale when ihe PWM output is active and a voltage is dropped across R2. T3 will then also conduct from collec- tor to emitter and the gate capacitance of T2 will be discharged down to about 800 mV. The P-ohannel MOSFET will then conduct from drain to source If the open- collectar output of ihe controller is deacti- vated, a negligibly small current Rows through resistor R2 and the base of T I will be raised to the input voltage level. The base-emitter junction of Tl will then conduct and the gate capacitance of T2 will be charged up to the input voltage level through the collector and emitter of Tl . The P-channel MOSFET will then no longer conduct from drain to source. This driver circuit constructed from discrete components is very fast, giving very quick switch-over times. Diodes D2 ond D3 provide voltage lim- iting for the P Rl 104 eIsScIw electronics - 7-0/2005 COMPONENTS LIST Resistor: R1 = in Capacitors: Cl = lOOnF C2 = 22pF Miscellaneous: L 1 -13,L 1 0 = ferrite inductor, 5MD 1 206 [e.g. Diglkey # PMC1 206- 202-ND) L9 = common-mode coil fe,g. r Dig! key # CM101 1-254-MD) K1-K8 = servo coble K9-K 1 7 = 3-way 5IL plnhecder PCB, reF. 054013-1 from ThePCBShop EE-ternal Blinker Burkhard KaJnka r — 1 j and a PNP transistor, which avoids wast- Yau occasionally see advertising signs in shops with □ blinking LEO that seems fa blink forever while operating from a sin- gle Darfery celL That's naturally an irre- sistible challenge for a true electronics hobbyist... And here s the circuit. It consists of an □stable multivibrator with special proper- ties. A ] QO-pE electrolytic capacitor is charged relatively slowly at a low current and then discharged via the LED with a short pulse. The circuit also provides the necessary voltage boosting, since 1 .5 V is certainly ico lav/ for an LED. The two oscillograms demonstrate how the circuit works. The voltage on the collector of the PNP transistor jumps to approxi- mately 1 .5 V after the electrolytic capacitor has been discharged to close to 0.3V at this point via a 1 Q-kQ resistor. If is charged to approximately 1 .2 V on the other side. The difference voltage across the electrolytic capacitor is thus 0.9 V when the blink pulse appears. This voltage adds to the battery voltage of 1 .5 V to enable the amplitude of the pulse on the LED to be as high as 2.4 V However, the voltage is actually limited fo approximately 1 .8 V by the LED r as shown by the second oscillogram. The voltage across the LED automatically matches the voltage of the LED that is used. It can theo- retically be os high as 3 V. The circuit has been optimised for low- power operation. That is why the actual flip-flop is built using an NPN transistor ing control current The two transistors only conduct during the brier Interval when the LED blinks. To ensure stable operating conditions and reliable oscilla- tion, an additional stage with negative DC Feedback is included. Here again, especially high resistance values are used to minimise current consumption. The current consumption con be estimated based on the charging current of the elec- trolytic capacitor. The average voltage across the two 104:0 charging resistors is 1 V in total. That means that the aver- age charging current is 50 pA. Exactly the same amount of charge Is also drawn from the battery during the LED pulse. The average current is thus around 100 pA. If we assume a battery capacity of 2500 mAh, the battery should last for around 25,000 hours. That is mare than two years, which Is nearly an eternity. As the current decreases slightly as the bat- ter voltage drops, causing the LED to blink less brightly, the actual useful life could be even longer. That makes it more than {almosi} eternal. 7-8/2005 - elfklor sbtJromrs 105 Paul Goa s sens Slave Hash with Ree -lye Delay Digital cameras are becoming mare and mare affordable. At the economy end of the market cameras are usually equipped with a small built-in flash unit that Is ideal far close-ups and simple portraiture. The power rating of the built-in flash unit is quite low so that any subject further away than about 2 to 3 metres (maybe 4 m if you are lucky) tends to disappear info the gloom.. You soon become aware of the limitations if you need to photograph a larger group of people say at a function under artificial light in a large hall or out- doors, The majority of these cameras are not Fitted with an accessory socket so it is not possible to simply conned a second flash unit to increase the amount of light. Single lens reflex cameras also need addi- tional lighting [e g. Fill-in flash) to reduce the harsh contrast produced by a single light source. For all these cases an addi- tional slave flashgun is o useful addition to the equipment bag. Rather than shelling out lots of cash on a professional slave i oshgun, the circuit here converts any addon flashgun into a slave flash unit triggered by light from ihe camera flash. Simple slave flash circuits can have prob- lems because most modern cameras use a red eye reduction pre-flash sequence. This pre-Flash is useful for portraiture. It Is designed to allow time for the subjects pupils to contract so that the red inner sur- COMPONENTS LIST Resistors; R1, R3 - lOOkn R2 = 100s R4, R5 - 220kO R6 = Ika Capacitors; Cl, C3 = IOjjF 16 V radial C2, C4 - lOOnF C5 - 47nF Semiconductors; D1 = TLRH 1 BOP [Parnell# 352-5451) D2, D3 = BATS 5 IC1 = 453SP IC2 = MGC3020 T1 - BC547B Miscellaneous; Bt I = two 1.5 V batteries (LR44) with PCB mount holder 5 1 - 3-posiiion slide swlich PCB, ref. 040070-1 from The PCBShop Cable or adaptor tar external hasher face of the eye is not visible when the picture Is taken. Some cameras use informa- tion gathered at this pre flash time to estimate the light power required for the main flash period and some use this time to fine-tune the autofocus. A sim- ple slave flash circuit will be triggered by the pre- flash sequence and writ fore not provide any additional lighting when the main flash occurs and the pic- * ,,ra 1 * ^h'ally token. The circuit shown 1 1 simple but neatly solves the pre-flash problem. With switch SI set to Normal . the pulse produced by D1 when it defects the cam- mere- 106 dektor ebd ionics - 7-B/2005 ere Rash will trigger bath monoflops 1C 1 o and 1C 1 b* The output of IC1 .A does not perform any useful action in thfs mode because the logic level an the other side of resistor R4 is pulled high by D3. The out- put of 1C 1 B will go high for approxi- mate!/ 1 0 ms switching T1 on and causing the Iriac to conduct and trigger the slave flash. The use of a friac opfocoupler here has the advantage that the circuit can be used on alder types of flashgun triggered by switching a voltage of around 1 GO V os well as newer types that require only a lew volts to be switched. With switch SI in the delay position the hrsr flash will trigger IC1 A and its ouipul will enable 1C 1.8 but the low pass char- acteristics of ihe filter farmed by R4 and C5 slow the rising edge of this waveform so that 1C KB will only be enabled 10 ms after the first flash is detected. IC1.B is now enabled for a period of about 1 s (governed by R1 and C3], When the main flash occurs in this time window if will immediately trigger 1C LB and ihe friac will be switched as described above. The circuit requires a supply of 3 V and draws very little current From the two 1 .5 V burton cells. It will run continuously for quite a Few days, should it be acciden- tally left on. Switch SI con be either a three-positron toggle or slider type. Circuit construction is greatly simplified and the finished unit looks much neater if it is built on the available PCB. Space is also provided to fit the PCB mounted battery holders. A suitable Rash extension coble or adapter can be round in most photo shops. Short-Wave Converter Burkhard Romka This short-wave converter, which doesn't have a single coil requiring alignment, is intended to enable simple medium-wave receivers to be used to listen io short-wave signals. The converter transforms the 49-m short-wave bond to the medium-wave fre- quency of 1 .6 MHz. At the upper end of the medium-wave bond, select an unoc- cupied frequency that you want to use ror listening to the converted short-wave sig- nals. Good reception performance can be obtained using a wire antenna with o length of one to two metres. The converter contains a free-running oscillator with a frequency of around 4.4 MHz which is tuned using two LEDs (which act as variable-capacitance diodes!) and a normal potentiometer. The frequency range is set by adjusting the emitter current using a 1-kO irimpot. The oscillator frequency depends strongly on the operating point. This is due to the combination of using an audio transistor and the extremely low supply voltage. Under these conditions, the transistor capacitances are relatively large and strongly dependent on the operating paint. The second transistor farms the mixer stage. If you calculate the resonant fre- quencies of the tuned circuits, you will obtain 6.7 MHz for the anienna circuit and 1 .7 MHz for the output circuit Addi- tional transistor capacitances and the effects of the coupling capacitors shift each of the resonant frequencies down- ward. The tuned circuits are relatively heavily damped to obtain bondwidths that are large enough to allow the circuit to be used without any specific alignment. The results are good despite the low collec- tor-emitter voltage of around only 0.6 V, due to the fact that only a modest amount of mixer gain is necessary. The entire cir- cuit also draws less than ] mA. 7-6/2005 -eMlor el etfr ernes 107 K Elektor’s online services have been restyled and extended within a brand new easy to use website. n4w featuring Elektor News Service, Forum, Marketplace, Online Shop and several download options. u, eerf*** ^'ectron^ indexed article archive back to 1998 «* s i 1 "Vi m a ry for las y rs s o cj nltlon * search articles * on paper and on the web umber ,S issue electronics r 1 rj r rj }\ r-n • dally electronics newsfeed - I ytW* FORUM • weekly free Newslette _ ^ r ’ss^tssss^sr -caSfcssr ^-- t25t0 ' ^ . «,«,*>** rt?1 r « 3 5Iir ’ 9 \ X • join in discussions with fellow enthusiasts and specialists sp^e re ~’"' „ «** >« "* ’“**' ^-s'SSsau .<-*"■■*" ® flat answers to technical problems not r^ uK ^ r r ^J ir**** s ioc=v=fJSL PROJECTS Lf : -^ opS (UC^ '.<* W c f download construction projects (PDF) and associated software hundreds of articles available ® search by category, alphabetical!} and chronologically SHOP ferss*’ , E« 0 5 •, ••=•• iVirS evcJl, i^' r/ ' : ' iE 3 ***K!h*. W**"* 1 ^ P)C‘ 3 everything you need to build projects, inch PCBs ® books and CD-BOJVls secure payment system MARKETPLACE from the piece tn visit for components, tools, old volumes, etc. PIC PWM Controller Jeon-Marc BUhler An efficient and economical method to control the power into a load (for exam- ple the speed of o motor or the tempera* ture of a heating element) is to use PWM (Pulse Width Modulation). But things are a little bit more involved of we want an accurate adjustment from 0 to 100 c s and an indication of the power. A little 8-pin micro controller can do these tasks easily: generating a PWM signal and indicating the power via a 4017 (see schematic). This configuration of the microcontroller does not require an external reset circuit (so that there is a spare pin), because we use the automatic internal one. A quartz crystal is not required either since we're using the integrated 4-MHz oscillator, which despite being based on an RC net- work, is accurate to 1 % thanks to the cah ibraiion carried out at the factory. Once the microcontroller has been pro- vided with a suitable program, it can carry out the instructions from the user by 1 ici 110 debtor elEcTronlcs - 7-B/2005 means oF two pushbuttons. A PWM sig- nal with a frequency of 1 00 Hz is gener- ated, while the power is indicated with a classical 4017. The circuit can be kept very simple because the microcontroller carries out a!! the complicated tasks. A 78L05 provides the power supply, a 401 7 for the indica- tor and a pair of MGSFETs for the power stage. Connector K1 receives the input power supply voltage (9 to 12 Vat 1 to 5 A). The load to be controlled is connected to K2. With 2 pushbuttons we can control the power in steps of 10 To stop immedi- ately, both need to be pressed at the same time. That concludes the user manual! A special feature of the circuit is the power indication with the 4017 and 10 LEDs. When first powered up, a back- and-forth running light indicates that the circuit is powered but the output Is not active. As soon as the lead is switched on with pushbutton SI, the first LED (10%) will light up. The correct operation of the circuit is indicated in an eye-catching manner by flashing the LED that indicates the power, using pin 3 af the controller. The program Is of a very simple design and the source code together with the hex file are available from the Efeklor Electron- ics website or on a floppy disk [order code 050056-11). You are free to add improvements, because there is plenty af space left in the program memory of the controller. To compile the code (written in C) you can use the evaluation version of the CC5X- compiler (limited to 1024 words, which in our case is more than enough). This is available from the website www.bknd.cam/cc5x [choose the Free Edition). Another handy piece of freeware Is the ConText editor. Et can be found or www.context.cx. Ef you 'would like to experiment with the circuit, it is recommended to use the reprogrammable 12F629. In this case R3 Is required. It is not necessary 'when a 1 2x508 is used. When programming, don t forget to check that all the fuses are configured correctly: Oscillator: !nfernol_RC WaichDcgJTimer; ON Master_Clear_Enable: Internal Code Protect: OFF This Is particularly important when using she 1 2C508, because this is an OTP-type (can be programmed only once). Figure 2 shows the printed circuit beard, which, because or the 4 wire links has remained single-sided and provides enough space for all the parts. T1 only requires a heatsink of you Intend to regulate currents greater than 2 A over extended periods of time. The choice of fuse depends on the current requirements of the load that is con- nected. T1 and the PCB traces can easily handle 5 A. As soon as the power supply is applied to the circuit, fitted with o programmed PIC, the LEDs should Sight up os a running light. Every button press of 52 increases the on /off ratio with 1 0 % to a maximum of 1 00 %. Thanks to the accurate oscillator in the 1 2C506, each step of ] 0 % corresponds to 1 ms and the entire cycle Is repeated at a rate of 1 0 ms, which corresponds to a frequency of 100 Hz. Ideal for small motors. A final note is that the program uses the watchdog functionality of the 1 2C5Q8, This generates an automatic reset within 20 ms if the program crashes for some reason (for example large voltage surges). So there is nothing left to be desired regarding the reliability of the circuit... r - z -- COMPONENTS LIST Resistors: Ri = 100k 13 R2,R3 = 4kD7 R4 = 22013 Capacitors: Cl - 2200uF 25V C2 = 1 OllF 25V C3-C6 - lOOnF Semiconductors: D1 = 1N5408 D2 = 1N4148 D3-D7 = LED, 3mm, green DS-D12 = LED, 3mm, red T1 -IRFZ34N 12 = 85170 IC1 =78105 iC2 = PSC 1 2C5GS-I/P IC3 = CD 4017 Miscellaneous: K1,K2 — 2-way PCB terminal block, Isad pitch 5mm SI ,52 = pushbutton, 1 make contact, DT56 FI = 2 AT [time lag) ruse wiin PCB mount holder Heatsink type SKI 04 (Fischer) PCB, ref. 050056-1 from The PCBShop Disk, PIC source and hex code: order code 050056-1 1 or f ree Download 1 - 8/ 2005 - eldttar elect ronics m Poui Goossens The PAL, NTSC ond SECAM television standards are all several decades old. Even in this digital era most people still have television, sets that use complex analogue signals complying with these standards. Nevertheless, the end is nigh for these standards. The DVI standard is on its way to becoming the new standard for trans- mitting video information. The most impor- tant property of this interface is that the information is transferred in digital form (24-bit words] instead of in the form of analogue signals. Figure 1 shows how the required signals □re divided into three data streams in a single-link mterioce. dong with a clock signal. In DVI terminology, the clock sig- nal is colled Channel C. A doubledink interface with three additional information channels has also been specified to dou- ble the bandwidth. Whether these three additional channels are actually used depends on the selected resolution ond repetition rate. Each channel consists of a differential signal pair. That makes this interface significantly less sensitive to inter- ference. The technology behind these dif- ferential signal pairs is called Transition- minimized differential signalling', or TMDS for short. Figure 2 shows how the signals are generated in electronic terms, ihe connector and associated signal names are shown in Figure 3 and Table 1 . Besides ihe six TMDS signal pairs and clock signal (seven pairs in total) there are several other signals on the connector. DDC Clock and DDC Data allow' a connection to be established in accordance with the DDC protocol. That protocol allows o connected device to determine which resolutions and frequen- cies the monitor can handle. The Hot Plug Detect signal makes it easy to recognise whether a monitor is connected. The +5- V line naturally does not need much expla- nation. Besides oil these digital signals, the (old-fashioned) analogue RGB signals ond associated sync signals are still present. Unfortunately the illustrated connector Is not ihe only type that is available. The illustrated connector is a DVT-1 connector. It can transport both analogue and digi- tal signals. There is also a DVI-D (digital only) and DVI-A (analogue only) connec- tor. With the digital version, when you Streams T.M.aS. Transmitter Un* TMD.S. Receiver R Jtraarra - 1 1 acquire a monitor or playback equipment you have to check both types of equip- ment i o see whether they use a double- link interface [six data channels) or a sin- gledink interface (three data channels). The DVI 1 .0 standard supports several dif- ferent resolutions. They are listed in Table 2. Each resolution can also be ms, Pin Signal Pin Signal Pin Signal 1 TMDS Dafa2 — 9 TMDS Data I — 17 TMDS Data 0 - 2 TMDS Doia2 + 10 TMDS Data I + 18 TMDS Data 0 + 3 TMDS Dato2/4 shield 11 TMDS Data 1 /3 shield 19 TMDS Data 0/5 shield 4 TMDS Data 4 — 12 TMDS Data 3 — 20 TMDS Dot a 5 — 5 TMDS Data 4 + 13 TMDS Data 3 + 21 TMDS Data 5 + 6 DDC clock 14 +5 V supply 22 TMDS clock shield 7 DDC data 15 Ground 23 TMDS dock + 3 Analog Vertical Sync 16 Hot Plug Detect 24 TMDS dock — Cl Analog Red C2 Analog Green C3 Analog Blue C4 Ana leg Horizontal Sync C5 Analog ground 112 eltkloi - 7-8/2005 3 Combined Analog and Digital Receptacle Conns-ctor 9 " used with o variety of repetition rates, which ore 60 Hz, 75 Hz and 85 Hz. That's a good selection of opiions, which (unfortunately) also mokes for a good chance of confusion among consumers. Table 2, Resolutions supported by DVI-1,0 VGA 640x400 SVGA 800x600 XGA 1024x768 SXGA 1 280x 1 024 UXGA 1600x1200 HDTV 1920x1080 GXGA 2048x1536 Meta 3v;§tee r w LI Rev* Thomas Scarborough To the best of the author s knowledge, the metal detector shown here represents another new genre. It is presented here merely as an experimental idea, and operates in conjunction with a Medium Wave radio. If a suitable heterodyne is rimed in on the medium waves, its performance is excel* lent. An old Victorian penny, at ] 80 mm, should induce a shift in frequency of one tone through the radio speaker This sug- gests that the concept will match the per- formance of induction balance (IB) detec- tor types, while employing a fraction of the components. In principle, the circuit is loosely based on a transformer coupled oscillator fTCO), a well known oscillator type. This essentially consists of an amplifier which, by means of a transformer, feeds the output back to ihe input, thus sustaining oscillation. On this basis, the author has named the detector o Coil Coupled Operation [CCO) Metal Detector. In tact the circuit would oscillate even without 12 and Cl . However, in this cose one would have nothing more than a beat frequency operation (BFO] detector. Coil L2 is added to bring the induction balance principle into operation, thus modifying the signal which is returned to the output, and greatly boosting perform- ance. This does not mean, however, that we ore dealing strictly with an IB detector type, since the design requires a beat fre- quency oscillator for detection. Also, unlike IB, its Rx section (L2) is active rather than passive, being an integral part of o TCO. Nor is this strictly a BFO type, since its performance far outstrips that of 8FO r and of course it uses two coils. Search oscillator IC1 oscillates at around 480 kHz, depending on the positioning of the coils on the search head. The pres- ence of metal induces changes both in the inductance and coupling of the two coils, thereby inducing a shirt in oscillator Id's frequency. The output (pin 6) is taken via a screened cable to o Medium Wove radio aerial. A crocodile clip termination would make a convenient connection. The two coils are each made of 50 turns 3 Oswg (0.315mm) enamelled copper wire wound on a I 20mm diameter for- mer. Each has a Faraday shield., which is connected to QV as shown. A sketch of the coil is shown in the separate drawing. The coils are positioned on the search head to partly overlap one another in such a way as to find a low tone on the best heterodyne, which should match the performance mentioned above. Oscillator ICl will sustain oscillation no matter which way the coils are orientated — however, orientation significantly affects performance. The correct orienta- tion may be determined experimentally by flipping one of the coils on the search head. Ideally the coils will finally be pot- ted in polyester resin. The CCO Metal Detector's search head offers a wide area of sensitivity, so that it is better suited to sweeping an area than pinpointing a find. As with bain BFO and IB, it offers discrimi nation between ferrous and non-ferrous metals, making it well suited to J treasure hunting'. And if you get fed up with searching, there's always the radio to listen to. 1 - S/2005 -tickler electronics T 13 Paul Goossetis Balancing LiPo Cells Things change Fast in the electronics world, and that s also true For recharge- able batteries. The rote oF development or new types of rechargeable batteries has been accelerated by the steadily increasing miniaturisation of electronic equipment, LiPo cells have conquered the marker in a relatively short lime. Their price and availability have now reached a level that mokes them attractive for use in DIY circuits. Unlike its competitors Elektor Electronics has already published several articles about the advantages and disadvantages of LiPo batteries. One of the somewhat less well-known properties of this type of rechargeable battery is that the cells must be regularly balanced if they are con- nected in series. This is because no two cells are exactly the same, and they may not all have the same temperature. For instance consider a battery consisting of a block of three cells. In this case the outer cells will cool faster than the cell in the middle. Over the long term, the net result is that the cells will hove different charge states. It Is thus certainly possible for an individual cell to be excessively discharged even when the total voltage gives the impression that the battery is not Sirlly discharged. Thai requires action - if only to prolong the useful life of the battery, since LiPo batteries are still not all ihor inexpensive. One way to ensure that all of the cells have approximately the same charge state is limit the voltage of each cell to 4.1 V during charging. Most chargers switch over to a constant voltage when the voltage across the batter terminals is 4.2 V per cell. If we instead ensure that the maximum voltage of each cel! 1$ 4.1 V, the charger can always operate in constant-current mode. When the voltage of o particular cell reaches 4.1 V, that cell can be dis- charged until its voltage is a bit less than 4.1 V. After a short while, all of the cells will have a voltage of 4. 1 V, with each cell thus having approximately the same amount of charge. That means that the battery pack has been rebalanced. The circuit (Figure 1 ) uses an 1C that is actually designed for monitoring the sup- ply voltage of a microcontroller circuit. The 1C {iC 1 ) normally ensures that the microcontroller receives an active-high reset signal whenever the supply voltage drops below 4,] V. By contrast, the out- put goes low when the voltage is 4.1 V or higher. In this circuit the output is used to dis- charge a LiPo cell as soon as the voltage rises above 4,1 V. When that happens, ihe push-pull output of ICI goes low, which in turn causes transistor T1 to con- duct , A current of approximately 1 A then flows via resistor Rl. LED D2 will also shine os a sign that the cell has reached a voltage of 4.1 V. The function of IC2 requires a bit of explanation. The circuit built around the four NAND gates extends the low' inter- val of the signal generated by ICI. That acts as a sort of hysteresis. In order to prevent ICI from immediately switching oft again when the voltage drops due the internal resistance of the cell and the resistance of ihe wiring between the cell and the circuit. The circuitry around IC2 extends the duration of the discharge pulse to at least 1 s. Figure 2 shows how several circuits of this type can be connected to a LiPo bat- tery. Such batteries usually have a con- nector Far a balancing device. If a suit- able connector is not available, you will have to open the battery pack and moke your own connections for it. The figure also clearly shows that a separate circuit is necessary for each cell. 2 \ 14 ebLlor dertrenia - 7-8/2C D>5 Plant Growth Corrector 054033 - 1 1 -► wavelength [nm] 05-1033 - 12 Puul Goossens House plants can make things more pleas- ant and cheerful However, they have the drawback that they require a fair amount of care, since otherwise iheir lire expectancy Is usually quire short. This care is not limited to watering them and occasionally adding a bit of fertilizer to the soil The problem is that sun4ovmg plants always try to grow toward the source of sunlight. Regular rotation of these plants con prevent them from grow- ing crooked. Thais not especially difficult with small plants, but if can be a highly unpleasant (and difficult) task with large types, which often have large pats as well it s even worse if the plants are located in the garden. These plants always try to grow toward the south (or for readers located south of the equator, toward the north; readers located dose to the equator don't have to worry about this!). One solution is to ploce a light source on the side of the plant that receives the least amount of sunlight. As the selected light source must be energy-efficient, □ stan- dard grow lamp is out of the question, LEDs, by contrast, are a very good choice for this application. Plants contain three different substances that can extract energy from incident light. From Fig- ure 1 it can be seen that blue light con be used as a source of energy by all three substances. Red light can only be used by chlorophyll o and chlorophyll b. From this, it can be deduced that blue light is the most suitable source of light for plants, but red light Is also quite usable. Thais quire fortunate, because red LEDs are a lot cheaper than blue LEDs. The circuit shown in Figure 2 can be used as a guide for building your own plant lamp. The AC voltage at the trans- former output Is converted info a DC volt- age by bridge rectifier SI , Cl smoothes this voltage to produce a more constant voltage across the resistor and LEDs. R1 ensures that the proper current flows through the LEDs. These LEDs emit energy in the form of red light. No component values are given here, since suitable val- ues must be selected according to your particular wishes. The First thing you need to know is the nominal current raring of the LEDs and the voltage across each LED at the nominal current. The rota! voltage across the LEDs is then: ^LEDtotat = Hed x (number of LEDs) You should ensure that at least 5% of this voltage appears across R1 , which means that: The voltage across C 1 is approximately 1 .4 times the output voltage of the trans- former, so the secondary voltage of the transformer must be ^jcfmr “ mm + MlEDiafatl * ^ Select a transformer that can provide at feast this voltage at the desired nominal current. Nov/ you can calculate the actual voltage across R 1 : V K\ = H -4 * Vicfmr) " Finally, calculate the value of R 1 : R1 — — /njj^jfiql R1 also has to dissipate a certain amount of power, so you have to first calculate this In order to determine what type of resistor to use for R1 : ^R1 “ ^Rt x ^lofninal the value if Cl is nor especially critical Something between lOOuFand 1 COO uF Is o good guideline value. Ensure ihat the capacitor is suitable for use with the selected supply voltage. 7-8/2005 - eldrior electronics 115 m? £12.05 [U$$ 21.25) Order now using the Order Form in the Readers Services section in irns issue EleKim Btectmndcs (Pufcfcfwrag) PO Box ISO TuniHKlge Wefis TN5 7WY Efpin Tefeptene *44 {0) 1550 2m G57 Fsx +44 m 1530 200 615 ektor lectronics CD-ROM Robotics A large collection of data- sheets, software tools, tips tricks and Internet links to assorted robot construc- tions and general technical information. All aspects of modern robotics are cover- ed, from sensors to motors, mechanical parts to micro- controllers, not forgetting matching programming tools and libraries for signal processing. Robots built from LEGO® bricks also get a fair amount of attention. See also www.elektor-electronics.co.uk DON'T LOSE YOUR TEMPER Before phoning us - if you are looking for a hard-to-find part. We have over 20.000 items in stock - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE ’mvn.erickletvoodelcctronics.cDm 2N 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD .ADC .AN AM AY BA BC BD BDT BDV BDW BDX BF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRYBS BSS BSV BSW BSX BT BTA BTB BRWBU BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DC DM DS DTA DTC GL GM ! 1A HCF HD HEF ICL ICM 1RF J KA KIAL LA I.B LC LD LF LM M M5M MA MAB ALAX MB MC MDAJ ABE MJF MM MN MPS MPSA MPSH MPSU MRF NJM ME OM OP PA PAL PIC PN RC S S.AA S.AB SAD SAJ SAS SDA SG St SL SN SO ST.A STK. SIR STRD STRM STRS SV1 T TA TAA TAG TBA TCTCA TD.ATDB TEA TIC TIP TIPL TEA TL TIC IMP IMS TPU U UA UAA UC UDN ULN UM UPA UPC UPD VN X XR 7, ZN ZTX + many others Me accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30 - 6:00 lit w Y-V' S«!iO( VISA Conned Crick] e wood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax: 020 8208 1441 sales @crickle\vuodelectronicsxont Forest Electronics - PIC end A VR C Compiler Products FED’s ANSI C Compiler for PIC or AVR processors Fully integrated editor with syntax highlighting, multiple pages etc. Full project support - include and manage multiple source files, simulator, assembler files and notes comments within one project Fully integrated simulator and waveform analyser step from 0 fine to C line. or examine code in assembler form. View device pins using s logic analyser application. Simulator supports LCD modules, keypad, buttons, LED s, displays, analogue inputs, serial and asynchronous data and more. Designed to ANSI C standards I i t _ 5% hi *> f 1 1 "" at I f— T jjJULC Tj i ' IS W ^45“ ii4! yf 'v* .p vj • PIC - Supports 18xxx f 16xxx r IZxxx series 14 and 16 bit core processors • AVR - Supports standard and MEGA core processors • Generates MPLAB/AVR Studio projects and source files and completely standard hex output fifes. wtz-c 7 a vi d icy Drag and Drop rapid application development using ANSI C for PIC and A VR * Rapid Application Development for the PIC or AVR microcontroller using the C language (WIZ- C for the PiC, AVID ICY for the AVR) * Drag and drop your software component selections on to your design * Included components support timers, serial interfaces, I2C, LCD t 7 Seg displays, keypads, switches, port controls, many bus interfaces including 1 1C and Dallas (Button, AVR/P1C Hardware, and more. * Connect software components to MCU pins by point & click * Parameters set from drop down list boxes, check boxes, or text entry' * Links your CGde automatically into library events (e g. Button Pressed, Byte Received etc.) * Automatically generates your base application including full initialisation, interrupt handling and main program loop * i he complete C Compiler and AVR Simulator programs are integrated into AVID.ICY - total editing / compilation assembly / simulation support in one program * Also includes the Element Editor to enable you to create your own components with ease, * Demonstration available from our web site Prices from £45.00 - details & demo from www.foredxo.uk Forest Electronic Developments 01 590-681 51 1 (Voice/Fax) email : info@forecLco.uk www.fored.co.uk Also programmers, ICE, & development systems 116 ABir strirosHS - 7-8- 2005 Number One Systems - Oak Lane - Brecon - Tewkesbury - GIos - Linked Kingdom - GL2G 7LR UK Easy- PC version 9 Just gets better Winning accolades the world over, Easy-PC for Windows V9 is another major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy-PC and prepare to be amazed at the power, versatility and remarkable value for money. Version 9 fetaures n 3D BoardView ■ New Win XP User Interface Cl Reverse Engineer 5CM from PCB 0 Track Fattening ■ Interactive Schematic Routing M New SndmgToofbars □ Component Clearance Checks M Alphanumeric Pin Names Plus many more exciting features,,*,, Fully integrated Schematics & PCB layout in a single application complete with forward and back annotation. Design and rules checks at all stages ensure integrity at all times. Professional manufacturing outputs allow you to finish the design process with ease* Stop press... Stop press... Stop press... Stop press, Easy-PC imports Eagle files as well asTsien Boardmaker 2 files call for a brochure, prices & CD on *44 <0) ! 684 773662 or e-mail sales@numberone.com you can also download a demo from www.numberone.com P - : / For rapid development of electronic systems... BLOCKS E-b'ocks are small droil boards sscfi of which contains a bfock of dectronics typtcafiy found in en electronic system. E-t’oefcs can, Cib programmed in C, Msemb - y and aro fchtSy integrated with Flow-code - which instafiBy converts flow charts tn!o PLCm'oro code. Low cost USB PIC programmers Hi £27. nHdfii * .plus a wide range of ...... plus Incredibly easy ...equals extremely rapid system add-on boards and Eo use software based on development like this mobile text messaging accessories.-* flow charts.,* system built from E-blocks* ...and solutions for learning and development... Hands on training courses Resources for teaming Complete courses In CPLD programming electronics and programming Equipment for datalogging, control and PC "scopes mi m EH m www.matrixmultimedia.co.uk Matrix Multimedia Limited sate s@matrixrmi I timedia, co.uk t 0870 700 1831 f* 0870 700 1832 117 7- S/2005 ■ -:=ktc: r kite ::s Valve Sound Converter +Ua the job. To avoid ripple on [he power sup- Stefan Deltemann Volvo sound'' is not jus! an anachronism: [here are [hose who remain ardent lovers of the quality of sound produced by a valve amplifier. However, no[ everyone Is inclined fo splash out on on expensive valve output stage or complete amplifier with o comparatively low power output. Also, for all [heir aesthetic qualities, mod- em valve amplifiers bum up [in the Full sense of the word!) quite a few watts even of normal listening volume, and so are not exactly environmentally harmless. Th is valve sound converter offers o cun- ning way out of this dilemma. IMs a low- cost unit that can be easily slipped into the audio chain at a suitable point and it only consumes a modest amount of energy. A valve sound converter can be constructed using a common-or-garden small-signal amplifier using a readily-ovaiS- able tnode. Compared to using o pen- tode, this simplifies the circuit and, thanks to Its less linear characteristic, offers even more valve sound. For stereo use a dou- ble triode is ideal. Because only a low gain is required, a type ECC82 (12AU 7] is a better choice than alternatives such as the ECC81 (12AT7) or ECC83 (1 2AX7], This also mokes things easier for homebrewers only used to working with semiconductors, since we can avoid any difficulties with high voltages, obscure transformers and the like: ihe amplifier stage uses an anode voltage of only 60 V, which is generated using a small 24 V transformer and a voltage doubler [D3, D4, C4 and C5), Since the double triode only draws about 2 mA at this volt- age, a 1 VA or 2 VA transformer will do ply and hence the generation of hum in Ins converter, the anode voltage is regu- lated using Zener diodes D1 and 02, and T1 , The some goes for ihe heater supply: rother than using AC, here we use a DC supply, regulated by 1C \ . The 9 V trans- former needs to be rated at ot least 3 VA. As you will see, the actual amplifier cir- cuit is shown only once. Components C 1 to C3, R1 to R4, and PI need to be dupli- cated for the second channel. The inset valve symbol in the circuit diagram and the base pinout diagram show how the anode, cathode and grid of the other half or the double tricde (VI .8) are connected. Construction should not present any great difficulties. Poy particular attention to screening and cable routing, and to the placing of the transformers to minimise the hum Induced by their magnetic fields. Adjust PI to set ihe overall gain to 1 (0 dB]. The output impedance of 47 Hi is relatively high, but should be compatible with the inputs of most power amplifiers ond preamplifiers. For o good valve sound, the operating point of the circuit should be set so that the audio output voltage is in the region of a few hundred millivolts up to around 1.5 V. If the valve sound converter is inserted between a preamplifier ond the power amplifier, it should be before the volume control potentiometer as otherwise the sound will change significantly depending on the volume. As an exam- ple, no modifications are needed to an existing power amplifier if the converter is inserted between the output of a CD player and the input to the amplifier. IN 40 02 ns elektor ebtfroniK - 7-&/200S THD: Sallen-Key versus MFB +15V +15V o' ;0 0.005 0,002 0,001 0.0005 0,0002 0.0001 Ton Giesberfs There are various types of active filters, and the Sallen-Key version is probably the most commonly used type. A voltage follower is usually used for such filters, although gain can also be realised using two additional resistors. A disadvan- tage of this type of fil- ter is its relatively high sensitivity to compo- nent tolerances. Mea- surements made on such Filters hove shown that component varia- tions affect not only the filter characteristic but also the amount of distortion. Hoy/ever, an advantage is that filters mare complex than third-order types con olsa be realised using a single amplifier stage, although severe require- ments ore placed on the component val- ues in such cases. One of the alternatives to the Sallen-Key filter is the 'multiple feedback' [MFB] fil- ter. It awes its name to the fact that the feedback occurs via two paths. The invert- ing architecture can perhaps be regarded os a slight disadvantage, but that is offset by the fact that non-unity gain can be obtained without using extra components. In addition, the filter is less sensitive to component tolerances. Another drawback is that the implementation is restricted to third-order filters, so additional stages (and thus opamps) are necessary for higher-order filters. That's all very nice, you might think, but how con multiple-feedback filters be cal- culated? That's practically impossible to do by hand. Fortunately, various software programs have been developed to do this for you, such os the quite usable filferPro program from Texas Instruments, which can even calculate component values that exactly match the various E series. For both types of filter, we designed a 20- kHz low-pass Burterv/arth bandpass filter using o standard TL081 1C [Figures 1 and 2] and then measured the distortion in the output signal for □n input signol of 5 V rm5 . Standard poly- ester (MKT) capacitors were used in the cir- cuits. To make the ulti- mate result mare dis- tinct, we intentionally used o simple opamp i.TLOSl) and avoided using expensive polypropylene, poly- styrene or silver-mica capacitors. The results of the meas- urements can be char- acterised as astonish- ing. The multi pie-feed- back filter proved to generate considerably less distortion than the Sallen-Key archi- tecture. Figure 3 shows the measure- ments for the two filters, which speak for themselves. The amplitude curves were the same within a few tenths of a dS. The Sollen -Key fitter clearly generates up to more than ten times as much distortion at certain frequencies. With the Sallen-Key architecture, better results can be obtained by using better capacitors and opamps (such as an OPA627). From the results, it is clear the multiple-feedback architecture is less sensitive to the compo- nents used in the filter. 25k C - 15 FilterPro: r. : / / focus. £i com / docs /tool s w / re o ; - : ■ or riireroro.html 0S47K-1 7-6/2005 - dcktej efectjtmks 119 ectroiie FC3 7fiLQe — 0 IQ pump o E40C3QO magnet WK45-11 Robert Edlmger Summers] me is holiday time but who will be locking after your delicate housepfants while you are away? Caring for plants is very often a hit or miss orfair, sometimes you under-water and other times you over- water. This design seeks to remove the doubt from plant care and keep them opti- mally watered. The principle of the circuit is simple: first the soil dampness is measured by pass- ing o signal through two electrodes placed in the sail The moisture content is inversely proportional to the measured resistance. When this measurement indi- cates it is too dry the plants ore given a predefined dose of water This last part is important for the correct function of the automatic watering can because it takes a little while for the soil to absorb the water dose and for its resistance to fail. If the water were allowed to flow until the soil resistance drops then the plant would soon be flooded. The circuit shows two 555 timer chips IC1 and 1C2. 1C I is an ostable multivibrator producing on ac coupled square wave at around 5C0 Hz for the measurement elec- trodes F and FI. An ac signal reduces electrode corrosion and also has less reaction with the growth-promoting chem- istry of the plant. Current flowing between the electrodes produces a signal on resis- tor R 1 3- The signal level is boosted and rectified by the voltage doubler produced by D2 and D3. When the voltage level on R l 3 is greater than round "1 .5 V to 2.0 V transistor T2 will conduct and switch T3. Current flow through the soil is in the order of ] 0 pA. T2 ana 13 remain conducting providing the soil is moist enough. The voltage level on pin 4 of 1C2 will be zero and IC2 will be disabled. As the soil dries out the sig- nal across R13 gets smaller until eventu- ally T2 stops conducting and T3 is switched off. The voltage on pin 4 of IC2 rises to a ' 1 J and the chip is enabled. IC2 oscillates with an 'an' time of around 5 s and an 'off' time (adjustable via P2J of 10 to 20 s. This signal switches the water pump vio T1 , PI allows adjustment of the minimum soil moisture content necessary before watering is triggered. The electrodes can be made from lengths of 1 .5 mm 2 solid copper wire with the insulation stripped off the last 1 cm. The electrodes should be pushed Into the earth so that the rips are at roughly the same depth as the plant root ball. The distant between the electrodes is not critical; a few centimetres should be sufficient. The electrode tips can be tinned with solder to reduce any biological reaction with the copper surface. Stainless steel wire is a better alternative to copper, heat shrink sleeving can used to insulate the wire with the lost 1 cm or the electrode left bare. Two additional electrodes (FI) are con- 120 ekktor electronics - 7-8/2D05 necfed In poralle] to the soil probe elec- trodes (F). The F 1 electrodes are for safety to ensure that the pump is turned off if for some reason water collects in the plant pot saucer A second safety measure is a float switch fitted to the water reservoir tank. When the water level falls too low a Hooting magnet activates a reed switch and turns off the pump so that it is not damaged by running with a dry tank. Water to the plants can be routed through closed end plastic tubing [with an Internal Precision I Amplifier Hergen Breitzke Designs for good-quality headphone amplifiers abound, but this one has a few special features that make It stand out from the crowd. We start with a reasonably conventional input stage in the form of a differential amplifier constructed from dual FET T2/T3. A particular point here is that in the drain of T3, where the amplified signal appears, we do not have a conventional current source or a simple resistor. T1 does indeed form a current source, but the signal is cou- pled out to the base of T5 not from the drain ot 13 but from the source of T1 . Notwithstanding the action of the current source this is a low impedance point for AC signals in the differentia! amplifier Measurements show that this trick by itself results in a reduction in harmonic distor- tion to considerably less than -80 dB (much less than 0.01 %) at 1 kHz. T5 is connected as an emitter follower and provides a low impedance drive to the gate of 16: the gale capacitance of HEXFETs Is far from negligible. 1C I , a volt- age regulator configured os a current sink, Is In the load of 16. The quiescent current of 62 mA (determined by R1 1) is suitable for an output power of 60 mW £ :: into an impedance of 32 Q, a value typical of high-quality headphones, which provides plenty of volume. Using higher-impedance headphones, say of 300 Q, considerably more than 100 mW con be achieved. The gain is set to a useful 21 dB (o factor of 11) by the negative feedback circuit Involving R10 and R8. It is not straightfor- ward to change the gain because of the single-sided supply: this voltage divider also afreets the operating point of the diameter of around 4 to 5 mm) to the plant pots. The number of 1 mm to 1 .5 mm outlet holes in the pipe will con- trol the dose of water supplied to each plant. The soil probes can only be inserted Into one flowerpot so choose a plant with around overage water con- sumption amongst your collection. Increas- ing or decreasing the number of holes In the water supply pipe will adjust water supply to the other plants depending on fheir needs. A 1 2 V water pump Is a good choice for this application but If you use □ mains driven pump It Is essential to observe all the necessary safety precau- tions. Last out not least the electronic watering can is too good to be used just for holi- day periods, it will ensure that your plants never suffer from the blight of over or under-watering again; provided of course you remember to keep the water reservoir topped up.,. eadphone +40V amplifier. The advantage is that excellent audio qualify con be achieved even using o simple unregulated mains supply. Given the relatively low power output the power supply is considerably overspecified. Noise and hum thus remain more than 90 dB below the signal (I ess than 0.003 Ta], and the supply can also power two amplifiers for stereo operation. The bandwidth achievable with this design is from 5 Hz to 300 kHz into 3C0 Q, with an output voltage of 1 0 V pp . The damping factor is greater than 800 between 100 Hz and 10 kHz. A couple of further things to note: some- what better DC stability can be achieved by replacing D I and D2 by low-current red lEDs [connected with the right polarity!). R 1 2 prevents o click from the discharge of C6 when headphones are plugged in after power is applied. To and 1C 1 dissi- pate about 1 .2 W o'r power each as heat, and so cooling is needed. For low imped- ance headphones the current through 1C "i should be increased. To deliver 100 mW 7 -S/2005 - ebktoi iltctronks 121 mto S n, around 160 mA is required, and R 1 1 wifi need to be 7.8 Q (use Kvo 1 5 Q resistors [n parallel). To keep heat dissipa- tion to a reasonable level, if is recom- mended to reduce the power supply volt- age to around 1 8 V [using a transformer with two 6 V secondaries). This also means an adjustment to the operating point of the amplifier: we will need obout 9 V between the positive end of C6 and ground. R4 should be changed to 1 CO Q, and R8 to 680 O. The gain will now be approximately 6 [1 5 dB). The final dot on the T is to increase C7 by connecting another 4700 pF electrolytic in parallel with it, since an 8 Li lead will draw higher currents. USB Power Booster Myo Min Power shortage problems arise svhen too many USB devices connected to PC are working simultaneously. All USB devices, such as scanners, modems, thermal print- ers, mice, USB hubs, external storage devices and other digital devices obtain their power from PC. Since a PC con only supply limited power to USB devices, external power may have to be added to keep all these power hungry devices happy. This circuit is designed to add more power to a USB cable line, A sealed 1 2- V 750 mA unregulated wall cube is cheap and safe. To convert 1 2 V to 5 V r two types of regulators, switching and lin- ear are available with their own advan- tages and drawbacks. The switching reg- ulator is more suitable to this circuit because of high efficiency and compact- ness and now most digital circuits are Immune to voltage ripple developed dur- ing switching. The simple switcher type LM2575-5 is chosen to provide a stable 5 V output voltage. This switcher is so sim- ple if just needs three components: on inductor, a capacitor and a high-speed or fast-recovery diode. Its principle is that internal power transistor switch on and off according to a feedback signal. This chapped or switched voltage is converted to DC with o small amount of ripple by D1,11 and C2. The LM2575 has an ON/OFF pin that Is switched on by pulling it to ground. It , R2, and R1 (pull-up resistor) pull the ON/OFF pin to ground when power sig- nal from PC or +5 V Is received. D2, o red LED with current resistor R3, serves to indicate 'good' power condition or stable 5 V. C3 Is a high-frequency decoupling capacitor. The author managed to cut a USB coble in half without actually cutting data wires. If Is advisable to look at the USB coble pin assignment for safety. Dual Oscillator for fiCs Ton Giesberts The MAX 73 78 contains Kvo oscillators and a power-on reset circuit tor micro- processors. The Speed input selects either 32.768 kHz (IF] or o higher frequency, which Is propreg rammed* The type number corresponds to the standard pre-pro g rammed value and the value of the reset threshold. There Is a choke of two thresh- old values: 2,56 V ond 4.29 V. Both thresholds are available with all standard frequencies,, which are I MHz, 1 .8432 MHz, 3.39545 MHz, 3,6864 MHz, 4 MHz, 4.1943 MHz r and 8 MHz, However, any frequency between 600 kHz and 1 0 MHz Is also possible. An internal synchronisation circuit ensures that no glitches occur when switching between the Kvo oscillators. The Reset out- put o! the MAX7378 is available in three different options. Two of the options are push-pull types, either active low or active high. The third option is open drain, which thus requires an external pull-up resistor. That is the only standard option (which Is why a resistor In dashed outline 122 dektor dictrDitirs - 7 - 8/2005 is shown connected to the Reset output). The Reset signal remains active for 100 Lis after the supply voltage rises above the threshold voltage. The Reset signal becomes active immediately if the voltage drops below the threshold. The 1C is powered via two separate pins. The V L pin powers ihe reset and oscillator circuitry, while the Vq^ pin powers the remainder of the chip. The two pins must always hove the same potential. Good decoupling in the form of two 100-nF ceramic capacitors [SMD types) is also necessary. The 1C is housed in the tiny 8-pin uMAX package and has dimensions of only 3.05 x 5.03 mm including pins, with o pin pitch of only 0.65 mm. Unfortunately, (he accuracy of the oscilla- tors is not especially good. The HF oscilla- tor has an error of ±2% at 25 c C with a 5-V supply voltage and a maximum tem- perature coefficient of +325 ppm, which doesn't exactly correspond to crystal accu- racy, but it is certainly usable for most non- time-critical applications. The error over ihe full supply voltage range (2. 7-5. 5 V] is twice as large. The 32.76S-kHz oscilla- +u s © tor is more accurate, with an error of only 1 % of 5 V ond 25 -C, although this is still a bit too much for time measurements. The error can be os much as ±3% over the entire supply voltage range. The maximum current consumption is 5.5 mA r which is relatively low. Step-up Converter for 20 LEI s Dirk Gehrke The circuit described here is a step-up con- verter to drive 20 LEDs, designed to be used as a home-made ceiling night light for a child's bedroom. This kind of night light generally consists of a chain of Christ- mas tree tights with 20 bulbs each con- suming 1 W, for a total power of 20 W. Here, in the interests of saving power and extending operating life, we update the idea with this simple circuit using LEDs, Power can be obtained from on unregu- lated 1 2 V mains adaptor, as long as if can deliver ai least about 330 mA. The circuit uses a low-cost current-made con- troller type UCC3800N, reconfigured info voltage mode to create a step-up converter with simple compensation. By changing the external components the circuit can easily be modified for other applicaiions. To use a current-mode controller as a volt- age-mode controller it is necessary to cou- ple a sawtooth ramp (rising from 0 V to 0.9 V) to the CS (current sense) pin, since this pin is also an input ro the internal PWM comparator. The required ramp is present on the RC pin of the 1C and is reduced to the correct voltage range by the voltage divider formed by R3 and R2. The RC network formed by R4 and Co is dimensioned to set the switching fre- quency at approximately 525 kHz, The comparator compares the romp with the divided-down version of the output 7 - c 2005 - elektur electronic 123 voltage produced by the potential divider formed by R6 and R 7. Trimmer PI allows the output voltage ta be adjusted. This enables the current through ihe LEDs Id be set lo a suitable value for the devices used. The UCC3800N starts up with an Input voltage of 7.2 V and switches off again if the input voltage foils below 6.9 V. The circuit is designed so that output voltages of between 20 V and 60 V can be set using PL This should be adequate for most coses, since the minimum ond max- Imum specified forward voltages for white LEDs are generally between 3 V and 4.5 V. For the two parallel chains of ten LEDs in series shown here a voltage of between 30 V and 45 V will be required. The power components D1, T1 and LI are considerably overspecified here, since the circuit was originally designed for a different application that required higher power. To adjust the circuit, the potentiometer should first be set to maximum resistance and a multimeter set to a 200 mA DC cur- rent range should be inserted in series with the output to the LEDs. Power can now be applied and PI gradually turned until a constant current of 40 mA flows. The stepKjp converter is now adjusted cor- rectly and ready far use. — § “ * ► 3 * rl — Resistor-Programmable Temperature Switch Tiu°C im -40 150 kQ 35 62 kn -30 136 kn 40 57.6 kn -20 122 kn 45 53.3 kn -10 3 08 kn 50 49.2 kn -5 102 kQ 60 41.3 kn 0 96.5 kn 70 33.9 kn 5 92 kn 80 27 kn 10 86.2 kn 90 20.4 kn 15 81 kn 100 14.1 kn 20 76 kn no 8.2 kn 25 71 kn 120 2.6 kn 30 66.5 kn 125 0 1 +2V7...+5VS * ass text M AX6509C Ts=T TseT + HYST MAX6509H - Tsst-HYST 7s=t 040431 -11 Gregor Kfeine The switching threshold of the MAX65G9 temperature switch from Maxim fwww. maxim-ic.com) can be pro g rammed over a range of -40 r C to + 125 C using an external resistor. The 1C needs only two external components [see Figure T ]. A hysteresis volue of 2 C (typical) or 10 'C (typical) can be selected by connecting the HYST pin to ground or Vec, respectively. The standard version of the 1C is the MAX6509C, which pulls Its open-drain output to ground when the temperature is below the threshold value set using the resistor. As shown in Figure 2, this ver- sion of the 1C can be used to control a fan via an external MOSFET. The MAX6509H version has an inverted out- put, which means it is switched to ground when the temperature Is above the thresh- old, A possible application for this version is switching on a heater in an oven when the temperature drops below the set point. The 1C is housed in a SOT232 SMD package (Figure 3). The MAX6509 operates over a supply voltage range of +2.7-5.5 V with o supply current of only approximately 40 pA. The result- ing self-heating is thus small enough ta avoid corrupted temperature measure- ments (as long as the output transistor is not required ta switch high currents to ground). The table lists suitable val- ues of resistor R^c- tor various threshold temperatures. The companion MAX65 1 0 hos an output stage that con be configured via a sepa- rate pin. The options ore active high, active low, and open drain with an Inter- nal pull-up resistor. Like the MAX6510, MAX 6 5 1 0 is available in a -C version (open drain when the threshold tempera- ture is exceeded] and an -H version (out- put pulled to ground when the threshold temperature is exceeded). A.±y.- m . Jci R2 © IC1 HYST m jt" UUI MAX 6509 R5=T - hi +5V -© &u IRF7607 351426 040431 -12 3 Tcp View MAX6509 HSETH 1 5]VCC GND£ 2 OUT [ 3 4 ]HYST SOT23-5 Top View MAXB5W RSET[ 1 fihvcc GH0[ 2 5 ] OUTSET OUT [ 3 4 3 HYST 5OT23-6 04W3I -13 124 dektor eletlitmits - 7-8/20Q5 Express PCI-Express lx Paul Goossens connector with only 26 connections. The connection detoils for the PCI Express con- nectar are shown in Table 1 . There are onfy four signals on Inis connec- tor that lake care of the actual data trans- mission via the PCI Express protocol. These are the signal pairs PETnO/PETpG and PERnO/PERpO. Signal pair PETxO (PCI Express Transmit 0] moves data from the host (PC) to the slave (slot), while PERxO (PO Express Receive 0) moves the data in the opposite direction. The smoll letter p or n denotes the polarity (positive or negative). The data has to be in step with a clack signal, provided by the signal pair CLK+ □nd CLK-. The rest of the connections are for the sup- ply, plus a few more signals for house- keeping tasks. It is noteworthy that the corv nector also has a USB port and an SMBus (a type of l_C bus). This bus is used in PCs for power management and system moni- toring. PCI Express cards could, for exam- ple, return measurements of the supply voltage and temperature. The PC could also put the expansion card into standby mode while if wasn't needed. Faster versions of PCI Express make use of multiple transmit and receive channels, (hence the '0' in, for example, PERnO), In this way a farm of parallelism is still used to provide a speed increase. 'rA'.z-i-i. Many new PCs now come equipped with one or more PCI Express slots on the motherboard. Eventually, PCI Express will make the old PCI standard obsolete, but for now most expansion cards still use the (old) PCI standard. The old standard (PCI ] .0) had a maxi* mum bandwidth of 133 MB per second. In the meantime there have been many developments in the computer industry. We can now watch videos over the Inter- net, as well os listen to the radio. MP3s (also unheard of then) are decoded in real-time, while we might also watch a DVD in another window. All these applications place a big demand on the PC hardware. To process these data streams efficiently, contempo- rary PCs have a separate memory bus, another bus for the graphics card (AGP) and yet another bus (PCI) that lets the processor communicate with expansion cards. There have been several enhancements to the PCI bus (e.g. the 66 MHz PCI bus, 64 bit versions, etc.), hut the time has coma for a complete overhaul. The result is PCI Express. The xl version has a bandwidth of 250 MB/s, but other versions are wait- ing in the wings (including a xV6 version) to provide even greater band widths. One way in which the data rate can be increased is to increase the number of bits that are moved at the some time. This technique has already been used In processors to increase their speed. For PCI Express however, a serial transport mechanism was chosen (as with SATA, USB, firewire, efc.). The slowest version of PCI Express uses a Pin Name From To Description 1 GND N/A Ground 2 USBD- bidirectional USB signals 3 U5BD+ 4 CPUSB slave host Detection of USB device 5 reserved 6 reserved 7 SMBCIX SMBus dock 8 SMBDATA SMBus data 9 +1.5V N/A + 1 .5V supply voltage 10 +1.5V 11 WAKE slave host Wake-up signal for host 12 +3.3V N/A +3.3V supply voltage 13 PERST host slave Reset signal 14 +3.3V N/A +3.3V supply voltage 15 +3.3V 16 CLKREQ slave host Clock request 17 CPPE slave host PCI Express detection 18 REFCLK- host slave Differentia! clock signal pair 19 REFC1X+ host slave synchronous with data 20 GND N/A Ground 21 PERnO slave host Differential data signal pair 22 PERpO slave host from slave to host 23 GND N/A Ground 24 PETnO hast slave Differential data signal pair 25 PETpO host slave from host fo slave 26 GND N/A Ground 7-8/2005 - ddrlof electronic ns Ton Giesberts Steep filters can be realised in many differ- ent ways, for example by connecting active 2 rz to 5^-crder sections in series and calculating ihe component values for the higher order. They can also be made passive, but in practice this has a few dif- ficulties associated with it. You cannot ovoid the need for inductors with values that deviate from the standard series. You will have to wind them yourself on a spe- cially selected core. The filter presented here was originally designed to enable measurements to be made on the Class-T Amplifier (yes indeed, the one in Elektor Electronics , June 2004). When designing and testing audio equip- ment, we use o System Two Cascade Plus Analyzer made by Audio Precision. The accuracy of the measurements with this instrument is reduced if frequency compo- nents above 200 kHz are present at signif- icant levels. This is the case with aur amplifier, particularly at low signal levels. We immediately went for large artillery, namely a 9^-order elliptical Filter. During the design of the filter we made use of nor- malised tobies. In the end it became a fil- ter with identical termination impedances, which unfortunately means an attenuation of two times within the pass band. When converting to realistic values we selected pure El 2-series values for Cl (+C2). All capacitors are arranged as two in paral- lel in order to closely approximate the cal- culated value. This applies to the resistors as well. With the inductors there is no way to avoid 'funny' values and series or paral- lel connections don't make much sense because to achieve a certain quality, stan- dard coils are not appropriate. So we had to think of o solution ourselves. The input and output impedance ore theoretically 1 .060 kQ and ore approximated quite well with components in parallel (1 1 05996 kQ). By making use of a volt- age divider it becomes possible for R3 to handle a higher voltage (otherwise note the dissipation of R1 1). Any voltage divider needs to have an output impedance of 1 .06 kn (R 1 / /R2//R3], In the last sec- tion, the parasitic capacitance of the con- necting cable and input impedance of the analyser has been taken into account. Trimmer Cl 9 can be used to compensate the attached capacitance and R5 can be omitted if the input impedance is about 100 Hi. A deviation of about 50 pF makes liflle difference to the amplitude characteristic in the pass-band. The advantage of an elliptical filter com- pared to, for example a Chebyshev filter, is to irade off a limited attenuation in ihe stop- band to a much steeper transition from pas*- to stopband. It suffices to men- tion that the curve from 180 kHz to 200 kHz falls by more than 60 dB, quite steep and certainly nol bad for o passive filter! In practice the attenuation in the stopband at -63 dB was a little lower thon the theoretical value of 60.2 dB, which was the design value. Frequency characteristic A shows mainly the stop4xind and ihe characteristic behav- iour of an elliptical filter can be clearly seen. Frequency characteristic B shows an enlarged version of the ripple in the pass- band, which also shows the phase behav- iour of the filter (scale on the right). At 20 kHz ihe attenuation is only 0,1 dB and the phase shift only -30% The first dip of only -0.263 dS occurs at about 46 kHz and the attenuation at 100 kHz is only 0.276 dB. Above that, the non-ideal behav- iour of the components becomes noticeable and ihe curve starts to drop a little too soon, but the characteristic elliptical behaviour is still clearly visible at 1 80 kHz. The filter proved to be quite useful In Fil- tering the PWM signal and analyse the LF- amplitude. The only disadvantage is the increasing distortion at 20 kHz (from 0.5 V input signal) so that good THD+N measurements can only be done at 1 kHz. This can be seen dearly in Graph C. With 1 W into 8 Q (2,828 V) the distortion at 1 kHz is less than 0.001%, but at 20 kHz the distortion is C3 C7 Ctl CIS 126 ctsklcr ekrtronks - 7-8/2005 COMPONENTS LIST Resistors: R 1 ,R4 = ]kQQ7 K2,R5 = 1 1 3kn R3 - not fitted * Capacitors: C 1 ,C1 4 = not fitted T C2,C5*C1 1 ,C 1 3 - I nF 500V 1% silvered mica (Fame!! 866-012] C3,C8,C12 - 1 20pF 500V 1% silvered mica (Famed 867-901] C4 = 6pF8 500V l c , silvered mica (Farnsli 867-779) C6.C15 = 270pF 500V 1% silvered mica (Parnell 867-949) C7,C9 = 680pF 500V 1% silvered mica (Farnell 867-998) C 1 Q,C ] 8 = 1 8QpF 500V 1 % silvered mica (Farnell 867-925) Cl 6 = 220pF 500V 1% silvered mica [Farnell 867-937] Cl 7 = 470pF 500V 1% silvered mica (Farnell 867-974] C19 - lOOpF trimmer Inductors: LI - 1 mH 15, 115 turns of 0.5mm dia. ECW on core TN23/1 4/7-4C65 from BCcomponenis (Farnell # 1 80009) 12 = 689pH 89 turns of 0.5mm dia. ECW an core TN23/ 1 4/7-4C65 from BCcomponents (Farnell =? 180-009) L3 = 557uH r 80 turns of 0.5 mm dia. ECW an core TN23/14/7-4C65 from BCcampanenls (Farnell 1 # 80009) 14 - 802pH r 96 turns of 0.5mm dia. ECW on care TN23/1 4/7-4C65 from BCcompanents (Farnell # 1 80-009] Miscellaneous: K1 ,K2 = cinch socket, PCB mount, e g., T- 709G (Mo n a cc r/ Mo n a r c h ) FCB, available from The PCfiShop see text 20 times larger. In this measurement the maximum input signal was 13.33 V (max- imum from the analyser). Far those who love to experiment and wind Inductors, we have also designed a FCB. A low permeability core material [TN23/14/7-4C65} was selected For the inductors, so thot saturation and material properties are less oFa problem. Unfortu- nately this results in a higher number of turns, but also means that the inductor value con be made more accurate, A larger core may have resulted in a lower distortion, but it would have been harder to obtain an accurate value. Toroids were selected to minimise mutual coupling — that this was successful is shown in Graph A. It is easiest when winding the cores to calculate the amount of wire required beforehand and then add 1 0 or more centimetres. You have to wind rightly and put She [urns close together to prevent the second layer drop- ping in between the first layer. This applies to the inside of the ring core. When using 0.5 mm enamelled wire the second layer turns easily fit between ihe first layer turns. The PCB hos been designed such that com nedions con be made In several places (3 Inside a quarter circle). The capacitors are 1 % silvered mica types with on operating voltage of 500 V. That way even extreme voltage peaks will not cause any harm. There is also room far 1 % tolerance 'Sfy- roflex' (polystyrene) capacitors from Siemens (that are not mode any more), which we have used in the past. Olher manufacturers also use this shape. Theoretical component values R 1 //R2 = 1 .060 k£l R4//R5 = 1 .060 lc£l C1+C2 = 1.000 nF C3+C4 = 128.0 pF C5+C6 = 1.277 nF C7+C8 = 809.0 nF C9+C10 = 860.4 nF Cl 1+0 2 - 1.125 nF 0 3+0 4 = 996.8 pF 05+06 = 492.7 nF 0 7+0 8+0 9 = 742.4 pF 11 - 1.148 mH L2 = 693.3 pH L3 = 556.4 pH 14 = 809.6 pH 7-8/2005 * elcktof Monies 127 Adjustable Duty Cycle 50f O 10f o I Cl , A 14 CT-0 CTR 14 .ISIS DIV2 f ■ ■ DIV5 (0 ± CT / T vl t U 13 1 11 10 9 13 15 CTFLDIV10/ 0 DEC t i C 2 & 74HC4Q17 CT=0 lOGn q 10% 4 20% <5) iCI.B 430% 1 2 CTR + 40% CT=0 044011 - 11 Gregor Kleine The circuit shewn here can be used to convert a digital input signal having any desired duty cycle inlo a output signal having a duty cycle that can be adjusted between 10% and 80% in steps of 1 0%. The circuit is built around a 74HC4017 decade Johnson counier 1C. Individual pulses appear an the ten outputs (GQ-G9) of this 1C at well-defined times, depending on the number of input pubes (see the timing diagram). This characteristic is utilised in the circuit The selected output is connected via a jumper lo the Reset input (MR, pin 2] of a 74HC390 counter. A High level resets the output signals of the 74 HC 3 90 counter, Q9 of the 74HC4017 is permanently connected to the CP0 input of the counter to set the GO output of the 74HC390 (pin 3) High on its negative edge. As can be seen from the timing diagram, which shows the signals for a duty cycle of 30% as on example, this produces a signal with exactly the desired duty cycle. The circuit cannot be used to produce a duty cycle of 1 0% (which would be equiv- alent to taking the signal directly from the Q0 output of the 74HC401 7] or 90%. In both cases, the edges of the pubes used for the count input (CP0) ond the asyn- chronous reset input (MR) of the 74HC390 would coincide, with the result that the output state of the 74HC390 would not be unambiguously defined. The input frequency must be ten times the desired output frequency. If the second half of the 74HC39G Is wired as a prescaler, a prescaling factor of 2, 5 or ]Q con be achieved, thus allowing the ratio of the of input frequency to the output frequency to be 20, 50 or 1 00. If She circuit is built using components from the 74HC family, it can be operated with supply voltages In the range of 3-5 V. C4S1M; 128 tbktor eledronks - 7-S/2Q05 Bridge-Rectifier fLEO Indicator &1 & 044026-91 i re-teieo an : osi 25 50 44^50 117 50 46.05 142.95 83.95 220.95 EVERGREENS £ S Elektor Electronics Help Disk 556022- 1 D £ ■. Vt tv 20 s v e=t • n 8-15 14.45 Elektor Electronics Item Tracer 1985-2003 C4 £003-1 1 ecrte fit e a atab i: da*: ,Y i-d-: a a ve r £ : n) 3-15 14.35 Universal Prototyping Boards UPB5-1 PCB 245 4.30 UPBS-2 2 FCBs 410 7.25 UP 65 -4 4 FCSs 655 11.55 No. 345 JULY/AUGUST 2005 £ s 1 MHz Frequency Counter 030045- 1 * u £ - s: b: : e : t.‘. a re 3-20 9.75 03JXK54 1 AT9QS23 1 3-t OP l . pr 'a ->d 5.50 10.35 Code Lock with One Button £40481-11 C e- source 5 fcs* f ,e& 520 9.75 047461-41 P C15FS4 programme 6-85 12.95 Digital VU Meter 050 116-11 C e k Aft n y software 5-20 9.75 GE0 113-41 Min y 1 5L- pr rajr n • s-d DiL/SOICrrSSOP Adapter Boards 3-40 6.45 040269-1 PCS fa r 2£ a ay DILIC 6-75 1270 C402S&-2 PCS ■=- 23-v. ST7 program 5-20 9.75 040239-41 5 F U7E05 r p re t. rr -:-i 6-55 12.35 Magnetic Flux Density Meter 040258-1 1 D e Pi C 53 u res cc-d a 5-20 9J5 049258-41 PfC'l6F875-2D.3P. p rc-irarr te-j 16-55 31.15 Products for older projects (if available) may be found on our website www.elektor-electronics.co.uk home construction = fun and added value £75 12.70 675 12 JO 3- 95 750 5-20 9.75 27-55 51.95 8-95 15.65 SNEAK PREVIEW USB Oscilloscope Test The 10 or so iruhrrmenls v/e're examining next month are small add-on boxes feat effectively turn your F C into an oscilloscope. All contain a fast A/D converter and a state of the art USB connection for easy connection to the PC. As with our previous tests of oscilloscopes and power sup' plies, the instruments will be critically evaluated for hard- ware & software performance, price and ease of use, Theme Plan for 2005 January .Power Supplies February . . . .Wireless March Sound April ...... .Microcontrollers May ...... .Sensors June ...... .Environment July/August . .Summer Circuits September .Test & Measurement October .... .Security November . . ,CAD Software December . . . Optoelectronics Xbox Modding & Surgery Jn inis article we explain how with 'minor surgery' ^box game computer can be made to do things its manufacturer ei iher wouldn't have dreamed of or wouldn't want you to know. In other words we have some serious Xbox modding up our sleeve. Autoranging Capacitance/ESR Meter This test instrument for capacitors designed by Flemming Jensen is not easily Found commercially. Although the capacitance meter function is obvi- ous, we should mention that It Is capa- ble of handling really large values. The ESR function allows the quality (loss factor] of a capacitor to be accurately measured without removing ihe device under lest from the circuit! The instru- ment is controlled by two PIC micros and ins readout is a twodine LCD. Also... USB-R5232 Hurdle Race, Barometer/ Altimeter, Commercial Break Silencer, Ez30Acclaim. RESERVE YOUR COPY HOW! Ife Sspk-ier MS mis gees z?, soh m Snliwi 20 MS IUK r - !•„ UK subscribers vrili receive the magazine o fe w days before this dale. Article titles and rnnpsne content; subject to change. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Plesae save / deliver one copy of Elektor JUectroiiics magazine for me each month Name: Address: Post code: Telephone: Date: Signature: i a ■- ■ ■ #■ ■ ■ m A i ■ ■ * * ■ * lektor ronics n g the? w s y Please cut out or photocopy this form, com- plete details and hand to your nev vs a gent, EJeJcTor Electronics is published on the third Friday of each month, except in July. Distribution S.Q.R. by Seymour (NS). Atrgood Technology Showcase v,'av.:& foodtmnabgpciim . , , .135 Autikrcpress. Showcase yv.wv.au 'riAZ'ass.zom ................. .136 Avtt Research ... avflresesrcfi.ee. . ... .... .49 Beta Layout Shu /.case ............. .vrAw.pcn-pcs icon ..... ... .49, 135 The 6ucK3flxCaru2ra ...... .aw vv:SP/57-j£'4.ce.ufc 59 Bteadboardlng Systems .......... ay.-.v,£ trials *tti ... .31 Bum Technology LTD, Showcase ...... .w.v w bn mac. Lam ..................... ,1 35 CMS .\\ . w cmsuK cum .... .... ....... .7 CompucuL Shu wcase , w ■, ■, v.: cornuu cuitS’S. cam ........... .136 Conic rd Bectronics. She wcase . .w-vw. cc r h rdc :sc.co.uk 135 CriektewoGd ...................... AVAwaictt&vaGtistBC&o/i: 2 s.com ...... 116 Danbury. Showcase ...... ,»*av. . egfatfapfisttfeesoe ce.sA ......... .136 Display Bectronics ................. ./vv.vcn Fie-. co-Vk .58 LasysyrrC. Showcase ... .4rav/.eas}-5)7jc.c£?.-.'. .17, 135 Etnec. Showcase WAW.elnec-cam ............... ... .136 Eurocircufe .itv.v. menzesr-jp com .......... .1 35 ExpressPCB . AvwwexprESspcb. com ..... .7 Fast Components ,u ^ov.fastccmpcnants. cc.uk ... .59 Forest. Showcase isor med z □ m to whom all correspondence, copy instruciions and artwork should bE addressed. Index of Advertisers MCP Bectronics. ShD a case . . 140 eSiklet ;!itlroniti - 7 - 8/2005 p;ease supply the following For PCBs. rent pane! foils. EPROMs, PALs. GALs, microcontrsiiers and diskettes state :hn p?.n ber at.: description, for books, state the full title; for photocopies of articles, state fu -afue of art ide and month and year of publication. PLEASE USE BLOCK CAPITALS- Description price each Qty- Total Order Code CD-ROM Elektor 2004 £ ie .25 cd-rom Audio Collection 2 £ 12.05 Micro Web Server; IV1SC1 210 board £ 75.90 Network extension £ 44 , so Combined package z 117.50 Flash Microcontroller Starter Kit £ 59.00 Prr=5 4 ?-u ilsRi 5 sLb-stt lo Ciiarg? Ths publishers resem the right to change pr : : : - without prior nolifEistHin, Prices and hern dasertphans shown hers supersede these m previous issues. E & G E. SWITCH 01 y: issue number: Sub-total P&P Total paid Name* METHOD OF PAYMENT see reverse before ticking as appropriate Note: cheques not made out in sterling must he increased by the equivalent of £15*00 [~~j Bank draft \ | Cheque (payable to Bektor Etectranjes Pub fishing) □ Giro transfer (our account no. 34 152 3801) □ Postal/money order □ ^!sa Please ssnd this order for ” t; ' sea -e verse fo. r co r L d. Hie n s • Elektor Electronics {Publishing RO. Box 190 Tunbridge Wells TN5 7WY ENGLAND Address EL07- OS Postcode Fax Email Data — — 2005 Signature Ted (-r44 1 (0)1 530 £00 657 Fax: -44 i (0)1530 £00 615 I niem et wwvv.elekto r-stectfonicE ,co . uk * U S A = - eS . : r-i da je e : i e ■ ■ rs m sy ![>-: ve r r c* :-:d to) 5 : ' :ie. :t e: : e g:-z ej Old C □ ; d r.\ SciiJEd Le: P0. 3u ' 8/6. Peterborough UH 03458-0876 Te 503 5 24-637 1 . 924-5520, =.=> £03! 524-9467 Email: custss rv&autfioXp re =s ,c '3m ii ■ ■ t. ^ a . i. _ + ~ - T - .a. - m . w i -a t ■■ m m r ■ Yes, I am taking out an annual subscription to elektor electronics and receive a free f 28 MB USB 2.0 Flash drive. I would like: □ Standard Subscription (11 issues) □ Subscription-Plus (11 issues plus the Elektor Volu me 2005 CD-ROM} * Offer available to Si bsenbers who hat. a not hard a Subscription to Elektor Eieckomcs in the fast 72 Months, Offer Subject to Availability., Sea reverse for rates and conditions. METHOD OF PAYMENT ■see reverse before licking as appropriate Note: cheques not made out in sterling must be increased by the equivalent of £15.00 □ Bank draft f | Cheque . p ay a b ; s I o I i Ef jii : s -_b shin g . □ Gl ro transfer (our Eccgunl re. 34 T52 380’ ) l "~] Postal/money order k:: 1 1 <■ ■ M - j ° '■* } trim □ VISA T ■ tie (Dr in ?. !r$ fe w ) Initials Surname Niime - Address Pest cede Email Date - 2005 Signature ’ CrOSS Out y/r-st IS not app Hcable E L07 oe Expin. _ 2 :f: .. * - Please sand this, order form to Worldwide Subscription Service Ltd. Unit 4, Gibbs Reed Farm Pashiey Rood Tlcehurst, nr + Wadhurst East Sussex ENGLAND TN5 THE TeL (+44) (0)1580 200657 Fax (+4 4) (0)1580 200616 Email vr.vss^ VAVss.demon.ca.uk ORDERING INSTRUCTIONS, P&P CHARGES Except in t he USA and Canada, all orders, except for subscriptions (forwhictl see below). must be sent BY POST or FAX to our Tunbridge Wells acdrass using ns Order r ■ orsn overleaf. On-line order 1 no: fittp; wav. elektor-fllectron ics.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 m van on Ins order form. Please apply tc Old Colon;, Sound for applicable PSP charges. Please allow 4-3 v, eeks for der: , sty Orders placed on our Tunbridge Wells office must include P&P charges i Priority or Standard; as folio .vs: OK: £4.00 Europe: £5.00 (Standard) or £7.00 t Priority) Outside Europe: £8.00 {Standard - or £12* *00 (Priority) HOWTO PAY Unless you have an approved credit account with us. all orders must be accompanied by the full payment including onstage and packing charges as stated above. Payment may be made by cheque drawn on a London clearing bank (but see para. 4 below), postal order. VISA, Access. MasterCard or EuroCard (when paying by credit card, tiie order must go the ‘cardholders address). Do not send cash through the mail. Cheques and postal orders should he crossed and made payable to *E!ektar Electronics (Publishing) 5 . Payment may also be made by direct transfer from a private or business Giro account to our Giro account No. 34-152-3801 by completing and sending to the National Giro Centra, in a national Giro post- age paid envelope, a National Giro transfer /deposit form.. Do not send Giro transfers direct to us r as this will delay your order. If you live outside the UK, payment may also be made by Bankers' sterling draft drawn on a London clearing bank. Eurocheque made out in pounds sterling (with holder's guarantee card number written on the back), or US or Canadian dollar cheque drawn on a US or Canadian bank, tf you pay by Bankers 1 ster- ling draft, make clear to the issuing bank that your full name and address MUST be communicated to the London clearing bank. Our bankers am NAT WEST PLC. 1 St James's Square, Wadhurst, East Sussex TN5 6BH, England. Our account number is 3512 5225. Sorting Code 60-22-15. IBAN code: GB40 NWB K6 022 15 3512 5225 BIC code: NWB KGB 2L COMPONENTS Components for projects appearing in Bektor Electronics are usually available from certain advertisers in this magazine. If difficulties in the supply of components ere envisaged, a source will normally be advised in the arise is. note., however, that the sources) given is are; not exd jsive. TERMS OF BUSINESS Delivery Although every effort will he made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this for all orders. Returns Faulty gc=ods or goods sent in error may be returned for replacement or refund, but net before obtaining rur consent All goods returned should be packed securely in a padded bag or box, enclosing a covering fetter stating the dispatch note number If the goods are relumed because of a mistake on our part, we will refund the return postage. Damaged goods Claims for damaged goods must he received at our i inbricge Walls office within tO-days (UK): t4-tlays .Europe - or 21 -days all other countries i Cancelled orders A 1 cancelled ,v. ; be subject to a 1C: handling charge with a minimum charge of £5-21 Patents Patent protection may axis! ir 'aspect o: : muits. dev- ces T components, and so on. described in our books and magazines, Elektor Electronic (Publishing i docs not accept responsibility or liability * or fai,in 9 10 Kiendfy such patent or other protection. Copyright A I drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes and software carriers published in our books and magazines (other than in ih.rd-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 permis- sion 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 tre above, printed -circuit boards may be produced for private and personal use without prior per- Limitation of liability - -4:* = :s -fe r z?-i ra: :e e: : - ::rara, se T ;-' r . : ire : - - .--re: : , the purchaser whatsoever or howsoever arising out of. or in connexion with, the supply of goods or services hy Elektor Electronics (Publishing) other iran :o supply goods as describee or at the option of Elektor Electronics (Publishing), to refund the purchaser an . money paid in respect of the goods. Law Any question relating Id the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws of England. January 2005 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION United Kingdom Standard £39.50 PtUS £46,00 Economy Mail Pesl or lhs World excluding Europe; £51.30 £57.80 Priority Airmail Europe & Firs £51.30 £57.80 Outside Europe £65,00 £71,50 Airfreight USA Sl Canada only USS88.00 US$98.0 0 Payment should be made by: 1 Cheque or bankers’ draft in sterling drawn on a London clearing bank . except in the USA end Canada — sea below): * UBS cheques drawn on a US or Canadian bank — only by subscribers in the USA or Canada. * Direct transfer to our bank (NAT WEST PLC f 1 St James's Square, Wadhurst East Sussex TN5 68H, England), Out account number is 3512 5225 : Sorting Code 60-22-15. IBAN code: GB40 NWB K6 022 15 3512 5225 BIC code: NWS KGS 2L * Postal order. * Cred it c a; fd; VISA, ACCESS. E u re ' J ast a rCa i d . J C 3 Els ctro n or S w lie h * Transfer to our Giro Account number 34 1 52 3801 . Giro transfer should be made by completing and sending the appropriate transfer/ deport form to the National Giro Centre l UK) or to your national Giro Centra. •Cheques and postal orders should be made payable to Elektor E ECtrenics i Publishing). Do nor send cash through the mail. SUBSCRIPTION RATES FOR 18-MONTH SUBSCRIPTION United Kingdom Standard E59.25 Plus £69.00 Economy Mail Rest of the World (excluding Europe) £76.95 £86.70 Priority Airmail Europe & Eire Outside Europe £76.75 £97,50 £88.50 £107.25 Airfreight USA & Canada only ! USS1 32.00 USS1 47.00 SUBSCRIPTION CONDITIONS j he standard subscription order p sited 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 i.n currant rates, must be supported by evidence of studentship signed by then s ad of t h 8 col le g e , school o r u n 1 ve r si tv fee u If y A s la n d ard Stu d en t Subscription costs £31 .60. a Student Subscription-Plus costs £37 60 (UK only). PI ease n ate t h a i n ev: s u b sc ripltons fe te a bo: ur four v, e e k 3 fro m re ca I p 1 of order 10 become effective. Conceited subscriptions will be subject to a charge of 25% (twenty- five per cent) of the full subscription price or £7.50, whichever is the nighe:, plus the cost of anv issues already d: spa jetted Sudsclplions cannot be cancelled after ibey have run for six months or mors. January 2055 * Select your own annual subscription and receive a free 128 MB USB 2.0 Flash drive Ulonth electronics Issue: The Summer Circuits edition 2005 Available options: • Elektor Electronics annual subscription (standard) You receive 1 1 issues, including the July/August double issue. • Elektor Electronics annual subscription-i ’LUS You receive 11 issues, including the July/August double issue, plus a copy of the Elektor Electronics Volume 2005 CD-ROM (normal price £16.25). Your saving: approx. £10.00! Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue. "“If i.fif' New Features ad in Version 6.5 Textual library part search. User defined keyboard map. C ADC AM output to ZIP file. The Confplete Electronics Design System X J Schematic & PCB Layout Powerful & flexible schematic capture. Auto-component placement and rip-up/retry PCB routing. Polygonal gridless ground planes. Libraries of over 8000 schematic and 1000 PCB parts. Bill of materials, DRC reports and much more. 0 Mixed Mode SPICE Circuit Simulation Berkeley SP1CE3F5 simulator with custom extensions for true mixed mode and interactive simulation. 6 virtual instruments and 14 graph based analysis types. 6000 models including TTL, CMOS and PLD digital parts. Fully compatible with manufacturers' SPICE models. • Bitmap import function. • Truetype fonts on PCBs. • Enhanced printer output. Call Now for Upgrade Pricing Proteus VSM - Co-simulation and debugging for popular Micro-controllers Supports PIC, AVR, 8051, and BASIC STAMP micro-controllers. Co-simulate target firmware with your hardware design. Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. Compatible with popular compilers and assemblers from Microchip, Crownhill, IAR, Keif and others. abcenCen Electronics 53-55 Main Street, Grassington. BD23 5AA www.labcenter. co. uk info@labcenter. co. uk