You are on page 1of 131
PLUS! 12 Hands-on The rcs ed crates in his Sure Gravis or bud tei mn elecais cats pic wp soli irene uid sorting nic fr esha. He we provide seve esc fips for ese rats 16 Gameboy PLC b ere we rst G2PL PLC on he se B Airlerdo Gameboy Roty- semble ord tested beer or ee ea eves cin en cr west! Th elon fer GO os 2 ft YO pay ocx cer date. hg, carers, onda sen, tte err hening sen rd even ar, psily een recy oT (SS) ess lektor lectronics Colophon é Hands-on rs Usoking Foro Noodle 14 GBPIC — Gameboy PIC 6 GBPLC IC 1/0 Box Pzy Bletroshock 8 ‘Alphadoky 40 Elektor SHOP 145 ‘Sneak Preview 148 BEC Rodio- MP3 fer Seniors 0 DC-coupled Audio Amplifier ay Hybrid Headphone Amp 54 | Multimedia RIAA Preamplifier 126 | Paraphase Tone Control 39 Phono Spliter 8 Simple Hybrid Amp 36 Slove Flash Tigger 0 Computers &Intemet Computer Off Switch 133 Exponsion for Universal Interface 24 Hard Disk Switch 122 ‘Multicolour HD LED 127 ‘SCSI Adapter 90 Serial to Bluetooth 108, Simulation Applets u9 Speed Pulse Generator for PC Fane 134 USB Switch for Printers 7 Tigboo Switching for Remote Contrel 9 le Speedometer wih Hub Dynamo U7 Binary Clock 68 Design for Merkin light Signals % Inteligen Interface for 1 40 8 Servos née ‘Medel Reilway Turnout Control 5 New KW1281 Interface 125 Preset Circuit for Servos As RC Servo Tester/Exerciser 32 RC Switch 128 Simple Slave Flash 53 ‘Stepper Motor Controller 38 Tiny RB a Tiny Simon 103 Volume 32 July/August 2006 no. 356 CircuITs 2006 ‘Alternative Halogen Supply m ‘Automatic Ronge Hood 79 Call Acknowledged! 82 Direction Sensitive Light Barrier 45 Easy Home Remote Control 72 Gentle Breeze 8 Hord:Wired Code Lock 7 Laser Alarm 31 LED Phototheropy Unit 58 ‘Meine Slave Switchor 107 ‘Mens Slove Svitchr I 134 ‘Meduloted tight Borier 4 On/olf Infrared Remote Control 76 Pipe Descoler 5 Presence Simulotor 66 Protection for Telephone Line 86 Shig Repellant 2 Telephone Ringer a Temperate Sensitive Sitch for Solar Collector 118 Thunderstorm Predictor 109 Toothbrush Timer 64 84xA8-pivel Grophics ICD 81 89P1CPxx USB Programming 4% Contrast Conta for LCDs 86 E-blocks = cheoper PIC design 59 How fol Connect your project to the PC 123 Programmer Board for the REC/13 114 Programming the Propeller IC 58 RECKey 78 Universal LCD Module 120 Adjustable Curent Limit for Dual Power Supply 61 Battery Saver 88 Driver for 20 LEDs 102 Earth Foul indicator 75 Fuse Saver 35 High~oltoge Regulator with Short Cit Pretction 101 Hyper-Simple Battery Copocity Tester 36 Leow Loss Step Down Converter n2 Mains Indicator 52 ‘Mecsuring Battery Charge 100 Power MOSFET Bridge Rectifier 2 ‘Quad Power Supply for Hybrid Amp 106 ‘Step-Down Converter Controller 34 USB Fuse 84 Active Antenna 110 ‘Antenna Height ond Range 55 DRM Receiver Upgrade 131 Harmonic Generator with Single Opomp 105 ‘Opamp VHF FM Transmiter 65 1-Wire Thermometer with LCD 70 Eight channel Scape Input 80 Electronic Terveell Barometer 85 i 130 129 33 104 98 a a) 10,000x with Ove Tronsistor ns ‘Audible Flasher Worning 89 Automatic Windshield Washer Control 94 Chorleplexing 7 Electronic Touch Switch 88 Miler Capacitor 3 Multi-Coloue Flashing LED 83 Rear Fog Lamp for Vintage Core 60 Recycling Flasher lights mA SMD Crystal Adapter a7 Thrify LED Protector a Trunscutoneous Electrical Nerve Stimulator (TENS) 49 Bold article title = PCB design included 2 ASSEMBLING CIRCUITS The circuits and circuit ideas in this Summer Circuits issue are bound to inspire many electronics enthusiasts to pick up a soldering iron and build something nice for themselves. Here we provide several basic tips for assembling circuits, Hands-on Assembling Circuits The minimum requirement for puting together a circuit is 0 scldsing tan A onde held heft larg one tke very convenient. you do lt of soldering Is @ good idea to buy a lerperaiureregulated soldering station that clwoys provides he correc soldering temperahuxe. Soldering tips A soldering ron wih « narrow bent pis highly procial feed otiganl eee ee ane Jorge components In tot case, the entire iron mast be televely in el net jn th ip Veious type of sol dering fips, os well os special miniciure soldering ‘re avilable for soldering SMD components sce inl, ‘good pai of tweezers is necrly indispensable for wotk ing wih SMBs, A magnifying gles or loupe con clso ie a nly hx caching key polls on Creat boerds. I you elec type of solder wih «fn core, you won’ need any additonal x for soldering, Desoldring braid is very Handy for removing exces solder, The braided ‘wide of thin copper wires "sucks up liquid solder A sok der sucker is nore convenient for removing relatively large omounis of cer Always keep the fp of your soldering iron clean. You con tsa.a dome sponge. spaviel mate wings. nv ip ar \etoe fr thl purpose, Adjs! he ion fo te proper tem perature [approximately 370 “C] and ensue hat your rorkplace hes good lighing. Most electronics enhusicss wil sil use ‘ordinary’ lead/i solder ct home, However, make sure you oko hove leadfree solder on hond in cose yeu need to make repairs on boords semble sing lecdtree solr Assembling circuits A piece of prototyping board is an excellent choice for csenbiing a small circuit, Severel types of boords ore cvaloble— with continuous copper sip, with independ. ent stands, ond wih various ae copper patterns. You on ute thin, insured copper wie To rnake connections botween the various components A wide voraly of adopter boords ore vcilble fr ‘experimenting with SMDs, Diferent types of SMD pock ‘aes con be mounted on a smal printed circu boord ft fed with standard 2.54:nm grid for headers cnd ether components Making PCBs (or having them made) ircuit boord layouts cre shown with some ofthe circuits in Elektor Eleckronics. Most of these circuit boards are covailable from Elettor Electronics or our business pertner, The PCB Shop (Eurccircuit) Ifyou have designed o prinied ceut board using @ FCB leyout program on your PC, you con make it ourself or have it made fer yeu. There are several FCB firms there days (such as Eurecicuits and PCB-Pool) that make proto: types at acceptable prices, even for one-ffs, Of course, you can also roll your own. The fist sep is fo use an inkjet or laser printer 10 make a ocd, opaque overlay fll. Films specially designed for this purpose ore commercially eveilable. Use a hair cyer to chy the print cer prining, ond ifmecessery print the layout en top again to obtain goed opacity Aer thet you cen use the film fo expose the photosensi- five circuitboard material {using a second-hand UY lomp, for instance) You can use granuloed iron chloride to etch the circuit board. Irdoes not hove to be heated, so it generctes loss vopour. That also means you can etch the board right ‘away, because it works af room lemperature, This chem: ‘col con be regenerated so it can be used severcl times, ‘ond itis less aggressive thon other etchant. lear evs -7-4/2006 Standard tools ¢ Soldering iron or soldering slation, including sland + Salder (lead/tn and lead free} 1 Desoldering braid Solder sucker 1 Scldering flux for good solder flow {also for use with desoldering broid for solder removel 1 PCB holder or ‘third hand’ © Tweezers © Caters {side evters} for euting off protruding pins ' ' ' 1 ' 1 e Loupe or 1 magniying gloss ' ' ' Soldering SMDs te polly portlet handle SMD components sig he conventional method (a normal soldering iron with a fine point, solder, and extra flux for very small components). First use tweezers to place the small components {such os Retreats cell oretaicns! ital proper locckions: ‘ond then secure one pin or solder pod using a drop of solder ‘on the tip of the soldering iron. Check whether the component is still properly positioned, and correct the position if necessary. Alter that, continue with the ‘ther solder padfs) by heating the component and the sclder pod. Feed solder under the rounded surface of the tip. The Isiah older en aptly extn beet Ro compo” rnent ond the solder pad will cause @ fight solder joint to be Famed Fy, efor sel poy, hes he ke clready there, and add a bit more solder to create a sound alates to ie ‘With o multipin IC, fist clign the IC properly and then solder ‘ene ofthe commer pins in place. Chock the positioning ogoin, ‘ond then solder pin in ploce on the other side. ifthe IC is sill propetly positioned, you can now solder the other pins, ‘oking care o cllow encugh time for IC 10 cool down in between. f's good proctice fo inspect your soldering afterword with @ loupe. iFthere are shors between the pins, ou con use copper braid and liquid lux o remove the extra solder A different methed can be used with ICs that have very nar row pins. Afer carefully eligning he IC ond securing it ct two ‘comers, you can solder all he pins using © generous mount cf solder. It doesn't moter if hat causes sherls between the Pins. Nexd, ute detaldering braid to remove the excess sol der, which will cls elimincte the shorts between the pins. BUYING COMPONENTS ‘Searching for components can be difficult, particularly in case of newly announced types and types made by unknown manufacturers. A few tips and several good Internet addresses can make your search a lot easier. Electronic component sales have increasingly shifted to the Internet during recent years, particularly in English-speaking countries, That's dhardly eurprising, IW nearly imponst- ble for a lecal electronics shop to keep ‘up with the enormous ranige of compo- nents and continuous stream of new components, so a larger-scale ‘approach is necessary. ‘There's an especially good chance of ‘encountering components in the Sum- mer Cirouts ieeue that are not 20 eacy to obtain. Ifyou at least know whi the ‘manufacturer is, you're already halfway there, Here we provide a few tips, ‘Start with the manufacturer's web- site. Many manufacturers offer free samples. To obtain such parts, you “ usually have to look up the IC on the ‘manufacturer's site, and then you can order samples. The conditions vary widely, but you often have to order using the name of a firm, However, it's certainly worthwhile to have a ‘900d look at this option ‘If you can’t obtain free samples, there's another option. More and ‘more manufacturers now have their ‘own webshops where you can place ‘small parts ordars using @ credit car, ‘The advantage here is that the man- ‘ufacturor knows exactly which ofits ‘own products it can supply, We have hhad good results with this method. ‘=Noxt, have a look at the adverts in ‘our magazine. Start your search with a specialised mail-order company. Atmost all such companies have vieb- sites where they sell special parts and construction Kits. Ifyou can't find what you're looking for there, try the large international mail-order firms such as Famell and Digi-Key, The order chargoe are ofton rolatively high with such firms, but you can keep them under control by waiting until you have accumulated a sufficiently large number of components or plac- ing a large order with several col leagues or fiends. ‘*Your search for a specific compo- nent may take you to a wholesaler or istributor. If you want to use the ‘component for a personal project, you ccan take the address in question to your electronics dealer and ask whether ho ordets from there. For ‘commercial use, you can simply place ‘an order from your firm ‘*There are also many firms on the ber cons 74/208 Internet that specialise in supplying spare parts for electronic equipment. ‘They may also have special parts in ‘their product lines. A common diffi- ‘alty in such cases is that i's dieu to find a specific component because they use manufacturers’ internal ‘codes and part numbers, However, it ‘can be worth the trouble. ‘Finally, ]ook beyond the border. For instance, there are a fewr specialised ‘fms m Germany and the Nether- lands where Blektor has a strong presence hence you can find compo- nents that are scarcely available any- where else, Ordering i weuslly not a problem. Mf your German or Dutch isn't that (9004, you can always try it in English Buying components via the Internet Ree Futurlec, a fatinas ————fronnpiat — 15, HOME AUTOMATION use a Nintendo GameBoy as a programmable logic controller for home automation Sascha Koths & Stephan Ruloff, in collaboration with Christian Miller ‘The key to this GameBoy transforme- tion, lke that of tha lagendlary Blektor Electronics GameBoy oscilloscope (GEDSO), consists of a plug-in card with memory ICs for the application software ancl an FC interface for eom- ‘munication with the outside word, but ‘without its ov processor. That allows the FLC to be programmed directly ‘with the GameBoy (via a menudriven interface) or inizoetly using 0 program running under Windows on a PC cor nected to the module, Here vie describe the hardware of the GameBoy module and briefly sketch {the structure and features ofthe soft- ‘ware, which also includes ready-made sample applications, The associated YO ewitching module ("20 1/0 box’) is described in a separate article in this isu, 6 Ameng mass producod game comput crs, the various models of the Nin tendo GameBoy are not only the least ‘expensive to acquire (via eBey, for example), but also the best docu: mented. The standard model, wi hardware built around a 280-deriva- ‘uve microprocessor, can he pro- (grammed directly nC. A development ‘environment tallored to Us hardware is available free of charge on the Inter- net. With its microprocessor eystem, Graphic LC display, serial mterface and handy packaging, the GameBoy is ‘a quite suitable for use as a platform for a programmable controller All GameBoy models based on the ‘original (‘classic’) version (GameBoy, GameBoy Focket, GameBoy Light, GameBoy Color, GaineDoy Advance, Cae) 1) |Table 1. | GBPLC Module Features '# Avciloble as a ready-cssembled cand tostod PCB » Load, delete ond store up to 8 “logie programs! ' Disable under password control ‘© Frogrom simulotion ‘* Programming end simulation ako possible in baterypowered mode indord logic functions [AND, OR, NOT, XOR, SR} | © Two timing fonctions #64 fogs '* Anclogue comporotor (less thon, equal, greater than) {© Rcing ond faling romps on anclague cut © PLC cycle time less then $00. ms ‘© Input end output names con be essigned freely inthe sofwere '# Nomes con be assigned to logie programs '# Run ond Stop modes # Log file can be viewed on the displey ' Battery-bocked reoltime clock '© EEPROM for dete soroge '© Mos recertly loaded (ocive) logic program starts evlomaticolly eer switchon Table 2. GBPLC I2C I/O Box Features ‘© Avciloble os o reody-assembled ond tested PCB © 8 digitl inpus (for potentclfree contocs) © 8 digitcd oupus [relay or rensstr) © 4 enalegue inputs (8-itresolior) ‘enalegue ouput (84Li vesoltion) 1 Inputs can be simuloted by connecting pushbuton switches tothe 1/0 box 1 Socket fer optional IC SMS chip (wih connecter for Siemens S25 or C35i mobile phone} ‘Fort for linking to @ Siemens $25 or C35i mobile phone ‘© All switch sates con be indicoted by connecting LEDs Fare 1. Suitable Gametoy models. The wit inthe cre is he GBPIC 1/0 vw ves th Grebo ited wih « GEPLC mode, ed 7 HOME AUTOMATION la feo af ufo ‘gue 2 Schematic agrm of he GE and GameBoy Advence SP) are suit- able for this project Figure 1 shows 2 few examples. The Nintendo DS and DS Lite (which actually do not belong tothe GameBoy family) and the Game- Boy Micro ere not suitable. ‘The cote ofthe system consists of the GBPLC module, which is inserted into ‘the bay on the back of the GameBoy instead of the usual game cassette (ROM cartrige). This module consists primarily of memory: a flash EEPROM for the firmware and an I2C EEPROM for the display messages and the PLC 18 Ie)eje data, which constitutes the PLC appli- ration rongrames (leo rferied tes the “logic programs’ in the rest ofthis arti- dle}. The I2C EEPROM allows data to be exchanged between the GameBoy and a PC application running under Windows. The GBPLC module has an FG interface that can be connected to all types of commonly used PC porta (serial, parallel or USB) using suitable adapters. Table 1 lists the key features of the GEPLC module. The PLC program can bbe generated on a PC using a conven- cle, which rss th WtndoGareBoy son esi programed PIC. {ont Windows-based program. The PC software can aleo ran zoal time cima lations and exchange program code and data with the GameBoy Ifneces- sary, PLC programs can also be gener- ated, modified and simulated directly on the GameBoy. Up to eight PLC pro- gram sequences (logic programs’) can >be stored in the GBPLC module, from which they can be individually rotrioved and run. The data read in by the application can be shown on the GameBoy display as # log fla and read ‘out from the GBFLC module to the PC, ‘ceklarcocronics 7.9 3008. Fie 3. he dtodd, hrougrle lated pitted cat board lth GBPLC mod, whichis essen wing SMD. Board also ve reat eoerted ad tested. For prograin execution, the GameBoy Js connected tothe circuit hoard of the °C VO Bor, which is described in a separate article in this issue. The prin- cipal features of the I2C 1/0 Box are listed in Table 2, ip adattion to eight Aigitel inputs and eight digital outputs, the 0 module hae four analogue inputs and one analogue output. One ofits special features is a socket for a small daughterboard fitted with an [eC ‘SMS chip. This optional extension also has an FC interface and allows the unit to be controlled and queried reiutely by using SMS messages (tex ting’) and a mobile phone, GBPLC module ‘As you can see in Figure 2, the citcuit of the GBPLC plug-in module essen- tially consists of only five ICs. IC1is a flash EEPROM that stotes the applica- tion software (firmware), IC2 is a PAL that provides address cecoding and ‘generates the °C signale, IC3 ie an 2c bus extender, 1C4 is an °C real-time ‘lock, and IB is an PC EEPROM From ‘a functional perspective, the GBPLC ‘module ads program andl data met ‘ory, an FC interface, and a battory. backed realtime clock to the basic GameDoy platform, ‘The GameRoy microprocesser, which resombles the 280, has a direct ‘address range of 64 K, However, the ‘upper $2 Kaze used for the LOD, RAM, sound and s0 on, leaving the range (0000~7FFF available for external HOM. and the range AGO0-BEFF available for extemal RAM, Consequently, the COMPONENTS LIST GBPLC Module Resistors (SMD 0805) RIR2 = 4k RS, Ra = 3300, R5RO~ 10k. Copacitors (SMD 0805) CICA = ToOnF Semiconductors TL.12=Bc850 ICt = AM9FO408 with socket, cogrommed * = PALCEZ2V10, progrommed * 8287 151D 813072 AC256, programmed * GamePoy uses only 16 of the 19 address lines of the flash EEPROM, ‘which moans that all programs in the fash memory aro restricted to 92 KB, Hovrever, the 16% address line (A1S of ICI) can be addressed via switch $1, ‘which can thus be used to solect one of two programs stored in the flash ‘memory. One of them is the actual application program (the PLC firmware), whilo the other is an editor that can be used to program or modify PLC application software directly on the GameBoy. As $1 should only be operated with power off, the cizcult board layout (Figure 3) is arranged euch that $1 ie only acceseible when the module is not fitted in the Game- Boy. The assembled prototype board is shown in Figure 4 IC2 (PALCE22V10) provides address decoding, and it generates the FC bus signals SDA (data) and SCL (clock) with the assistance of transistors T1 end 2 and pull-up resistors Ri and R2 ‘The programs held in the flash mem ory (IC1) ave stored ‘permanently’ and can only be overwzritton by a software ‘update (which requires a flash pro- (grammer), but the content of the EEP- ROM (1C8), which is addressed via the PC bus, is always accessible. It is used primarily to store the FLC appli Cation programs (eight maximum), The messages for the display ato also stored in the ’C EEPROM. That ‘means the firmware in the flash mein ‘ory does not contain any messages, so it does not have to be reassembled for every minor change to a message, ‘That also has the advantage that it is ‘easy to load different language ver- rie et facet eae, ae x eee {lumberg type 2486 01, Fornell # ie cer, ae aan oes. pe, GBFIC CVO Blox rder code aaa * set of programmed Flosh (C1), PAL (1C2) oma FEPROMA [C5]; enor code (050190-51 For oll tents 050190-nx: see SHOP pages and/or sworelehiorelectonic.co.uk 19 Iter HOME AUTOMATION About the authors Sescha Keths ond Stephon Ruaff devel ‘oped ths design cs a graduation project a BerioltBrechtBeruficleg in Duisburg, Germany. During their studies forthe Certified Electonics Technician diplema, the idea of using a GameBoy os con- troller led o their graduation project ‘Alter receiving their techricion diplomas in the eld of dota processing technology, they are now both enrolled in the Niederthein University of Applied Sciences in Duisberg. Noturcly, the enly conceivable course of study for them was Engineering Informatics. ‘A word ofhenks is oso dve to Chision ‘Miller, who essised inthe project work sions. Display messages in Germen and English av included in tho ready made software. ‘The FC real-time clock (DS1037) pro~ vvides the time of day in 12shour and hous format slong with the date and day of the week, to allow switch-on and switch-off times to be pro- ‘grammed using the PLC and events to be logged. Thanks to the bacle-up bat- tery, the clock is specified to operate ‘for up to 10 years without losing track ‘of the time, The internal 56-byte RAM cof tho D81207 io not ued in the GBPLC pplication. 2 Saree Ml PTET oe ‘igue 4 Fly essed proterypebeerd of the GBPLC mode. ‘The 32-way card-edge connector of the ‘module board (shown at the left in the schematic diagram) automatically con- nects the module to the GameBoy ‘when the module is mserted. The only ‘connection to the cutside world is the PC port, which is located on the edge of the board that remains accessible when the modnle is inserted. The board is fitted with a miniaturo USE-B socket (K2) forthe I2C bus. In contrast to the GBDSO, the serial interface port of the GameBoy is not used in the GBPLC application. ning adopter ‘As the GEPLC module osn only bo ‘accessed via the I°C bus, en interface adapter that can be connected to a PC is necessary for linking the module to ‘PC, The circuit shown in Figure § ‘can be used for connection to a serial pport or a USB port with a USB to serial Interface adapter However, using @ “virtual COM port’ with a USB adapter is only a makeehift solution due to tho very low data transmission rate. ‘Accireuit board with a USB-A connec- tor for the FC bus (Figure 6) has also been designed for the programming adapter corresponding to the circuit shown in Figure 3. If you use this ‘adapter, you will need a cable with a ‘USB mini plug at one end and @ USB-A plug at the other ond for the link to the GBPLC module The same cable can he ‘used to connect the GBPLC module to the °C 1/0 box As the PC YO Box has ‘two FC connectors (a USB-A socket and a USB-B socket), the programming Aenea adapter and the GBPLC module can ‘both be connected to the I°C 1/0 Box at the same timo. That requires using the toliowing cables, which are avail- able as standard items: ‘Mini USD to USB-A fer cornecting the GBPLC module to the I°C 1/0 box. USR.A to USR-R for connecting the peo- gramming adapter to the PC 1/0 box. ‘The supply voltage (+5 V)for the pro- (gramming adapter is tapped off from the °C 1/0 box via the USB cable. An advantage of this arrangement (with the programming adapter connected to the PC 1/0 box) is thet the GBPLC ‘module in the GameBoy remains per- ‘manently connected to the 11/0 bes. That oliminates unplugging and teplugging cables to connect the GameBoy to the PC, since the ‘spare’ USB connector of the I°C 1/0 box can ‘be used for that purpose as necessary. Construction and assembly Given the avallable space, the cireutry of tho GEPLC module can only be assembled using a double-sided, through-hole plated PCB with SMD ‘components. Due to the dlificulties of jessembling such a board, the GBPLC module is optionally available as a fully scembled and tested PCB, which only has to be fitted into an empty Game- Boy cartridge housing. As such hous- ings are not commercially available, you will have to remove the innards of ‘second-hand (cheap) GameBoy game cartridge and use its housing. As you cat see frau the plicto of te GBPLC module (Figure 7), four openings must bbe made in the housing to aecomme- date the flash memory (IC1 with socket), the back-up battery. the exter- nal connector, and the slide switch en the edge ofthe board (St), GBPIC software ‘The firmware for the GameBoy (PLC application software and editor) has already been mentioned. These two programs, which can be selected using St, are pre-installed in the flash mem- ory of the assembled and tested GBPLC module. The 2C EEPROM is also already loaded with the display messages in one language (Boglish). IF you assemble the hoard yourself, you cam order TCA, 1C2 and ICS pre-pro- grammed (refer to the components list). All files necessary for program- ming these ICs are also available on the Internet for downloading (refer to tho links at the end of this article). A | yes dtr does Figs 5: Sthamaic gra of the programming ape fr comet to a ei PC port. The USB comnts used bee for the FC br sige. ctl MOON ‘igs 6 Gra board dk layout ord cnpenent yeu forthe srl nerf progranming dope. Roar en eve rndy-ectmbled n Nested. COMPONENTS LIST : GAPLC Programming Adapter Miscellaneous | > ae K1 = 9.veay subD socket, cngled pins, PCB cont K2~ type USB sockel, PCB mount PCB, bare, order code 050190-2 (supplied together with 050190-1), 1 ' Copacitors Set ofreadpessombled ord teed | CICS = 1) 25V redial ‘boord of 1 pe, GBPIC Madule and 1! Com toon Pe GBAC C/O Box onder code! 050190-91 1 Semiconductors ' mi pce47, Fer all tome 050190-2: ' Ir maxza2 s20 SHOP poges and/or wwnwelehion | 1C2= 7828715 clecronies 20k (Cree HOME AUTOMATION Table 3. GBPLC Windows Software System requirements © PC with Pentium-closs processor '* Windows 95 with 32 MB RAN; Windows 98/ME with 64 MB RAM; Windows NT 4.x with Service Pock 4 or higher; Windows 2000 or Windows. XP with 128 MB RAM (minimum requirement in eoch case) ‘© Administrator rights if Windows NI, Windows 2000 or Windows. XP is used 1 Microsoft Internet Explorer 5.0 or later «© Serial er porclel interface (USB can be used with @ USB 0 RS232 converter but is very slow} Ready-to-use PLC programs © Aquorium/terrerium contreller ‘Alarm systom © Reller shutter controller GBPLC Manager © Generate and edit logic programs ‘Print aystem logic ond lobo + Buttons for tuning other program modules © Configure interface GBPLE Simulator ¢ Lood legic programs Start and stop programs Realtime simulation of inputs © Generate outputs GBPLC Log Viewer ' Read log data from GBPLC module ' Display charocterisic curves (pled versus ime) ‘© Fredy selectable colours for characteris: curves ‘© Export to Excel er other programs SIS Configuration {lor eon I7C SMS chi) * Configure short messoge service carior (SMSC) number * Configue recipient umber © Wite SMS (text) messogos ssutable programming device must be used to program IC1 and 102. The PC EEPROM oan be programmed using simple programming circuit and soft- ‘ware, such as PonyProg. You ean also start up the GBPLC with IC5 empty (unprogrammed) and use the GBFLC PC software and GEPLC programming, adapter to load display messages in ‘the language of your choice into ICS. Even with a pre-programmed EEP- ROM, the selected language for the displayed messages can be changed at any time via the PC. Tho details of ‘configuring the module for initial use are described in the ‘Step by Step’ guide (included in the download for the project) Afterall the above-mentioned ICs have Deen poyramied, you vat alse use the editor stored in the flash memory ‘to generate an application program (PLC sequence program) directly on the GameBoy or modify a proeram that has already been loaded, However, it is more convenient to use the GBPLC PC software for that purpose and then use the programming adapter to download the program into the EEP- ROM of the GBPIC. The documentation of the internal structure of the controller and the menus of the GBPLC is also contained Figue 7. The fished GBPLC module fied the howsng fo shaged GameBoy game cris, ‘nthe pretctype pred ber, an IC socket wos usd fr 12 nd jack sdk fr H2. he eay-asembled del on sl hrcugh Reader Serves has 12 seed onthe board, ‘nd ai USB socket for Kz (te igre 4) {in the dovmload files for this article. Hovrever, you do not need to bother ‘about the intemal structure and byte eto eens 7/2006 74/16 debe dees. organisation if you use the Windows software. ‘The structure of a soquence program is the same, regardless of whether itis generated using the PC software or directly (on the GameBoy. Up to eight PLC program sequences (logic programs’) can be developed in a single ‘project’. The project programs (up to eight) can be stored in the 240256 of the GEPLC module, They can be individuelly retrieved and run via the menu interface on the GameBoy LCD or from the PC. Each of these programs consists of a maximum of 64 blocks. Each block corresponds to a 4-byte line of program code that defines a function (also known as a logic gate’). The avall- able functions are listed in Table 1. Each logic gate has a ‘maximum of two inputs and a single output. The tecrinals of the I2C 1/0 Box listed in Table 2 can he selected as the ‘inputs or outputs. It is also possible to define ‘block flags’ (lags' for short) for the inputs and curputs. These block flags ‘interconnect the inputs and outputs of efferent blocks. Windows softwore ‘A package consisting of three programs that run under Win- Gown in provided tn simplify neing the contraller. Like the firmware, itis available for downloading free of charge. Bor- lend C+ + Builder was used to develop the Windows software Each ofthe three programs (GBPLC Manager, Simulator, and LogView) performs a specific task. A fourth program (SkIS ‘Connguration) cen be used to configure the optional -C SMS cchip. All the other programs can be run fram GBPLC Man- ager, £0 all the Window's software can be used in the GBPLC ‘Manager environment, Table 3 summarises the major features ofthe Windows pro- ‘grains. Typical screen shots are shown in Figures 8, 9 & 10. The extensive help files for the Windows programe form an excellent tutorial with detailed explanations and examples. “Three complete example projects that you can also uso for your own applications are also available: a controller for ‘aquariums and terrarium, a roller shutter controller, and an alarm system. For demonstration purposes, the authors Installed these spplicatione in a model dicplay homo that io ‘also shown in the photes. Ifyou want to get an exact idea ofthe functions and capabil tis ofthe GBPLC, you can download the Windows software five of charge and at no obligation and familiasise yourself with ‘the display of the GameBoy PLC. After that, i's only a small step from a simulation to th real thing (see the Step by Step’ ‘guide included in the download fle), with the added benefit ‘hat you Imowr in advance that it wil be wort the effort. ess Links for downloads ‘ww elelterelectreric.co.uk (Elckior Electronics erties, software ane documents) vewrwatktech org (cuthors’ website, sofware ond documents) hip://ebek sourceforge net (GBDK~ GomeBoy Developers Kit ‘eww. work.de/nocosh/gmb hi (NOSGME ~ Gometoy emulator for Windows) sedencos.com/prog hin! (PonyProg) bth a ea etaneneanezengseeasaiyaaaEaEa) Figue 8 Sasensht of GEPLC Manger, the main progr fr eperting od orang the GameBoy PLC er Windows. Figs ©, GBPLC Leg Sie, wih cmb from GBPLC Manos, combo used est plato programs wit the Goeboy. The GameBoy fncions re iat he sirabtr. ‘igo 10, OBPLC LegView an be sede spay ond expr cota deta calcd bythe PLC. 23 1/0-BOARD GBPLC I2C 1/0 Box Sascha Koths & Stephan Ruloff To use the Nintendo GameBoy as a system control centre, you need an I2C interface in addition to the special plug-in card. The circuit presented here is cut out for the job. It has a total of 24 inputs and outputs, induding 4 analogue inputs and 8 digital inputs. That’s sufficient to control roller shutters, outside lighting, curtains, an alarm system, the central heating system and even more, possibly even remotely via TXT (SMS) messages. ‘The feature project of this year's Sum- ‘mer Circuits seve, the GameBoy home ‘automation controller (GBPLC), natu- relly needs information from various switches and sensors. An interface is necessary for reading in these signals and sending commands to the out- side world. This 1/0 box has Dect ceigiedl Us provide that interface. ‘Tae circuit comnm- niicates via the well-estab- lished, industry standard souice 5 Vat A. It also has ea inter {ace for connecting a special SUS mod- uleto allow messages to be ‘texted t0 ‘mobile phone. In shor, it has lots of capabilities. The SMS module also allows the circuit to be controlled by a ore ‘Tho active part of the circuit consists of TC3-IC5, each of which has an PC bus interface. 1C6 and IC7 are PC bus extenders that act as boosters, They reduce the link’'s euscoptibilty to inter ference by increasing the current on the PC bus end reducing its capacitance, del decenis-7-9/7006 Fig 1. Thema components of he elt re the dvr nd th bus extender TCA converts analogue signals into &-bit digital deta suitable for the PC bus, The reference voltage on pin 14 is set 102.5 V, which yields a resolution of approxi- mately 10 mY. TTL. signale can aoceee the PC bus via IC5, Capacitors C8-C15 decouple noise on the inputs. That's hhardly an unnecessary hoxury for signal lines that doubtless run over a consid erable distance through your house. Digital and analogue signals are out- Put to the outside world via 1C3 and ates tr dors C4. The PCFBE74 contains an B-bit quasi-bidrectionel port with internal latches. The latch retains the most recently configured output state. 105 ebviously docs not use this data, since none of its outputs are used in the circuit. ‘The addresses of 103, lod and ICB are hardwired in the circuit by tying address pins AQ, Al and A2 to fixed Potentials. The PCF8691 has a ciffornt intemal base addtess, which explains why IC4 and C8 can apparently be assigned the same adress. Ifyou want to-couple several of these modules toa single bus for a different application, ‘you wil have tomodify address portion of the PCB track layout. ‘Standard USB connectors are used for ‘the connection to the °C bus. They are ‘thus not real USB ports. K28 is a USB- ‘A connector for comnection to the Figure 2 Praclly the ene outer ein of he Baris capi bya lrge ruber of cmectrs. ' COMPONENTS LIST 1 Resistors TRIRI9 = Ahoy jtors CVC16,C18,C19 = 100nF (SMD 0805) C17 = 1OuF 25 redo 1 1 Semiconductors 1 D1 = UM3362 (1092 cose} 1 D2 IN4001 GameBoy module. K27 is a USB-B con- noctor intended to be used for connec- tion to @ PC. That makes it unneces- sary to constantly disconnect and reconnect cables when you want to ‘contol the mocule trom the GameBoy hile linking it to @ computer at the ‘game time via an PC to RS232 adapter. All digital inputs and outputs are irectly accessible on K25 and K26. ‘That means you can check the outputs by connecting low-current LEDs ditectly to K26. Don't forget to use cui- rent-limiting resistors for the LEDs. ‘The PCP85747 has open-drain outputs that can source adequate current for that purpose. We use the SMD version of the well- Imovm BCE5O here for inverters (11-78, BC850) that drive MOSFET: ‘T8-T16. Otherwise the outputs would 0 high immediately after the circuit THT = C850 TONG =IiFZ34N KC) = 7805 162 caria0 1C3, ICS = PCFBS7«T ic4'= PCRBSSIT 1C6 C7 = P8287 151D Miscellaneous Ki'= Yay suBD plug [mole ongled ins, PCB mount * KEKIZ.K19K23 » PCB terminl block vas switched on, due to the initial state of the PCBS74. ‘As already mentioned, the MOSFETs ‘can handle currents up to around § A. Incidentally, you can also use the pin- eoinpuuble’ BUZIL in place of te IRFZ34N. It is no longer being made, but you can doubtloce still find it on the shelf here and there, ‘The power supply is @ simple desian ‘using 2 7805, That means you can sim- ply use a standard AC adapter with a voltage of 9 V or more as a power source. D2 provides reverse-polarity ‘protection in case you accidentally connect a different adapter with the ‘wong polarity. Construction Assembling the circuit board is not dif- ficult, Start by soldering all the small #.CP.007BND} 1 K25, K26-= 20-pn (double row) socket, 1 ith 0.1" 1572 ISR connector ype K28 = USB eoanecior ype A CB, order code 0600981 Reedy sented i ne hood code 060098-91 * only required in combintion vath Sis chip For all items 060098-xx: see SHOP Beater ene ‘SMDs. Next in line are the DIL and ‘SMD ICs. IC2.can optionally be fitted ‘na socket. After that, you can fit the rest ofthe components, ‘Youcan connect a mobile phone directly wt cucultviag serial data cable con nected to KI ifthe opticnal SMS module {ig alao fitted, You can order the SMS module at wwortl-tech org. Of course, this circuit is also perfectly suitable for use as a general-purpose PC bus interface — it doesn't have to bbe restricted to use in combination with the GameBoy module. Au C- based system with all sorts of control ‘and svvitching capebiities can be used {or innumerable purposes aside from a home hus system. That makes this PC W/O Box suitable for a wide variety of ‘applications. lek elec -7-4/0008 ‘ Inexpensive (weberve (eh, 2006 ond ee develope. Blecrenc Stamping (Sep. 2006) Centre cote orl free-lance Modding & Tweaking expert Jeroen Domburg in his student digs TRISPEPC é fl aA 5: Mid dsplysopes ied on cet Cts ight Sig (x. 2005 iin yg mee ection eget eds 29 ale! ae Just recently the author had couse to make on MPS pleyer for a 93yeor old recerity moved io « nursing heme. There, radio reception tuned out to be hope less, mainly owing to interference from TL lamps. The elderly person involved con nether see well rx has good manip- ave sills (artis, while learning neve procedures is sure fo present problems. The solution tothe radio reception prob lems wos to build on iRiver U10 MP3 player into a speaker box which looks like an ald feshioned radia nel hos only con ON/OFF bution and volume conto. The unit is powered by the normal mains cond can remain unplugged fer about fen hours before it stops. Remarkably, thot also happens on being teplugged into the mains. Due to « firmware problem of the UIO, on 5 volts appearing on the USB connector it essumes iis connected 0.0 computer end stops plying The circuit iogrom isl staightforwacd ‘ond specks for self. The U10 ts fixed in ‘awidov on the back ofthe ployer wih the keys locked. Hence, it plays contre BBC Radio-MP3 for Seniors ceusly whether the amplifier ison or not {he cuthor used « 15 pound specker set 7 emplfer for computer which switches the 12 vols AC). The trans: former wes reploced with a double sec- ondary winding to avoid any earthing probleme betwaen the USB chorging device and the amplifier ground. ‘The unit is working wall ond ploys the dlien’sfovourite music for about 43/4 hours, more or less like © personal radio station, Of course, much more music could be loaded on the player since stereo makes no sense and it could be encoded ot a slower rae. An inital problem of the MP3 player’s caput level not being wel mached fo he ‘amp input was solved by choosing ‘onether amplifier (Vellemen K4001} “which hos @ more vite input seni iy of 40mv. a Laser Alarm Dimitris Kouzis Loukas This citeuiis@ leer alarm system lke the one we seein various movies. uses 1a laser pointer boom to secure your valuables ond property. Essentilly, shen the beom gets interrupted by & person, orimal or object, the resistance ‘af a photodiode will increase and on alarm will be cctivated. The laser ond the receiver con be fied in seme box, sharing a coninon power sup- ply. As the receiver draws less than 10 mA on everage, youl soon find thatthe laser isthe most curent hungry device! Minors ‘are used to dec the beam in whatever setup you require. Examples of o possoge cond an orec: protected by the olerm are shown in the diag In the circuit diagram we find © T1072 epemp (C1.A) configured a: voliage comparaier between the voltage refer- ence provided by the adjustable vllage divider P1/24 ord the lightdependent volloge provided by the vallage divider consisting of photodiode D1 and fixed resistor 83. When the laser beams inter | "upted, the vellage on comparator pin 2 drops below thot at pin 3, causing the Curpur to swing to (alms the postive supply volage and indicating an olarn condition. This signal can dive a siren, cecomputer orc light thot hopefully will dleter the inireder.Allernotively it can be sed fo ‘silently rigger © more sophis cated olor. Resistor R2 provides some hyslresis fo prevent oscillation when the Wo compactor input vologes ere most equal. Capacitor C1 makes the circuit immune to shor, accidental inetuptons tte beam, e.g, by Hing insects. you wart your circuit fo have fate responses you con reduce its valve to 1 pf The operation ofthe circuits illuskated by the waveform diagram, which also proves the hysteresis action tha sels on Upper and a lower thretheld onthe ieput votoge. You can alo se the delay ito. duced by capociter C1 The circuits simple cnd could be assem bled on a piece of breadboard. Alter ‘ossembling the circuit and testing it, you should mount itn o block bex thet hos justo smal hole. You moy decide to put | the ser in the same box but only if you are sure there is ro way the photodiode Lanter deter: con see" the laser beam direc. The small hola should be filled with black dtinkng see s0 thot only ight fom the direction ofthe loser beom con ener. With the appropriate setup of the box cond the mirors, the laser beam is 60 intense that even direct sunlight cannot coffect the operation ofthe photodiode Ee cL) the laser you are using must be observed, Laser power should be kept Prt 31 ra red: 77 Ray King The design presented here is for « device for testing radio conte [RC] serves. The present design has features thot mcke it especially seul fo people desigring ond building radio control equipment. By building « number ofthese devices in a single enclosure an enti rodio con- trolled model can be setup and tested without having to ccilly use the RC transite. The most unusual feature ofthis design i thot it doaen't wena joystick c similar cnalague device to determine the servo pesition. Instead it gives an output of precisely 1.5 ms that con be changed up or down in stops of 0.166 ms and ‘ives a display on a line of LEDs ofthe Position selocted. Ths is of porkculr use if you are designing and testing radio control devices thot use the receiver out put direally, enabling « known pulse ‘wid to be opplied without resorting to sing an oscilloscope. With this Fai the devices can be colibrated simply cod quickly. Secondly the device has the ability to switch lo on ‘exercise’ mode, Selecting this mode eyeles the servo between the extremes of rvel ond senes as 0 se ful quick test of normal servos to verify RC Servo Tester/Exerciser ‘correct working. A further LED indicates selection cf hs mode. Finally the device uses very few compo- nents ond is extremely cheap to build since the FIC processor cores out all of the fiming functions. The circuitry iso pretty saightforward implementation of the good old PIC 16F84 processor with eight LEDs DI-D8 cord three switches 1, $2, $3 com nected. The softwore generoles a servo ‘euiput signal every 20 ms then scans the switches foro button press. Depending pressed the cutput pulse length will be odiusted cceordingly When fist switched on the cit cuit will ouput a servo pulte of 1.5. ms duration ond the middle LED ofthe erry wil be it Press ing the ‘up’ or ‘down’ buttons will increase or decrease the pulse width by i | a | D4, DB = IED. 3mm, high ef pe igh efficiency, 1 = PICIGFB4(A), DILIS case, Fa, RS-Thea yormed, order code O40172-41 "2 = 1N2940, T0220 case (or SV 1A itors Tow drop equivalent) (Sn fed ih) cice= 2 Miscellaneous 3, CA= 100nF X] = 8MHz quortz crystal, 32pF parallel ood copecitnce, Hca¥ cose er low ‘Semiconductors cle model 1,02,03.05,06.07 =LED. 3mm, high KI = 3 way Sil pinheader 1 eficiency, green S1, $2, $3'= pushbuton, 1 make contoct Sane 0.166 ms and the LED display will move The source code was written using Pro- ‘63 oppropriote fo show the pulsewidih ton PIC Basic which then compiles into selected. cessembler and object code. For those At ony time the ‘mode’ button may be with @ PIC programmer, all project soft pressed which couses the device to ware including the hex ond source code switch to/from the ‘exercise’ mode. A files is available as a free download, file servo connected to the output will cycle tef, 040172-11.zip, from the Elektor repectedly rom end fo end of its tavel Electonics website. The PIC isco oveit — a useful indication of whether the able ready programmed though Readers ‘servo is operational or not. Services under number 040172-41 ‘An Eleltorsivle PCB was designed forthe Several oplions are available for power project and the artwork is shown here. ing the circuit. A 9-V PPS (6F22) battery ‘Only one wire is required on the board. may look okay at first blush but then it The author's ev prototype incorporaied willbe exhausted quildy even with small two of these boards ina single enclosure servos. A mains adapior (‘batery elimi- 50 thot two servos on c model can be nator’ is possible, but precludes field tested at once. The board shewn inthe vse. Undoubtedly the most elegant photograph is a prototype differing from _approcch, then, i the use cf a case with the final version in minor detail. a battery compartment for penlight (AA. IR Remote Control Tester Malte Fischer piezo buzzer directly toon IR receiver IC This method is los! os simple o¢ can- This small circuits idea for checking he necting a photodiode cirecly to the input basic operation of on infrared remote of an oscilloscope, but has the adven- control unit: The circuits bosed on the tage that no oscilloscope is needed: the brillionly simple idea of connecting a compact units abvoys ready to use and Case: Hommond 1591ATBU IC socket 18 Mens odoptor OC socket FCB, erder code O40172-1 Projet software, Fee dovnlood (040172-11 from Elektor website A ito pars s availble from Eleltor Hlecrenics; order code O40172-71, 00 SHOP pages or webste. Kit oniots es component li size batteries, on then use four lkaline cells or five NiMH rechargeables 10 obtain o raw supply vologe of 6 V. This will necessicte the use of lowdkop reg lator for 1C2, like the 4805 or the 1M2940 you’ find suggested here becouse it will not drain an almost fat battery duet its own cure. An on/off switch is ao recommended. The stondy current consumption of the circuit ‘omouris fo about 5 mA, Finally, PIC burners omong you using the hex file should set the config bits as fol lows: HS (10) {since xtol > 4. MHz); WOTE disable [0}; PWRTE enable (0}. The other config bils ore for code protec: fion and ther use is at your discretion al) ale much easier to carry around thon bulky fost equipment Operation of the remote control is ind coted by he buzzer making a chatring noise. The circuit is very sensitive and has ‘a range of several metres. The TSOPI738 inlegroled IR receiver accepts, amplifies ard demoduletes the I signal hom he remle conto, preducing an out put with « frequency of erourd 700 He. The piezo buzzer is com rected fo is cut, rendering tho signal audible. ‘Allthe ther components are sim ply concemed with producing @ stable 5 V power supply fom the 9 V PF3-(6F22) type battery. Instoad of he TSOP1738 similar Dirk Gehrke, Texos Instruments The TPS6420x controller is designed to operate from ene to Hhree series-com nected cels or from a 3.3 V or 5 V sup- ply oboined from a USB port. At is oUF pat itcan produce 3.3 V at2A, suitable ‘or powering © microcontollerbased sys- tem. With o suitable choice of external ‘components (inductor, Pchannel MOS. FET ond Schotly diode) the device con Le opauited over u wick range of possk ble output voltages ond currents. A fur- ther advanloge is its extremely low qui- escent current corsumpfion in power- dowin moda (100 nA typical) and in noleod operation (20 mA. Also, ifthe input voltage is less than or equal o the desired output voltage, the device con ‘connect the output directly fo the input Using just afew external camponents the TPS6420x con cover an output volloge range from 1.2 V upto the input velloge ‘of up 10 3.A, 0s long os @ suttable F- channel MOSFET ond Schottky diode ‘ore used. the device isan asynchreneus step-down converter which, unlike the more widely ved PEM (pulse tmodvlation) and PWM (pulse wid modulation] types, involves @ constant comtime and/or constant offtime. Con- ventional controllers eperate in PWM mode ot medium te high laods, switeh- ing to PFM ot lower leads in order to minimise switching lsses. The contller described here also adjusts its switching Frequency in accordance with the load to ochieve @ similar effect to. the PFM/PWM contrellers. devices from other morufoctrers con be used, and of course cor fier frequercies other than ‘88 kHz con be used. The circuit sill works if there is © mismoich between the nominal corres fre- quencies ofthe fransitter and receiver IC, but range is reduced. its sill, however, adequate for determining whether o remote control is producing on IR signal oF rot. xo Step-Down Converter Controller Corrs Co ecco es for ich iceny ov santordamr ton Redced ontine fo higher fe Lerosroar iene cpeaon ran So4200, Oo th suiting eguency cutie Feaeiced ea fo bish pitching heen epics re fev spoce reba oproncis 1, such os coe oe/os/o.4rs ferteg 38103 3¥. fe frum of une dterines be withing feerey Hd cas wih low ek tpoce ron where high sehing equncy ered sch ox co ering 8 fo 15 ¥: he minim foe dries the shin equncy lek leon - 78/2006, The circuit diagram shows @ classical step-down converter wih an input volt ‘age ronge from 3.3 Vt0 6 V and an out put volloge of 3.3 V ata curent of up to 2A. The oplicnal 33 mQ2 shunt resistor provides for current limiting. The 1964202 offers minimum ontime selectable between 1.6 ms, 0.8 ms, 0.4 ms-ond 0.2 ms and « fixed offtime of 300 ns. A MOSFET inthe supply volt cage path is switched on ky the contrller for as lorg as is necessary forthe output voltage to reach its nominal val uni the moximum permissible curent, os determined by the shunt resistor, is reached. If the current does exceed this limit the MOSFET is switched off for 300 rs. f the nominal output voltage is reached, the MOSFET s switched off ond remains in the off state until the output voltage once again fails below the nom. Fuse Saver David Clark This ciecuit will be particulary useful to those hist who use & ‘breadboard’ to ry out idoas and who also use o simple ‘homemade’ DC power supply consising caf transformer, rectifier, smecthing ‘copocior ard protective fuse, thats, one without overcuent protection! In this circuit, the detecting element is resistor R6. Under normal conditions, its vellage drop is rot high enough to such ‘on transistor T1. The value of R6 can be cltered to give « diferent cutoff curt, cs determined by Ohm's Law, iFrequied, ‘When o shor circuit occurs in he load, the voltage rises rapidly ond T1 starts to conduct. This draws inthe relay, switching its contacts, which cuts off power fo the external cireuit, end instead powers the relay coil directly, latching it in this sec- cond site. The circuit remains in his state unfil the primary power supply is switched off. Capacitors C1. ond C2 held enough charge {via D3, D4 and D6, which pre- vent he charge from being lest to the rest cof the circult, whichever state it is in) 10 keep T1 switched on and power the reley while it switches over, and R2 ond A provide slow dischorge paths. LEDs inal value. At very low ouput currents the controller therefore operates in ‘discon tinuous mode’ (DCM). Each switching ‘oycle begins withthe current ot zero. I rises the threshold or maximum value, cond then falls egain back to zero, At the moment of switchoft the Schottky diode ‘causes the residual energy inthe induc tor to appear asa quiclydecoying osci- lotion atthe resonant frequency of the cutput lille. This loweenergy ciation in discontinuous mode is normal ard hos no odverse affect on the efficiency of the converter. It con be damped using the (optional) RC series network Athigher output currents the switch-down Comerier operas in coninueus condue- fion mode (CCM). In this made the indvc- tor current never falls fo zero, The output voltage is directly proportional to the switching mark-pace ratio inthis mode. If the $i2323 P-channel MOSFET from VishaySiliconix is not aveilable, the IRLML64O1 (12 V type) or IRLML6.402 (20 V type) from IRF can be used instecd. Both these types have a higher on resist. cance, but do offer a lower gate copoci- fonce. An cllernative for the Schotky diode suggested is the MBRM140 avai ble from Digikey and Farrel), cthough this sin an SMB pockoge rather than the Fowermite package ofthe MBRM20. The voltage drop ot 1 A is somewhat higher: 0.6 V instead of 0.45 V. The devices ore manufactured by IRF and ON Semiconductor. was.) Literature at htip:// www.ti.com: ‘$0123 Step-Down Controle, document reference number SIVS485 TPS6402 Evchotion Module (3.3 V, 2), document reference number SIVU0S3 D1 (ed) ond DS (greer) indicate whet sla he circuits in. Inductor L1 slows the inrush of current when the circuit i switched on, which would otherwise cut off the circuit imme- dictely. D2 and D7 provide the usual backemf protection across the coils. In use, the input of the circuit is con nected fo the main tronsformer-ecifer ‘copacitorfuse power supply via KI, and the outpu is connected tothe lexperimen- tal load vio K2. Note that he input ve ‘age must be a floating supply if Vout- is ‘grounded via the load, as Vin~ ond ‘Your must not be connected together, ‘Some consideration needs to be given to ‘0. number of components. First, the choice of reloy Rel. For the protolype, this was toned from Meplin, port rum ber YAOZF. This is bas coil resistance ‘of 320 £2, which wih R1 forms the cok lector load for TI. ts allowed pullin volt ‘age ronge is nominelly 9 Vo 19 V, ‘wich limits the input pewer supply vot 198 tn hetwenn around 10°V to 30 V ale rd UU/ J. Von der Sterre The citeuit described here is eminently suitble fo indicate the capacity ofa bat tery. We use « cheop electric cock for this, By connecting a resstor ceross the battery terminals, the batiery is dis charged somewhat faster than with the dock olone. If we pick a resistor with a valve of 5.6 0, the discharge current comounts to L2V/5.6.0= 214 mA. ‘we muliply this with the number of hours thot the lock ran afer the botery wos connected up then we knove {approxi motel) the capacity of the Battery When discharging o NiCd battery we need to moke sure we remove the bot- tery the moment the clock stops running INICd bateres do not oerate too deep «discharge very well. We therefore rec- aes} Nile Méebor (27-00), reasoncbly affordable, There i, however, alle problem in tht its oper- tion requires the use ofsignl keyboard Type 72750, which mokes the setup not caly more expensive but also inenble. There is, fortunately, cnother solution, simpler ond much more economical, 36 {OC only). R1 could be replaced by @ wir link for operation at input voltages below 10 V, or increased in value, os determined by either the application of ‘Ohm's tow once more or ml and errr, for on input voltage above 30 V. Cail LI wos obtained from Farrel, part number 581-240. Finally he protective fore Fr the input power eupply shou bo 0 ‘slow-blow’ type; ‘fost’ fuses will rop- ture before the relay has time to switch. ‘Ako nce that his device is meant o sove fuses, not reploce them. A mains trans- former must always be fused if iis pot designed to un sally, ., without pre- senling a fire hozord, even if its output has 0 continuous shortiruit faut Hyper-Simple Battery Capacity Tester commend keeping an eye on the voltage in one way or onethe, for example by Design for Cconrecting © muliimeter in poral with the resistor. (58 Marklin Light Signals which requires just @ switch ond 10 ides. is bosed onthe fot that, seen from en electronics poet of view, the light signol consists f two anthporallekcor- rected IFDs with dropping rsitee The lower section ot the right ofthe dio- gram, Do, Db, Ra ond Rb represents the Iypical inner circuit of such o light sigrl When the output voltage of the light power source is applied tothe circuit, both LEDs light. Hewever, since only @ red or green signal 1s wented, the vl 0¢ is simply oppled via diodes D3 ond 4. Changeover swith $1 then deter mines which colour will be seen. Surely very econemical sion Fin mere complex setups itis required to have direct control ever which colour the light signal on the trock i to be, it suffices LEDs, DI ond D2, in the connection between switch S1 ond the light signcl. So far, so good. Bul now for a few spe- dlierlecocis 79/2006

You might also like