2006 07 PDF
2006 07 PDF
£5.65
www.elektor-electronics.co.uk
™xHRKCQIy451 28zv+:=
Get your teeth into our 410+ page catalogue
jam-packed with over 780 new and exciting
products for 2006. Claw your way on line to
www.jaycarelectronics.co.uk/elektor and
request your new 2006 catalogue - it’s FREE!
You can purchase from us 24/7/365 through
POST AND PACKING CHARGES:
our secure encrypted system. Post and Order Value Cost Order Value Cost
£20 - £49.99 £5 £200 - £499.99 £30
packing charges are modest so you can have £50 - £99.99 £10 £500+ £40
any of 8,000 unique products delivered to £100 - £199.99 £20
Max weight 12lb (5kg). Heavier
your door within 7-10days of your order. parcels POA. Minimum order £20.
Log on to
www.jaycarelectronics.co.uk/elektor
for your FREE catalogue!
410+ page
0800 032 7241 Catalogue
(Monday - Friday 09.00 to 17.30 GMT + 10 hours only).
For those who want to write: 100 Silverwater Rd
Silverwater NSW 2128 Sydney AUSTRALIA All prices
in PDS
Helping You Succeed
24/7
Technical
Support
Local Online
Seminars Programming
Authorised
Consultants/ Regional Training
Design Houses Centres
Expanded Local
Free Samples Technical
Support
Volume Pricing
www.microchip.com
The Microchip name and logo, PIC, and dsPIC are registered trademarks of Microchip Technology Incorporated in the USA and other countries. All other trademarks and registered trademarks are the property of their respective owners.
© Microchip Technology 2006. All rights reserved. ME156Eng/05.06
US!
e lektor
lectronics
leading the way
PL S UMMER
12 Hands-on Plus!
Colophon 6
The circuits and circuit ideas in this Summer Circuits issue are bound to inspire many electronics Hands-on 12
enthusiasts to pick up a soldering iron and build something nice for themselves. Here we provide
Looking for a Needle 14
several basic tips for assembling circuits.
GBPLC — Gameboy PLC 16
GBPLC I2C I/O Box 24
ElectroShack 28
16 Gameboy PLC
Alphadoku 140
Elektor SHOP 145
Sneak Preview 148
Here we present GBPLC, a PLC based on the
Nintendo GameBoy. Ready-assembled and
tested boards are available through a reverse Audio, Video & Photography
auction on our website! BBC Radio-MP3 for Seniors 30
DC-coupled Audio Amplifier 47
Hybrid Headphone Amp 54
Multimedia RIAA Preamplifier 126
Paraphase Tone Control 39
Phono Splitter 48
Simple Hybrid Amp 56
Slave Flash Trigger 50
C IRCUITS 2006
Home & Garden Step-Down Converter Controller 34
Alternative Halogen Supply 111 USB Fuse 84
Automatic Range Hood 79
Call Acknowledged! 82
RF (radio)
Active Antenna 110
Direction Sensitive Light Barrier 45
Antenna Height and Range 55
Easy Home Remote Control 72
DRM Receiver Upgrade 131
Gentle Breeze 63
Harmonic Generator with Single Opamp 105
Hard-Wired Code Lock 97
Opamp VHF FM Transmitter 65
Laser Alarm 31
LED Phototherapy Unit 58
Test & Measurement
Mains Slave Switcher I 107
1-Wire Thermometer with LCD 70
Mains Slave Switcher II 134
Eight-channel Scope Input 80
Modulated Light Barrier 41
Electronic Torricelli Barometer 85
On/off Infrared Remote Control 76 Geiger Counter 130
Pipe Descaler 51 Increased Range for DVM 129
Presence Simulator 66 IR Remote Control Tester 33
Protection for Telephone Line 86 LED Thermometer 104
Slug Repellent 92 LM35 to ADC 98
Telephone Ringer 91 Multimeter as Lightning Detector 43
Temperature Sensitive Switch for Solar Collector 118 Optical Pulse Generator 95
Thunderstorm Predictor 109
Toothbrush Timer 64 Miscellaneous Electronics & Design Ideas
10,000x with One Transistor 113
Microcontrollers Audible Flasher Warning 89
84x48-pixel Graphics LCD 81 Automatic Windshield Washer Control 94
89PLC9xx USB Programming 46 Charlieplexing 77
Contrast Control for LCDs 86 Electronic Touch Switch 88
E-blocks = cheaper PLC design 59 Miller Capacitor 93
How to! Connect your project to the PC 123 Multi-Colour Flashing LED 83
Programmer Board for the R8C/13 114 Rear Fog Lamp for Vintage Cars 60
Programming the Propeller IC 58 Recycling Flasher Lights 74
R8CKey 78 SMD Crystal Adapter 87
Universal LCD Module 120 Thrifty LED Protector 67
Transcutaneous Electrical Nerve Stimulator (TENS) 49
Power Supplies & Batteries
Adjustable Current Limit for Dual Power Supply 61 Bold article title = PCB design included
Battery Saver 88
Driver for 20 LEDs 102
Earth Fault Indicator 75
Fuse Saver 35
102er Articles
High-voltage Regulator with Short Circuit Protection 101
k
Crac
Hyper-Simple Battery Capacity Tester 36
ha s more
e
no on
Low Loss Step Down Converter 112
Mains Indicator 52
ing le issue
Measuring Battery Charge 100
in a s volum
e)
Power MOSFET Bridge Rectifier 42
or a year
Quad Power Supply for Hybrid Amp 106 (
Subscriptions: Elektor Electronics (Publishing),
Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England.
Tel. (+44) (0) 208 261 4509, fax: (+44) (0) 208 261 4447
Internet: www.elektor-electronics.co.uk
Email: [email protected]
Rates and terms are given on the Subscription Order Form
Volume 32, Number 356, July/August 2006 ISSN 0268/4519 Head Office: Segment b.v. P.O. Box 75 NL-6190-AB Beek The Netherlands
Telephone: (+31) 46 4389444, Fax: (+31) 46 4370161
Elektor Electronics aims at inspiring people to master electronics at Distribution: Seymour, 2 East Poultry Street, London EC1A, England
any personal level by presenting construction projects and spotting Telephone:+44 (0)207 429 4073
developments in electronics and information technology. UK Advertising: Huson International Media, Cambridge House, Gogmore Lane,
Chertsey, Surrey KT16 9AP, England.
Publishers: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Telephone: +44 (0)1932 564999, Fax: +44 (0)1932 564998
Road, Brentford TW8 9HH, England. Tel. (+44) (0) 208 261 4509, fax: (+44) (0) Email: [email protected]
208 261 4447 www.elektor-electronics.co.uk. Internet: www.husonmedia.com
Advertising rates and terms available on request.
The magazine is available from newsagents, bookshops and electronics retail outlets,
or on subscription. Elektor Electronics is published 11 times a year with a double issue International Advertising: Klaas Caldenhoven, address as Head Office
for July & August. Email: [email protected]
Advertising rates and terms available on request.
Under the name Elektor and Elektuur, the magazine is also published in French, German
Copyright Notice
and Dutch. Together with franchised editions the magazine is on circulation in more
The circuits described in this magazine are for domestic use only. All drawings, photographs, printed
than 50 countries.
circuit board layouts, programmed integrated circuits, disks, CD-ROMs, software carriers and article
International Editor: Mat Heffels ([email protected]) texts published in our books and magazines (other than third-party advertisements) are copyright
Segment. b.v. and may not be reproduced or transmitted in any form or by any means, including pho-
Editor: Jan Buiting ([email protected])
tocopying, scanning an recording, in whole or in part without prior written permission from the
International editorial staff: Harry Baggen, Thijs Beckers, Ernst Krempelsauer, Publishers. Such written permission must also be obtained before any part of this publication is stored
Jens Nickel, Guy Raedersdorf. in a retrieval system of any nature. Patent protection may exist in respect of circuits, devices, compo-
nents etc. described in this magazine. The Publisher does not accept responsibility for failing to identi-
Design staff: Ton Giesberts, Paul Goossens, Luc Lemmens, Karel Walraven
fy such patent(s) or other protection. The submission of designs or articles implies permission to the
Editorial secretariat: Hedwig Hennekens ([email protected]) Publishers to alter the text and design, and to use the contents in other Segment publications and activ-
ities. The Publishers cannot guarantee to return any material submitted to them.
Graphic design / DTP: Ton Gulikers, Giel Dols
Disclaimer
Managing Director / Publisher: Paul Snakkers Prices and descriptions of publication-related items subject to change. Errors and omissions excluded.
Customer Services: Margriet Debeij ([email protected]) © Segment b.v. 2006 Printed in the Netherlands
SRROLQJIRUVWDQGDUGERDUGV
<RXUSULFHFRQVFLRXV3&%VXSSOLHU 9HULILHG XSWROD\HUV
IURPWRSLHFHV
IURPZRUNLQJGD\VRQZDUGV
2QOLQHSULFHFDOFXODWLRQ
2QOLQHRUGHULQJ WHFKQRORJ\DWWKHULJKWSULFH
2QOLQHRUGHUWUDFNLQJ jODFDUWH XSWROD\HUV
2QOLQH+DQG' IURPWRSLHFHV
IURPZRUNLQJGD\VRQZDUGV
,QWHUHVWHG"&RQWDFWXV
\RXUERDUGRXUFKDOOHQJH
(PDLOHXUR#HXURFLUFXLWVFRP XSWROD\HUV
2QGHPDQG IURPSLHFHRQZDUGV
ZZZHXURFLUFXLWVFRP IURPZRUNLQJGD\VRQZDUGV
4 Channel Digital Scope using industry
standard BNC probes or analog inputs on
the POD connector.
8 logic, External Trigger and special
purpose inputs to capture digital
signals down to 25nS.
True MSO to capture 4 analog waveforms
time-aligned with 8 logic using sophisticated
cross-triggering on any input.
Real-Time Spectrum Analyzer Turn your PC into an expandable multichannel scope solution.
See spectra and waveforms of all analog Never run out of channels again. Whether debugging an embedded 3 phase motor
channels in real-time displayed simultaneously. controller or monitoring a full scale synchrotron, BitScope is the right solution.
Advanced Networking Operation With 4 independent analog and 8 synchronized logic channels, BitScope is ideal in
Flexible network connectivity supporting situations where a dual channel scope is simply not enough. Consider many modern
multi-scope operation, remote monitoring embedded systems, component video, 3D robotics, DSP process control and automotive
and data acquistion. systems. All frequently require more than 2 analog channels and several synchronized
timing channels to really see the big picture.
Integrates with third-party software Perhaps 4 + 8 channels is not enough? No problem, build a scope array accessible from
Use supplied drivers and interfaces to build the PC via your network and synchronized via BitScope's trigger bus or logic inputs.
custom test and measurement and data "Smart POD" connected active probes and multiple software options complete the picture
acquisition solutions. for the perfect low cost high performance multichannel test and debug solution!
Standard 1M/20pF BNC Inputs BitScope Smart POD probe connector Ethernet Connectivity Expandable and Programmable
200µV-200V/div vertical scale 8 logic channels, cross-triggering High speed binary data transmission Simple ASCII Protocol
Software select AC/DC coupling 4 additional analog inputs on POD Standard network protocols (UDP/IP) BitScope Scripting Language
Switchable 50 ohm termination Async serial I/O for external control Internet addressable device Add active probes and devices
x1 to x100 or differential probes Trigger bus for multi-scope sync
Hands-on
Assembling Circuits
The minimum requirement for putting together a circuit is a available – with continuous copper strips, with independ-
soldering iron. A stand to hold the hot soldering iron is ent islands, and with various other copper patterns. You
also very convenient. If you do a lot of soldering, it’s a can use thin, insulated copper wire to make connections
good idea to buy a temperature-regulated soldering station between the various components.
that always provides the correct soldering temperature. A wide variety of adapter boards are available for
experimenting with SMDs. Different types of SMD pack-
ages can be mounted on a small printed circuit board fit-
Soldering tips ted with a standard 2.54-mm grid for headers and other
A soldering iron with a narrow bent tip is highly practical components.
for soldering small components located between other
large components. In that case, the entire iron must be
relatively thin, and not just the tip. Various types of sol- Making PCBs (or having them made)
dering tips, as well as special miniature soldering irons, Circuit board layouts are shown with some of the circuits
are available for soldering SMD components (see inset), in Elektor Electronics. Most of these circuit boards are
A good pair of tweezers is nearly indispensable for work- available from Elektor Electronics or our business partner,
ing with SMDs. A magnifying glass or loupe can also The PCB Shop (Eurocircuits).
come in handy for checking soldering points on circuit If you have designed a printed circuit board using a PCB
boards. layout program on your PC, you can make it yourself or
If you select a type of solder with a flux core, you won’t have it made for you. There are several PCB firms these
need any additional flux for soldering. Desoldering braid days (such as Eurocircuits and PCB-Pool) that make proto-
is very handy for removing excess solder. The braided types at acceptable prices, even for one-offs. Of course,
wick of thin copper wires ‘sucks up’ liquid solder. A sol- you can also roll your own.
der sucker is more convenient for removing relatively The first step is to use an inkjet or laser printer to make a
large amounts of solder. good, opaque overlay film. Films specially designed for
Always keep the tip of your soldering iron clean. You can this purpose are commercially available. Use a hair
use a damp sponge, special metal shavings, or a tip acti- dryer to dry the print after printing, and if necessary print
vator for that purpose. Adjust the iron to the proper tem- the layout on top again to obtain good opacity.
perature (approximately 370 °C) and ensure that your After that you can use the film to expose the photosensi-
workplace has good lighting. tive circuit-board material (using a second-hand UV lamp,
Most electronics enthusiasts will still use ‘ordinary’ for instance).
lead/tin solder at home. However, make sure you also
have lead-free solder on hand in case you need to make You can use granulated iron chloride to etch the circuit
repairs on boards assembled using lead-free solder. board. It does not have to be heated, so it generates less
vapour. That also means you can etch the board right
away, because it works at room temperature. This chemi-
Assembling circuits cal can be regenerated so it can be used several times,
A piece of prototyping board is an excellent choice for and it is less aggressive than other etchants.
assembling a small circuit. Several types of boards are (060182-1)
• Loupe or
magnifying glass
Soldering SMDs
It’s perfectly possible to handle SMD components using the
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 as
resistors, capacitors and transistors) in the proper locations,
and then secure one pin or solder pad 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. After that, continue with the
other solder pad(s) by heating the component and the solder
pad. Feed solder under the rounded surface of the tip. The
flux in the solder and the capillary action between the compo-
nent and the solder pad will cause a tight solder joint to be
formed. Finally, return to the first solder point, heat the solder
already there, and add a bit more solder to create a sound
solder joint here as well.
With a multi-pin IC, first align the IC properly and then solder
one of the corner pins in place. Check the positioning again,
and then solder a pin in place on the other side. If the IC is
still properly positioned, you can now solder the other pins,
taking care to allow enough time for IC to cool down in
between. It’s good practice to inspect your soldering afterward
with a loupe. If there are shorts between the pins, you can use
copper braid and liquid flux to remove the extra solder.
A different method can be used with ICs that have very nar-
row pins. After carefully aligning the IC and securing it at two
corners, you can solder all the pins using a generous amount
of solder. It doesn’t matter if that causes shorts between the
pins. Next, use desoldering braid to remove the excess sol-
der, which will also eliminate the shorts between the pins.
Electronic component sales have usually have to look up the IC on the and construction kits. If you can’t find
increasingly shifted to the Internet manufacturer’s site, and then you can what you’re looking for there, try the
during recent years, particularly in order samples. The conditions vary large international mail-order firms
English-speaking countries. That’s widely, but you often have to order such as Farnell and Digi-Key. The
hardly surprising. It’s nearly impossi- using the name of a firm. However, order charges are often relatively high
ble for a local electronics shop to keep it’s certainly worthwhile to have a with such firms, but you can keep
up with the enormous range of compo- good look at this option. them under control by waiting until
nents and continuous stream of new • If you can’t obtain free samples, you have accumulated a sufficiently
components, so a larger-scale there’s another option. More and large number of components or plac-
approach is necessary. more manufacturers now have their ing a large order with several col-
own webshops where you can place leagues or friends.
There’s an especially good chance of small parts orders using a credit card. • Your search for a specific compo-
encountering components in the Sum- The advantage here is that the man- nent may take you to a wholesaler or
mer Circuits issue that are not so easy ufacturer knows exactly which of its distributor. If you want to use the
to obtain. If you at least know who the own products it can supply. We have component for a personal project, you
manufacturer is, you’re already halfway had good results with this method. can take the address in question to
there. Here we provide a few tips. •Next, have a look at the adverts in your electronics dealer and ask
our magazine. Start your search with whether he orders from there. For
•Start with the manufacturer’s web- a specialised mail-order company. commercial use, you can simply place
site. Many manufacturers offer free Almost all such companies have web- an order from your firm.
samples. To obtain such parts, you sites where they sell special parts • There are also many firms on the
BEC http://www.bec.co.uk/
Digi-Key www.digikey.com
Farnell www.farnell.co.uk
Futurlec www.futurlec.com
Grandata www.grandata.co.uk/
Maplin www.maplin.co.uk/
Microchip www.microchipdirect.com
RS Components http://rswww.com/
Internet that specialise in supplying
spare parts for electronic equipment. SK Pang Electronics www.skpang.co.uk
They may also have special parts in
their product lines. A common diffi-
Sycom http://www.sycomcomp.co.uk/
culty in such cases is that it’s difficult
to find a specific component because
they use manufacturers’ internal Specialised in supplying Elektor parts and selected kits
codes and part numbers. However, it
can be worth the trouble. Barend Hendriksen www.barendh.com
•Finally, look beyond the border. For
instance, there are a few specialised DIL Electronics www.dil.nl/
firms in Germany and the Nether-
lands where Elektor has a strong Geist Electronic-Versand www.geist-electronic.de
presence hence you can find compo-
nents that are scarcely available any-
where else. Ordering is usually not a Reichelt Elektronik www.reichelt.de
problem.
Segor Electronics www.segor.de
If your German or Dutch isn’t that
good, you can always try it in English! Viewcom www.viewcom.force9.co.uk/
(060183-1)
GBPLC – GameB
use a Nintendo GameBoy as a
programmable logic controller
for home automation
Sascha Koths & Stephan Ruloff,
in collaboration with Christian Müller
Table 2.
GBPLC I2C I/O Box Features
• Available as a ready-assembled and tested PCB
• 8 digital inputs (for potential-free contacts)
• 8 digital outputs (relay or transistor)
• 4 analogue inputs (8-bit resolution)
• 1 analogue output (8-bit resolution)
• Inputs can be simulated by connecting pushbutton switches to the I/O box
• Socket for optional I2C SMS chip (with connector for Siemens S25 or C35i
mobile phone)
• Port for linking to a Siemens S25 or C35i mobile phone
• All switch states can be indicated by connecting LEDs
Figure 1. Suitable GameBoy models. The unit in the centre is the GBPLC I2C I/O Box,
which drives the GameBoy fitted with a GBPLC module.
+5V
+5V
R1 R2 R3 R4
IC3 8
330 Ω
330 Ω
4k7
4k7
C2 +5V
3 K2
SCL 3 SX LX 2
100n 2
28 1
+5V SDA 6 SY LY 7
2 T1
CLK/I0 R5 4
3 27
I1 I/O9 10k USB-mini
4 26 SCL 4
I2 IC2 I/O8
K1 5 25 SDA P82B715BN
I3 I/O7 T2
R6
1 6 24 WR
+5V I4 I/O6 10k
2 7 23 RD
ECLK I5 I/O5
3 WR A14 9 PAL 21 A15
WR I6 I/O4
4 RD 10 CE22V10 20 2x BC850
RD I7 I/O3
5 11 19 D3
RAMCS I8 I/O2
6 A0 12 18 D2
A0 I9 I/O1
7 A1 13 17 D1
A1 I10 I/O0
8 A2 16
A2 I11
9 A3 +5V
A3
10 A4
A4 14 22
11 A5
A5
12 A6 C4
A6
13 A7 A15
A7
100n
14 A8
A8 C1 +5V
15 A9 8 3
A9
16 A10 VCC VBAT
A10 100n BT1
17 A11 7 IC4 1 X1
A11 SQW X1
18 A12
A12 32
19 A13 SCL 6 DS1307 3V
A13 SCL
20 A14 A0 12 31 SDA 5 2
A14 A0 WE SDA X2
21 A15 A1 11 22 CE 32kHz
A15 A1 CE GND
22 D0 A2 10 24 RD
D0 A2 OE 4
23 D1 A3 9
D1 A3
24 D2 A4 8
D2 A4
25 D3 A5 7
D3 A5
26 D4 A6 6
D4 A6 IC1
27 D5 A7 5 13 D0
D5 A7 D0 +5V
28 D6 A8 27 14 D1
D6 A8 AM29F D1
29 D7 A9 26 040B 15 D2
D7 A9 D2
30 A10 23 17 D3
RESET A10 D3 C3
31 A11 25 18 D4
AUDIOIN A11 D4
32 A12 4 EPROM 19 D5 100n
GND A12 D5
A13 28 20 D6
A13 D6 8
A14 29 21 D7
Game Boy A14 D7
3
A15 7 IC5 1
2 WP A0
A16 SCL 6 2
+5V 30 SCL A1
A17 SDA 5 3
1 SDA A2
A18 24C256
S1
16 4
050190 - 11
Figure 2. Schematic diagram of the GBPLC module, which transforms the Nintendo GameBoy into an easily programmed PLC.
and GameBoy Advance SP) are suit- data, which constitutes the PLC appli- ient Windows-based program. The PC
able for this project. Figure 1 shows a cation programs (also referred to as the software can also run real-time simu-
few examples. The Nintendo DS and ‘logic programs’ in the rest of this arti- lations and exchange program code
DS Lite (which actually do not belong cle). The I2C EEPROM allows data to and data with the GameBoy. If neces-
to the GameBoy family) and the Game- be exchanged between the GameBoy sary, PLC programs can also be gener-
Boy Micro are not suitable. and a PC application running under ated, modified and simulated directly
The core of the system consists of the Windows. The GBPLC module has an on the GameBoy. Up to eight PLC pro-
GBPLC module, which is inserted into I2C interface that can be connected to gram sequences (‘logic programs’) can
the bay on the back of the GameBoy all types of commonly used PC ports be stored in the GBPLC module, from
instead of the usual game cassette (serial, parallel or USB) using suitable which they can be individually
(ROM cartridge). This module consists adapters. retrieved and run. The data read in by
primarily of memory: a flash EEPROM Table 1 lists the key features of the the application can be shown on the
for the firmware and an I2C EEPROM GBPLC module. The PLC program can GameBoy display as a log file and read
for the display messages and the PLC be generated on a PC using a conven- out from the GBPLC module to the PC.
digital inputs and eight digital outputs, which can thus be used to select one
R3
IC3
R4
IC5
BT1 the I/O module has four analogue of two programs stored in the flash
C3
R5 R1
R2
inputs and one analogue output. One memory. One of them is the actual
050190-1
T2
T1
R6 C1
of its special features is a socket for a application program (the PLC
C2
IC1 small daughterboard fitted with an I2C firmware), while the other is an editor
IC2
SMS chip. This optional extension also that can be used to program or modify
has an I2C interface and allows the PLC application software directly on
unit to be controlled and queried the GameBoy. As S1 should only be
remotely by using SMS messages (‘tex- operated with power off, the circuit
ting’) and a mobile phone. board layout (Figure 3) is arranged
K1
such that S1 is only accessible when
the module is not fitted in the Game-
GBPLC module Boy. The assembled prototype board is
As you can see in Figure 2, the circuit shown in Figure 4.
of the GBPLC plug-in module essen- IC2 (PALCE22V10) provides address
tially consists of only five ICs. IC1 is a decoding, and it generates the I2C bus
flash EEPROM that stores the applica- signals SDA (data) and SCL (clock)
(C) ELEKTOR
tion software (firmware), IC2 is a PAL with the assistance of transistors T1
050190-1
that provides address decoding and and T2 and pull-up resistors R1 and R2.
generates the I2C signals, IC3 is an I2C The programs held in the flash mem-
bus extender, IC4 is an I2C real-time ory (IC1) are stored ‘permanently’ and
clock, and IC5 is an I2C EEPROM. From can only be overwritten by a software
a functional perspective, the GBPLC update (which requires a flash pro-
module adds program and data mem- grammer), but the content of the EEP-
ory, an I2C interface, and a battery- ROM (IC5), which is addressed via the
backed real-time clock to the basic I2C bus, is always accessible. It is
GameBoy platform. used primarily to store the PLC appli-
cation programs (eight maximum). The
The GameBoy microprocessor, which messages for the display are also
resembles the Z80, has a direct stored in the I2C EEPROM. That
address range of 64 K. However, the means the firmware in the flash mem-
upper 32 K are used for the LCD, RAM, ory does not contain any messages, so
sound and so on, leaving the range it does not have to be re-assembled for
0000–7FFF available for external ROM every minor change to a message.
and the range A000–BFFF available for That also has the advantage that it is
external RAM. Consequently, the easy to load different language ver-
COMPONENTS Miscellaneous
S1 = slide switch, sub miniature, angled
050190-1
sions. Display messages in German and switch-off times to be pro- The 32-way card-edge connector of the
and English are included in the ready- grammed using the PLC and events to module board (shown at the left in the
made software. be logged. Thanks to the back-up bat- schematic diagram) automatically con-
tery, the clock is specified to operate nects the module to the GameBoy
The I2C real-time clock (DS1037) pro- for up to 10 years without losing track when the module is inserted. The only
vides the time of day in 12-hour and of the time. The internal 56-byte RAM connection to the outside world is the
24-hour format along with the date and of the DS1307 is not used in the GBPLC I2C port, which is located on the edge
day of the week, to allow switch-on application. of the board that remains accessible
when the module is inserted. The
board is fitted with a miniature USB-B
socket (K2) for the I2C bus. In contrast
to the GBDSO, the serial interface port
of the GameBoy is not used in the
GBPLC application.
4k7
4k7
+5V +5V K1
Mini USB to USB-A for connecting the 100n C1
1
C1+
V+ 16
050190-2
through-hole plated PCB with SMD
components. Due to the difficulties of
R3
K2
assembling such a board, the GBPLC
R2
IC2
assembled and tested PCB, which only
C6
(C) ELEKTOR
Table 3. GBPLC
Windows Software • Print system logic and labels
• Buttons for running other program modules
System requirements
• Configure interface
• PC with Pentium-class processor
• Windows 95 with 32 MB RAM; Windows 98/ME with GBPLC Simulator
64 MB RAM; Windows NT 4.x with Service Pack 4 or • Load logic programs
higher; Windows 2000 or Windows XP with 128 MB • Start and stop programs
RAM (minimum requirement in each case) • Real-time simulation of inputs
• Administrator rights if Windows NT, Windows 2000 or • Generate outputs
Windows XP is used
• Microsoft Internet Explorer 5.0 or later GBPLC Log Viewer
• Serial or parallel interface (USB can be used with a USB
to RS232 converter but is very slow) • Read log data from GBPLC module
• Display characteristic curves (plotted versus time)
Ready-to-use PLC programs • Freely selectable colours for characteristic curves
• Aquarium/terrarium controller • Export to Excel or other programs
• Alarm system
• Roller shutter controller SMS Configuration (for optional I2C SMS chip)
• Configure short message service carrier (SMSC) number
GBPLC Manager • Configure recipient number
• Generate and edit logic programs • Write SMS (‘text’) messages
Windows software
A package consisting of three programs that run under Win-
dows is provided to simplify using the controller. Like the
firmware, it is available for downloading free of charge. Bor-
land C++ Builder was used to develop the Windows software.
Figure 8. Screenshot of GBPLC Manager, the main program for operating and
Each of the three programs (GBPLC Manager, Simulator, and
programming the GameBoy PLC under Windows.
LogView) performs a specific task. A fourth program (SMS
Configuration) can be used to configure the optional I2C SMS
chip. All the other programs can be run from GBPLC Man-
ager, so all the Windows software can be used in the GBPLC
Manager environment.
GBPLC 2
IC I/O Box
analogue, digital I/O plus TXT (SMS)!
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, including 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.
mobile phone.
That means you
could ‘text’ a mes-
sage to close the cur-
industr y tains or operate some other
standard I2C system.
bus. It has four ana-
logue inputs and eight digi-
tal inputs, a single analogue out- The circuit
put, and eight digital outputs that can The active part of the circuit consists of
source 5 V at 5 A. It also has an inter- IC3–IC5, each of which has an I2C bus
face for connecting a special SMS mod- interface. IC6 and IC7 are I2C bus
ule to allow messages to be ‘texted’ to extenders that act as boosters. They
a mobile phone. In short, it has lots of reduce the link’s susceptibility to inter-
capabilities. The SMS module also ference by increasing the current on the
allows the circuit to be controlled by a I2C bus and reducing its capacitance.
C5 1 3 5 7 9 11 13 15 17 19
K25 K11
R19
R18
100n
+5V IC1
16 2 4 6 8 10 12 14 16 18 20
4k7
4k7
D2
1N4001 7805 +5V
K12
13 4 +5V
INT P0
R20
R21
C18
IC5 5 K24
P1 3
330 Ω
330 Ω
100n 14 6
SCL P2 K13 1
15 7 C17 C6 C7
IC6 8 SDA P3 2
+5V 9
P4
1 PCF8574T 10 10µ 100n 100n
A0 P5 K14 25V
K27 7 LY SY 6 SDA 2 11
1 A1 P6
3 12
2 A2 P7
C15
C13
C11
2 LX SX 3 SCL
C9
3 K15
4
8
USB -B 4
K16
P82B715BN
C14
C12
C10
C8
+5V
8x 100n
SDA
SCL
C4 K17
+5V
100n
C2 R1
K19
R10
R11
R12
R13
R14
R15
R16
R17
4k7
16
100n
K2
4k7
4k7
4k7
4k7
4k7
4k7
4k7
4k7
12 5
EXT A0
K20 6 T9
A1
1 IC4 7
AIN0 A2 8
2 2 7
AIN1 K23 K3
K21 3 6
AIN2 IC2
4 15 3 5
AIN3 AOUT
4 T10
PCF8591 1
K22 10 14
SCL VREF D1
9 11 CA3130
SDA OSC C1 K4
AGND
8 13 100n
+5V
SDA
SCL
T11
LM336
K5
+5V
R22
R23
C19
330 Ω
330 Ω
100n C3
T12
IC7 8
16 100n
K6
K28 7 LY SY 6 SDA 13 4 R2
1 INT P0 4k7
IC3 5 R3
2 P1 4k7
T13
2 LX SX 3 SCL 14 6 R4
3 SCL P2 4k7
15 7 R5
4 SDA P3 4k7
9 R6 K7
P4 4k7
USB -A 4 1 PCF8574T 10 R7
A0 P5 4k7
P82B715BN 2 11 R8
A1 P6 4k7 T14
+5V 3 12 R9
A2 P7 4k7
C16
SDA
SCL
T1 K8
8 T2
100n
1 3 5 7 9 11 13 15 17 19
T3 T15
K26
T4
K18 K9
1 32 VCC 2 4 6 8 10 12 14 16 18 20
T5
RTS 2 31 DTR
T6
3 30 TXD V24 T16
4 29 RXD V24 T7
+5V
5 28 TXD Max
T8
6 27 TXD TTL K1
7 26
1
8 25 GND 6 8x
2
9 24 7 IRFZ34
3
10 23 8
4
11 22 9 8x BC850 060098 - 11
5
AVCC 12 21
13 20 SCL
14 19 SDA SUB-D9
15 18
GND 16 17
Figure 1. The main components of the circuit are the I2C drivers and the bus extender.
IC4 converts analogue signals into 8-bit IC4. The PCF8574 contains an 8-bit internal base address, which explains
digital data suitable for the I2C bus. The quasi-bidirectional port with internal why IC4 and IC5 can apparently be
reference voltage on pin 14 is set to 2.5 latches. The latch retains the most assigned the same address. If you want
V, which yields a resolution of approxi- recently configured output state. IC5 to couple several of these modules to a
mately 10 mV. TTL signals can access obviously does not use this data, single bus for a different application,
the I2C bus via IC5. Capacitors C8–C15 since none of its outputs are used in you will have to modify address portion
decouple noise on the inputs. That’s the circuit. of the PCB track layout.
hardly an unnecessary luxury for signal
lines that doubtless run over a consid- The addresses of IC3, Ic4 and IC5 are Standard USB connectors are used for
erable distance through your house. hardwired in the circuit by tying the connection to the I2C bus. They are
Digital and analogue signals are out- address pins A0, A1 and A2 to fixed thus not real USB ports. K28 is a USB-
put to the outside world via IC3 and potentials. The PCF8591 has a different A connector for connection to the
K2 K3 K4 K5 K6 K7 K8 K9
K24 K1
C16
R13
R15
T9 T11 T13 T15
R8
R6
R4
R2
T2 R11 T4 T6 T8
R17
K18
R9
K19
R10
R14
R16
R7
R5
R3
T1 T3 R12 T5 T7
T12
T10 T14 T16
D2 C3 C5
C17
R18
R20
C18
C1
K20
IC4 C4
C15 C8
R1
C6
IC3
IC1
IC5
C13 C14
C10 C9
K26
K21
IC6
D1
R19
C11
C7
C12
R21
K27
IC2
K25
C2
K22
R23
K23 K17 K16 K15 K14 K13 K12 K11 K10 IC7
C19
K28
V
H4
R22
Figure 2. Practically the entire outer region of the board is occupied by a large number of connectors.
GameBoy module. K27 is a USB-B con- was switched on, due to the initial SMDs. Next in line are the DIL and
nector intended to be used for connec- state of the PC8574. SMD ICs. IC2 can optionally be fitted
tion to a PC. That makes it unneces- As already mentioned, the MOSFETs in a socket. After that, you can fit the
sary to constantly disconnect and can handle currents up to around 5 A. rest of the components.
reconnect cables when you want to Incidentally, you can also use the pin- You can connect a mobile phone directly
control the module from the GameBoy compatible BUZ11 in place of the to the circuit via a serial data cable con-
while linking it to a computer at the IRFZ34N. It is no longer being made, nected to K1 if the optional SMS module
same time via an I2C to RS232 adapter. but you can doubtless still find it on is also fitted. You can order the SMS
All digital inputs and outputs are the shelf here and there. module at www.rk-tech.org.
directly accessible on K25 and K26. The power supply is a simple design
That means you can check the outputs using a 7805. That means you can sim- Of course, this circuit is also perfectly
by connecting low-current LEDs ply use a standard AC adapter with a suitable for use as a general-purpose
directly to K26. Don’t forget to use cur- voltage of 9 V or more as a power I2C bus interface — it doesn’t have to
rent-limiting resistors for the LEDs. source. D2 provides reverse-polarity be restricted to use in combination
The PCF8574T has open-drain outputs protection in case you accidentally with the GameBoy module. An I2C-
that can source adequate current for connect a different adapter with the based system with all sorts of control
that purpose. wrong polarity. and switching capabilities can be used
We use the SMD version of the well- for innumerable purposes aside from a
known BC550 here for inverters home bus system. That makes this I2C
(T1–T8, BC850) that drive MOSFETs Construction I/O Box suitable for a wide variety of
T9–T16. Otherwise the outputs would Assembling the circuit board is not dif- applications.
go high immediately after the circuit ficult. Start by soldering all the small (060098-1)
1HZ7KH3&2VFLOORVFRSHWKDW
¿WVLQWKHSDOPRI\RXUKDQG
7KH3LFR6FRSH 3&2VFLOORVFRSHV
7KLVFRVWHIIHFWLYHVROXWLRQLVD3&2VFLOORVFRSHFRQQHFWHGDQG
SRZHUHGYLDWKH86%FRQQHFWLRQ(UJRQRPLFDOO\GHVLJQHG
WR¿WLQWKHSDOPRI\RXUKDQGWKLVLVWKHSHUIHFWSRUWDEOH
FRPSDQLRQIRUWRGD\¶VHQJLQHHURQWKHJR+DQG\WRWUDYHO
ZLWKDQGHDV\WRVHWXSIRUWKHQRYLFHDQGWKHSURIHVVLRQDO
WKH3LFR6FRSH SURYLGHWKHSHUIHFWVROXWLRQWR
\RXUWHVWDQGPHDVXUHPHQWQHHGV$VZLWKDOO3LFRSURGXFWV
OLIHWLPHVRIWZDUHXSJUDGHVDQGWHFKQLFDOVXSSRUWDUHDYDLODEOH
IUHHRIFKDUJH
8SWR06VUHDO 6XSSOLHGZLWK3LFR6FRSH
WLPHVDPSOHUDWH 3LFR/RJDQGELW
SURJUDPPLQJOLEUDULHV
8SWR0+]
EDQGZLGWK &RPSDWLEOHZLWK:LQGRZV
6(0(DQG;3
'LJLWDO(76HQKDQFHV
UHSHWLWLYHVLJQDO NVDPSOHEXIIHU
VDPSOHUDWHWR*6V
3LFR6FRSH
3UHVHQWHGLQDKDQG\SURWHFWLYHFDVHSHUIHFWIRU\RXUWRROER[
6LQJOH&KDQQHO6FRSH6ROXWLRQV
$YDLODEOH1RZ)URP2QO\
ZZZSLFRWHFKFRPKDQGKHOG
ELECTROSHA
1. Workplace with various projects ‘under 2. Inexpensive (web)server (Feb. 2006) and 3. Modding for Home Improvement (June 2006).
development’. Electronic Stamping (Sept. 2006). Central control for all equipment.
28 elektor - 7-8/2006
CK free-lance Modding & Tweaking expert
Jeroen Domburg in his student digs
6
4
3
4. Jeroen’s personal server, secured ‘suspending’ 5. Modified display; supplies info on currently 6. Christmas Light String (Dec. 2005) still in
to maximise space in the bed-sitter. playing music selection. budget enclosure.
7-8/2006 - elektor 29
BBC Radio-MP3
001
Richard Salisbury
for Seniors
Just recently the author had cause to
make an MP3 player for a 93-year old
recently moved to a nursing home. There,
radio reception turned out to be hope-
less, mainly owing to interference from
TL lamps. The elderly person involved
can neither see well nor has good manip-
ulative skills (arthritis), while learning new
ously whether the amplifier is on or not station. Of course, much more music
(the author used a 15-pound speaker set could be loaded on the player since
/ amplifier for a computer which stereo makes no sense and it could be
switches the 12 volts AC). The trans- encoded at a slower rate.
former was replaced with a double sec- An initial problem of the MP3 player’s
ondary winding to avoid any earthing output level not being well matched to the
problems between the USB charging amp input was solved by choosing
device and the amplifier ground. another amplifier (Velleman K4001)
The unit is working well and plays the which has a more suitable input sensitiv-
client’s favourite music for about 4-3/4 ity of 40mV.
hours, more or less like a personal radio (060070-1)
to twin speakers
AUDIO
R1
also happens on being replugged into K1
the mains. Due to a firmware problem of C1 C2 C3 1N5819 1
2
+5V
22k
470 Ω
C TL072
divider P1/R4 and the light-dependent
R3 R4
voltage provided by the voltage divider C1 D2
10k
10k
1 IC2
7805 +9V
R5 R4 R6 R1
C3
10k
10k
10k
10k
100n D1
14
D2
4 6
MCLR RB0
7 D3
K1 RB1
S 17 IC1 8
RA0 RB2 C4
Servo 18 9 D4
under RA1 RB3
1
Test RA2 PIC16F84 RB4 10 100n
2 -AP 11 D5
RA3 RB5
3 12
RA4/T0CKI RB6
13 D6
RB7
D8 OSC2 OSC1
D7
15 16 5
X1
R3 R2
S1 S3 S2
C2 C1
1k
1k
27p 27p
DOWN UP MODE 8MHz
040172 - 11
IC2
040172-1
R2 0
D8 C4 K2
K1 R1 +
T C2 R5 R4 R6
+
IC1
S
R3
S1 S3 S2
X1
C1
DOWN UP MODE
C3 ROTKELE )C( 1-271040 040172-1 (C) ELEKTOR
COMPONENTS LIST
Resistors D4, D8 = LED, 3mm, high efficiency, Case: Hammond 1591ATBU
(1/4W 10%) yellow IC socket 18p
R1,R4,R5,R6 = 10kΩ IC1 = PIC16F84(A), DIL18 case, Mains adaptor DC socket
R2, R3=1kΩ programmed, order code 040172-41 PCB, order code 040172-1
IC2 = LM2940, TO220 case (or 5V 1A Project software, free download
Capacitors low drop equivalent) 040172-11 from Elektor website
(5mm lead pitch)
C1,C2 = 27pF Miscellaneous A kit of parts is available from Elektor
C3, C4 = 100nF X1 = 8MHz quartz crystal, 32pF parallel Electronics; order code 040172-71,
load capacitance, HC49 case or low- see SHOP pages or website. Kit
Semiconductors profile model contents as components list.
D1,D2,D3,D5,D6,D7 = LED, 3mm, high K1 = 3 way SIL pinheader
efficiency, green S1, S2, S3 = pushbutton, 1 make contact
0.166 ms and the LED display will move The source code was written using Pro- size) batteries, and then use four alkaline
as appropriate to show the pulsewidth ton PIC Basic+ which then compiles into cells or five NiMH rechargeables to
selected. assembler and object code. For those obtain a raw supply voltage of 6 V. This
At any time the ‘mode’ button may be with a PIC programmer, all project soft- will necessitate the use of a low-drop reg-
pressed which causes the device to ware including the hex and source code ulator for IC2, like the 4805 or the
switch to/from the ‘exercise’ mode. A files is available as a free download, file LM2940 you find suggested here
servo connected to the output will cycle ref. 040172-11.zip, from the Elektor because it will not drain an almost flat
repeatedly from end to end of its travel Electronics website. The PIC is also avail- battery due to its own current. An on/off
— a useful indication of whether the able ready programmed though Readers switch is also recommended. The standby
servo is operational or not. Services under number 040172-41. current consumption of the circuit
An Elektor-style PCB was designed for the Several options are available for power- amounts to about 5 mA.
project and the artwork is shown here. ing the circuit. A 9-V PP3 (6F22) battery
Only one wire is required on the board. may look okay at first blush but then it Finally, PIC burners among you using the
The author’s own prototype incorporated will be exhausted quickly even with small hex file should set the config bits as fol-
two of these boards in a single enclosure servos. A mains adaptor (‘battery elimi- lows: HS (10) (since xtal > 4 MHz );
so that two servos on a model can be nator’) is possible, but precludes field WDTE disable (0); PWRTE enable (0).
tested at once. The board shown in the use. Undoubtedly the most elegant The other config bits are for code protec-
photograph is a prototype differing from approach, then, is the use of a case with tion and their use is at your discretion.
the final version in minor detail. a battery compartment for penlight (AA (040172-1)
Step-Down Converter
005
Dirk Gehrke, Texas Instruments
Controller
+3V3...+6V R1
33m Ω
The TPS6420x controller is designed to
S
operate from one to three series-con- G T1
10V
Fuse Saver
David Clark
006
re1
100k
Hyper-Simple
007
J. Van der Sterre
Battery Capacity Tester
The circuit described here is eminently
suitable to indicate the capacity of a bat-
tery. We use a cheap electric clock for
M1
this. By connecting a resistor across the
M
battery terminals, the battery is dis-
charged somewhat faster than with the
clock alone. If we pick a resistor with a M1 BT1
value of 5.6 Ω, the discharge current
amounts to 1.2 V / 5.6 Ω = 214 mA. If 1V5
BT1
we multiply this with the number of hours R1
Design for
008
Nils Körber
Märklin Light Signals
which requires just a switch and two red or green signal is wanted, the volt-
diodes. It is based on the fact that, seen age is simply applied via diodes D3 and
Märklin’s light signal Type 74391 (block- from en electronics point of view, the light D4. Change-over switch S1 then deter-
ing signal) for size HO model railway signal consists of two anti-parallel-con- mines which colour will be seen. Surely
sets is fairly new and, at 10 euros nected LEDs with dropping resistors. a very economical solution.
(£7·00), reasonably affordable. There is, If in more complex setups it is required to
however, a little problem in that its oper- The lower section at the right of the dia- have direct control over which colour the
ation requires the use of signal keyboard gram, Da, Db, Ra and Rb represents the light signal on the track is to be, it suffices
Type 72750, which makes the setup not typical inner circuit of such a light signal. to add two further anti-parallel-connected
only more expensive but also inflexible. When the output voltage of the light LEDs, D1 and D2, in the connection
There is, fortunately, another solution, power source is applied to the circuit, between switch S1 and the light signal.
simpler and much more economical, both LEDs light. However, since only a So far, so good. But now for a few spe-
560 Ω
2x 1N4148 D2
3k3
more than 10 mA, whereas low-current
types draw not more than 5 mA. Da Db
R2 R8
C3
10k
100k
S1 1000µ
IC3 25V
5
1
4
R1
R4 16 2
1k
470k 3 3
0
CTRDIV10/ 2 D1 TDA2030
1
DEC D2 "I"
4
IC1 2
7 D3 M1
1 IC2 3 IC5 A2 A1
3 7 10 D4 "Q" 5
4 1
5
6 14 1
LF356 & + 5 4
2 5
M
6 4x 2
4 P1 13 6 1N4148
7
3 B1 B2
9
4017 8
11 TDA2030
R5 9
15 12
330k CT=0 CT≥5 IC4
1M 5
2
8
4
1
3
R3 R6 R7 R9
C1 C2
TDA2030
5k6
5k6
10k
100k
0µ47 2µ2
16V
050246 - 11
K1 6 K2
R1 C9 R16
2 13 7
10k C1 C2 C3 C4 IC1.B 100 Ω
1 14 5
IC1.A IC1.D 2µ2
3 P2 12 R17
47n 47n 47n 68n
100k
TREBLE
R9 R10 R11
100k IC1 = TL074
8k2
8k2
8k2
R4 R5
+15V
1k
10k
+15V
R3 R7 C10
1k
10k
R15
100n
C5 C6 C7 4
1M
P1
10n 10n 10n
IC1
11
BASS C11
10
R12 R13 R14 C8
100k 8 100n
IC1.C 2k2 2k2 2k2
9
100n -15V
R8
6k8 -15V 060015 - 11
higher than that of IC1.C to ensure the mid positions for a straight response. which may be increased (within limits) by
overall response curve remains as flat as To audio fans, the circuit is rewarding to using lower resistor values here. The val-
possible at equal settings of the tone con- experiment with, especially in respect of ues shown ensure a tone control range
trols. Because each network introduces a the crossover point of the two networks. of about 20 dB.
loss of about 1.72 (times), IC1.D and R3 and R4 determine the control range, IC1.B buffers the summed signal across
IC1.C first amplify the signal. The gain is
set at about 8 (times) allowing input sig-
nal levels up to 1 V to pass the circuit at
maximum gain and distortion-free. The
2 +6
+4
gain also compensates the attenuation if
you prefer to keep the tone controls at the +2
+0
d
-3
COMPONENTS LIST B
r -5
Resistors A -7
R1-R4 = 10kΩ -9
R5,R7 = 1kΩ
R6 = 7kΩ15 -11
R8 = 6kΩ80
-13
R9,R10,R11 = 8kΩ2
R12,R13,R14 = 2kΩ2 -15
R15 = 1MΩ 20 50 100 200 500 1k 2k 5k 10 k 20 k
R16 = 100Ω Hz 060015 - 12
R17 = 100kΩ
P1,P2 = 100kΩ preset or chassis-
mount control potentiometer, linear
law
3
Capacitors
1-510060
C1,C2,C3 = 47nF MKT, lead pitch ROTKELE )C(
K2
K1
5mm OUT1
R2
5mm
R17
R16
R15 C11
0
C8
7.5mm
R12
C7
-
R11
R8
R7
R5
R6
C1
Semiconductors
R13
060015-1
IC1 = TL074
C4
R9
C6
C2
P2
R4
060015-1
PCB, ref. 060015-1 from The
PCBShop
10 Ω
1k
10k
basis of events in this environment to
switch, for example, lamps or buzzers.
To help with this, the light barrier 4 8 4 8
described here can be used to guard an R R4 R D1
7 7
entrance. You can use it to signal of R1
DIS 10k DIS
IC1 IC2 LD274 IR
someone is walking through the corridor,
6k8
3 P1 3
OUT OUT
or to check if the car has been parked far 2 TR 555 2 TR 555 R6
10k
enough in the garage to be able to close 6 THR 6 THR
T1
the door. The circuit consists of a trans- CV 10k CV C3
10k
3k3
100k
IC4
ence on the power supply rail. 4
The receiver (Figure 2) is quite a simple R14
light beam
design, because IC3 already does a lot of 100k interrupted
Power MOSFET
013
Wolfgang Schubert
Bridge Rectifier
F1
R5A
The losses in a bridge rectifier can easily 4A T
IRFZ48N
82 Ω
IRF4905
become significant when low voltages
are being rectified. The voltage drop R5 R1
10k
10k
68k
2
1
synchronous rectifier. What that means is R6 R2 3
IC1.A
8k2
8k2
10
age is greater than the rectified output 8
IC1.C
voltage, a MOSFET is switched on to R12 R10
68k
68k
9
IRF4905 IRFZ48N
allow current to flow from the input to the S S
10k
Multimeter
as Lightning Detector
Karel Walraven
014
Most digital multimeters have a sensitiv-
ity of 200 mV and in input impedance of
10 MΩ. With this information you can
calculate that at full scale there will be a
current of 20 nA (nano-ampères). In real-
ity you have a very sensitive ammeter in
your hand.
Now that we know this, it becomes a
mission to do something with that knowl-
edge. In other words, here is a solution
that requires a problem...
K1
R3
C3 C4 C2 C1
33k
14
16 13
RA7/OSC1/CLKIN RB7/T1OSI/PGD
15 12
RA6/OSC2/CLKOUT RB6/T1OSO/T1CLK/PGC
4 11
RA5/MCLR/VPP RB5
3 IC1 10
RA4/TOCLK/CMP2 RB4/PGM
2 9
RA3/AN3/CMP1 RB3/CCP1
1 8
RA2/AN2/VREF RB2/TX/CK
18 7 S5
RA1/AN1 PIC16F628 RB1/RX/DT
17 6
RA0/AN0 RB0/INT
SAVE 1
5
S1 S3 S6
D2 D1
MIN MAX
+ RECALL 1 SAVE 2
S2 S4 S7
R2 R1
1k
1k
060082 - 11
Elmar Jongerius need to be repeated about every 20 ms. A Also make sure that the servo is con-
pulse duration of 1.5 ms corresponds nected correctly. Different manufacturers
This circuit was called into life to operate approximately to the neutral position of the use different colour codes. Fit C3 as
servomotors from the model world. The servo. The limit positions of the servo are at close as possible to the PIC. This is
emphasis here is remembering certain pulse durations of about 0.8 and 2.2 ms because C3 serves to suppress interfer-
preset values. For this, the internal mem- (this depends on the type of servo). ence from the servo.
ory of a PIC16F628A is used. The program running in the microcon- The software for the project has been writ-
The module can be used to automate var- troller consists of a loop, which is ten in PICbasic and includes comments.
ious mechanical functions. In addition to repeated every 20 ms and comprises the
the usual model building applications, following steps:
the circuit can also be used for the oper- No. Name Function
ation of small cranes, mirrors, etc. The • check for pushbutton presses; Move the servo in the
preset-circuit can also be useful when • check for valid values and turn on one S1 Up
positive direction
doing demonstrations. of the LEDs if the limit value has been
The hardware is very simple by design. reached; Move the servo in the
S2 Down
When the circuit is powered up, it auto- • send the pulse; negative direction
matically drives the servo to the initial • wait 20 ms.
position. The circuit is operated using Recall the value
S3 Recall 1
seven pushbuttons. The table details the When checking for pushbutton presses, of Set 1
functions of the pushbuttons. The pull-up the IC will immediately carry out the cor-
Recall the value
resistors for the pushbuttons are already responding action, for example storing a S4 Recall 2
of Set 2
built into the PIC and the de-bouncing is value in EEPROM. Because the buttons
handled by the software. Two LEDs are are checked once every 20 ms, addi- Store the current
S5 Set 1
used to indicate the limit values and the tional de-bouncing is not necessary. position in Set 1
power supply is provided by a standard We have a few things that need to be
circuit around a 7805. Additionally, it is noted regarding the construction of the Store the current
S6 Set 2
position in Set 2
convenient to use a connector so that a circuit. Provide sufficient cooling for IC1,
servomotor can be connected easily. particularly if it is used with a high power Store current position
The operation of the servo is done with servo or if the servo is exerting force con- S7 Set Initial
as initial position
pulses of different lengths. These pulses tinuously, for example against a spring.
Direction Sensitive
Light Barrier 016
1 +5V
10k
10k
100k
100k
IC5 IC6
IC3 4 7
3 D4 RE1
2
1
D2 IC5.A
3 2
1N4148
1
1N4001
T1
TSOP1736 R14
9 13
D 10k
IC6.B
11
C
12 BC517
IC4
5 R S
2
7 10 8
D3 IC5.B
3 6
IC5 = LM393
1N4148
1 IC6 = 4013
R10
C4 C5
TSOP1736
10k
10n 10n
TSOP1736
5 1
D
IC6.A
3 2
C
R S
4 6
060086 - 2 - 11
Heino Peters and off when leaving the room. The cir- sion with one IR transmitter and two
cuit for this has many similarities with the receivers. Both types of installation are
With two light barriers closely positioned modulated light barrier appearing else- shown here, which one is most suitable
one after the other it is possible to estab- where in this Summer Circuits issue. depends on the actual application.
lish in which direction they have been There are two ways to position the light When used in a doorway, one transmitter
crossed. If, for example, you place it at barriers, namely a completely duplicated is sufficient if the receivers are placed
the entrance of the toilet then you can use installation in opposing directions (this to about 5 cm apart. With a wider pas-
it to control the lights: on when entering prevent mutual interference) and a ver- sage, an installation with two separate
2 IC3
TSOP1736
D1
LD274
IC3
TSOP1736
light barrier 1
outward direction
outward direction
inward derection
inward derection
D1
LD274 light barrier 1
D1 IC4 IC4
LD274 TSOP1736 TSOP1736
060086 - 2 - 12
89LPC9xx USB
017 Programming
1 5 +3V3
IC2
LP2985 red
3 4 D3
ON/OFF BYPASS
R4 14
C7 2 C8 C9 T1 JP1
IC2
680 Ω
6402
R3
green yellow C6
4k7
D1 D2
L1 C4 100n
1k5
21
FB 20 4
VDD
VCC VCCIO
23 5 18
CBUS0 TXLED RXD P1.0 TXD
22 1 17 IC3
CBUS1 RXLED TXD P1.1 RXD
13 3 12
C3 CBUS2 IC1 RTS P1.2 SCL
14 2 11
CBUS3 PWREN DTR IC2.C P1.3 SDA INT0
10n 12 6 IC2.A 8 IC2.D 10
CBUS4 SLEEP RI 2 10 11 JP2 P1.4 INT1
9 1 9 ≥1 13 6
DSR 3 ≥1 12 ≥1 P1.5 RST
19 10 5
RESET DCD P1.6
15 FT232R 11 4
USBDP SSOP28 CTS IC2.B P1.7
16 5
K1 3 USBDM 4 89LPC935
27 17 6 ≥1
2 OSCI 3V3OUT
28 26
1 OSCO TEST
064013 - 11
Back in November 2003 you could we propose here a USB version. For this plain language: this method only works
already read about a small development we use a well-known USB/RS232-con- with a well-behaved program. And this
system for the (then) new series of con- verter chip, the FT232R. is obviously not always the case in a
trollers from the 8051-compatible The 89LPC9xx series can be placed in development environment!
89LPC9xx-family. A nice feature of the programming mode in two different When you also look at the schematic from
current 89LPC9xx-series is that these ways: by transmitting a ‘break’ over the 2003, you will see that very little has
chips can remain in the circuit while (re- serial port or by providing three defined changed. Really the only difference is that
)programming. All that’s required for this reset pulses immediately after power-on. the RS232 interface chip has been
programming is an RS232 port. But We use the latter method, because this is replaced with the FT232R. As you will
because many modern computers do not a hardware solution. This is because the know, the USB-interface is terribly slow
have an RS232 connection any more, ‘break’ has to be sensed by software. In when the handshake lines such as DTR
DC-coupled
Audio Amplifier
Peter Bitzer
018
1
Designs for audio amplifiers with DC cou- R1a
C1a
100k
IC1 = MC1458
voltage divider, a voltage follower and
the loudspeaker in the headphones, 3
8
L
whose other side is connected to the junc- L IC1.A
1
R1a 2 R3a
tion of two electrolytic capacitors, provid-
10k
100k
BT1
in the audio signal to be amplified. R2
4k7
Figure 2 shows a practical realisation of u C2
this idea in the form of a stereo head- C2
9V
R4b
phone amplifier. The amplifier itself con-
1k
10µ
sists of IC1 and P1, R3 and R4 (giving a P1b 3V LS b
C1b
gain of 11). This part of the circuit 50k
log
R1b R3b
demands no further explanation, and the 300 Ω
470µ
6V
10k
100k
120 Ω
10µ 10µ
D3 1%
T4
C13 C8 C23 C22
R13
10k
R1 R6 R2 R3
C1 C2 C3
499 Ω
499 Ω
499 Ω
12k
8n2 8n2
1% 8n2 1% 1%
R11 T1 T2 T3
C9
294k
12p
1% BC560 BC560C BC560C
C4
T5 C15 C19
C10 470p 47µ K2 47µ K3
220n
BC550 R14 R15 R16 R17
T6 C5 C14 C18
105 Ω
105 Ω
1k8
1k8
K1
10µ 1n 1n
1% 1%
J310
R5
100 Ω
1%
R9 R4 R7
D1 C7 C6
D4 D5
22k
1M
Marcel van de Gevel gramme, the signals from two record play- not possible either because all the line
ers had to be sent to a large radio mixing inputs of the small club mixing panel were
This circuit is intended to send the signal panel (which is also the entry point for jin- already in use. Switching between them
from a record player with a magnetody- gles and presenter microphones). For a was also not desirable; another switch
namic (MD) element to two different programme with modern dance music the that can be in the wrong position...
RIAA-amplifiers without creating any signals had to be routed to a small club The circuit works as follows. The feed-
problems with ground loops. A kind of mixing panel that was positioned between back ensures that the signal voltage of
distribution amplifier for phono signals, the two record players. the element will be across R5. The signal
in other words. Connecting in parallel was not an option, current that results from this, runs through
The circuit was originally designed by a because it will create a ground loop and T1 and, because the bases are tied
local VHF FM broadcast station called the load for the element will be wrong. together, also through T2 and T3. This
‘Haarlem 105’. For the golden-oldies pro- An RIAA amplifier for each player was causes a signal voltage across R14 and
Transcutaneous Electrical
Nerve Stimulator (TENS)
Klaus Rohwer
020
S1
T1
D1
machine for giving electric shocks. The
author was prescribed such a device on 8 4
R3 1N4004
R2 R
loan by his orthopaedic specialist. The BT1 C1 7
6k8
47 Ω
DIS
unit has a large number of programmes, IC1
100µ 3
of which he used only one. Measuring 9V 16V
P1 2 TR 555
OUT
TR1
the signals at the output of the device in 6 THR
this mode revealed damped oscillations CV
C3
10k
at a frequency of approximately 1 5 4n7
2.5 kHz, with a repetition rate of approx- C1 C2 400V
IC1 = 4013
S1.A R1 R2 S1.B
22k
10k
T1
C3 14 6
IC1 5 S 1
D
4n7 7
IC1.A
2N3906 3 2
C
R
BT1 4
C1 C2
to remote
9V 10 Flash Gun Trigger
100µ 100n R via lead
9 13
25V D
D2 D1
IC1.B
11 12
C
S
2x
1N4148
8
R4 R5 R7
TRI1
1k
1k5
470k D3
R3 R6 R8 TIC206D
D5 D4
C4 1N4148 C5
10k
10k
100k
2µ2 47p
SFH300-2 Tant 16V
READY
060116 - 11
Peter Metcalfe The presented trigger circuit optically fier T1 into the dual flip-flop clock IC1.
receive the camera flashes and either One output of a flip-flop illuminates an
Using any camera in a dull or dark envi- fires at the same time as the first flash or LED as a ‘ready’ signal. A double pole
ronment generally requires the use of sup- has one flash delay before triggering 3-position slide switch, S1, selects none
plementary light. This is a standard tech- the slave flash. Additional counting cir- (e.g. for Kodak camera) or one (e.g. for
nique, and even where adequate natural cuitry is required for more than one Olympus camera) flash delay before
lighting exists, to take conventional film delay (covered by modified circuit not triggering. Both flip-flops are used in the
pictures with enhanced contrast using a presented here). 4013, the clock signal derived from the
‘fill-in’ flash for foreground subjects in flash is used (triggered on the rising
shade. A flash is often built into the cam- Here’s how it works. The response of clock signal) to ‘divide by two’ and trig-
era body, but the internal flash is not usu- phototransistor D5 to the external camera ger the TIC206 triac on the first or sec-
ally powerful enough to illuminate sub- flash is pulsed by a transistorised ampli- ond flash. A simple RC timed reset
jects much more that 3 m or so from the
camera. On SLR cameras a hot-shoe is
provided for triggering an auxiliary, Camera Reset
Ready Clock 1 Clock 2 Reset
more powerful flash, but the small pocket Dependent Delay
10k
10k
MT2
at the gates of the triacs. If the input goes
high, this positive change is passed BC557
Pipe Descaler
Christian Tavernier relatively expensive (especially when we
023
functions at around 10 kHz when the only
discover what they are made of!), we capacitor C6 is operating; in other words,
For many years now, magnetic (or elec- decided to offer this project to our read- when T1 is blocked. The latter is controlled
tromagnetic) water descaler devices have ers. For the price of a few tens of pounds, by another astable oscillator, based on
been showing up on the shelves of Home you will be able to evaluate the state of IC1 this time, but which functions at about
Improvement and other DIY stores all over your own faucets, pots, and other pipes. 1 Hz. When T1 is turned on by IC1,
Europe. Despite the numerous studies The device we’re offering as a project is capacitor C4 is effectively in parallel with
completed on that subject, by manufactur- identical to top-of-the-line items found on C6 which divides the frequency produced
ers as well as by various consumer asso- sale; in other words, it includes the bi-fre- by IC3 by two, i.e. to about 5 kHz.
ciations, none have been able to con- quency option because it seemed that In order to have high amplitude signals,
clude on the efficiency of commercial would be the best way to fight lime scale the power supply operates with a mid-
pipe descalers in a decisive manner. deposits. An initial astable oscillator, point transformer utilized in an unconven-
Since electronic devices of this type are based on a traditional 555, labeled IC3, tional way, with simple half-wave rectifica-
approximately 40 VDC which is used to 1000µ 25V 10µ 25V 1000µ 63V
100mA
supply power to coils L1 and L2, wound
2 x 15V
around the pipe systems on which the 2VA5...3VA
1k
22k
6k8
BF457 or equivalent) which chops this 8 4 8 4
high voltage to 5 or 10 kHz frequency R D3 R
7 7
depending on the state of IC1. R2 DIS R6 DIS
IC1 IC3
6k8
LED D3 lights up to signal that the power
100k
22k
22k
made from insulated flexible wire, with CV 10n CV
1 5 T1 1 5 T2
about ten windings each. They have to C1 C6
6V3 6V3
230V
D1 D2 D3 D4 D5 D6
C2 C4
220µ 220µ
2x 6V3 6V3
1N5401 D3...D6 = BAT85 044029 - 11
Karel Walraven
unfortunately you’d better duck for cover resistor should be adjusted depending on
if you tried… the magnitude of the current.
It is not always immediately obvious The obvious solution would be to place It would be better to insert two anti-par-
whether a power-consuming appliance is a (power-) resistor in series with the load allel diodes in the power lead. Unfortu-
switched on or not. Examples are the and connect an LED with series resistor nately, the voltage drop is too low to
lamp in the attic or the shed, or electric across it. However, this solution has signif- power an LED. It does work with 6
heating in an awkward place. A nice icant disadvantages, for instance, the diodes, for that matter, but the power loss
solution would be to connect an LED power loss is relatively large (easily a is then also 3 times greater.
directly in series with the appliance, few watts). In addition, the value of the We therefore chose a solution with two
H1
current through the LED is automatically K1
limited by the internal impedance of the
D4
D6
D1
D2
D3
D5
1-920440 D7 044029-1
cascade rectifier. The impedance isn’t
that small, despite the large electrolytic
capacitors. Use a low-current LED, other-
H2
C2 C4
wise the LED will probably not be bright
enough. The 1N5404 used here can
handle up to 3 A
(3 A × 230 V = 690 W).
If the power is less than 200 W, you COMPONENTS LIST diode)
D7 = LED, low current
could use two 1N4004s instead.
The voltage across the diodes is a Capacitors:
Miscellaneous:
square wave with an amplitude of about C1-C4 = 220µF 6.3V
K1 = 2-way PCB terminal block, lead
1.3 Vpp. The voltage multipliers are pitch 5mm
Semiconductors:
used to turn this into the LED voltage. D1,D2 = 1N5401 PCB, order code 044029 from The
This will only work if the voltage drop D3-D6 = BAT85 (or any other Schottky PCBShop
across the diodes in the multipliers isn’t
too large. That is why these diodes are
Schottky diodes. These only have about their value, the greater is the amount of tion distances of 6 mm (also in air). For
a 0.35 V voltage drop. Exactly which current that can be delivered. the same reason, use a 5 mm LED (not a
type of Schottky diode that you use is Keep in mind that working with mains 3 mm one!) and fit it as far into the
not too important. voltage can be fatal. Build the circuit in enclosure as possible. Mount the PCB in
You are free to experiment with the value such away that there is no risk that live the enclosure with nylon bolts.
of the electrolytic capacitors. The larger parts can be touched and maintain isola- (044029-1)
11
9
74HC4017 12
erties, the design is simplicity itself. It is T2 CT≥5
R4
controlled by a low-current CMOS dec-
10M
8
imal counter IC1, a Type 74HC4017, T3
BC
which enables the entire circuit to be 548
powered directly via the sync contacts of C2 C3
the main flash unit via resistor R1 and BSS89
4n7 47n
voltage limiter D1.
The control circuit based on transistor T1 050047 - 11
026
Jeff Macaulay
Hybrid Headphone Amp
ECC 82
Potentially, headphone listening can be f
f 5 1a D2 +12V
technically superior since room reflections 4 6
R7
are eliminated and the intimate contact 1N4001
2k 1g
39k
3 7
between transducer and ear mean that T5
1k
91k
BC550
of 32 Ω per channel. The usual standard T1
15k
power of 100µ
25V
U2 / R = 0.7752 / 32 = 18 mW 050347 - 11
Antenna
Height and Range
Gert Baars
027
In practice these distances turn out to be
larger than those computed using the for-
At frequencies below 30 MHz or so, radio H
mula. This has to do with the propagation
transmitters can normally be received over D
s
of electromagnetic fields. It appears that
great distances because ceratin layers of the wave is subject to reflection and does
the ionosphere reflect radio signals with a curve a little with the surface of the Earth.
certain frequency. These reflections nor- This is readily observed with so-called
r
mally do not take place at higher frequen- temperature inversion layers. The weather
cies, so the maximum distance that can be r circumstances are such that hundreds of
covered is, in principle, limited to the visi- kilometres can be covered without prob-
ble horizon. How this theoretical distance M lems using signal frequencies in the VHF
can be calculated is explained here. range. But even without these special
The accompanying figure indicates the weather conditions the distances that can
various distances required. M is the cen- be covered appear to be larger than pre-
tre point of the Earth, r is the radius, H is dicted by theory, as already mentioned.
the height at which the antenna is 060083- 11
With the antenna height of 15 m
placed, s is the length of the signal path assumed earlier, the distance that can be
between antenna and horizon and D is covered appears to be of the order of
the distance across the Earth’s curved sur- 40 km, instead of the calculated 13.8 km.
face. Because in practice H will be much s2 = 2rH How the propagation of electromagnetic
smaller than r, s will be approximately waves actually works is a complicated
equal to D. The signal path s between or: matter covered in many excellent books
antenna and horizon is perpendicular to and publications. However, it is known
the radius of the Earth. This means that s = √(2rH) that at frequencies in the GHz range the
we can apply Pythagoras’ Theorem to distance that can be covered becomes
find the relationship between antenna The average radius of the Earth is progressively smaller as the frequency
height and distance to the horizon. 6,371 km. √(2r) is therefore about 113. increases. This is also the reason why
According to the Theorem: The formula can now be simplified to: parabolic antennas for SHF frequencies
are positioned as high as is practicable.
r2 + s2 = (r + H)2 s = 113 √(H) The amount of transmitter power plays a
= r2 + H2 + 2rH secondary role in all this.
where s and H have to be expressed in What does matter however, is the height
Collecting terms results in: kilometres. of the receiving antenna. The same for-
An example: a VHF FM antenna is posi- mula can be used for this antenna (that
s2 = H2 + 2rH tioned at a height of 15 m. the maximum is s = 113 √(H)). The theoretical total dis-
distance at which a line-of-sight connec- tance that can be covered is then the sum
Because H2 is much smaller than 2rH it tion is possible amounts to: of both distances to the horizon.
can be left out. So it follows that: 113 √(0.015) = 13.8 km. (060083-1)
1N4001 C9
L1
G S
R6 R9
C3 C5 D1 4700µ 25V
D 50mH
4k7
100k
2A
10µ 400V 100n
C8
T1
V1 4 700µ
1,3A
1 6 R4 25V
T2
180 Ω
C1 BC337 R13
2 7
1Ω5
C7
100n C4
3 8 R10
2µ2 LS1
4 9 5
47k
ECC88 2µ2 BUZ11
250V
f2 f1 P2
R1 R2 R5 R7 R8 R11 R12
D2 C6 C10
8Ω
180 Ω
1Ω5
1Ω5
1k
4k7
1M
100k
100µ 100n
25V 4k7
1N4001 050153 - 11
amplifier (Quad power supply for hybrid found that the ripple on this supply was If you use a separate transformer for the
amp). This can of course just as easily be responsible for a severe hum at the out- filament supply you can try and see if the
used with other amplifiers. put of the amplifier. To get round this circuit works without R5. During the test-
The supply uses a cascade stage to out- problem we designed a separate voltage ing we used a DC voltage for the fila-
put an unstabilised voltage of 170 V for regulator (High-voltage regulator with ment supply.
the SRPP (single rail push pull) stage short circuit protection), which can cope Although you may not suspect it from the
(V1). During initial measurements we with these high voltages. test measurements (see table), this ampli-
T1
R4
C9
R12
C6
R7
R8
R9
R10
R11
D2
V1
R1
R2
C8
R3
R13
C4
C3 +180V
P1 P2
C2 050153-1 + LS1 - C10
Programming
029
Parallax, well known for its successful
the Propeller IC
Basic Stamp IC, has recently introduced +3V3 DIL
the Propeller: a new microcontroller with 11 (7)
RES
a certain difference. It packs no less than C1 R5
T3
10k
R1 R4
Parallax Propeller
makes genuine simultaneous multipro-
10k
4k7
1
030
Jörg Trautmann
LED Phototherapy Unit
look at these devices in more detail, we gic reactions in the body, since it acts
find that their operation is relatively sim- against free oxygen radicals and
It is widely thought that light can be ther- ple to explain. strengthens the immune system, reducing
apeutic for the human skin and soul. Light Common to all the devices is that they inflammation of the mucous membrane.
at the correct wavelength may also be emit intense red light with a wavelength of Since this treatment does not take the
effective against depression and allergies. 660 nm. Some biophysicists claim that form of a medicine, but rather the form
There is a wide range of products on the light of this wavelength can have a posi- of visible light, there is no risk of side-
market, at prices from a few tens of tive effect on the human body and can effects. There has been scientific research
pounds to a hundred pounds or so, initiate healing processes. This so-called showing that this therapy does not work
which are presented as universal reme- ‘phototherapy’ is a treatment which is in every case, but success rates as high
dies for dust allergies or hay fever. If we claimed to have an effect against aller- as 72 % have been reported. Since it
1k
old nasal hair trimmer. These can be
470µH
obtained new for a few pounds, or you C1
may have an old one that can be recy- BT1
2k2
the choice of battery: the unit contains a 100µ
3V
holder for an AA-size cell. The circuit must T1
R1
T2 D1 1V5
therefore not only be very compact (there 1k
E-blocks =
cheaper PLC design 031
John Dobson be frustrated with the fact that you are puts which would cost you just over £
paying in excess of £ 100 for a simple 10 if you put it together yourself. Well
If you are a habitual user of PLCs (pro- system that (hardware-wise) contains only here is a suggestion that could help you
grammable logic systems) then you may a couple of inputs and a couple of out- develop your own PLC for a lot less.
RE1
5A
85
30
LA1 86
D1 S1
87
15 85
D2
T3 1N4008 T4
R8
10k
BC517 BC337
R7
C3 16 C4
10k
IC1
8 47µ 7 9
LA2 100n 16V R6
1 S 6 10 S 15 L
J J 3k3
IC1.A 5 11 IC1.B
K K
58K 2 3 13 14
C C
R10 R9 R1 R2 R R R5 R4
820 Ω
4 12
10k
10k
47k
100k
470k
0W5
T1 T2
R3
S
D3 1k IC1 = 4027
C1 C2
BC547B BC547B
15V 1µ 1µ
500mW 16V 16V
050378 - 11
fuse bay
Eric Vanderseypen
prevent the fog lamp from going on T3 acts as an emitter follower, and it only
when the lights are switched on if the supplies power to the circuit when the
According to current legislation in many driver forgot to switch it off after the last lights are switched on. For safety rea-
countries, vintage cars must also be fitted patch of fog cleared up. sons, the supply voltage is tapped off
with a fog lamp at the rear. The circuit described here extends that from the number plate lamp (L2),
In modern cars, there is a bit of circuitry technology back in time. The circuit is built because it is on even if you accidentally
associated with the fog lamp switch to around a dual JK flip-flop (type 4027). drive with only the parking lights on. The
R1 C1
10k
8
100n
1 5
PB5 PB0
IC1
6 3
PB1 PB3
ATtiny15LP
7 2
PB2 PB4
R2 R3 R4
180 Ω
180 Ω
27 Ω
Kingbright 1 2 3 4
R B G B
D1
1 ANODE RED
2 ANODE BLUE
2 5 1 5 COMMON CATHODE LF59EMBGMBW 5 6
3 6 4 3 ANODE GREEN
4 ANODE BLUE
6 COMMON CATHODE
050027 - 11
Tobias Flöry LEDs with a controller already built-in on from www.elektor-electronics.co.uk free
the market but where would be the fun in of charge as file no. 050027-11.zip.
This circuit is a good example of a micro- the ready-built version? You will certainly A pre-programmed controller (part no.
controller design using the absolute min- learn much more by building and pro- 050027-41) can also be ordered from
imum of external components. The gramming the design yourself. the online shop at the same address.
ATTiny15L microcontroller from Atmel has
three of its outputs connected to an RGB The brightness of each LED is controlled The Kingbright RGB LED used in this circuit
LED (or three individual red green and using Pulse Width Modulation (PWM). actually contains one red, one green and
blue LEDs) and produces changing colour This is accomplished in software and the two blue LEDs. This helps compensate for
patterns. There are of course multicolour source code is available to download the poorer output from the blue LEDs and
Gentle Breeze
Rainer Reusch
035
4,00V @ 30°C (1,040k)
4,11V @ 35°C (1,080k)
Where there is heat, let us bring cooling: 4,23V @ 40°C (1,122k)
4,47V @ 50°C (1,209k)
a fan will do the job, but unfortunately 4,72V @ 60°C (1,299k)
+12V
fans are usually noisy. In many cases there
is no need for the fan to run continuously at R1 R3 R5 R9
82k
1k2
trol the fan speed in response to the tem-
T1
perature of the heatsink or device being C2
R6
4k7
cooled, switching the fan off entirely if it
should fall to room temperature. 100n R10 BC161/10
1,09V 2 2N2907A
4k7
The circuit shown here does this and 1 13
IC1.A
even offers a little more. The low-cost 3 14
IC1.D
KTY81-110 is used as the temperature 12
8V @ 30°C
sensor, in a negative-feedback arrange- 12V @ 50°C
M1
R8
ment with an operational amplifier. The 270k M
R2 R4 R7
temperature-dependent voltage at the C4
390 Ω
1k
39k
20k
C1
IC1
to 12 V suitable for the fan. The third 11 100n
operational amplifier works as a com-
11,8V @ ‹30°C 11,8V @ ›60°C
parator. At room temperature its output 6
0V @ ›35°C
R16
4,53V 0V @ ‹40°C
9 OVERTEMP
IC1.B
of the second stage with it, switching 5
1N4148 IC1.C
8
12k
COMPONENTS LIST
Resistors
R1 = 9-way 1kΩ SIL array
Capacitors
C1,C2 = 22pF
C3 = 100nF
C4,C5 = 10µF, 63V, radial
Semiconductors
D1 = LED, green, low current, 5mm 1 +5V
1 R1 9x 1k
IC2 = 7805
Miscellaneous
X1 = 4MHz quartz crystal
Case: e.g. Bopla type BOS 503
1 wire link +5V
PCB, order code 050146-1
C3
100n
20
1
The circuit of the toothbrush timer (Fig- 19
PB7
RST
2
C3
IC1
D1 X1
C1 C2
D2 D3 D4 D5 D6 C4
R1
IC2
D7 D8 D9
0 + 050146-1 C5
1-641050 050146-1
D10 ROTKELE )C( (C) ELEKTOR
Opamp
VHF FM Transmitter
Gert Baars
037for this. The output voltage is
+9V about 6 Vpp at a power supply
ICs that in the past were far too voltage of 9 V. The transmitter
C4
expensive for the hobbyist tend power amounts to about 50 mW
to be more favourably priced 100n at a load of 50 Ω. This is about
these days. An example of this R1
R4
20 times as much as the average
33k
ANT1
is the AD8099 from Analog 5k6 ca. 10cm oscillator with a transistor.
Devices. This opamp is avail- With a short antenna of about
able for only a few pounds. The AUDIO C1 R3 7
10 cm, the range is more than
8
AD8099 is a very fast opamp 150 Ω
3
1 sufficient to use the circuit in the
(1600 V/ms) and has high- 100n
2
IC1 6 home as a test transmitter.
impedance inputs with low input 4 Because the output signal is not
capacitance. AD8099
RD8
free from harmonics the use of
The bandwidth of the opamp is R5 an outdoor antenna is not recom-
so large that at 100 MHz it still R2 C3
1k mended. This requires an addi-
has a gain of nearly 40. This C2
tional filter/adapter at the output
33k
means that this opamp can be 10p (you could use a pi-filter for this).
330p
used to create an RC oscillator. The FM modulation is achieved
The circuit presented here 060095 - 11
by modulating the hysteresis,
realises that. which influences the oscillator
The circuit has a few striking frequency. An audio signal of
characteristics. Firstly, unlike normal oscil- is continually being charged and dis- about 20 mVpp is sufficient for a reason-
lators that contain transistors this one charged when the voltage reaches the able output amplitude.
does not have any inductors. Secondly, hysteresis threshold. The output continu- The package for the opamp is an 8-pin
there is no need for a varicap diode to ally toggles as a consequence. This SOIC (provided you use the version with
do the FM modulation. results in a square wave output voltage. the RD8 suffix). The distance between the
The opamp is configured as a Schmitt With a 10-pF trimmer capacitor the fre- pins on this package is 1/20 inch
trigger with only a small amount of hys- quency can be adjusted into the VHF FM (1.27 mm). This is still quite easy to sol-
teresis. The output is fed back via an RC broadcast band 88-108 MHz). The fre- der with descent tools. If SMD parts are
circuit. In this way, the trimmer capacitor quency of the oscillator is stable enough used for the other components as well
IC1.B D4 230V
5
4
P1 6 & 14
1N4148
IC1
470k 10V
16 7 0W4 T1
D1
R5
2M2 CTR14 7
3
IC2 4
5 BC547 TRI1
4
C2 11 !G 5 IC1.D C3
1µ RCX 6 12 D2 4µ7 R7
9 6 11
CX + 14 13 & 100 Ω TIC206D
R1 P2 10 7
63V RX CT 13 1N4148 63V
8
22k
47k 12 2
CT=0 12
3 load
IC1.A 13
R2 1 S2 0W5 BC557
3
1M 2 & R6
8
* C4
390k
R3 IC1.C
C1 8 D3
10 220n F1 N
9 &
LDR 22µ
25V
1N4148 100mA
060106 - 11
* see text
Christian Tavernier ing an observer with bad intentions to level. This has the effect of triggering triac
believe that the premises are occupied. T3 through gates IC1.C, IC1.D and tran-
Among the many anti-theft devices that Creating such a function with a microcon- sistors T1 and T2. At the same time, this
are available, presence simulators have troller is certainly very easy and has clears the reset input from IC2 which is
a special role to play. In fact, while an already been done many times in the none other than the classic 4060 in
alarm system generally reacts the instant past, but the project we are proposing CMOS technology.
the intrusion is detected, or sometimes a now is intended for those among you Considering the values of C2, R4 and
little afterwards, in all cases the damage who do not want to, or who cannot pro- P2, the internal continuous oscillator in
has already occurred. The purpose of the gram this type of circuit. As a result, our IC2 functions at a frequency on the order
presence simulator is to stop intrusions diagram only includes very common of 5 Hz. Consequently, its output Q12
beforehand by making crooks think that logic circuits from the CMOS 4000 fam- (pin 2) changes state at the end of
someone is at home. Working from the ily, with quite respectable results. approximately one to two hours (depend-
principle that the majority of home burgla- Ambient light is measured using the LDR ing on the P2 setting) while Q13 (pin 3)
ries, with break-in, happen particularly at R3 and, when it goes below a threshold does the same, but in two to four hours.
night, a properly designed presence sim- determined by the adjustable potentiome- Depending on whether a link has been
ulator turns on the lights as evening falls, ter (P1) setting, like when night falls, it installed on S1 or on S2, gate IC1.B out-
then turns them off a few hours later, caus- drives the IC1.A gate output to a low put thus changes state after one to four
15k
require a few more parts however. T3 quency of about 50 kHz does not
become unnecessarily high (which
The circuit shown in the figure has R2
BC557 would increase the loss).
deliberately been designed with The circuit works from about five
15k
2N3906
* see text
parts that everyone will have volts, depending on the forward
lying around, except perhaps the R6
voltage of the LED. From about
L1
small coil. T1
*
D1 C1 9 V you will clearly notice the
100k
2N3904
ally the case that components will is generated by the coil will auto-
fail if the current or power is too matically adapt. The maximum
high and this is very effectively BC547B 2N3904 060128 - 11 power supply voltage is 24 V.
BC557B 2N3906
avoided with this technique. It A little clarification regarding the
works like this. Resistor R5 meas- choice of coil: the value is not
ures the current through the coil critical, it could just as easily be
and T2 ‘watches’ to make sure it 3.9 mH or 6.8 mH. Even 10 mH
doesn’t become too large. L1 will C E E C can be used, especially if the
B B
never go into saturation, which power supply voltage is greater
could cause T3 to give up the than 9 V. The coil does need to
+5V
7V...12V B1
R11
390Ω
I = 100mA max.
C3 C1 C2 C4
B80C1500 D21
470µ 100n 100n 47µ
25V 16V
D22
220Ω
+5V
"1"
R2 D1 D2 D3 D4 D5 D6
220Ω
R13 R14 R16 C5
D23
"2"
4k7
4k7
10k
S1 S2 R15 D24 1k
C6 C7 4MHz C8 T6
4k7
R10
1k
10µ 15p 15p
4V7 16V
6x BC550C 020390 - 11
Marco Freitag seconds, and units of seconds. The val- ally drive all of the LEDs, and doing so
ues are read row by row from top to bot- would also require several additional
Unusual clocks are not uncommon in tom: one, two, four, and eight — in other components, the display is multiplexed.
Elektor Electronics. The version presented words, binary. With a bit of practice, it’s In order to nevertheless make the low-cur-
here is based on the binary clock (not yet even possible to quickly and easily read rent LEDs nice and bright, the magnitude
on display) in the new Museum of Math- the time in a single glance. of the current pulses is made significantly
ematics in Gießen, Germany (www.mm- The supply voltage for the circuit comes higher than the rated current.
gi.de/htdocs/mathematikum/index.php?5 from a simple mains adapter with an ac Buttons S1 and S2 can be used to set the
13), but it is entirely compatible with an output voltage of 8–15 V at a maximum time. If you press S2, you will arrive at the
ordinary living room. However, the output current of 300 mA. The voltage setting menu after a brief LED test (all LEDs
hours, minutes and seconds have been must not be rectified, since the micro- on). The value of the first column can now
further divided into units and tens to controller uses the frequency of the ac be set to any desired value using S2.
make them easier to read, which yields voltage (50 Hz) as a clock signal with Pressing S1 takes you to the next column.
six columns: tens of hours, units of hours, long-term stability. As PIC16C54 does This continues in the same manner until
tens of minutes, units of minutes, tens of not have enough output ports to individu- the configuration mode is exited after the
H1
H2
D1 D2 D3 D4 D5 D6
D17
1-093020
020390-1
D13 D14 D15 D16
D18 D19
D20
T2 T3 T5
T4 T6
T1
D23
R10
R16
R5
R6
R7
R8
R9
D24
R4
R3
R2
R1
IC1
IC2
C6
R11
C5
C2
X1
R12
R15
R14
R13
C3
C1
C8
C7
C4
D21
D22
B1
H3
H4
K1 ~ ~ S2 S1
final column. The clock will continue to lead soldered in place, after which they
COMPONENTS LIST run, starting with the newly set value. must be aligned. The remaining leads
We have designed a printed circuit should only be soldered after the LEDs
board layout for the binary clock. Fitting are all nicely lined up.
Resistors:
R1-R4,R12 = 220Ω the components to the board couldn’t be The board can be displayed ‘bare’ or fit-
R5-R10 = 1kΩ easier, although you mustn’t overlook the ted into a small plastic enclosure. A
R11 = 390Ω set of nine wire bridges. As one of them transparent enclosure is quite practical,
R13,R14,R15 = 4kΩ7 is underneath the microcontroller, the lat- since it eliminates the need to drill holes
R16 = 10kΩ ter must be fitted with a socket. The LEDs for the LEDs.
should initially be fitted with only one (020390-1)
Capacitors:
C1,C2,C5 = 100nF
C3 = 470µF 25V radial
C4 = 47µF 16V radial
C6 = 10µF 16V radial
C7,C8 = 15pF
Semiconductors:
B1 = B80C1500 (80V piv, 1.5A)
D1-D20 = LED, low current, colour to
personal taste
D21 = LED
D22,D23 = 1N4148
D24 = zener diode 4.7V, 0.5W
IC1 = LM7805
IC2 = PIC16C54-04/P (programmed,
order code 020390-41)
T1-T6 = BC550C
Miscellaneous:
K1 = 2-way PCB terminal block, lead
pitch 5mm
S1,S2 = pushbutton, 1 make contact
X1 = 4MHz quartz crystal
Project software on disk: order code
020390-11 or Free Download
PCB, order code 020390-1 from The
PCBShop
1 +5V
LCD1
DS1820
16 C4
IC2 LC DISPLAY 2 x 16
8 100n
VDD
VSS
R/W
VO
RS
D0
D1
D2
D3
D4
D5
D6
D7
A
K
E
+5V
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
DQ
+5V
R1 R6 R7
C3
10k
3k3
P1 R8
IC3
K2 100n 10k
10 Ω
3
2
1
14
BC547 T1
IC2
DS1820 R3
4 1
1k MCLR C2
15
EN3
6
K1 RB0/INT SRG8
7 IC1 17 3
RB1 RA0 C1/
1 8 1 R9
RB2 RA2
6 9 PIC16F84 18 2 4
10k
RB3 RA1 1D 2D 3
2 10 2 5
R4 RB4 RA3 LCD_1
7 11 3 6
10k RB5 RA4/T0CKI LCD_2
3 12 7
RB6
8 13 14
RB7
4 13
R5 OSC2 OSC1
9 12
1k 15 16 5
5 X1 11
R2
9
10k
SUB-D9 C1 C2 10
060090 - 11
R4
Oscillator XT (01)
C2
A IC1
R3
WDTE off (0) T1
R5
C C1
R9
C3
PWRTE on (0)
CP off (1) (all bits) 0 X1
P1
+5V IC2
C4
1 15
1-090060
16 LCD1
PIC processor, IC1, runs at a frequency
of 4 MHz and that each instruction in
the program lasts exactly 1 µs. This is
useful for the timing in the program, 060090-1
which, by the way, is available as a
free download on the Elektor Electron-
ics website (file no. 060090–11.zip).
Resistors R3, R4 and R5 enable IC1 to
be programmed directly by a PC via
connector K1. Resistor R1, which may
any type of LDR, and R2 form a poten-
tial divider that, depending on the ambi-
ent light, sets a ‘0’ or a ‘1’ on input RB4
of IC1. The data line of temperature sen-
sor IC3 is connected to terminal RA4 of
IC1. This terminal is the only open-col-
lector one of IC1 and is exactly what is
needed for the 1-wire data line. Resis- the Elektor website (the .ASM file). After
tor R7 ‘pulls up’ the data line in quies-
cent operation.
you have added your own adaptations,
make a .HEX image by clicking on the
COMPONENTS
The right-hand section of the diagram
BUILD icon. Then, use the free program
NTPICPROG.EXE from Andres Hansson
LIST
enables the display of the temperature. (http://www.geocities.com/CapeCanav
To limit the number of connections to the eral/7706/ntpicprog.zip) to program Resistors
R1 = LDR (small model)
processor, the LCD is controlled via the the .HEX file in the PIC via the COM R2,R4,R6,R9= 10kΩ
series/parallel converter in IC2. The LCD gate of the PC. The 5-V supply rail must R3,R5 = 1kΩ
proper is driven in the 4-bit mode remain connected during programming. R7 = 3kΩ3
(DB4–DB7). Also, the Register Select, RS, Do not program the PIC with a note- R8 = 10Ω
P1 = 10kΩ preset, horizontal
and the backlight must be provided with book, but use a desktop PC, since the
the appropriate signals. IC2 converts the voltage levels at the COM gate of a Capacitors
8 bits provided serially by IC1 into 8 notebook often are only 3–5 V, C1,C2 = 33pF
parallel bits. The rising edge of the strobe whereas a minimum of 10 V is C3,C4 = 100nF
signal from RA2 instructs IC2 to set the needed. Also, do not use a
Semiconductors
previously received eight bits at the out- USB/RS232 converter, because that
T1 = BC547
puts. The falling edge clocks them to the usually confuses the timing. IC1 = PIC16F84A-04CP
screen via enable input E of the LCD. (programmed, order code
Since only six of the eight bits are Once you have this setup working, the 060090-41)
needed, individual extensions may be step to other applications is easy. IC2 = 4094
IC3 = DS1820, DS18S20
accommodated at outputs LCD1 and The circuit is readily constructed on the
LCD = alphanumerical LCD, 2x16
LCD2: for instance, a buzzer or an LED. printed-circuit boards shown. Start with characters, 44780-compatible
The combination of R9, T1 and R8 pro- the wire links, so that they are not over-
vides a current of 100–200 mA from looked at a later stage. If you do not Miscellaneous
output Q3 (pin 7) of IC2 to the backlight want to program the PIC yourself, a pro- K1 = 9-way sub-D socket (female),
angled, PCB mount
of the LCD. The contrast of the display grammed one may be ordered from Elek-
K2 = 3-way SIL pinheader
may be adjusted with P1. tor (order code 060090–41). A power X1 = 4MHz quartz crystal, parr. cap.
source of 5 V capable of providing a 32pF, HC49 case
The associated program is written in current of up to 100 mA is required. 5 wire links
assembly code; it may be adapted as PCB, ref. 060090-1 from The
PCBShop
needed by downloading development Note that the circuit does not provide
Source and hex code files, ref.
area MPLAB from www.microchip.com protection against polarity reversal or too 060090-11, free download from
Design a project in MPLAB and within high a supply voltage. www.elektor-electronics.co.uk
this, load the source code available at (060090-1)
OSC2 OSC1
a few mA for microcontroller, IR sensor
15 16 5 1N4148 T3
and LED. X1 R5
1k
The circuit is designed to respond to R1 1 5x10k
infrared commands coded to the Philips R2 BC547A
C1 4MHz C2
K4
1k
D5
R2 RE4
IC2
R6
K3
T3
D4
IC1
RE3
C3 R5
X1 T2 D3
S1 RE2
R4
K2
T1
C1
C2
D2
RE1
R1
R3
K1
- +
is a transition from Vcc to 0 V, where the the relays is saved in the microcontroller The Easy Home Remote Control is config-
period of one bit is 1.7778 ms. Many EEPROM and retrieved every time the ured as follows.
articles on RC5 have appeared in this PIC re-initialises. 1. Switch the circuit on with all DIP
magazine. The actuation of electric curtains differs switches set to OFF.
from lamps as it’s necessary to send a 2. Flip ON switch #5 (switch connected
The software developed for the project is short pulse to the relays. to RA4/TOCK1) to enable programming
stored in the PIC microcontroller. It allows To make the home control more versatile it is mode. Using Table 1, set the other
four different RC5 codes to be saved and possible to control all relays (configurable switches as required to save desired IR
used to control the four outputs. For by the DIP switches) in one of two modes: codes in EEPROM.
example, your TV remote may be able to 3. Flip OFF switch #5 to select working
control five systems: TV (default), VCR, • toggle between ON and OFF positions mode. Using Table 2, configure the
DVD, AMP, SAT. If, for example, you do with memory for lamps; other switches to select the desired relay
not have VCR then the relevant IR codes • output pulse for other devices like elec- mode.
are available for Easy Home Control. If tric windows-curtains.
your remote control is not compatible In working mode a fast-blinking LED (D1)
with RC5 codes, you can buy a cheap If you’re a keen energy saver, it is also means reception of IR codes with no
universal remote control to do the job. possible to program an IR code to turn associated function; 1-second blink
To avoid the relays changing state owing off all the relays (and save 5 V·140 mA means programmed IR code was
to a power cut in your home, the state of = 0.7 watts per relay). received and corresponding action was
043
Gérard Guilhem
Recycling Flasher Lights
1 TR1
or animals. TR2
BT1
C2
and so it routes to the protective earth (PE) earth, does not take special precautions
connections. In this setup, mains voltage, earth 0W5
and risks his/her life.
R1
however small, will cause the differential E 150k
However, all that’s needed is an
circuit breaker to trip. The circuit breaker extremely simple system to automatically
LA1
is part of any modern electrical installation. C1 detect any break in the earth connection;
This type of security device may however so simple that we ask ourselves why it is
220n
become defective due to common corro- neutral neon 160V not already included as part of all fac-
sion as we have seen many times on var- N tory production for appliances that carry
ious older household devices, as well as 060108 - 11 any such risk, as we have discussed
on construction sites. Actually, since these above. We propose it as a project for
On/off
045 Infrared Remote Control
D1 R8 C5 F1 L
2k2
1N4007 0W5 470n 100mA
R9 250V
X or X2
2k2
R2 R5 0W5
C1 14
load
390 Ω
47k
IC2
470µ 7 R6 R7
25V
390 Ω 470 Ω
1
IC3 6
IC2 = 74HC74
TRI1 230V
2 4
4 10
C2 MOC3041
3 S 5 11 S 9
C C TIC206D
10n
IC1 IR receiver 2 IC2.A 6 12 IC2.B 8
D D
R R
T1 R3 1 13
R1 C3 R4
1M
D2
100k 1M5 C4
1µ
BC547
15V 47n
0W4 250V N
X or X2
060107 - 11
Christian Tavernier remote control. Therefore, the first one Q of IC.2A makes IC.2B change state,
you find allows you to turn off the light which has the effect of turning on or turn-
Most homes today have at least a few and enjoy your movie in the best possi- ing off the LED contained in IC3. This circuit
infrared remote controls, whether they be ble conditions. is an opto triac with zero-crossing detec-
for the television, the video recorder, the The infrared receiver part of our project is tion which allows our setup to accomplish
stereo, etc. Despite that fact, who among entrusted to an integrated receiver (Sony switching without noise. It actually triggers
us has not cursed the light that remained SBX 1620-52) which has the advantage the triac T2 in the anode where the load
lit after we just sat down in a comfortable of costing less than the components to be controlled is found. The selected
chair to watch a good film? This project required to make the same function. After model allows us to switch up to 3 amperes
proposes to solve that problem thanks to being inverted by T1, the pulses delivered but nothing should stop you from using a
its original approach. In fact, it is for a by this receiver trigger IC2a, which is more powerful triac if this model turns out
common on/off switch for infrared nothing other than a D flip-flop configured to be insufficient for your use.
remote controls, but what differentiates it in monostable mode by feeding back its In order to reduce its size and total cost,
from the commercial products is the fact output Q on its reset input via R4 and C3. the circuit is powered directly from the
that it is capable of working with any The pulse that is produced on the output mains using capacitor C5 which must be
Charlieplexing
Do you think it is possible to drive an 8-
046
digit, 7-segment display with only nine 1
(9) connections? Yes certainly, and here
we show you how it’s done.
Normally speaking, a 7-segment display
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
CC
CC
CC
CC
CC
CC
CC
CC
has eight LEDs (including the decimal Seg a
Cathode 8
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
Seg dp
common output of each display is also
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg b
Seg d
Seg g
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg a
Seg c
Seg e
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
Seg f
CC
CC
CC
CC
CC
CC
CC
CC
connected to a segment (but each to a dif- Drive Pin 8
+ + + + + + + + + + + + + + + + + +
3 4
Seg dp
Seg dp
Seg dp
Seg dp
Seg g
Seg d
Seg b
Seg g
Seg d
Seg b
Seg e
Seg c
Seg a
Seg e
Seg c
Seg a
Seg f
Seg f
CC0 CC1 CC2 CC3 CC4 CC5 CC6 CC7 CC0 CC1 CC2 CC3 CC4 CC5 CC6 CC7
DISPLAY 0 DISPLAY 0
CC0 CC0
DISPLAY 1 DISPLAY 1
CC1 CC1
060124- 13 060124- 14
1 MODE
switch, a button and a few passive and 558C
6 GND
active (two transistors) components 2 RXD +5V
should not be too difficult. 7 T1 RESET
R3
Begin by soldering the gold-plated single- 3 TXD
27k
RXD1
8
row 6-contact connector. Solder it with its 4 BC
plastic base in order to retain the proper 9 R4 548C
spacing, then forcefully slide out the plas- S1 S2
10k
2 31
AN6
5 carries ground. 3
RESET AN5
30
4 29
AN4
5 28
Implementation of the R8CKey VSS MODE
6 27
Warning: Make sure the R8Ckey is 7
AN3
26
VCC AN2
properly oriented in socket K3. It must be 8
P17 AN1
25
3k3
3k3
3k3
3k3
IC1 cooker
switch on and off automatically. After all, 4 RE1
hood
100n
a simple temperature sensor under the 1N4001
hood can detect whether a burner is on. R9
100k
The circuit described here goes a step fur- 3
R6
ther and compares the temperature under IC3.A
1
3k3
5 T1
R1 2 7
the hood with the temperature just outside IC3.B
3k3
6
the hood. At a certain (adjustable) tem- IC1 IC2 LM335 BC517
BC517
3k3
adj C E
again by themselves. The advantage of B
Eight-channel Scope
049
H. Steffes
Input
+12V
2 1
on in more than two IC1.E 4
R4 8
places simultane- 11
1
10 1% R11
10k LT1227
470 Ω
10k
for professional
10k
25V
IC1.A CTR4
users only. The cir- 1 2 1 0
3
1%
1 + IC2.A 4
cuit described here CT
C1 5 –5V
shows that with a lit- 2
CT=0 6
3 11
tle ingenuity it is per- 470p
10
0
0
MUX
G
fectly possible to 9 7
2
expand the numbers Ch 1
4
0
of input channels to Ch 2
3
1
5
2 IC3 +5V
eight. The circuit has Ch 3 2
1 3 74HC151
Ch 4
been designed with Ch 5
15
4
6
16 C8
simplicity in mind Ch 6
14
5 IC3
13
and can only be Ch 7 6 8 100n
12
used for viewing dig- Ch 8
7
7
EN
ital waveforms. 0
There are two basic 060013 - 11
84x48-pixel
Graphics LCD 050
1 2
for just a few pounds! 96x64 pixels). You can find numerous (in the telephone) to establish contact.
sites on the web which sell this product Two DIY solutions are possible:
Marcel Cremmel (new or used) as a one-off or in bulk. 1. we solder an 8-wire ribbon cable to
After such praise, what is there to criti- the pads (Figure 1). Don’t forget, the
Alphanumeric displays (having ? lines of cise? Any difficulty in implementation is pitch is 1.14 mm !
n characters) are very popular. Reason- due to the connections. The connector is 2. we reproduce the original connection
ably priced, they are rather easy to composed of gold-plated ‘spring’ blades system. Tests have shown excellent relia-
implement. However, here we are pro- (on the LCD) which rest on solder pads bility with tin-plated solder pads. Inter-
posing to replace them with a graphics
LCD that scores better on a number of
aspects: 3 IC1
LCD Nokia 3310
• superior contrast; 20
7
8
D5 7
8
13
12
7
8
CAP
12
• can be backlit 22
23
10
ACK 74HC541
C2
to 4 pounds, new! 25
13
PE LP2950ACZ-3.0
READY +3V0
Y-address
Connector
Do not attempt to extract the display from
its plastic casing as the display also MSB
Power supply
All you need to do is apply a supply volt-
age of between 2.7 and 3.3 V to the
display. The display has its own the DC-
DC converter which produces the
required current for the LCD, decoupled
by C2 (see diagram in Figure 3).
You will find a test program in C on the • variable speed scrolling in 4 direc-
Programming Elektor website (ref. 060080-11.zip) tions;
The LCD uses a controller type PCD8544 that has the most common functions: ini- • saving the drawing.
from Philips [1]. Full documentation is tialisation, write text (two font sizes) and
available on the web. The circuit has a simple drawing (pixel and straight track). The low current consumption of the LCD
screen memory organised into six lines It is written for the MSP430 family in the means it can be powered from the printer
of 84 bytes, or 504 bytes. The eight bits free IAR environment [2] but is easily output port. However, a 3 V regulator
of a byte represent the states of eight ver- adaptable to other microcontrollers and buffer gates have been added to
tical pixels corresponding to the screen because it does not rely on hardware avoid any risk of damaging or overload-
(state 1 = black pixel, see Figure 4). from a specific resource (SPI coupler, ing the LCD electronics. For example, the
In order to display text, for example, the among other things). LCD does not seem to like voltages
program should ‘draw’ each letter in the Furthermore, a program called applied to logic inputs in the absence of
screen memory. Test_LCD_Nokia_3310 is available (see the supply voltage.
Assigning registers for the PCD8544 con- Figure 6). It runs on the PC and is used (060080-1)
figuration and for the ‘screen’ RAM is to test the display connected to the par-
carried out by a synchronous serial con- allel port as shown in the diagram in Fig-
nection: ure 3. Internet Links
• SCE : selection of the circuit (5) The installation of this program is simple: [1] www.semiconductors.philips.com/
• SDIN : serial input output (3) copy the executable to any folder and products/
• SCLK : synchronous clock (2) the TVicLPT.sys file to C:\Windows\Sys- [2] MSP430, 4K KickStart Edition v3.40A
• D/C : given selection/command (4) tem32\Drivers. on www.iar.com
• RES : Reset (8) The archive file ‘LCD_Nokia’ containing all
Available functions: of the files mentioned in this article can be
Figure 5 shows the typical timing dia- • free drawing with the mouse; downloaded free of charge from
gram for writing a command. • text drawing; www.elektor-electronics.co.uk
051
Bart Trepak
Call Acknowledged!
shout above the level of the CD of a call as well as confirming to the caller
player/TV/games console in their bed- that the ‘message’ has been received. This
This circuit could be used (depending on room. Rather than resorting to a full-blown is especially useful in the latter case, as the
your circumstances) by a gentleman to intercom system, a simpler solution was call may be easily drowned out by the
summon his butler, a manager his secre- envisaged and while a buzzer could eas- music playing in the headphones.
tary or as in the author’s case to call the ily fulfil this function, this circuit has the The circuit, which requires no compli-
kids down to dinner without having to advantage of providing a visual indication cated switching, uses a simple two-wire
10k
100k
100k
LED (D3) as well as the buzzer Bz1 on red
blue
and off at about 1.5 Hz when push but- BT1
ton S1 is closed. This frequency may of R4
560 Ω
course be altered if required by chang-
9V
ing the values of the capacitors. The D1 optional
Multi-Colour
Flashing LED
Light effects have always been popular.
052
Now that LEDs are available in all sorts of
shapes, sizes and colours for reasonable
prices, a whole gamut of possibilities has
become feasible. Examples are case mod-
ding (embellishing PC cases with all kinds
of lights, windows, etc.), adorning scoot-
ers, motorcycles and cars with various
light ornaments, mood lighting in different
colours and we could go on.
1 IN
2
D1
CHARGE
ON 1
PUMP
5 6
IN OUT red
IN 5 2
FAULT IC1
IN 7 7 8
IN OUT
ISET 4 ILIM R1 MAX1562 R2
4 2
THERMAL 6 OUT 5k6 ISET FAULT 1k5
SHUTDOWN
25mA
8 OUT ON GND
FAULT LOGIC 1 3
20ms TIMERS P1
C1 C3 C2
OSC
MAX1562 ULVO
25kHz
BIAS REF
1µ 220n 4µ7
3 10k
GND 060024 - 12
060024 - 11
typically 40 µA or 3 µA in standby
mode. The circuit introduces a very low COMPONENTS
resistance in the power line (typically 26 Capacitors
mΩ but guaranteed less than 50 mΩ) LIST C1 = 1µF (SMD 1206)
C2 = 4µF7 10 V, tantalum
from an internal MOSFET. The FET gate C3 = 220nF (SMD 1206)
bias voltage is generated on-chip from a Resistors
charge pump circuit. Semiconductors
R1 = 5kΩ6 (SMD 1206) D1 = LED, low current
The chip can distinguish between an R2 = 1kΩ5 (SMD 1206) IC1 = MAX1562ESA
overload and a short circuit condition in P1 = 10kΩ preset PCB, ref. 060024-1
the supply line by measuring the voltage
drop across its internal resistance; if the
voltage is less than 1 V a short circuit is
assumed and the chip pulses a (limited)
3 P1
D1 1-420060
+
IC1
0 0
output current every 20 ms in an effort
060024-1 060024-1
R2
C3
C2
R1 C1
to raise the output voltage. This approach
will eventually be successful if the short
Electronic
Torricelli Barometer * 054
IC1
7805 D11 +9V
1N4004
C1 C3 C2 4
IC4
100n 220n 470µ 11
25V
3
1
IC3 3 IC4.A P1 D1
2 R3
4 R6
1k
3
2 9
+VO D3
8 12 1
R4 IC4.C L1
10 14 7 18
1 1k IC4.D REFOUT L2 D4
13 5 17
SIG IC2 L3
6 16
MPX2200AP 5 RHI L4 D5
R5 R9 R8 15
7 L5
IC4.B
120 Ω
1k 1k 14
6 L6 D6
13
LM3914 L7
4 12
R2 RLO L8 D7
9 11
1k MODE L9
R7 8 10
REFADJ L10 D8
R1
1k
2
D9
1k
D10
060110 - 11
Christian Tavernier which, if not as beautiful, is still less toxic ential and at a very low level, we had to
for the environment in case of breakage. resort to the use of four operational ampli-
Although it does not have the same As indicated on the drawing, the pressure fiers IC4.A to IC4.D, contained in one
charm as real mercury barometers with sensor utilized is a Motorola MPX2200AP. LM324, to obtain levels that can be
long glass tubes on pieces of carved and This circuit is adapted for measuring processed easily. As long as potentiome-
polished wood, the Torricelli barometer absolute pressure and has a range well ter P1 is adjusted correctly, this group of
discussed here is a functional equivalent suited for atmospheric pressure. Without operational amplifiers delivers a voltage
and electronic replica of the Torricelli entering too deep into the technical of 1 volt per atmospheric pressure of
barometer. Actually, rather than display- details, such sensors deliver an output of 1,000 hPa to the LM3914. Since the
ing the atmospheric pressure on the tra- voltage proportional not only to the meas- atmospheric pressure will be within the
ditional digital displays, we preferred to ured pressure but, unfortunately, to their range 950 to 1040 hPa at sea level, we
reproduce the general look of this supply voltage as well. Hence they must need to make an expanded-scale volt-
respected predecessor of electronic be powered from a stable voltage which meter with this LM3914 in order to better
barometers. The mercury tube is, of is ensured here by the use of IC1. exploit the 10 LEDs that it can control. That
course, replaced by a simple LED scale Since the output of the MPX2200 is differ- is the role of resistors R7 and R8 which
Contrast Control
055
Heino Peters
for LCDs
R1 = 227x10-6 x 293 /
(200x10-6)
500 µA +5V 200 µA
The adjustment control for the R1 = 333 Ω
Vo
contrast of an LC-Display is typ-
LM334
ically a 10-k potentiometer. This IC1 V+ Note that the current supplied by
works fine, provided that the 200 µA the LM334 depends on the tem-
P1 adj.
power supply voltage is con- Vo perature. This is also true for the
R1
stant. If this is not the case (for current from the display, but it is
330Ω
Protection
056
Christian Tavernier
for Telephone Line
Paradoxically, now that we are hooking served by overhead telephone lines,
up delicate and expensive equipment there’s an obvious risk of very high volt-
A long time ago when telephones were such as telephones filled with electronics, ages being induced on the lines during
so simple almost nothing could go amiss fax machines, (A)DSL modems, etc., this thunderstorms. While we have lost count
from an electrical point of view, Telecom protection has disappeared. today of all of the modems, fax machines
operators installed surge protection on all However, if you have the good fortune to and other telephones that have been
telephone lines exposed to storm risks. live in the countryside in a building destroyed by a ‘bolt of lightning’, surpris-
telephone line
During a storm, often with light- gas
discharge LA1
R3 remember that all of the author-
ning striking near a telephone line, tube ized telephone equipment, carry-
VDR
the line carries transient voltages V250LA4
ing the CE mark must be able to
up to several thousands of volts. T21-A230X GeMOV, SiOV withstand it without damage. This
Contrary to the HV section of tele- EL R2 SL is not always the case however
vision sets or electrical fences, on b 10 Ω b with some low-end devices made
which practically no current is run- 3W 060112 - 11 in China, but that’s an entirely dif-
ning, in the case of lighting strik- ferent problem.
ing current surges of thousand of Since pulses generated by light-
amps are not uncommon. suddenly becomes a full conductor to the ning are very brief, the ground connec-
To protect oneself from such destructive point of being able to absorb colossal tion of our assembly must be as low-
pulses, traditional components are not currents without being destroyed. The inductance as possible. It must therefore
powerful or fast enough. As you can see one we are using here, whose size is of be short, and composed of heavy-duty
on our drawing, a (gas-filled) spark gap the same magnitude as an ordinary one wire (1.5 mm2 c.s.a. is the minimum). If
should be used. Such a component con- watt resistor, can absorb a standardized not, the coil, composed of the ground
tains three electrodes, insulated from 5,000 amps pulse lasting 8/20 ms! connection, blocks the high frequency
each other, in an airtight cylinder filled Since we are utilizing a three-electrode signal that constitutes the pulse and
with rare gas. As long as the voltage spark gap, the voltage between the two reduces the assembly’s effectiveness to
present between the electrodes is below wires of the line or between any wire nothing.
a certain threshold, the spark gap and ground, cannot exceed the sparking Finally, please note that this device
remains perfectly passive and presents voltage, which is about 250 volts here. obviously has no effect on the low fre-
an impedance of several hundreds of Such protection could theoretically suffice quency signals of telephones and fax
MW. On the other hand, when the volt- but we preferred to add a second secu- machines and it does not disturb (A)DSL
age rises above this threshold, the gas is rity device made with a VDR (GeMOV or signals either.
very rapidly ionized and the spark-gap SiOV depending on the manufacturer), (060112-1)
SMD Crystal-Adapter
057
K1 IC1
1 8 (14)
1 8
IC1
OSC
4 5
4 5 (11)
Ton Giesberts small SMD package. We originally used
the SG531P-series from Seiko Epson in
The idea for this adapter was really born the design for the A/D-converter. This
out of necessity. The 24.576-MHz crystal (7) (8) comes in a kind of 8-pin DIL package.
oscillator that is used in the Audio ADC So, to nevertheless enable us to use the
2000, (24 bit/96 kHz, March 2001) is ( ) = 14-pin DIP Citizen version, we designed a very
not (easily) available any more. A col- 064003 - 11 small circuit board that adapts the SMD
league who was interested in the circuit device with 4 pins to the footprint for the
and was keen to try out the prototype 8-pin DIP version. The connection pin
realised that a 25 MHz oscillator was 48000 Hz, or 24.576 MHz. Fortunately order is the same. In addition, we have
used at the time. In order to create useful this frequency is available as part of a made the PCB also suitable for the 14-
recording material it is of course necessary series of oscillators from Citizen, the CSX- pin version (SG531P series). This
to use the correct sampling frequency, 48 750FC series, to be more specific. requires two additional pins. These are
kHz, that is. This requires 512 times These oscillators are housed in a very located at pins 7 and 8 of the 14-pin
058
This circuit performs a similar func-
Battery Saver
gate threshold voltage (around 2 V
tion to the ‘sleep’ button on a radio for the FET types specified). The
R1 R3
alarm clock; pressing the button length of the ‘on’ period depends
100 Ω
1k
connects the battery supply to some on three factors; firstly the value of
external equipment or circuit (repre- S1 R2 which governs the capacitor dis-
sented by RL) for a preset time RL charge current, secondly the capac-
BT1
period. The period can be extended 4V5...12V ON itance of C1 and finally the supply
by pressing the button again before voltage from the battery BT1. When
‘time out’. The circuit will avoid the R2
C1 D1 C1 is charged to a higher voltage it
10M
situation where you forget to turn off G T1 takes longer to fall below the thresh-
47µ
some battery powered equipment 25V old level. The component values
and return to find the battery is flat. S D
given will produce an ‘on’ time of
Unlike a digital alarm clock sleep BS170 ≤ 100mA
060121 - 11
around 10 minutes with a supply of
IRL540 ≤ 1A
function the circuit here is based on 5 V. The FET turns off relatively
a simple analogue timer which uses slowly at the end of the ‘on’ period;
very few components. Pressing but- this should not cause a problem if
ton S1 rapidly charges C1 via R1. When FET is negligible for the two types of FET the switched equipment uses only ana-
the voltage on C1 exceeds the threshold specified (for a maximum load current of logue circuitry but can lead to a momen-
voltage at the gate of FET T1 it conducts either 100 mA or 1 A). tary malfunction if the equipment contains
and switches the battery to RL. The drain- T1 remains conducting as long as the digital circuitry.
source voltage drop introduced by the voltage on C1 is greater than the FET (060121-1)
059
Heino Peters
Electronic Touch Switch
nails, etcetera, which are placed close The voltage at the non-inverting input of
together on a non-conducting surface. In IC1.b amounts to half the power supply
Mechanical contacts have the disadvan- this circuit a comparator of the type voltage (through voltage divider R4 and
tage that they wear out. That is why it is LM393 has been used. R5) and is lower than the voltage on the
practical to use an electronic ‘touch inverting input. The output of IC1.b is
switch’ in some situations. With such a In the idle state there is, via R1, a voltage therefore a ‘0’.
touch switch the resistance of the human equal to the power supply voltage on the If the two touch contacts are bridged with
skin is used for the switching action. non-inverting input of IC1a. Because the a finger, the voltage at the non-inverting
The schematic shows the design of a cir- inverting input of IC1a is set with R2 and input will become low enough to cause
cuit that senses the resistance of the skin D3 to D5 at the supply voltage minus the comparator to toggle state. The moist-
and converts it into a useful switching sig- 1.8 V, the open-collector output of IC1.a ness of the skin results in a resistance of 1
nal. The touch switch contacts can be is, via R3, equal to the power supply volt- to 10 MΩ.
made from two small metal plates, rivets, age. This voltage is inverted by IC1.b. If this circuit is used in the vicinity of
10M
10k
10k
100k
D1 D4 IC1
The body then acts as an antenna which 4 R7
100 µ
receives the 50 Hz (or 60 Hz) from the D5 25V 100k
S1 R2 R5
Note that a fly walking across the touch D2 D1, D2 = 1N4001 IC1 = LM393
10k
10k
D3...D5 = 1N4148
switch conducts enough to generate a
switching signal. So do not operate
important things with this circuit (such as
060084 - 11
the heating system or the garage door).
Do not make the wires between the touch
contacts and the circuit too long to pre- The power supply voltage for the circuit voltage in the range from 6 to 20 V can
vent picking up interference. is not very critical. Any regulated DC be used. (060084-1)
R3
3
provides an audible reminder. The clever 2 TR 555
OUT 1k2
D3 D4
bit is the way it doesn’t annoy you by 6 THR BC327
LA3 LA4 S1
beeping the instant you activate the flash- CV BZ1
TERMPWR_B
GND_B
064007 - 11
064007-1
(C) ELEKTOR
fitting the right-angle 25-way male sub-D therefore only one pin header required.
connector and the other for the high-den-
sity connector. The PCB has been
You may have to take into account the
locking screws of the male sub-D connec-
COMPONENTS
designed in such a way that the two com-
ponent sides can be connected together
tor. These are probably already present
on the scanner and you will have to
LIST
via a double row pin header (2?21 remove them from the adapter. The
K1 = 25-way sub-D plug (male),
pins). By selecting the spacing between adapter is held in place firm enough angled pins, PCB mount
the boards just right, so that the height of without the locking screws. K2,K4 = 2x21-pins pinheader (see
the connectors is about the same, a Unfortunately it turned out that the soft- text)
robust and compact adapter can be ware for the scanner could not cope with K3 = 50-way angled SCSI-2 high-
density connector, PCB mount (e.g.,
made. The photo shows what the inten- the USB driver for the converter, but that Farnell # 369-3752 or # 854-037)
tion is. There is really no opportunity for is another story. PCB, ref. 064007-1
mistakes. K2 is also K4 and there is (064007-1)
Telephone Ringer
Christian Tavernier
D1
062
LA1
C1 R1 1N4004 R2
If you are lucky enough to have a big 1k 220 Ω
1µ D3
house, a large garden, and small chil- 250V
230V
2A max.
dren, this project just might interest you. a
L
IC1 R3
It’s actually a telephone ringer capable of D2
telephone C2
making any mains-powered device work line VDR
230V
+U
1N4148 IC1.D
R3 D3
9 8
100k 1
14 C5 14 C6
C4 T1 T2
IC1 IC2
7 100n 7 100n
10n
BUZ11 BUZ11
+U
IC1 = 40106 T5
R4 R6 R8 BUZ11 R7
F1 +U 8
47k
2k2
1M
160k
K1
BT1
1A6 IC3 2
HYST
3 IC1.F
C3 THRESH D4
4 13 12
6V R5 OUT 1
100n ICL8211
1N4148
47k
060179 - 11
Uwe Kardel Something should be done about this, A second experiment was done based
any right-minded electronics engineer is on a home-made design: Square pieces of
Anyone who has a vegetable garden never going to admit defeat. Special PCB material of 5x5 mm were glued on
knows the problem. As soon as the straw- ridges are available from garden centres the four corners of a large printed circuit
berries start to get some colour, a net to stop slugs and there is also a special board. Copper wire with a diameter of
needs to be placed over the plants to pre- ribbon shaped material with wires woven 1 mm was soldered on the little squares
vent birds from eating the harvest. But in. The power supply comes from a 9-V so that the surface of the PCB was com-
what emerges the next morning? Some- battery. A practical experiment indicated pletely enclosed. A voltage of 6 V was
one still has had a nibble from the nicest that slugs were not the least bothered by applied to the copper wire. This worked
strawberry. The culprit is usually still in these current-carrying wires: they noncha- much better. Two slugs that acted as
the neighbourhood: A large brown slug. lantly climbed right across the ribbon. guinea pigs stayed the entire night on the
Miller Capacitor
Gert Baars
064
1). The gain A is negative. In addition,
1 C
input current I, input voltage U and out-
There are amplifier circuits that have put voltage Uo are also drawn in. The
capacitance between the input and out- input current I is equal to Ic and the input
UC
put. If the gain is positive, this can lead IC voltage U is equal to Uc + Uo. Uo in turn
to oscillations. If the gain is negative, I is equal to the product A U. From this fol-
another outcome is the result. We can A lows that
deduce this from the following theoretical
circuit. Uin Uout Uc = U–Uo = U (1–A).
An amplifier with a negligibly low output
impedance, an infinitely high input 060075 - 11
Substituting into the formula the current
impedance and gain A has feedback in that flows through a capacitor, Ic =
the form of capacitor C (refer Figure C(dUc/dt) results in
resistor to the input and meas- this circuit are, for example,
4µ7
ure the input voltage with an 63V adjustable LC-filters for audio
oscilloscope, we can easily 060075 - 12
applications.
determine the corner frequency. (060075-1)
Automatic Windshield
065
Christian Tavernier
Washer Control
+12V
Most, if not all, recent cars have an
R4
impressive amount of electronics, whether
220k
washer
pump
rinse product right in the middle of a just- 10µ
25V
cleaned windshield. Unfortunately, many 060109 - 11
‘low end’ cars or some of the older cars
are not equipped with this automatic
This little aid was originally designed to The circuit is build around a trio of stan- 1000, 500 or 250 Hz (see table). The
test the Shutter Time Meter from the January dard logic ICs. Firstly a 74HC4060 (IC1) frequency is then passed on to J2 and the
2006 issue. This meter was specifically is used to provide a quartz crystal accu- dual decade counter IC2 (a 4518). This
designed for ‘analogue’ SLR cameras. rate reference for the duration of the does not need to be a fast HC-type, since
pulses. For the crystal frequency we the frequency is at most 1 kHz. With J2
In order to measure the exposure time of choose the common 4.096 MHz value. the frequency can be reduced by 1, 10
a camera accurately, it will first have to To test all the ranges of the shutter time or 100 times. This frequency is then
be checked with a well-defined signal meter, we choose three different pulse applied to IC3 (a 5-stage Johnson-
first. This circuit was designed for that lengths in three different decades, counter). This has been set up in such a
purpose. But the circuit can also be used namely: 1 / 2 / 4 / 10 / 20 / 40 / way that in the end there appears only
if you need a well-defined pulse for some 100 / 200 / 400 ms. one single pulse at the output. The advan-
other purpose. With jumper J1 you select a frequency of tage of the Johnson-counter is that each
S1
C4 16 C5 IC2 = 4518
IC2
100n 100n C6
8
IC2.B
R3
CTRDIV10 100n
C3
1M
10 11
E ≥1 0
9 + 12 10n
IC1 16 C 1 IC3 16
13
2 3
7 15 14 R4 0
CTR14 3 CT=0 3 CTRDIV10/ 2
1
10k
5 DEC
4 4
11 !G 4 2
RCX 5 15 7
9 6 CT=0 3
R2 CX + 6 10
10 14 4
1M RX 7 IC2.A 1
R1 CT 13 5 R5
8 CTRDIV10 5
J1 J2
180 Ω
6
1k
15 2 3 13
9 E ≥1 0 & 6
X1 1 2 1 1 + 4 1 2 + 7
11 C 1 9
12 2 4 3 5 3 4 14 8
CT=0 12 2 11
3 6 5 7 6 5 6 9
13 CT=0 3 12 D1
4.096MHz CT≥5
C1 C2
8 8 HSDL-4230
74HC4060 74HC4017
33p 33p
064006 - 11
output is free from glitches and has a has practically no influence on the length changed be selecting another crystal fre-
duration that is exactly equal to the of the pulse. If you would like to use quency. The current consumption in the
period of the clock input. another LED then you will have to look idle state is less than 2 mA. In our pro-
closely at the switching time. This needs totype, while the circuit is delivering a
We choose Q2 as the output. Q4 is used to be small compared to the duration of pulse, the current consumption increases
to stop the counter. Q0 is only active if the pulse. If you want to use the circuit briefly to about 18 mA.
we push the reset-button S1. IC3 will then with a logic level output then you can Do not forget the wire link under IC2
start to count. To ensure that the reset just omit D1. when assembling the circuit.
does not affect the duration of the pulse, If necessary, the pulse lengths can be (064006-1)
a differentiating RC-network R4/C3 gen-
erates a short reset pulse. R3 ensures that
C4 is discharged after releasing S1.
Also, just to be sure, we don’t use the
+
D1
R5
second counter output but use the third
C6
C3
R1
which, with a switching time of 40 ns,
J1 J2 Pulse (ms)
COMPONENTS LIST Semiconductors
1-2 5-6 1 D1 = HSDL-4230
3-4 5-6 2 Resistors IC1 = 74HC4060
R1 = 1kΩ IC2 = 4518
5-6 5-6 4 R2,R3 = 1MΩ IC3 = 74HC4017
1-2 3-4 10 R4 = 10kΩ
R5 = 180Ω
3-4 3-4 20 Miscellaneous
S1 = pushbutton, make contact, 6mm
5-6 3-4 40 Capacitors
C1,C2 = 33pF J1,J2 = 3-way pinheader with jumper
1-2 1-2 100 X1 = 4.096MHz quartz crystal
C3 = 10nF
3-4 1-2 200 C4,C5,C6 = 100nF ceramic, lead pitch 1 wire link.
5-6 1-2 400 5mm PCB, ref. 064006-1
R5
C2 C3 C1
3k3
100n 100n 100µ
S1 16V
1 4x 1N4148 R6
100k
D1 D2 D3 D4
S2 D5
2 14
IC1.A
IC1.B
IC1.C
IC1.D
IC1 1N4148
S3 3 4 10 11
3 7
& & & &
16
S4
IC socket
4 1 2 5 6 8 9 12 13
3
0 CTRDIV10/
S5 2 DEC
1
5 4
2 CT=0
15
7
3 IC2
S6 10
6 4
1
5
S7 5
6 4017
7 6
7
14
+ &
R7 electronic
9 doorlock
8
3k3
S8 D6 red 11 13 connections
8 9
IC1 = 4011 12
CT≥5
S9
9
8
green
dual LED T1
S10 R8
0 R1 R2 R3 R4
10k
3k3
3k3
3k3
3k3
BC517
060085 - 11
Heino Peters reset input (pin 15) of IC2, which causes the buttons for the each of the remaining
output Q0 (pin 3) of IC2 to be the only digits of the code are pressed correctly
Installations with restricted access are output with a ‘1’ level. All other counter within 10 seconds, the Q4 output
often protected using an access code. If outputs are at the ‘0’ level. Dual LED D6 (pin 10) will ultimately go to ‘1’ and the
you don’t have particularly demanding will be on and red to indicate that a dual LED will change to green. After 10
requirements regarding modifying the code can be entered. If the button for the seconds, C1 will again be discharged
code, you can manage quite nicely with first digit of the preset code is now and the dual LED will change back to
a static design with the access code fixed pressed (in this case the ‘0’ button), the red. The Q4 output can be used to switch
in the hardware. output of IC1a will go to ‘0’ and the reset something, such an electronic door latch.
The access code can be set by inserting input of IC2 will also go to ‘0’ via D1 If you want to change the code, you only
wire links in the IC socket shown at the and D5. When the button is released, a have to change the configuration of the
left in the schematic diagram. The code rising edge appears at the clock input of wire jumpers in the IC socket.
‘0280’ is shown configured in the draw- IC2, which causes the counter to be The combination of diodes D1–D4 and
ing. The user enters the code with incremented by 1. Thanks to R6 and C1, R5 acts as an AND gate. If the output of
S1–S10. The most important components the reset input of IC2 remains low for one of the four NAND gates in IC1 is ‘0’
in this circuit are the four NAND gates around 10 seconds. Output Q1 (pin 2) (which is always the case if a correct but-
(4011 CMOS IC) and the counter with of the counter is now ‘1’ as a result of the ton is pressed), a ‘0’ is applied to the
ten decoded outputs (4017 CMOS IC). clock pulse, and IC1b is waiting for the clock input of IC2 as long as the button
R1–R4 hold the four pushbutton inputs at second button (‘2’) to be pressed. If that is held pressed. If you find a delay of 10
ground level if no button is pressed. No doesn’t happen within 10 seconds, C1 seconds too long, you can reduce the
measures need be taken to debounce the discharges via R5 and R6 to a level that value of R6 or C1. The time is approxi-
switch signals, since the circuit simply causes IC2 to be reset. Dual LED will mately equal to the product of R6 and
ignores repeated button presses. In the again become red, and the user must C1 (R6 x C1).
quiescent state, a ‘1’ is applied to the start entering the code again. However, if (060085-1)
1 D1 IC1
1N4002 7805
R3
100 Ω
R1 1 LM35CZ
C3 C5 C7
3k9
100µ 2
100µ IC3
25V 100n 25V JP1
1
5
3 R8
7
0 IC2.B 330 Ω T
2
R4 6
P1 1 K2
IC2.A 100 Ω
3
K1 250 Ω R6 R7
C1 8 C2
9...12V 1k3 4k7
IC2
AC/DC
470µ 25V 4 100n R2 R5
C6 C8 C9
820 Ω
27k
100n 1µ 100n
25V
C4 D2
100µ
IC2 = TLC272 030190 - 2 - 11
1N4002
25V
(C) ELEKTOR
ROTKELE )C(
R1
R4
R3
IC1 C2 C7
JP1
R2
IC2
R6
C8
C3
030190-2
2-091030
D1
C6
IC3
R5
R7
C5
D2
C4 C1 R8
K1 030190-2
9..12V 0
The circuit is powered from a mains adap- used). To avoid the need to use rail-to-rail The overall accuracy of the thermometer
tor with an output of 9 V to 12 V (either opamps, diode D2 is used to lift the circuit is highly dependent on the precision of
AC or DC). Although the current consump- ground to approximately 0.7 V above the the components used. In particular, R6
tion is only around 50 mA, a 1 A fixed IC’s negative supply. and R7 should be as close as possible to
voltage regulator is used to produce a sta- The sensor electronics can be built on the their calculated values. The output volt-
ble 5 V supply, since no heatsink is then small printed circuit board shown in Fig- age of the regulator is also important if
required. The regulator directly supplies ure 2. There is a single wire link, it is used as the reference voltage for the
the voltage divider for IC2.A and can also between C3 and IC2. It is worth pointing A/D converter. Deviations from nominal
provide power for a connected ADC cir- out that not only the sensor, but also all values will result in an expansion or a
cuit. The supply for the sensor is decou- the other components, must be capable compression of the overall temperature
pled from the rest of the circuit by R3 and of operating over the desired tempera- scale.
C7 to reduce interference. Diode D1 oper- ture range. The ‘C’-suffix versions of the (030190-II)
ates either as a rectifier (when an AC sup- sensor are specified to work from –40
ply is used) or as protection against °C to +110 °C, while the ‘D’ versions are Internet link
reverse polarity (when a DC supply is specified to work from 0 °C to +100 °C. www.national.com/pf/LM/LM35.html
4k7
4k7
4k7
inputs on other nodes in the buttons connected to EP1 and
network. This is achieved by VDD EP2 are pressed, messages
pressing the ‘bind’ button on EP1 are transmitted to the receiver.
both devices at the same time. 2x
EP2
Pixie Figure 2 is the receiver. By set-
AA cell
One input can control multiple Switcher ting ModeB high, it is config-
outputs and vice versa. For BIND STATUS
D1
ured as a router. This means it
example, it would be quite MODE
A, B VSS can allow battery powered
feasible for a bedside or hall- R4
sleeping devices (such as the
S1 S2 S3
way switch to turn off all the transmitter) to join it as a
470 Ω
lights in the house. neighbour. Routers, however,
A typical application circuit is must be always-on and so are
shown in the schematics, 060078 - 11
not really suited to battery
where one Pixie Switcher unit powering. ModeA is also
has been configured to have wired High, indicating that this
two inputs and the other to router is in fact a coordinator.
have two outputs. This config-
2 +2V1...+3V3
The difference between the
uration must be done prior to D2 RE1
two is that when a coordinator
R2
placing the modules in the cir- powers up, it starts a new net-
4k7
cuit shown, using the RxD 1N4148 work instead of looking for an
and TxD serial interface pins D3 RE2 existing one to join. Every Zig-
(not shown). MODE
A, B
VDD
T1 Bee network has one coordi-
Figure 1 shows the transmit- 1N4148
nator. If further routers nodes
Pixie
ter. The ModeA and ModeB BIND EP1
T2
were added to this network,
Switcher
pins are grounded, so the they would have to have the
STATUS EP2
transmitter will operate in D1 ModeA pin low. EP1 and EP2
VSS
sleep mode and only wake up on the receiver are connected
when a button is pressed. The S1
R1
2x BSS138N to relays via MOSFET driver
470 Ω
Measuring
070 Battery Charge
It is not generally known that it is possi-
ble to ascertain the extent of charge of a
5.00
battery with a standard digital volt-
meter. It does not apply to all kinds of 4.75
battery, but it does to, for instance, 4.50
0.2 C
Lithium-ion batteries. 4.25
1.0 C
Voltage [V]
4.00
Although there are quite a few different
types of Li-ion batteries, it is possible to 3.75
generalize to a degree. The graphs in 3.50
the figure (from Panasonic) show clearly 3.25
that the terminal voltage of the cell drops 2.0 C
3.00
in direct relation to the diminution of the
charge. This means that a simple voltage 2.75
0 100 200 300 400 500 600 700 800 900 1000
measurement suffices to determine the
state of charge of the battery. Note that Discharge Capacity [mAh] 064017 - 11
High-voltage Regulator
with Short Circuit Protection
071
D1
47k
100k
different. That’s why we decided to 100p
15p
design this simple regulator that can cope T1
C1
47k
100k
39V
072
Eberhard Haug
Driver for 20 LEDs
This contains closely-matched PNP tran-
sistors. The current mirror function is ingly high efficiency. The current in each
If we wish to use a step-up switching reg- implemented in the first (regulated) chain chain is calculated as follows:
ulator to run several LEDs from, for exam- by connecting the base and collector of
ple, a 3 V battery, we find that the max- its transistor together; the base and emit- ILED = 95 mV/R1 = 95 mV/4.7 Ω
imum usable mark-space ratio limits us to ter connections of all the transistors are = 20 mA.
driving just a few LEDs in series. If we also wired in parallel. Since there will be
have seven white LEDs in series the total a small effect on the currents in the other The circuit can operated from voltages
forward voltage will be about 7 times chains, it is best not to dispense with their from 3 V to 10 V. If fewer than five LEDs
3.4 V, or 23.8 V, requiring a mark- series resistors R, in the interests of are used in each chain, or if LEDs with a
space ratio of around 90 %. This is the improved current matching. lower forward voltage are used, the bat-
upper limit for many tery voltage may need to
switching regulators. If we D21 be reduced: it must be
want to drive more LEDs, L1
MBRM140
IC2 THAT320 lower than the total for-
we must divide them into a 10µH ward voltage drop of the
(800 mA) 3 12 5 10
number of parallel strings, chain. Otherwise, as with
for which the regulator will any boost converter, an
of course have to supply unregulated and potentially
2 1 13 14 6 7 9 8
the necessary current. damaging current will flow
There are various ways to *see text continuously through the
D1 D6 D11 D16
drive a parallel array of LEDs. Also, if the chains
series-connected LEDs. The contain different numbers
7 1
simplest approach is to VIN ≥ 3V SW OVP of LEDs or if different colour
wire a number of chains, 2 IC1 * D5 D10 D15 D20 LEDs are used, care must
VIN
each consisting of the same MIC2291 be taken to ensure that the
3 6
number of LEDs and a EN -34BML FB
R1 R2 R3 R4
sum of the LED forward
series resistor, in parallel, C1 C2 voltages is greatest in the
* * *
4Ω75
AGND PGND
hoping that the total for- 2µ2
4 8
2µ2 first (regulated) chain.
ward voltage of the LEDs in The EN input allows the
each chain is approxi- 060156 - 11 LED array to be turned on
mately the same. We can (EN>1.5 V) or off
sense the current in a single (EN<0.4 V), or dimmed
chain using a sense resistor R, and thereby The circuit shows a type MIC2291 PWM using a PWM signal. An alternative (ana-
deliver the same current to the other chains step-up LED driver from Micrel driving a logue) dimming technique is also
as well. Unfortunately, the assumption that four-by-five LED array. This arrangement described in the MIC2291 data sheet.
the total forward voltage of the LEDs in leaves the device a little headroom in The Schottky diode must be a fast-switch-
each chain is the same is not always terms of mark-space ratio and total ing type with a low capacitance and low
borne out in practice. power. The voltage at the output will be voltage drop, such as the MBRM140 or
To get around this problem we can use a at most 18 V in normal operation. A par- SS14. Ceramic capacitors C1 and C2
multi-way current mirror, which can, for ticular advantage of the MIC2291 in this should be XSR or X7R types with a suit-
example, be constructed using a bipolar circuit is its low feedback voltage of able working voltage. The 10 µH coil
transistor array such as the THAT320. 95 mV, which makes for a correspond- must have a rated current of at least
Tiny Simon
IC2
073
LM2936Z-5
+9V
R2 R5 R8 R11
C1
220 Ω
220 Ω
220 Ω
220 Ω
10µ
16V
D1 D2 D3 D4
IC1
R1 8
150 Ω
R4 5
PB0/AIN0
150 Ω 6 1
PB1/AIN1 PB5/ADC0
R7 7
PB2/ADC1
150 Ω 2 3
PB3/ADC3 PB4/ADC2
R10
150 Ω 4
S1 S2 S3 S4 ATTiny13 BZ1
R3 R6 R9 R12
100 Ω
100 Ω
100 Ω
100 Ω
050391 - 11
Clive Graham microcontroller running software written point is automatically selected upon
for the project. As you can see from the power-up. Dynamic I/O switching is used
The ‘Tiny Simon’ game is based upon the circuit diagram, the ATtiny13 chip in its to reduce pin-count — the LEDs and push-
‘Simon says...’ sequence following game 8-pin case does not require much in the buttons are conected to the same pins on
which has proved popular over the years. way of external components to make an the ATTiny13!
Although not particularly original in con- attractive little game that hopefully will The game runs from a 9-volt PP3 type bat-
cept, this implementation of the game, put keep children busy for a while. tery. The low quiescent current of less than
together for use by playschool children, The software was coded in AVR assembler 8 µA is due to the use of a micropower
has a number of noteworthy features. using the freeware Atmel AVR Studio4. It regulator type LM2936Z-5 and extensive
is available free of charge from the Pub- power saving features on the ATtiny13
The game uses sound (via a piezo- lishers’ website as file number 050391- (the micro draws less than 1 µA!).
sounder) and light (via four LEDs) to dis- 11.zip. Careful use of modular program-
play an extending sequence to the player, ming allows for easy changing of music Construction is very simple and the parts
who has to follow and repeat back the generated during the game (stored in EEP- are inexpensive and easily obtained. The
sequence via a set of four press-switches. ROM) and other features. An 8-stage max- component count is so small that construc-
If the sequence is remembered correctly, imal length pseudo-random number gen- tion of the circuit on a piece of Veroboard
a celebratory tune is played (with light erator (in software) is used to produce a is a perfectly acceptable option. The pho-
show) and the sequence extended by a varied and easily checked light sequence. tograph shows an experimental construc-
further element. If not, the player is shown Feedback taps can be altered in software tion of the game is an ABS box. The
the correct sequence and, after a short to produce a different sequence. Each small, hand-held construction allows easy
‘jingle’, is invited to play again. starting point for a sequence is saved in operation for those with small fingers!
The circuit is built around an ATtiny13 EEPROM, so if power is lost, a new starting (050391-1)
R13
R12
R11
R10
R9
R8
R2
R3
R4
R5
R6
R7
S1 S2
ROTKELE )C(
(C) ELEKTOR
JP2
IC1 C2
R1
K1
1-091030 030190-1
030190-1 X1 C1
LEDs is lit in sequence from bottom to Now switch off the power supply, in position 0). Apply power and adjust
top. Each of the 23 possible display pat- remove JP1 on the digital board and set P1 until LED D11 lights; this corresponds
ters is shown for 100 ms. Finally the the BCD switches to the zero position. to the lower limit of the temperature
two-colour LED flashes yellow twice, and On the analogue board connect the measurement range.
the unit starts to display the temperature. LM35’s ground to the amplifier input (JP1 (030190-I)
Harmonic Generator
with Single Opamp
Gert Baars
075
non-inverting input. The circuit
Quartz crystals have the property amplification, which in principle
that their amplitude/phase charac- V+ must be unity to ensure oscillation,
teristic repeats itself at frequencies is determined by the network
C2
that are an uneven multiple of the formed by R4, R5 and trimmer
fundamental frequency. There are 100n capacitor C3. This network is fre-
R1 X1
* * see text
so-called overtone crystals that are quency-dependent such that the
100k
cut in such a manner that they pos- amplification increases as the fre-
sess this property to a greater quency rises. The network gain is
extent. However, in principle, any R3 7
8
adjustable with C3. The setting of
330 Ω
3 3f, 5f, 7f
crystal may be used on one or more 1 the capacitor must be such that the
IC1 6
of its harmonic frequencies. Har- 2 gain is too small for oscillation at
monic generators based on transis- 4
the fundamental frequency, but suffi-
AD8099
tors may operate satisfactorily on R4 RD8 cient for, say, the 5th or 7th har-
the 3rd harmonic, but if the 5th or 100 Ω monic.
7th harmonic are wanted, the circuit C3 The author uses a standard com-
40p
becomes less reliable and requires R2 R5
puter crystal of 10 MHz. Depend-
frequent adjustment. C1 ing on the setting of C3, the circuit
10 Ω
100k
47µ 400V
C3 C1
K1 D3 D1
47n 47n L1 L2
F1
30V 5 IC1 4
VIN VSW
80VA 100µH 100µH 16V
2A5 T 5A 5A R3 R4 5A
C4 C2
LT1074CT
6k8
14k0
D4 D2 VC GND FB
47n 47n
2 3 1
R1
D1...D4 = B10100 D6
2k2
D5
C8 R2
C5 C6 C7 C9 C10 C11 C12 C13
2k21
POWER
100n 100n 100n 100n 220µ 220µ 100n
63V 63V
6V C14 C15
750 mA 12V
K5 1A
100n D7 10µ
0A5 T
f 63V
230V
1N4148 JP1
6V
4VA5
064011 - 11
Ton Giesberts
regulator, which means that the circuit the 16 V into a stabilised voltage for the
can be built with relatively standard com- buffer stage.
This power supply was designed for use ponents and will have a high efficiency. When an ECC83 (12AX7) is used in the
with the ‘Simple hybrid amp’ published The power loss is less with this device hybrid amp we could use this 12 V to
elsewhere in this issue. It is of course suit- compared to a linear voltage regulator. power the filaments in the valve as well,
able for use in other applications as well. This allows us to use a higher transformer although we really need 12.6 V. The
We’ve used a cascade generator for the voltage and a smaller cascade section to current taken by the valve is about 150
170 V, a switch mode supply for the 16 generate the 170 V (which is required mA, which means that the 12 V regula-
V, a series regulator for the 12 V and a for the SRPP stage in the amplifier). The tor needs to be fitted with a heatsink. This
separate transformer for the 6.3 V fila- lower input current also results in smaller can be a small version of an SK129
ment supply. losses in the bridge rectifier (D1 to D4). heatsink from Fischer (38.1 mm, 6.5
We’ve chosen an LT1074CT (IC1) for the A standard 12 V regulator (IC2) turns K/W). To increase the voltage by 0.6 V
230V
1N4148 BC557
combinations or perhaps closest to every T2
078
Richard Hoptroff
Serial to Bluetooth
special-purpose microcontroller,
+3V3...+5V such as the PIC18F4550) to make
When computer makers switched data transmission possible. That
from RS232 to USB, one of the VDD sounds like a zero-sum game,
collateral benefits was TTL com- RxD TxD CTS which raises the question: if you
patibility with regard to the sup- already have to use an extra IC,
ply voltage as well as signal lev- TxD RxD RTS why not go directly to Bluetooth?
els. Unfortunately, there was also Micro- And in fact, there are already sev-
LinkMatik
collateral damage, primarily in controller eral Bluetooth modules available,
the form of an enormous increase complete with an integrated
Connect
in the complexity of the data Detect
Status antenna and simple serial inputs
transmission process. All you and outputs. However, many of
Mst/Slv VSS
need for connection to an RS232 them have the disadvantage that
serial port is a level converter, but they are controlled using AT com-
USB requires an extra IC (such as 060077 - 11 mands, which makes it necessary
the Cypress CY7C68000 or a to use an additional controller.
Thunderstorm Predictor
Karel Walraven
079
R6 R4
Sure, listening to VHF FM has great
47 Ω
3k9
2k2
820p
about 300 kHz can faithfully detect the 330µH
K1
components is not too crucial. Various 2N5109 C2 R6 coax 2N5109
BFW16
39 Ω 50 Ω
types of FET may be used: BF245, BF246, 100n
to K2
2V4
220k
C8 K3
frequencies, which leads to higher ampli- 47p
BFR91
tudes. This is compensated by L6. This L3 L4
C6 R7
100n BFR96
inductor may be omitted and replaced by 1w 8w B C
1M
P1
a wire bridge, but then the output volt- 500p 470 Ω
log.
ages at higher frequencies increases. E
C1 C9 0
L7
L8
C2 L5 T
R4
R6 S1 C10
T1 T3 T C5
L2
R1
R2
L1
C7 T2
R5
T L3 L4
R3 P1 C8
ROTKELE )C( R7
L6
(C) ELEKTOR
040383-1
Alternative
Halogen Supply
Stijn Coenen lamps to be initially powered from the 5-
081
Operation of the circuit is as follows. As
V rail of the supply via RE2, so that they soon as the PC supply provides power,
Readers who do not care to modify the are preheated. Subsequently, they are IC1.B drives T1 into conduction and RE2
power supply of an old PC into a suitable powered from the 12-V rail via RE1, closes. The potential at the non-inverting
halogen power source (see our April while at the same time the 5-V rail is dis- input of IC1.B is 6 V, while that at the
2006 issue), may find the present design connected. This ensures that the current inverting input rises from 0 V. Lamp LA1
a welcome alternative. surge through the lamps is so small that is then connected to the 5-V rail.
The circuit does not need any changes to the protection in the power supply does After a short span of time, the voltage
the power supply. It allows the halogen not react. across C1 has risen to a value where
470Ω
D1
47k
D3
power supply is protected against spikes
on the 12-V line by D1. 10CTQ150-1
P1
Diode D2 protects IC1 against over-volt- D2
8 1N4148
T2
2
age on its inputs should the 12-V rail fail. 47k
1
R4
IC1.A 4k7 RE2
Resistors R4 and R5 limit the base cur- 3 D4
47k
1M
150W
depends to some extent on the type of
10µ 25V
power supply used. Some experimenta-
060151 - 11
tion may be worthwhile!
(060151-1)
Low Loss
082
Michel Franke
Step Down Converter
quiescent current: 120µA @ +12V +9V...+60V
1N4148 250µA @ +60V
This circuit arose from the need of the R1 R7 R6 Ue
D3
author to provide a 5 V output from the
1M
330k
330k
T2
24 V battery of a solar powered genera-
tor. Although solar power is essentially
free it is important not to be wasteful espe- T3 C6 C7
BC327
cially for small installations; if the battery 26µA @ Ue = +12V
C3 C4
R5 220µ 220µ
runs flat at midnight you’ve got a long 63V 63V
220k
2SJ221
2SJ174
wait before the sun comes up again. The 1n 3n3
100V
20A
basic requirement was to make an effi- D1 D2
0Ω22
470k
ciency in mind.
When power is applied to the circuit a * see text 050264 - 11
10,000x
with One Transistor
Gert Baars
083
acteristic of the transistor. In practice, it
+U b turns out that the transistor does actually
For a collector follower with emitter resis- have an output resistor between collector
Rb Rc
tor, you’ll often find that the gain per and emitter. This output resistance exists as
stage is no more than 10 to 50 times. a transistor parameter and is called ‘hoe’.
The gain increases when the emitter resis- Co U out
In normal designs this parameter is of no
tor is omitted. Unfortunately, the distor- consequence because it has no notice-
tion also increases. able effect if the collector resistor is not
T
Ci
U in large. When powering the amplifier from
With a ubiquitous transistor such as the 340 V and setting the collector current
BC547B, the gain of the transistor is to 1 mA, the collector resistor will have a
roughly equal to 40 times the collector value of 338 kΩ. Whether the ‘hoe’-
current (Ic), provided the collector current parameter has any influence depends in
is less than a few milliamps. This value is 060074 - 11 the type of transistor.
in theory equal to the expression q/KT, We also note that with such high gains,
where q is the charge of the electron, K is the base-collector capacitance in partic-
Boltzmann’s constant and T is the temper- be about 40?(12–5) = 280. ular will start to play a role. As a conse-
ature in Kelvin. For simplicity, and assum- Notable is the fact that in this way the quence the input frequency may not be
ing room temperature, we round this gain can be very high in theory, by select- too high. For a higher bandwidth we will
value to 40. ing a high power supply voltage. Such a have to use a transistor with small Cbc,
For a single stage amplifier circuit with voltage could be obtained from an isolat- such as a BF494 or perhaps even an
grounded emitter it holds that the gain ing transformer from the mains. An isolat- SHF transistor such as a BFR91A. We
Uout/Uin (for AC voltage) is in theory ing transformer can be made by connect- will have to adjust the value of the base
equal to SRc. As we observed before, the ing the secondaries of two transformers resistor to the new hfe.
slope S is about 40Ic. From this follows that together, which results in a galvanically The author has carried out measurements
the gain is approximately equal to 40IcRc. isolated mains voltage. That means, that with a BC547B at a power supply volt-
What does this mean? In the first instance with a mains voltage of 240 Veff there age of 30 V. A value of 2 V was cho-
this leads to a very practical rule of will be about 340 V DC after rectifica- sen for the collector voltage. Measure-
thumb: that gain of a grounded emitter tion and filtering. If in the amplifier circuit ments confirm the rule of thumb. The gain
circuit amounts to 40⋅Ic⋅Rc, which is the power supply voltage is now 340 V was more than 1,000 times and the
equal to 40 times the voltage across the and the collector voltage is 2 V, then the effects of ‘hoe’ and the base-collector
collector resistor. If Ub is, for example, gain is in theory equal to 40 x (340–2). capacitance were not noticeable
equal to 12 V and the collector is set to This is more than 13,500 times! because of the now much smaller collec-
5 V, then we know, irrespective of the However, there are a few drawbacks in tor resistor.
values of the resistors that the gain will practice. This is related to the output char- (060074-1)
4k7
project published in the Febru- 1 R8C/13 T2
ary 2006 issue of Elektor Elec- 6
1 32
R4
10k
3 30 558C
3 TXD RESET AN5
27k 4 29
behind the 5-V regulator and 8
5
AN4
28
BC VSS MODE
three small connectors (ground 4
10k
R2 548C 6
AN3
27
9
(0V); +5 V on the bottom left) to 5 S1
7
VCC AN2
26
8 25
supply power to potential RESET
P17 AN1
9 24
daughterboards. Connectors are 10
P16 AN0
23
P15
linked to the R8C/13 output K4 IC1 11
P14 P30
22
D1 S2
ports. 7805 12
P13
21
13 20 MODE
The layout of components has 1N4004 14
P12 P31
19
P11
been selected in order to ensure +9V C1 C2 C3 15 18
P10 P32
easy manipulation. The connec- 16
P45 P33
17
10µ 10V 100n 100n
tions are arranged in the upper
area of the board, while the
R6
Reset button and Mode switch
1k
special tool.
Installation
of components
The component type codes and
characteristics can be found in
the component list; a glance at
the photo lets you identify every-
thing, as does the overlay for
the components, on the other
page.
Do not forget to install the wire
links and resistor R5 between
the links for the R8C module
before plugging in the latter.
The reset pushbutton is found on
the bottom, slightly shifted to the
left, and the programming
switch is found on the right.
Pay attention to the direction of
the switch. It is more practical for
the off position to be directed
servo
serial connection. We are referring to the PIC BASIC
Bicycle Speedometer
with Hub Dynamo
Hans Michielsen
086
The idea for this circuit came when the
author had problems with the wireless
speedometer on his bicycle. Such a device
consists of two parts: the cycle computer
itself and a transmitter that is mounted on
the front fork. A small magnet is attached
to the spokes so that the transmitter sends
out a pulse for every revolution of the
wheel (as long as everything has been fit-
ted properly). Since the range of the trans-
mitter is limited (about 75 cm), you’ll be
lucky if it works straight away. And when
the voltage of the battery starts to drop
you can forget it. The following circuit gets
round these problems.
A Shimano NX-30 hub dynamo has 28
poles. This results in 14 complete periods
of a 6 V alternating voltage per revolu- +12V
tion (when loaded by a lamp; under no
load the voltage is much higher). C1, R3
25V 12
8 3
G1
tion of the wheel. This pulse enters the cir- D2 C2 C3
11
9
14
15
GND
10
cuit at the point where the reed contact 100µ 330µ
CT=0
11
1
6V
was originally. 25V 25V
8
The circuit is built inside the front light,
MBR5828 3x BAT18
since it has enough room and a cable D4
* see text
from the dynamo is already present. The
D5
distance to the cycle computer is smaller
as well in that case. D8
060166 - 11
The following tip can be used if you want
to save yourself a few components. In the
author’s prototype the counter divided by wheel was adjusted to 16/14th of the puter. In that case you can leave out D4,
16 and the setting for the size of the real size in the setup of the cycle com- D5 and D8. (060166-1)
R9 R17
SOLAR
R7 R11
2k7
PANEL
-Θ
2k2
100k
Hyst. min (133k) = 0V5
NTC 10k Hyst. max (33k) = 1V5
5
R6
7
R2 IC1.B 100k R8 P2
C7 6
R5 33k
9k1
100k
100k
1µ
25V
3 T1
R12
V+ 10 1
IC2.A 10k
8 2
R10 IC1.C
9 BC638
POOL
-Θ
R13 D1 RE1
NTC 10k R3 CIRCULATION
680 Ω
3 PUMP
R4 100k
1
R1 IC1.A 100k
C8 2 P1
D2 1N4001
9k1
C3
Vref min = 0V
1µ Vref max = 5V
25V 100n
PUMP ON
100k
5
13 12
7
IC2.B
6 IC1.D
R21
10k
IC3 R23
LM7812 14
470 Ω
V+
16 14
+15V D3 V+ R20
V PH V STAB
470 Ω
11 10
R19 VCNTRL
1N4001
IC4
680 Ω
R22
13 15
C4 C5 C6 VR MAX VI 1k
D21 D22 UAA170
D4 12 1
330n 330n 100µ VR MIN
25V
5V1 5V1 H G F E D C B A
POWER ON
2 3 5 4 6 7 8 9
IC1 = LM324
V+ IC2 = LM393
D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20
4 C9 8 C10
IC1 IC2
11 100n 4 100n
050217 - 11
Tom Henskens starts up. The warm water will then be which can easily pick up interference.
pumped to the swimming pool and the Both potential dividers are followed by a
This circuit can be used to turn the pump temperature difference will drop rapidly. buffer stage (IC1a/IC1b). IC1c and R3,
on and off when a solar collector is used This is because fresh, cool water from the R4, R5 and R6 make up a differential
to heat a swimming pool, for example. swimming pool enters the collector. amplifier (with unit gain), which measures
This way the water in the collector has a Once the difference is less than 3 °C the the temperature difference (i.e. voltage
chance to warm up significantly before it pump is turned off again. difference).
is pumped to the swimming pool. A R10/R1 and R9/R2 each make up a When both temperatures are equal the
bonus is that the pump doesn’t need to potential divider. The output voltage will output is 0 V. When the temperature of
be on continuously. be about half the supply voltage at a tem- the solar collector rises, the differential
The basis of operation is as follows. perature around 25 °C. amplifier outputs a positive voltage. This
When the temperature of the water in the C7 and C8 suppress any possible interfer- signal is used to trigger a comparator,
solar collector is at least 10 °C higher ence. The NTCs (R9 and R10) are usually which is built round an LM393 (IC2a).
than that of the swimming pool, the pump connected via several meters of cable, R7 and P1 are used to set the reference
Simulation Applets
088
Simulation programs for analogue cir- nents. Unfortunately, the addition of com- The simulations aren’t limited to just elec-
cuits come in all shapes and sizes, and ponents has not (yet?) been fully imple- tronics; other subjects such as physics
at various prices. It is often much easier mented in the program: you’ll see the and mathematics have also been exten-
to test a circuit on a PC instead of reach- added component appear in the circuit sively covered. There’s more than enough
ing for the soldering iron. diagram, but it won’t have any effect in on this website to keep you happily occu-
The website of Paul Falstad contains a the operation of the circuit. But don’t let pied for a few hours...
free Java applet that illustrates how vari- that spoil your fun. Its usefulness is (060196-1)
ous basic analogue and digital circuits increased by the addition of a large Web link
work. Voltages and currents can be library of example circuits, which makes www.falstad.com/mathphysics.html
brought to life in simulated scope this applet educational as well. Each sim- The electronics simulation can be found
screens; circuits can be modified by the ulation is accompanied by a short under Electrodynamics/Analog Circuit
addition, removal or alteration of compo- description. Simulator Applet
R/W
D0
D1
D2
D3
D4
D5
D6
D7
A
K
E
0 1 2 3 D1
Software for IC1 can be downloaded
S5 S6 S7 S8
from www.elektor-electronics.co.uk for 1N4148
8 9 A B D3
050259-1
1 -952050
3
F
LCD1
S12
S16
S4
S8
K1
C4
E
T1
S11
S15
COMPONENTS LIST
S3
S7
R1
C5
D
Resistors
S10
S14
S2
S6
R1 = see text
C2
C3
C
Capacitors
X1
C1,C5 = 100nF
S13
S1
S5
S9
C2, C3 = 27pF D1
C4 = 10µF 16V radial
IC1
D2
D3
Semiconductors
D4
C1
D1-D4 = 1N4148
T1 = BS170
IC1 = AT90S2313, order code
050259-41
Miscellaneous
X1 = 11.0592MHz quartz crystal
S1-S16 = pushbutton type D6
LCD module, 2x16 characters
PCBs, ref. 050259-1
Figure 2.
The finished PCB provides a neat, universal
input/output module.
090
Uwe Kardel
Hard Disk Switch
D4
25V D3
it is effectively protected against viruses. RE3 Hard disk 3
K4
The solution outlined here has been in 4
+5V
satisfactory use for a couple of years. R1
3
2
There is an additional benefit: if there are
1k
1
+12V
ever any problems with the operation of
the computer, then it is very easy to
change to another hard disk to check if 060178 - 11
SRG8
3
C1/
DTR
2 4
1D 2D 3
5
6
7
TxD 14
13
12
D1 D2 D3
11
9
4V7 4V7 4V7
10
4094N
+UB U+
U+
C2 C3
16 14
IC1 IC5
8 7 15 15 15
100n 100n EN3 EN3 EN3
1 1 1
IC2 C2 IC3 C2 IC4 C2
IC5 = 4081N 2 4 2 4 2 4
1D 2D 3 1D 2D 3 1D 2D 3
5 5 5
6 6 6
U+ 7 7 7
14 14 14
13 13 13
C4 C5 C6
16 16 16 12 12 12
IC2 IC3 IC4 11 11 11
8 8 8
100n 100n 100n 9 9 9
10 10 10
4094N 4094N 4094N
050109 - 11
Roland Plisch neously to its outputs. This arrangement delayed by R4 and C1, via AND gates
can easily be extended by adding further IC5.B, IC5.C and IC5.D when the corre-
The ‘Universal Interface for Windows’ shift registers in cascade, allowing data sponding output (Q6, Q7 and Q8
designed by Burkhard Kainka (Elektor words of (in theory) any desired size to respectively) of the first shift register is
Electronics, December 1999 Supplement, be built up byte by byte. active. The software sends a 16-bit word
page S2) provides for a range of input containing the address and a data byte
interfaces along with eight digital out- The circuit in Figure 1 shows shift reg- in a single transfer. For example, to select
puts, all under direct control of a PC’s ister IC1 connected as before to the PCs Q6 and hence IC2, it is necessary sim-
serial port. The program (available for interface. The serial data pass through ply to add 2048 to the eight-bit data
free download from http://www.elektor- this device first, and then, via its serial value; for IC3 add 4096, and for IC4
electronics.co.uk under ‘Magazine’) uses cascade output (pin 9) to three further add 8192. The circuit can be extended
the TXD signal to clock eight data bits 4094s. The last (i.e., eighth) bit of the in similar fashion using the spare outputs
from the DTR signal into a 4094 shift reg- shift register appears on this cascade pin. of IC1 (pin 4 to pin 7 and pin 14) to con-
ister. On the positive-going edge of the The three shift registers IC2, IC3 and IC4 trol further 4094s.
RTS strobe it transfers these bits simulta- receive their strobe pulses, slightly (050109-1)
560 Ω
1 V+ 16
out from the car and parameters to be C3 C1+
K1
set. The communications protocol used is 1µ 3
C1–
IC1
1
called KW 1281. Versions of VAG- 16V 11
T1IN T1OUT
14
2
6
R2
T1
10 7 7
COM up to 311 require the use of an T2IN T2OUT 3 2k2
12 13 8
isolated interface connected to the PC’s 9
R1OUT R1IN
8
4
9 BC547B
R2OUT R2IN 5
serial port to protect both the car’s com- C4
4
C2+
C6 2N3904
puter systems and the PC itself from pos- MAX232 1µ
5 15 RS232
sible damage. A popular and rather min- 1µ
16V
C2–
V-
16V
1:1 cable
imal design for the circuit is ‘Jeff’s inter- 6
C7
SUB D9
330 Ω
3
K3 SUB D9
Microelectronics and the (OBD) C1 C2 D2
Motorola/Freescale MC33290D. Both 9 1
2k2
IC1 optional
available and far from it. You may have 4 10n 1000µ 100µ
treasures in your collection that you would 25V 25V
100k
fully-equipped Hi-Fi systems. From a point R7
5n6
R8
1n5
22k
100k
C10
work with the sound card of your PC and
22µ
that, admittedly, is where the problem 25V
starts. Most high-quality turntables are
equipped with a magnetic cartridge C13 C14
R10
which typically delivers just a few mV. The
100k
5n6 1n5
cartridge signal requires a correction of R14 R15
C15
T1
K1 2 4
K1
CNY17
red
+5V
BC547
10k
black
R1
black
R2
yellow
560Ω +12V
IC2
A2 1 6 5 D1
T2 0V
K2 2 4
CNY17
DUO LED
BC547
10k
R3
R4
560Ω 030117 - -11
H1
H2
R1
R2
LED to indicate hard disk access, with the hardly any need to worry about over- K1 IC1
LED being connected to the motherboard loading. The optocouplers eliminate the A1
D1
via a two-pin connector. However, this problems with the different voltages. On K2
R3
R4
A2
LED only works with IDE drives, and if a the output side, a Darlington transistor IC2
T2
SCSI disk controller is fitted, its activity consisting of the phototransistor and a
H4
1-711030 K1
will not be visibly noticeable. This small BC547 drives the multicolour LED. The
circuit remedies that problem using a mul- 10-kΩ resistor (whose value of is not crit-
ticolour LED. ical) provides secure cut-off of the driver 030117-1
The activity LED for the IDE interface is transistor. The base of the phototransistor
usually driven by a connected device via in the CNY17 is left open.
one or more open-collector stages. It illu- The series resistors for the individual LED
minates if either of the two possible IDE elements are dimensioned using the stan-
drives is activated. The shared series dard formula. It may be necessary to
resistor limits the current and also pro- adjust their values slightly, depending on
vides short-circuit protection. Even if the the relative brightness levels. The circuit
LED is shorted out due to faulty wiring, can also operated from the +12-V line
the current is restricted to a safe level. of the power supply if the values of the
An obvious solution would be to have the series resistors for the LEDs are suitably
IDE and SCSI disks drive a shared dual modified. If necessary, a third optocou- COMPONENTS LIST
LED, but unfortunately the current flows pler stage can be added to allow a
from the positive supply line through a three-colour LED (red, green and blue) to Resistors:
R1,R3 = 10kΩ
series resistor, the LED and a transistor to be driven.
R2,R4 = 560Ω
ground. The dual LED would thus have to The circuit board has been designed to
have a common anode, but no such be so small that the components can be Semiconductors:
device exists. All known multicolour LEDs fitted in a few minutes and everything D1 = Dual LED with 3 pins (Conrad
have a common cathode lead. That can be suspended from the LED in the PC Electronics # 187496)
IC1,IC2 = CNY17-2
means they cannot be connected directly, enclosure. A drop of hot-melt glue will T1,T2 = BC547B
but we’re not that easily defeated. prevent the circuit board from becoming
Only a small additional circuit is needed dislodged due to vibration. The supply Miscellaneous:
to allow the LED to be driven by the differ- voltage reaches the circuit via a normal K1 = 4-way SIL connector
Small disk drive connector for PCB
ent interfaces. small drive connector, to make it easy to
mounting, or solder pins (see text)
In this circuit, each of the drive signals obtain the necessary plug. Otherwise, PCB, order code 030117-1 from the
from the two controllers is fed to an opto- you can also use ordinary solder pins. PCBShop
coupler, which acts nearly the same as (030117-1)
+U B
+U B = max. +15V
R4 R2 K2
D1
100k
150k
D2
IC2.D
9 10
1
8 4
IC2.A BAT85
R JP1 1N4148
3 2 7 5 1 IC2.E max. 100mA
1 DIS D
IC1 IC2.C IC3.A 11 12
K1 C2 1
2 3 7 6 3 C 2
TR OUT 1
IC2.B
1n TLC555 R S IC2.F
5 4 6
0V 1 THR 4 6 14 15
1
CV
+U B
1 5
IC2 = 4049 R5
470k
R1 IC1 = 4013
4k7
9 13
D
1 14 T1 IC3.B T2
C3 C4 C1 R3
IC2 IC3 11 C 12
47k
8 7
100n 100n 10n R S
BC547 10 8 BC547
044030 - 11
R3
+ R1, R3 and T1. This circuit makes sure
0V
that when the flip-flip has decided that
1-030440IC3
IC2
R5
the servo-pulse is longer than the 555’s
044030-1
pulse (and signals this by making output
T1
R2
Q high), the pulse duration from the 555
C3
C1
T2 is made a little shorter. The length of the
R4
R1
IC1
Increased Range
for DVM 097
R1
INH
Vin R2
Iin
INL
Range R1 R2
040037- 11
2V 910k 100k
20 V 1M 10k
Vin
200 V 1M 1k Voltmeter modules are readily available, current with these modules.
both as LCD- and LED-versions. A disad- In order to measure higher voltages we
2000 V 1M 100 Ω
vantage of these modules is the standard have to reduce the voltage with a poten-
200 mA 0Ω 1k measuring range of 200 mV DC. So, tial divider. For this purpose we add R1
with such a module you can only meas- and R2. R1 is connected in series with
2 mA 0Ω 100 Ω
Iin ure DC voltages up to 0.2 volts. Fortu- the + input of the module and R2 is con-
20 mA 0Ω 10 Ω nately it is not difficult to increase the nected in parallel with the inputs. In the
measuring range to higher voltages. In table we can see the correct ratios of R1
200 mA 0Ω 1Ω
addition, it is also possible to measure and R2. These modules typically have an
098 R3 R4
Geiger Counter
10M 10M
+5V
LS1
R6
C2 C3 D7 C11
*
100k
100n 100µ 10V 100n
TR1 1N4148 D8
C6 C8
0W5 A 32 Ω
R2
D2 D3 D4 D5 D6
1N
C4 4148
100k
230V
6V
8 4 8 4
R
22n * R
2 C5 C7 C9
TR 6 7
3 THR DIS
OUT R5
P1 R1 IC1 T1 IC2
10M
100k
7
DIS C5...C8 = 22n / 250V
555 555 R7
D1...D6 = 1N4004 2 3
100k 6 TR OUT 1k
THR BC546B
CV CV K1
1 5 D1 * see text R8 1 5
C1 C12 C10 C13
1M
040291 - 11
Malte Fischer measurements; the most common and sim- ing of a 6 V mains transformer. An alter-
plest detector type is the Geiger counter. nating voltage of around 250 V is pro-
April this year was the twentieth anniver- The design described here uses two duced at the primary side which is then
sary of the Chernobyl reactor accident. In NE555 type timer ICs, a small mains multiplied by the classic voltage multiplier
the days following the incident winds transformer and a few other standard com- configuration consisting of cascaded
deposited much of the reactor contents ponents to make a low cost and simple to capacitors and diodes to produce
across central Europe, Scandinavia and build Geiger counter. The only fly in the around 700 V DC. The voltage is fed
the UK. A large area surrounding the reac- ointment is likely to be locating a Geiger- back to the timer input through resistors
tor is still off limits but just how much of the Mueller (GM) tube; this is not in any way R3 and R4 to provide some stability of
fallout is still lying around on our gardens a standard component. The on-line auc- the output voltage.
and farmlands? At the time of the release tion site eBay may provide a source of The counter tube anode is connected to
Iodine 131 was responsible for many new or used counter tubes or alternatively 700 V via a 10 MΩ protection resistor.
cases of thyroid cancer but with a half life Google will be useful in identify stockists. In normal operation with no radiation
of 8.1 days this does not pose much of a A brand new type ZP1300 tube can be detected there will be no current flowing
threat in the long term. Strontium 90 is purchased from ALRAD [1] at a cost of through the tube and gas filling. When a
more of a problem; it has a half life of 28 £55.00 plus VAT. The GM tubes are listed radiation source is brought close to the
years and more than 50 % of the fallout under nuclear products and nucleonics. tube, ionising radioactive rays pass
still remains. Radio caesium affects the The counter tube requires a high voltage through it and collide with some gas
food chain and can contaminate milk, in the region of 700 V. IC1 is a NE555 atoms knocking a few electrons out of
meat and to a lesser extent crops. timer configured as an astable multivibra- their shell; this produces a current pulse
Radioactivity is invisible so a detector is tor switching the BC547C transistor from the tube terminal which in turn gen-
needed before we can start to make any which in turn drives the secondary wind- erates a voltage pulse across the 1 MΩ
C11 R9
R13 C15
270k
27k
100n
A2 A1 A3 C13 10µ
A2 A1 A3 5 16V
R11 R12
7 2
100n IC2.B 27k 27k
C6 6 1
IC2.A
3
+5V 100n R8 R10 R14 R15
C14
100 Ω
L2
1k
R1
27k
27k
1k
100n
C4 C7
1µH5
JP1
22p 100n C10
CON6 R4
8 1k
R18 C2
C5 R5 100n
7 6 +5V 1k
OSCO OSCI 1M
R19 100p C22 CON3
100n IC1 R2
1 4 13 27k
INA OUTA 27k R16
14 100n
NE612 IC2.D
27k
R3
2 5 12
INB OUTB 27k 9 T2
8
C12 C8 C9 C21 IC2.C
3 10 CON1
1k 47µ
100n BS107 16V
T1
C16
100n
+12V IC3
BF245 D2 78L05 +5V
L1 C3
C17
(18) CON5 CON7 1N4001
CON2 R7 100n 4
C19 C20
45p IC2 IC2 = LM324
470 Ω
(2)
100n 11 100n
060140 - 11
Burkhard Kainka matic gain control (2/06). particular giving better image frequency
Both of these add-ons have been subject rejection and higher receiver sensitivity
The DRM Receiver described in the to continuous refinement by the author so that more distant DRM, AM, SSB and
March 2004 issue of Elektor Electronics and the resulting combined circuit shown CW broadcasts can be detected.
has proved very popular and many thou- here can now be assembled on a ready-
sand of the receivers are already in the made PCB. This design equips the DRM The RF input stage of the circuit in Figure
field. Its excellent design is both simple receiver with an automatically tuned pre- 1 is tuned by a varicap and passed
and inexpensive. In the best tradition of selector for short wave signals in the fre- through the source-follower formed by T1.
homebrew construction we have sup- quency range from 3.5 MHz to around A tuning voltage is generated by the pas-
ported the receiver by publishing two 16 MHz and an automatic gain control sive PLL circuit and NE612 mixer. The
add-ons to the basic design; an auto- (AGC). The modifications improve the DDS output signal from the receiver is
matic preselector (11/04) and an auto- properties of the basic DRM receiver, in connected to the input connector CON6.
COMPONENTS LIST
Resistors C18 = 47µF 16V radial block, lead pitch 5mm
R1,R4,R6,R14,R18,R20 = 1kΩ CON3 = 3.5mm jack socket
R2,R3,R8,R10-R13,R16,R17,R19 = 27kΩ Semiconductors CON4,CON5 = pinheader or wires
R5 = 1MΩ D1 = BB313 or 3 off BB112 CON6,CON7 = 1mm dia. solder pin
R9 = 270kΩ D2 = 1N4001 L1 = inductor former with core (Conrad
R7 = 470Ω T1 = BF245 Electronics # 516651) and ECW
R15 = 100Ω T2,T3 = BS107, BS170 0.3mm
IC1 = NE612 L2 = 2µH2 fixed inductor
Capacitors IC2 = LM324 PCB, ref. 060140-1
C1,C3,C5-C14,C16,C19-C22 = 100nF IC3 = 78L05
Suggested kit supplier:
C2 = 100pF www.geist-electronic.de
C4 = 22pF Miscellaneous
C15 = 10µF 16V radial J1 = Jumper Ready built and tested units from:
C17 = 45pF trimmer CON1,CON2 = 2-way PCB terminal www.modul-bus.de
9 8
1 IC1 1 2x
+5V IC1.A
2 7 C3 1N5817 1N5817
D– 1 2
3 1
D+ IC1.E
4 10µ D3 D4 D5
GND 11 10
1
USB - A D2 D6
Re1
C8 C9 C1 C7 C6 C5
IC1.F 10µ
470µ 330p
25V 13 12 25V 1N4148
1
1N5817 3x 1000µ
25V
IC1 = 40106
IC1.B T1
3 4
1
C4
BSS295
1µ
060177 - 11
Uwe Kardel A PCB design is available for the elec- The capacitors charge up in about two
tronics part, but not for the high voltage seconds after switching on. The circuit is
How often does it happen that you close part. It is best to solder the mains wires now ready for use. When Windows is
down Windows and then forget to turn off straight onto the switch and to insulate closed down, the 5-V power supply volt-
the computer? This circuit does that auto- them with heat shrink sleeving. age disappears. C4 is discharged via R2
matically. After Windows is shut down C8 is charged via D1. This is how the and this results in a ‘0’ at the input of
there is a ‘click’ a second later and the PC power supply voltage for IC1 is inverter IC1b. The output then becomes a
is disconnected from the mains. Up to now obtained. A square wave oscillator is ‘1’, which causes T1 to turn on. A voltage
there were no mains switches available built around IC1a, R1 and C9, which is now applied to the coil in the mains
with a magnetic coil to turn off the power drives inverters IC1c to f. The frequency is switch and the power supply of the PC is
supply voltage, but now one is available about 50 kHz. The four inverters in par- turned off. T1 is a type BSS295 because
from Conrad Electronics , with the article allel power the voltage multiplier, which the resistance of the coil is only 24 Ω.
number 70061 for a price of 12.95 Euro has a multiplication of 3, and is built When the PC is switched on, the circuit
(approx. £ 9.00). Surprisingly enough, from C1 to C3 and D2 to D5. This is draws a peak current of about 200 mA,
this switch fits in some older computer used to charge C5 to C7 to a voltage of after which the current consumption
cases. If the circuit doesn’t fit then it will about 9 V. The generated voltage is drops to about 300 µA. The current
have to be housed in a separate enclo- clearly lower than the theoretical when switching on could be higher
sure. That is why a supply voltage of 5 V 3x4.8=14.4 V, because some voltage is because this is strongly dependent on the
was selected. This voltage can be lost across the PN-junctions of the diodes. characteristics of the 5-V power supply
obtained from a USB port when the circuit C5 to C7 form the buffer that powers the and the supply rails in the PC.
has to be on the outside of the PC case. coil of the switch when switching off. There isn’t much to say about the con-
1k
47k
the speed-dependent voltage spikes gen- 8
IC1
16
IC2
100n
erated by commonly used types of PC R3 4 8
IC1 = TL082 IC2 = 4520
power supply fans, which are superim- 56k
2
4k7
1N4148 IC1.B C 2
to monitor the speed of the fan. For this 100µ
5
3
6 T1
R4 R
purpose, the pulses are tapped off from 16V
1k
1k
102
Bart Trepak
Mains Slave Switcher II
vacuum cleaner switch. This unit was The circuit diagram shows a simple
designed to fulfil this function by automat- mains slave switch based on this idea.
Many power woodworking tools such as ically switching on the vacuum cleaner The coil may be wound directly onto the
saws and sanders have a provision for when the power tool is switched on. reed switch using insulated single core
connecting a vacuum cleaner hose to In this circuit, current flow is sensed using hook-up wire or enamelled copper wire
suck up the dust and debris produced by a reed relay which is not only cheap but of sufficient gauge to carry the current
their operation. The problem is of course provides a positive indication that current drawn by the power tool (or master
that the vacuum cleaner must be switched is flowing and dissipates very little appliance). In practice this should be as
on when the tool is switched on and as power. Reed switches are often used in thick as possible to cater for any power
the operator’s attention must be directed burglar alarms where they sense the appliance while still enabling a sufficient
towards the work in hand especially magnetic field from a small magnet but number of turns to be accommodated to
when a blade with large teeth is spinning it is also possible to produce a magnetic produce the required magnetic field
only inches from his fingers, there is often field by winding a coil around the reed which will depend on the reed switch
little incentive to look away to locate the switch and passing a current through this. and is therefore best determined by
S1
The circuit is by its nature connected RL1 RL2
directly to the mains supply. Great care C1 REED
SWITCH
SLAVE X2 MASTER
should therefore be taken in its con- (VACUUM 1µ 250V (POWER
struction and the circuit should be CLEANER) R2 TOOL)
100 Ω
enclosed in a plastic or earthed metal
D2
box with mains sockets fitted for the
master and slave appliances. 230V
RE1 D3 1N4148
1N4148
experiment. As a guide, a one-inch reed
D1
switch with 40 turns reliably switched on C3 C2
Advertisement
School of Technology
ate
passion
Are you c tro nics?
our ele Yes to all of these?
about y it,
ilding k Then upgrade your qualifications, by
love bu ?
Do you g thing
s w ork studying at Derby
m ak in
and
career, BSc(Hons) Electronics
o u want a
D o y what
paid for ? BSc(Hons) Electrical &
getting yd g o in
you enjo Electronic Engineering
Also Foundation Year, and HNC/HND
Electrical & Electronic Engineering
Next Issue:
FREE PHILIPS MIFARE RFID CARD
design your own application
with our matching RFID Reader
Subscription rates and conditions may be found at the back of this issue.
* Offer available to Subscribers who have not held a subscription to Elektor
Electronics during the last 12 months. Offer subject to availability.
Take out a free subscription to
E-weekly now
Do you want to stay up to date with electronics and
computer technology? Always looking for useful hints, tips
and interesting offers? Subscribe now to E-weekly, the free
Elektor Electronics Newsletter.
Your benefits:
The latest news on electronics in your own mailbox
each friday
Free access to the News Archive on the Elektor website
You’re authorized to post replies and new topics in our forum
A I
F N G E
D T Y
Q U A
P
Solve Alphadoku and win!
Correct solutions enter a prize draw for
C an
V Y P
Entering the competition
R A C X M Please send the letters in the red boxes by email, fax or post to
M N W Elektor Electronics Alphadoku
Regus Brentford - 1000 Great West Road
B W K Brentford TW8 9HH - United Kingdom.
Fax (+44) (0)208 2614447.
E N K G Email [email protected]
J S V P Subject: alphadoku 07-2006.
W G O R T
Prize winners
R T E The solution of the May 2006 Hexadoku is: 02675.
The E-blocks Starter Kit Professional goes to:
B I S Rob Quin (Caste Douglas).
E-blocks AVR-Kit
C for AVR microcontrollers single user £ 118.00
E-blocks AVR multiprogrammer £ 77.65
E-blocks LED board £ 14.65
E-blocks LCD board £ 19.30 E-blocks Starter Kit professional
E-blocks Switch board £ 14.65 Flowcode professional £ 118.00
Total value: £ 244.25 USB Multiprogrammer £ 77.30
Special Offer:
£ 171.80 LED-board £ 14.65
Switch-board £ 19.30
LCD-board £ 19.30
Total value: £ 248.55
Special Offer:
£ 166.00
E-blocks Easy Internet Kit Extra: PIC16F877 microcontroller
Flowcode Professional £ 118.00
E-blocks LED board £ 14.65
E-blocks LCD board £ 19.30
E-blocks USB Multiprogrammer £ 77.30
E-blocks Starter Kit basic
E-blocks switch board £ 14.65
Flowcode student/home: £ 59.90
E-blocks internet board £ 71.95
USB Multiprogrammer: £ 77.30
PIC16F877 £ 10.50
Total value: £ 137.20
Ethernet ‘crossover’ cable £ 5.30
Special Offer:
£ 96.00
Total value: £ 331.65
Special Offer:
£ 232.50
RESERVE YOUR COPY NOW! The September 2006 issue goes on sale on Thursday 24 August 2006 (UK distribution only).
UK mainland subscribers will receive the magazine between 18 and 22 August 2006. Article titles and magazine contents subject to change, please check our website.
Name: ............................................
Address: ............................................
Please cut out or photocopy this form, com-
Post code: ............................................ plete details and hand to your newsagent.
Telephone: ............................................ Elektor Electronics is published on the third
Date: ............................................ Friday of each month, except in July.
Signature: ............................................ Distribution S.O.R. by Seymour (NS).
In the Elektor Electronics Shop you’ll find all other products sold by the pub-
lishers, like CD-ROMs, kits and books. A powerful search function allows you
to search for items and references across the entire website.
07/08-2006
description; for books, state the full title; for photocopies of articles, state full name of article and month and year of publication.
PLEASE USE BLOCK CAPITALS.
SWITCH ONLY:
Start date: ....................................................
Sub-total
Prices and item descriptions subject to change. Please send this order form to *
The publishers reserve the right to change prices (see reverse for conditions)
without prior notification. Prices and item descriptions
P&P
shown here supersede those in previous issues. E. & O.E.
Total paid Elektor Electronics (Publishing)
Regus Brentford
1000 Great West Road
Brentford TW8 9HH
Name
United Kingdom
Tel.: (+44) (0) 208 261 4509
Address + Post code
Fax: (+44) (0) 208 261 4447
Internet: www.elektor-electronics.co.uk
[email protected]
*USA and Canada residents may
(but are not obliged to)
Tel. Email use $ prices, and send the order form to:
Old Colony Sound Lab
P.O. Box 876, Peterborough
✁
✁
EL07/08 Email: [email protected]
Order Form
07/08-2006
* Offer available to Subscribers who have not held a subscription Expiry date: .................................................
to Elektor Electronics during the last 12 months. Offer subject to availability.
See reverse for rates and conditions. Verification code: .........................................
SWITCH ONLY:
Start date: ....................................................
Name
Issue number: ..............................................
Subscription
* cross out what is not applicable Fax: (+44) (0) 208 261 4447
Internet: www.elektor-electronics.co.uk
EL07/08 [email protected]
ORDERING INSTRUCTIONS, P&P CHARGES
Except in the USA and Canada, all orders, except for subscriptions (for which see below), must be sent BY POST or FAX to our Brentford address
using the Order Form overleaf. On-line ordering: http://www.elektor-electronics.co.uk
Readers in the USA and Canada may (but are not obliged to) send orders, except for subscriptions (for which see below),
to the USA address given on the order form. Please apply to Old Colony Sound for applicable P&P charges. Please allow 4-6 weeks for delivery.
Orders placed on our Brentford office must include P&P charges (Priority or Standard) as follows:
UK: £4.00 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 (Standard) or £12.00 (Priority)
HOW TO PAY
All orders must be accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff.
Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35
ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us.
Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. We can only accept sterling cheques and bank drafts
from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country.
Giro transfer into account no. 34-152-3801, held by Elektor Electronics (Publishing) / Segment b.v. Please do not send giro transfer/deposit
forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre.
Credit card VISA, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering
through our website is SSL-protected for your security.
COMPONENTS
Components for projects appearing in Elektor Electronics are usually available from certain advertisers in this magazine. If difficulties in the supply
of components are envisaged, a source will normally be advised in the article. Note, however, that the source(s) given is (are) not exclusive.
TERMS OF BUSINESS
Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this
time scale for all orders. Returns Faulty goods or goods sent in error may be returned for replacement or refund, but not before obtaining our
consent. All goods returned should be packed securely in a padded bag or box, enclosing a covering letter stating the dispatch note number. If the
goods are returned because of a mistake on our part, we will refund the return postage. Damaged goods Claims for damaged goods must be
received at our Brentford office within 10-days (UK); 14-days (Europe) or 21-days (all other countries). Cancelled orders All cancelled orders
will be subject to a 10% handling charge with a minimum charge of £5·00. Patents Patent protection may exist in respect of circuits, devices,
components, and so on, described in our books and magazines. Elektor Electronics (Publishing) does not accept responsibility or liability for failing
to identify such patent or other protection. Copyright All drawings, photographs, articles, printed circuit boards, programmed integrated circuits,
diskettes and software carriers published in our books and magazines (other than in third-party advertisements) are copyright and may not be
reproduced or transmitted in any form or by any means, including photocopying and recording, in whole or in part, without the prior permission
of Elektor Electronics (Publishing) in writing. Such written permission must also be obtained before any part of these publications is stored in
a retrieval system of any nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior
permission. Limitation of liability Elektor Electronics (Publishing) shall not be liable in contract, tort, or otherwise, for any loss or damage suffered
by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor Electronics (Publishing) other
than to supply goods as described or, at the option of Elektor Electronics (Publishing), to refund the purchaser any money paid in respect of the goods.
Law Any question relating to the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws
of England. January 2006
Standard Plus
United Kingdom £41.90 £48.80
Surface Mail
Rest of the World £54.50 £61.40
USA & Canada US$ 95.50 US$106.50
Airmail
Rest of the World £68.90 £75.80
USA & Canada US$120.00 US$131.00
Bank transfer into account no. 40209520 held by Elektor Electronics The standard subscription order period is twelve months. If a perma-
(Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35 nent change of address during the subscription period means that
ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). copies have to be despatched by a more expensive service, no extra
Please ensure your full name and address gets communicated to us. 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
Cheque sent by post, made payable to Elektor Electronics (Publishing) service.
/ Segment b.v.. We can only accept sterling cheques and bank drafts Student applications, which qualify for a 20% (twenty per cent) reduc-
from UK-resident customers or subscribers. We regret that no cheques tion in current rates, must be supported by evidence of studentship
can be accepted from customers or subscribers in any other country. signed by the head of the college, school or university faculty. A
standard Student Subscription costs £33.50, a Student Subscription-
Giro transfer into account no. 34-152-3801, held by Elektor Plus costs £40.40 (UK only).
Electronics (Publishing) / Segment b.v. Please do not send giro transfer/ Please note that new subscriptions take about four weeks from receipt
deposit forms directly to us, but instead use the National Giro postage of order to become effective.
paid envelope and send it to your National Giro Centre. Cancelled subscriptions will be subject to a charge of 25% (twenty-
five per cent) of the full subscription price or £7.50, whichever is the
Credit card VISA, Access, MasterCard, JCBCard and Switch cards can higher, plus the cost of any issues already dispatched. Subsciptions
be processed by mail, email, web, fax and telephone. Online ordering cannot be cancelled after they have run for six months or more.
through our website is SSL-protected for your security. January 2006
ISBN 0-905705-68-8
496 pages
£27.50 / US$ 51.50
Visual Basic
New
INDEX OF ADVERTISERS
ATC Semitec Ltd, Showcase . . . . . . . . . .www.atcsemitec.co.uk . . . . . . . . . . . . . . . . . .142 Lascar . . . . . . . . . . . . . . . . . . . . . . . . . . .www.lascarelectronics.com . . . . . . . . . . . . . . . .8
Avit Research, Showcase . . . . . . . . . . . . .www.avitresearch.co.uk . . . . . . . . . . . . . . . . .142 London Electronics College, Showcase . .www.lec.org.uk . . . . . . . . . . . . . . . . . . . . . . . .143
Beta Layout, Showcase . . . . . . . . . . . . . .www.pcb-pool.com . . . . . . . . . . . . . . . . .137, 142 MQP Electronics, Showcase . . . . . . . . . .www.mqpelectronics.co.uk . . . . . . . . . . . . . . .143
Conford Electronics, Showcase . . . . . . . .www.confordelec.co.uk . . . . . . . . . . . . . . . . . .142 PCB World, Showcase . . . . . . . . . . . . . . .www.pcbworld.org.uk . . . . . . . . . . . . . . . . . . .143