0% found this document useful (0 votes)
131 views65 pages

2005 09

Uploaded by

navaltronica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views65 pages

2005 09

Uploaded by

navaltronica
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Copyright  2005, Wimborne Publishing Ltd

(408 Wimborne Road East, Ferndown, Dorset, BH22 9ND, UK)

and TechBites Interactive Inc.,


(PO Box 857, Madison, Alabama 35758, USA)

All rights reserved.

WARNING!
The materials and works contained within EPE Online — which are made
available by Wimborne Publishing Ltd and TechBites Interactive Inc —
are copyrighted. You are permitted to make a backup copy of the downloaded file
and one (1) hard copy of such materials and works for your personal use.
International copyright laws, however, prohibit any further copying or
reproduction of such materials and works, or any republication of any kind.

TechBites Interactive Inc and Wimborne Publishing Ltd have used


their best efforts in preparing these materials and works. However, TechBites
Interactive Inc and Wimborne Publishing Ltd make no warranties of
any kind, expressed or implied, with regard to the documentation or data
contained herein, and specifically disclaim, without limitation, any implied
warranties of merchantability and fitness for a particular purpose.

Because of possible variances in the quality and condition of materials and


workmanship used by readers, EPE Online, its publishers and agents disclaim
any responsibility for the safe and proper functioning of reader-constructed
projects based on or from information published in these materials and works.
In no event shall TechBites Interactive Inc or Wimborne Publishing Ltd
be responsible or liable for any loss of profit or any other commercial damages,
including but not limited to special, incidental, consequential, or any other
damages in connection with or arising out of furnishing, performance, or use of
these materials and works.
ISSN 0262 3617
PROJECTS . . . THEORY . . . NEWS . . .
COMMENTS . . . POPULAR FEATURES . . .

VOL. 34. No. 9 SEPTEMBER 2005


Cover illustration: Mehau Kulyk/Science Photo Library
www.epemag.co.uk
EPE Online: www.epemag.com

Projects and Circuits


ALL-BAND RADIO by Thomas Scarborough 604
No-frills, low-budget, easy-build, sensitive radio with excellent reception
MULTICORE CABLE TESTER by Mike Geary 612
How to conveniently check lengthy multicore cables
INGENUITY UNLIMITED – Sharing your ideas with others 618
Low-cost RS232 Interface; TV Audio Coupler; PIC-Based Noise Generator
SNOOKER AND DARTS SCOREBOARD by John Becker 626
Readily display all the scores at your snooker and darts matches
CONTROLLING MODEL RAILWAY SIGNALS by John Waller 636
Using stepper motors to control the semaphore signals used with model railways
BACK TO BASICS – 6 Daily Reminder and Whistle Switch 648
by Bart Trepak
Simple, easy-to-build circuits based on one or two CMOS logic chips

Series and Features


TECHNO TALK by Mark Nelson 620
Describing the problems of wind turbines – and some ingenious solutions
CIRCUIT SURGERY by Alan Winstanley and Ian Bell 622
Low-frequency amplification, plus simple low-battery monitoring
PRACTICALLY SPEAKING by Robert Penfold 634
A novice’s guide to measurement units
PIC N’ MIX by John Becker 658
Getting a DS1267 dual digital potentiometer working with a PIC
NET WORK – THE INTERNET PAGE surfed by Alan Winstanley 660
Emails and ISPs

Regulars and Services


EDITORIAL 603
NEWS – Barry Fox highlights technology’s leading edge 610
Plus everyday news from the world of electronics
SHOPTALK with David Barrington 624
The essential guide to component buying for EPE projects
READOUT John Becker addresses general points arising 642
CD-ROMS FOR ELECTRONICS 645
A wide range of CD-ROMs for hobbyists, students and engineers
DIRECT BOOK SERVICE 655
A wide range of technical books available by mail order, plus more CD-ROMs
PRINTED CIRCUIT BOARD AND SOFTWARE SERVICE 661
PCBs for EPE projects. Plus EPE project software
© Wimborne Publishing Ltd 2005. Copyright in all BACK ISSUES Did you miss these? 662
drawings, photographs and articles published in
EVERYDAY PRACTICAL ELECTRONICS is fully ADVERTISERS INDEX 664
protected, and reproduction or imitations in whole or
in part are expressly forbidden.

Our October 2005 issue will be published on Thursday,


8 September 2005. See page 595 for details Readers Services • Editorial and Advertisement Departments 603

Everyday Practical Electronics, September 2005 593


NEXT MONTH
PIC-BASED USB INTERFACE
Are you ready to jump on the Universal Serial Bus
(USB) bandwagon? Maybe you have an existing
embedded application or a PIC design you would like
to update or develop to use USB. In this article we
explore the basics of an easy way of getting data into
and out of a PIC18F2455 microcontroller using its
USB interface.
This design allows existing RS232 devices to be
controlled by a Windows 2000/XP USB connection.
Although the design is simple, it illustrates the process of
getting data into and out of the PIC over a USB connec-
tion. The “easy way” approach to USB makes maximum
use of existing free software and Windows drivers.

PHOTIC PHONE
The Photic Phone slices up the human voice into forty-
thousand binary segments a second, transmits it over a
light-beam, then re-integrates it at the other side. That is,
it applies pulse width modulation (p.w.m.) to the voice, to
create a binary transmission. This has the advantage of
always transmitting at full intensity, meaning that even the
weakest nuances of a voice will reach the receiver as
strongly as the rest.
HALLOWEEN HOWLER
The circuit typically has a range five times greater than Halloween’s coming – why not give your “trick or treat”
similar analogue circuits. Without the use of lenses, the visitors a scare?! Picture a pumpkin head, eyes lighting
prototype achieved a range of four metres. With a single up red and emitting an eerie howl when someone walks
lens at the transmitter, it achieved a range of fifteen past it!
metres. With the use of two lenses, it should achieve a Although intended to help generate a bit of fun over
range of fifty metres using a single cheap, ultrabright Halloween this project also serves to demonstrate just
l.e.d. It is all but impossible for anyone to eavesdrop on a how easy (and cheap) it can be to output audio in an
transmission. electronics project. The sound comes from a pre
recorded computer “WAV” file stored in a small EEP-
ROM memory. WAV files can be downloaded from the
internet, extracted from music CDs and even recorded
PLUS BACK TO BASICS – 7 by yourself on a PC using software supplied with most
ɀ Parking Radar operating systems.
The circuit described can be configured into one of two
modes of operation: Halloween Howler, which includes
Avoid expensive mishaps to that car behind you.
a light sensor to detect moving objects, and a generic
ɀ Telephone Switch 3-input design that allows one of three stored sound
samples to be played when an input is asserted. This
Phone home and remotely control an electric appliance second setup provides a more general purpose sound
while you’re away. generator that can have a number of uses.

NO ONE DOES IT BETTER


DON'T MISS AN
ISSUE – PLACE YOUR
ORDER NOW!
see page 640
Or take out a subscription and save money..
see page 598

OCTOBER 2005 ISSUE ON SALE THURSDAY, SEPTEMBER 8


Everyday Practical Electronics, September 2005 595
Quasar Electronics Limited Postage & Packing Options (Up to 2kg gross weight): UK standard 3-7 Day
PO Box 6935, Bishops Stortford, Delivery – £3.95; UK Mainland Next Day Delivery – £8.95; Europe (EU) –
£6.95; Rest of World – £9.95 !Order online for reduced price UK Postage!
CM23 4WP We accept all major credit/debit cards. Make cheques/POs
Tel: 0870 246 1826 payable to Quasar Electronics Limited.
Fax: 0870 460 1045 Prices include 17.5% VAT. MAIL ORDER ONLY.
Call now for our FREE CATALOGUE with details of over 300
E-mail: [email protected] high quality kits, projects, modules and publications.

0871 CREDIT CARD


SALES 717 7168
Helping you make the right connections!

ABC Maxi AVR Development Board NEW! DTMF Telephone Relay Switcher
PIC & ATMEL Programmers The ABC Maxi board Call your phone number
has an open architec- using a DTMF phone from
We have a wide range of low cost PIC and ture design based on anywhere in the world
ATMEL Programmers. Complete range and Atmel’s AVR and remotely turn on/off
documentation available from our web site. AT90S8535 RISC any of the 4 relays as
Programmer Accessories: microcontroller and is desired. User settable
40-pin Wide ZIF socket (ZIF40W) £15.00 ideal for developing new designs. Security Password, Anti-Tamper, Rings to
Features: Answer, Auto Hang-up and Lockout.
18VDC Power supply (PSU010) £19.95
8Kb of In-System Programmable Flash Includes plastic case. 130 x 110 x 30mm.
Leads: Parallel (LDC136) £4.95 / Serial
(1000 write/erase cycles) • 512 bytes Power: 12VDC.
(LDC441) £4.95 / USB (LDC644) £2.95
internal SRAM • 512 bytes EEPROM Kit Order Code: 3140KT – £39.95
• 8 analogue inputs (range 0-5V) Assembled Order Code: AS3140 – £59.95
• 4 Opto-isolated Inputs (I/Os are
NEW! USB ‘Flash’ PIC Programmer bi-directional with internal pull-up resistors) Serial Port Isolated I/O Module
USB PIC programmer for most • Output buffers can sink 20mA current Computer controlled
‘Flash’ devices. No external (direct l.e.d. drive) • 4 x 12A open drain 8-channel relay
power supply making it truly MOSFET outputs • RS485 network board. 5A mains
portable. Supplied with box connector • 2-16 LCD Connector rated relay outputs
and Windows Software. ZIF • 3·5mm Speaker Phone Jack and 4 opto-isolated
Socket and USB Plug A-B lead • Supply: 9-12VDC. digital inputs (for
not incl. The ABC Maxi STARTER PACK includes monitoring switch
Kit Order Code: 3128KT – £34.95 one assembled Maxi Board, parallel and states, etc). Useful in a variety of control
Assembled Order Code: AS3128 – £39.95 serial cables, and Windows software and sensing applications. Programmed via
CD-ROM featuring an Assembler, serial port (use our new Windows interface,
BASIC compiler and in-system terminal emulator or batch files). Serial
“PICALL” ISP PIC Programmer programmer. cable can be up to 35m long. Includes
“PICALL” will program Order Code ABCMAXISP – £89.95 plastic case 130 x 100 x 30mm. Power:
virtually all 8 to 40 The ABC Maxi boards only can also be 12VDC/500mA.
pin serial-mode* AND purchased separately at £69.95 each. Kit Order Code: 3108KT – £49.95
parallel-mode Assembled Order Code: AS3108 – £59.95
(PIC16C5x family)*
Programmed PIC Controllers & Loggers Infra-red RC 12-Channel Relay Board
micro controllers. Control 12 on-board relays
Free fully functional Here are just a few of the controller and data with included infra-red
software. Blank chip auto detect for super acquisition and control units we have. remote control unit. Toggle
fast bulk programming. Parallel port connec- See website for full details. Suitable PSU for or momentary. 15m+ range.
tion. Supply: 16-18V dc. all units: Order Code PSU445 – £8.95 112 x 122mm.
Assembled Order Code: AS3117 – £39.95 Supply: 12VDC/0·5A.
Kit Order Code: 3142KT – £39.95
Rolling Code 4-Channel UHF Remote Assembled Order Code: AS3142 – £49.95
ATMEL 89xxx Programmer
Uses serial port and any State-of-the-Art. High security.
4 channels. Momentary or PC Data Acquisition & Control Unit
standard terminal comms
latching relay output. Range Monitor and log a
program. 4 LEDs display
up to 40m. Up to 15 TXs can mixture of analogue
the status. ZIF sockets
be learned by one Rx (kit and digital inputs
not included. Supply:
includes one Tx but more and control external
16VDC.
available separately). devices via the ana-
Kit Order Code: 3123KT – £29.95
4 indicator LEDs. logue and digital
Rx: PCB 77x85mm, 12VDC/6mA (standby). outputs. Monitor
NEW! USB & Serial Port PIC Programmer Two & Ten Channel versions also available. pressure, tempera-
USB/Serial connection. Kit Order Code: 3180KIT – £39.95 ture, light intensity, weight, switch state,
Header cable for ICSP. Free Assembled Order Code: AS3180 – £47.95 movement, relays, etc. with the apropriate
Windows software. See web- sensors (not supplied). Data can be
site for PICs supported. ZIF Computer Temperature Data Logger processed, stored and the results used to
Socket and USB Plug A-B Serial port 4-channel tem- control devices such as motors, sirens,
lead extra. 18VDC. perature logger. °C or °F. relays, servo motors (up to 11) and two
Kit Order Code: 3149KT – £34.95 Continuously logs up to 4 stepper motors.
Assembled Order Code: AS3149 – £49.95 separate sensors located
200m+ from board. Wide Features
range of free software appli-  11 Analogue Inputs – 0·5V, 10 bit (5mV/step)
USB Flash ICSP PIC Programmer  16 Digital Inputs – 20V max. Protection 1K in
Fully assembled version of cations for storing/using data.
PCB just 38x38mm. Powered series, 5·1V Zener
our 3128 USB Flasher
by PC. Includes one DS1820 sensor and  1 Analogue Output – 0-2·5V or 0-10V. 8 bit
PIC Programmer but (20mV/step)
four header cables.
WITHOUT the pre-
Kit Order Code: 3145KT – £16.95  8 Digital Outputs – Open collector, 500mA, 33V
gramming socket. It max
just has 5-pin ICSP Assembled Order Code: AS3145 – £23.95  Custom box (140 x 110 x 35mm) with printed
header (GND, VCC, Additional DS1820 Sensors – £3.95 each front & rear panels
CLK, DAT, VPP) and  Windows software utilities (3·1 to XP) and
cable. No external programming examples
PSU required. Free  Supply: 12V DC (Order Code PSU203)
Windows software. Most items are available in kit form (KT suffix)
or pre-assembled and ready for use (AS prefix). Kit Order Code: 3093KT – £64.95
Order Code: AS3182 – £37.95 Assembled Order Code: AS3093 – £94.95
Hot New Kits This Summer! FM Bugs & Transmitters
Here are a few of the most recent kits Our extensive range goes from discreet
CREDIT
added to our range. See website or join our surveillance bugs to powerful FM broadcast CARD
email Newsletter for all the latest news. transmitters. Here are a few examples. All
can be received on a standard FM radio SALES
and have adjustable transmitting frequency.
NEW! EPE Ultrasonic Wind Speed Meter 0871
Solid-state design
wind speed meter MMTX’ Micro-Miniature 9V FM Room Bug 717
(anemometer) that Our best selling bug! Good
uses ultrasonic performance. Just 25 x 15mm.
7168
techniques and has Sold to detective agencies
no moving parts worldwide. Small enough to Helping you make the right connections!
and does not need hide just about anywhere.
calibrating. It is intended for sports-type Operates at the ‘less busy’ top
activities, such as track events, sailing,
end of the commercial FM waveband and Electronic Project Labs
hang-gliding, kites and model aircraft flying, Great introduction to the world of electron-
to name but a few. It can even be used to also up into the more private Air band.
Range: 500m. Supply: PP3 battery. ics. Ideal gift for budding electronics expert!
monitor conditions in your garden. The probe
is pointed in the direction from which the Kit Order Code: 3051KT – £8.95
wind is blowing and the speed is displayed Assembled Order Code: AS3051 – £14.95 500-in-1 Electronic Project Lab
on an LCD display. This is the top of the range
HPTX’ High Power FM Room Bug and is a complete electronics
Specifications Our most power- course taking you from
 Units of display: metres per second, feet per beginner to ‘A’ level standard
ful room bug.
second, kilometres per hour and miles per hour and beyond! It contains all
Very Impressive
• Resolution: Nearest tenth of a metre the parts and instruc-
• Range: Zero to 50mph approx. performance. Clear and stable output signal
thanks to the extra circuitry employed. tions to assemble 500
Based on the project published in Everyday Range: 1000m @ 9V. Supply: 6-12V DC (9V projects. You get three
Practical Electronics, Jan 2003. We have comprehensive course books
PP3 battery clip suppied). 70 x 15mm.
made a few minor design changes (see web (total 368 pages) – Hardware Entry Course,
Kit Order Code: 3032KT – £9.95 Hardware Advanced Course and a micro-
site for full details). Power: 9VDC (PP3 bat- Assembled Order Code: AS3032 – £17.95
tery or Order Code PSU345). computer based Software Programming
Main PCB: 50 x 83mm. Course. Each book has individual circuit
MTTX’ Miniature Telephone Transmitter explanations, schematic and assembly dia-
Kit Order Code: 3168KT – £34.95 Attach anywhere grams. Suitable for age 12 and above.
along phone line. Order Code EPL500 – £149.95
NEW! Audio DTMF Decoder and Display
Tune a radio into the 30, 130, 200 and 300-in-1 project labs also
Detects DTMF
tones via an signal and hear available – see website for details.
on-board electret exactly what both parties are saying.
microphone or Transmits only when phone is used. Clear,
direct from the stable signal. Powered from phone line so Number 1 for Kits!
phone lines through completely maintenance free once installed.
Requires no aerial wire – uses phone line as With over 300 projects in our range we are
the onboard audio
transformer. The antenna. Suitable for any phone system the UK’s number 1 electronic kit specialist.
numbers are displayed on a 16-character, worldwide. Range: 300m. 20 x 45mm. Here are a few other kits from our range.
single line display as they are received. Up Kit Order Code: 3016KT – £7.95
to 32 numbers can be displayed by scrolling Assembled Order Code: AS3016 – £13.95
the display left and right. There is also a 1046KT – 25W Stereo Car Booster £29.95
serial output for sending the detected tones 3087KT – 1W Stereo Amplifier £6.95
3 Watt FM Transmitter
to a PC via the serial port. The unit will not 3105KT – 18W BTL mono Amplifier £9.95
Small, powerful FM
detect numbers dialled using pulse dialling. transmitter. Audio 3106KT – 50W Mono Hi-fi Amplifier £23.95
Circuit is microcontroller based. preamp stage and 3143KT – 10W Stereo Amplifier £10.95
Supply: 9-12V DC (Order Code PSU345). three RF stages 1011-12KT – Motorbike Alarm £12.95
Main PCB: 55 x 95mm. 1019KT – Car Alarm System £12.95
deliver 3 watts of RF
Kit Order Code: 3153KT – £17.95 1048KT – Electronic Thermostat £9.95
Assembled Order Code: AS3153 – £29.95 power. Can be used
with the electret 1080KT – Liquid Level Sensor £6.95
microphone supplied or any line level audio 3003KT – LED Dice £7.95
NEW! EPE PIC Controlled LED Flasher source (e.g. CD or tape OUT, mixer, sound 3006KT – LED Roulette Wheel £9.95
This versatile card, etc). Aerial can be an open dipole or 3074KT – 8-Ch PC Relay Board £24.95
PIC-based LED Ground Plane. Ideal project for the novice 3082KT – 2-Ch UHF Relay £30.95
or filament bulb wishing to get started in the fascinating 3126KT – Sound-Activated Relay £8.95
flasher can be world of FM broadcasting. 45 x 145mm. 3063KT – One Chip AM Radio £11.95
used to flash Kit Order Code: 1028KT – £23.95 3102KT – 4-Ch Servo Motor Driver £15.95
from 1 to 160 Assembled Order Code: AS1028 – £31.95 3155KT – Stereo Tone Controls £11.95
LEDs. The user arranges the LEDs in any
pattern they wish. The kit comes with 8 1096KT – 3-30V, 5A Stabilised PSU £32.95
25 Watt FM Transmitter 3029KT – Combination Lock £7.95
superbright red LEDs and 8 green LEDs. Four transistor based stages with a Philips
Based on the Versatile PIC Flasher by Steve 3049KT – Ultrasonic Detector £14.95
BLY89 (or equivalent) in the final stage.
Challinor, EPE Magazine Dec ’02. See web- 3130KT – Infra-red Security Beam £13.95
Delivers a mighty 25 Watts of RF power.
site for full details. Board Supply: 9-12V DC. Accepts any line level audio source (input SG01MKT – Train Sounds £6.95
LED supply: 9-45V DC (depending on SG10 MKT – Animal Sounds £5.95
sensitivity is adjustable). Antenna can be an
number of LED used). PCB: 43 x 54mm. 1131KT – Robot Voice Effect £9.95
Kit Order Code: 3169KT – £11.95 open dipole, ground plane, 5/8, J, or YAGI
configuration. Supply 12-14V DC, 5A. 3007KT – 3V FM Room Bug £6.95
Supplied fully assembled and aligned – just 3028KT – Voice-Activated FM Bug £11.95
connect the aerial, power and audio input. 3033KT – Telephone Recording Adpt £8.95
Most items are available in kit form (KT suffix) 70 x 220mm. 3112KT – PC Data Logger/Sampler £18.95
or assembled and ready for use (AS prefix) Order Code: AS1031 – £134.95 3118KT – 12-bit Data Acquisition Unit £49.95
3101KT – 20MHz Function Generator £69.95

www.quasarelectronics.com
No.1
FOR

KITS Secure Online Ordering Facilities  Full Product Listing, Descriptions & Photos  Kit Documentation & Software Downloads
UK readers you can

SAVE 71p
on every issue of EPE
How would you like to pay £2.58 instead of £3.30 for your copy of EPE?
Well you can – just take out a one year subscription and save over 71p an issue,
or £8.60 over the year
You can even save over 92p an issue if you subscribe for two years
– a total saving of £22.20 STA
RTIN
Overseas rates also represent exceptional value SOO G
You also: TEA N
ɀ Avoid any cover price increase for the duration of
CH
200 -IN
your subscription 6
ENR
ɀ O
NOW L
Get your magazine delivered to your door each month
ɀ Ensure your copy, even if the newsagents sell out !
Order by phone or fax with a credit card or by post with a cheque or postal order, or
buy on-line from www.epemag.co.uk (click on “Subscribe Now”)

SUBSCRIPTION ORDER
EPE SUBSCRIPTION PRICES FORM
Subscriptions for delivery direct to any address in the UK:
6 months £16.50, 12 months £31, two years £57; Overseas: 6 Months: UK £16.50, Overseas £19.50
6 months £19.50 standard air service or £28.50 express airmail, (standard air service), £28.50 (express airmail)
12 months £37 standard air service or £55 express airmail, 1 Year: UK £31.00, Overseas £37.00 (standard air service)
24 months £69 standard air service or £105 express airmail. £55 (express airmail)
Cheques or bank drafts (in £ sterling only) payable to Everyday 2 Years: UK £57.00, Overseas £69.00 (standard air service)
Practical Electronics and sent to EPE Subs. Dept., Wimborne £105 (express airmail)
Publishing Ltd., 408 Wimborne Road East, Ferndown, Dorset To: Everyday Practical Electronics,
BH22 9ND. Tel: 01202 873872. Fax: 01202 874562. Email: Wimborne Publishing Ltd., 408 Wimborne Road East,
[email protected]. Also via the Web at
Ferndown, Dorset BH22 9ND
http://www.epemag.co.uk. Subscriptions start with the next
available issue. We accept MasterCard, Amex, Diners Club, Tel: 01202 873872 Fax: 01202 874562
Maestro or Visa. (For past issues see the Back Issues page.) E-mail: [email protected]

I enclose payment of £ ........... (cheque/PO in £ sterling


ONLINE SUBSCRIPTIONS only), payable to Everyday Practical Electronics
Online subscriptions, for downloading the magazine via the
Internet, $14.99US (approx. £8) for one year available from
www.epemag.com. My card number is: .......................................................................
Please print clearly, and check that you have the number correct

USA/CANADA SUBSCRIPTIONS
Signature .........................................................................................
To subscribe to EPE from the USA or Canada please telephone
Express Mag toll free on 1877 363-1310 and have your credit
card details ready. Or fax (514) 355 3332 or write to Express Mag, Card Security Code .................. (The last 3 digits on or just under the
PO Box 2769, Plattsburgh, NY 12901-0239 or Express Mag, signature strip)
8155 Larrey Street, Anjou, Quebec, H1J 2L5.
Email address: [email protected]. Card Ex. Date ..................................... Maestro Issue No. ..............
Web site: www.expressmag.com.
USA price $60(US) per annum, Canada price $97(Can) per
annum – 12 issues per year. Name ...............................................................................................
Everyday Practical Electronics, periodicals pending, ISSN 0262 3617 is
published twelve times a year by Wimborne Publishing Ltd., USA agent
USACAN at 1320 Route 9, Champlain, NY 12919. Subscription price in US Address ...........................................................................................
$60(US) per annum. Periodicals postage paid at Champlain NY and at
additional mailing offices. POSTMASTER: Send USA and Canada address
changes to Everyday Practical Electronics, c/o Express Mag., PO Box Post code ................................. Tel. ..............................................
2769, Plattsburgh, NY, USA 12901-0239.
Subscriptions can only start with the next available issue.

598 Everyday Practical Electronics, September 2005


EE276 135 Hunter Street, Burton-on-Trent, Staffs. DE14 2ST
Tel 01283 565435 Fax 546932
http://www.magenta2000.co.uk
E-mail: [email protected]
All Prices include V.A.T. ADD £3.00 PER ORDER P&P. £6.99 next day

MAIL ORDER ONLY • CALLERS BY APPOINTMENT


PIC PIPE DESCALER
EPE PROJECT PICS
Programmed PICs for *EPE Projects
 SIMPLE TO BUILD
 HIGH POWER OUTPUT
 SWEPT
FREQUENCY
EPE
12C508/9 – £3.90; 16F627/8 – £4.90
16C84/16F84/16C71 – £5.90
16F876/877 – £10.00
 AUDIO & VISUAL MONITORING
An affordable circuit which sweeps
the incoming water supply with
TEACH-IN
All inc. VAT and Postage
(*Some projects are copyright)
variable frequency electromagnetic
signals. May reduce scale formation,
dissolve existing scale and improve
lathering ability by altering the way
2000
salts in the water behave. Full set of top quality NEW
EPE MICROCONTROLLER Kit includes case, P.C.B., coupling components for this educa-
P.I. TREASURE HUNTER
coil and all components. tional series. All parts as
High coil current ensures maximum specified by EPE. Kit includes
The latest MAGENTA DESIGN – highly effect. L.E.D. monitor.
stable & sensitive – with I.C. control of all breadboard, wire, croc clips,
timing functions and advanced pulse KIT 868 ....... £22.95 POWER UNIT......£3.99 pins and all components for
separation techniques. experiments, as listed in
 High stability
drift cancelling MICRO PEsT introduction to Part 1.
*Batteries and tools not included.
 Easy to build
& use
SCARER
 No ground Our latest design – The ultimate TEACH-IN 2000 -
effect, works scarer for the garden. Uses
in seawater special microchip to give random KIT 879 £44.95
delay and pulse time. Easy to
build reliable circuit. Keeps pets/
pests away from newly sown areas,
MULTIMETER £14.45
play areas, etc. uses power source
from 9 to 24 volts.

EE
 RANDOM PULSES SPACEWRITER

PP
 Detects gold,

RO
NOM C
 HIGH POWER An innovative and exciting project.

W HIP
silver, ferrous & Wave the wand through the air and

W &
 DUAL OPTION Plug-in power supply £4.99

IT S
non-ferrous

H O
your message appears. Programmable

PI FT
metals to hold any message up to 16 digits long.

C1 W
KIT 867. . . . . . . . . . . . . . . . . . . . . . . . . . . . .£19.99

6C AR
Comes pre-loaded with “MERRY XMAS”. Kit

84 E
 Efficient quartz controlled includes PCB, all components & tube plus
microcontroller pulse generation. KIT + SLAVE UNIT. . . . . . . . . . . . . . . . . . . .£32.50

DI
instructions for message loading.

SK
 Full kit with headphones & all
hardware WINDICATOR KIT 849 . . . . . . . . . . . .£16.99
KIT 847 . . . . . . . . .£63.95 A novel wind speed indicator with LED readout. Kit comes
complete with sensor cups, and weatherproof sensing head.
Mains power unit £5.99 extra. 12V EPROM ERASER
A safe low cost eraser for up to 4 EPROMS at a
DEVELOPMENT KIT 856. . . . . . . . . . . . . . . . . . . . . . . . . . . . .£28.00
68000 time in less than 20 minutes. Operates from a
12V supply (400mA). Used extensively for mobile

 TENS UNIT 
TRAINING KIT work - updating equipment in the field etc. Also in
educational situations where mains supplies are
 NEW PCB DESIGN not allowed. Safety interlock prevents contact
 8MHz 68000 16-BIT BUS with UV.
 MANUAL AND SOFTWARE
 2 SERIAL PORTS DUAL OUTPUT TENS UNIT Set of KIT 790 . . . . . . . . . . . .£29.90
 PIT AND I/O PORT OPTIONS As featured in March ’97 issue. 4 spare
 12C PORT OPTIONS electrodes
Magenta have prepared a FULL KIT for this.
excellent new project. All components, PCB,
£6.50 SUPER BAT
hardware and electrodes are included. DETECTOR
KIT 621 Designed for simple assembly and testing and
providing high level dual output drive. 1 WATT O/P, BUILT IN
£99.95 KIT 866. . Full kit including four electrodes £32.90 SPEAKER, COMPACT CASE
 ON BOARD 20kHz-140kHz
5V REGULATOR NEW DESIGN WITH 40kHz MIC.
 PSU £6.99 1000V & 500V INSULATION A new circuit using a
 SERIAL LEAD £3.99
TESTER ‘full-bridge’ audio
amplifier i.c., internal
Superb new design. Regulated speaker, and
headphone/tape socket.
output, efficient circuit. Dual-scale The latest sensitive
Stepping Motors meter, compact case. Reads up to transducer, and ‘double
200 Megohms. balanced mixer’ give a
MD100..Std 100 step..£9.99 Kit includes wound coil, cut-out stable, high perfor-
case, meter scale, PCB & ALL mance superheterodyne design.
MD200...200 step...£12.99
MD24...Large 200 step...£22.95
components. KIT 861 . . . . . . . . . . .£34.99
KIT 848. . . . . . . . . . . . £32.95 ALSO AVAILABLE Built & Tested. . . £48.99

ULTRASONIC PEsT SCARER


MOSFET MkII VARIABLE BENCH SIMPLE PIC
Keep pets/pests away from newly
POWER SUPPLY 0-25V 2·5A sown areas, fruit, vegetable and PROGRAMMER
Based on our Mk1 design and flower beds, children’s play areas,
preserving all the features, but patios etc. This project produces KIT 857... £12.99
now with switching pre- intense pulses of ultrasound which
regulator for much higher effi- deter visiting animals.
ciency. Panel meters indicate Includes PIC16F84 chip
Volts and Amps. Fully variable  KIT INCLUDES ALL disk, lead, plug, p.c.b.,
down to zero. Toroidal mains COMPONENTS, PCB & CASE
transformer. Kit includes  EFFICIENT 100V  UP TO 4 METRES
all components and
punched and printed case and TRANSDUCER OUTPUT RANGE instructions
all parts. As featured in April  COMPLETELY INAUDIBLE  LOW CURRENT
1994 EPE. An essential piece TO HUMANS Extra 16F84 chips £3.84
DRAIN
of equipment. Power Supply £3.99
Kit No. 845 . . . . . . . .£64.95 KIT 812. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . £15.00
PIC LCD DISPLAY DRIVER
16 Character x 2 Line display, pcb, pro-
grammed PIC16F84, software disk and
• Learn how to drive the display and write
your own code.
20W Amp. Module
all components to experiment with stand- • Ideal development base for meters, calcu- EPE May ‘05 -- Superb Magenta Stereo/Mono Module
ard intelligent alphanumeric displays. lators, counters, timers --- just waiting for
Includes full PIC source code which can your application! Wide bandwidth Low distor-
be changed to match your application. • Top quality display with industry stand- tion 11W /channel Stereo 20W
ard driver, data and instructions Mono True (rms) Real Power
KIT 860.....£19.99
Short Circuit & Overheat Pro-
PIC STEPPING MOTOR DRIVER tected. Needs 8 to 18V supply.
PCB with components and PIC16F84 Use this project to develop your own ap- Stable Reliable design
programmed with demonstration software plications. PCB allows ‘simple PIC pro-
to drive any 4 phase unipolar motor up to grammer’ ‘SEND’ software to be used to Latest Technology IC with lo-
24 Volts at 1 Amp. Kit includes 100 reprogram chip. cal feedback gives very high
Step Hybrid Stepping Motor Full soft-
performance.
ware source code supplied on disc. KIT 863.........£18.99
KIT 914 (all parts & heatsink for stereo or mono) £11.90
8 CHANNEL DATA LOGGER
From Aug/Sept.’99 EPE. Featuring 8 analogue inputs and serial data transfer to PC.
Magenta redesigned PCB - LCD plugs directly onto board. Use as Data Logger or as a
test bed for developing other PIC16F877 projects. Kit includes lcd, progd. chip, PCB,
Case, all parts and 8 x 256k EEPROMs
Magenta BrainiBorg
KIT 877.........£49.95 A super walking programmable robot with eyes that sense obstacles and daylight:
BrainiBorg comes with superb PC software CD (WIN95+ & XP) and can be pro-
grammed to walk and respond to light and obstacles on any smooth surface.
PIC16F84 MAINS POWER CONTROLLER
& 4 CHANNEL LIGHT CHASER / DIMMER CD contains illustrated constructional
details, operating principles, circuits
• Zero Volt Switching • With program source code disk. and a superb Educational Program-
• Opto-Isolated 5 Amp HARD FIRED • Chase Speed and dimming potentiom- ming Tutorial.
TRIACS eter controls.
• 12 Way keypad Control • Reprogram for other applications Test routines give real-time ‘scope
traces of sensor and motor signals.
KIT 855.........£39.95 Connects to PC via SERIAL port with
the lead supplied.
EPE MARCH APRIL MAY ‘98
PIC TUTOR 1 PIC16F84 STARTER SERIES
Kit includes all hardware, components, 3 motor/gearboxes.
Uses 4 AA batteries (not supplied). An Ideal Present!
The original PIC16F84 series by John Becker. Magenta’s Tutor board has individual
switches and leds on all portA and PortB lines, plus connectors for optional 4 digit seven KIT 912 Complete Kit with CD rom & serial lead £49.99
segment led display, and 16 x 2 intelligent lcd. Written for newcomers to PICs this series.
Disk has over 20 tutorial programs. Connect to a PC parallel port, send, run, and KIT 913 As 912 but built & tested circuit board £58.95
experiment by modifying test programs - Then Write and Program your Own

KIT 870... £27.95, Built...£42.95


16x2 LCD..£7.99. LED display..£6.99. 12VPSU..£3.99
EPE PIC Tutorial
EPE Apr/May/Jun ‘03 and PIC Resources CD
• Follow John Becker’s excellent PIC toolkit 3 series.
SUPER PIC PROGRAMMER • Magenta Designed Toolkit 3 board with printed component
Magenta’s original parallel port programmer. Runs with down- layout, green solder mask, places for 8,18, 28 (wide and slim),
loaded WINDOWS 95 - XP software. Use standard Microchip and 40 pin PICs. and Magenta extras.
.HEX files. Read/Prog/Verify wide range of 18,28,and 40 pin PICs. • 16 x 2 LCD, PIC chip all components and sockets included.
Including 16F84/876/877, 627/8, (Inc. ‘A’ versions) + 16xx OTPs.
KIT 880 (with 16F84) £34.99, built & tested £49.99
KIT 862... £29.99 Power Supply £3.99
KIT 880 (with 16F877) £39.99, built & tested £55.99
ICEBREAKER EPE TEACH-IN 2004
THE LATEST NOV 03 SERIES Additional Parts as listed in
All parts to follow this new Edu- ‘misc.’ Section (less RF mod-
cational Electronics Course. ules, Lock, and Motor/g.box)
Inc. Breadboard, and wire, as
listed on p752 Nov. Issue. Reprints: £1.00 per part.
KIT 920..........£29.99 KIT921.........£12.99

MAGENTA BRAINIBOT I & II


• Full kit with ALL hardware and
electronics.
• As featured in EPE Feb ‘03 (KIT
910)

PIC Real Time •
Seeks light, beeps, and avoids
obstacles
Spins and reverses when
In-Circuit Emulator •
‘cornered’’
Uses 8 pin PIC chip
• ICEbreaker uses PIC16F877 in-circuit Programs can be written, downloaded, • ALSO KIT 911 - As 910 PLUS
debugger. and then tested by single-stepping, run- programmable from PC serial port
• Links to standard PC Serial port (lead ning to breakpoints, or free run at up to leads and software CD included.
supplied). 20Mhz.
• Windows (95 to XP) Software included Full emulation means that all ports re- KIT 910....£16.99 KIT 911....£24.99
• Works with MPASM assembler spond immediately - reading and driv-
16 x 2 LCD display, Breadboard, Relay, ing external hardware.
I/O devices and patch leads. Features include: Run; set Breakpoint;
View & change registers, EEPROM, and
Featured in EPE Mar’00 Ideal for begin- program memory; load program; ‘watch
ners & experienced users. window’ registers.

KIT 900...£34.99 With serial lead & software disk, PCB, Breadboard,
PIC16F877, LCD, all components and patch leads.
POWER SUPPLY - £3.99 STEPPING MOTOR 100 Step £9.99 All prices include VAT. Add £3.00 p&p. Next day £6.99
Tel: 01283 565435 Fax: 01283 546932 email: [email protected]
072005

See Next / Last Months Ad. for


PCB Production - Processing Equipment PCB Production - Laminates

ELECTRONIC COMPONENTS
We carry a large range of the photographic & chemical Copper clad - paper
processing equipment for PCB production, a full list with Single sided low cost paper composite board
full technical specifications is available in our catalogue 100 × 160mm Board £0.44
or vist our web site. 100 × 220mm Board £0.62
UV Exposure units 160 x 233mm Board £1.02
2 x 8W Tubes, 6 min timer 220 x 233mm Board £1.40
229 x 159mm working area 8“ x 12” Board £1.70
Model 332-002 £88.78 Copper clad - glass fibre
4 x 15W Tubes, 7½ min timer Single & Double 1.6mm 305g/m²
330 x 260mm working area 100 × 160mm Single £0.85
Model 332-004 £194.51 100 × 220mm Single £1.25
Station Road, Cullercoats, Chemical Processing 160 x 233mm Single £2.29
Low cost plastic tray £1.80 220 x 233mm Single £2.88
Tyne & Wear, NE30 4PQ Process tanks feature electrically 8“ x 12” Single £3.44
operated pumps and/or heaters 100 × 160mm Double £0.88
Prices Exclude Vat @17½%. with thermostat control, suitable 100 × 220mm Double £1.25
UK Carriage £2.50 (less than 1kg) for boards upto 320 x 260mm. 160 x 233mm Double £2.30
£5.50 greater than 1kg Universal Tank with heater 220 x 233mm Double £2.90
Model 333-007 £161.60 8“ x 12” Double £3.50
Cheques / Postal orders payable to Bubble etch Tank with heater Photoresist Coated
ESR Electronic Components. & bubble pump. 1.6mm 35 micron Pre-coated with a high quality photo-
PLEASE ADD CARRIAGE & VAT TO ALL ORDERS Model 333-004 £198.50 Any of these items, carriage £5.50 resist layer. Available in low cost paper composite or
Glass fibre, Single & Double sided. Other sizes also
PCB Production - Development PCB Production - Tools available.
0.1” Copper Stripboard Drill Bits Paper Glass Fibre
Size Tracks/Holes HSS parallel shank bits available in sizes from 0.3mm to Size Single Double Single Double
25 x 64mm 9T / 25H £0.24 2.0mm 4 × 6” £1.47 £1.82 £1.89 £2.17
64 x 95mm 24T / 37H £0.87 0.3-0.95mm in 0.05mm steps £0.60ea £4.00/10 6 x 12” £4.20 £5.04 £5.60 £6.23
95 × 127mm 36T / 50H £1.41 1.0-2.0mm in 0.1mm steps £0.40ea £3.60/10 9 x 12” £6.30 £7.70 £8.40 £9.38
95 × 432mm 36T / 170H £4.39 HSS Reduced shank (2.35mm) bit available in sizes from 10 x 12” £8.19 £10.01 £10.78 £11.83
100 × 100mm 39T / 38H £1.40 0.6mm to 1.7mm in 0.1mm steps £0.84ea £7.60/10 12 x 12” £8.26 £10.08 £10.99 £12.25
100 × 500mm 39T / 199H £6.20 Reground Tngsten carbide reduced shank (3.2mm) avail- 100 x 160mm £2.38 £2.66
119 × 455mm 46T / 179H £5.40 able in sizes from 0.6 to 1.6mm in 0.1mm steps £1.90 203 x 114mm £3.01 £3.43
Stripboard track cutter £1.99 Drilling Machines 220 x 100mm £3.08 £3.71
Expo reliant 12V drill, 3.8mm capacity, 8400rpm £12.78 233 x 160mm £4.83 £5.32
Solderless Breadboard 233 x 220mm £6.83 £7.70
Tie Points & Size Power Rails Minicraft MX1 230V,
390 81 x 60mm 2 £2.75 8000 - 21000rpm with PCB Production - Chemicals
840 175 x 67mm 2 £4.86 chuck & collet. 100ml Aerosol Photoresist spray, covers 2m² £4.25
740 175 x 55mm 1 £4.03 Model EPE270-390 50g Powder developer, makes 1lt £1.09
640 175 x 42mm 0 £3.08 Normal price £48.51 500g Powder developer, makes 10lt £7.08
Many other sizes available, 250g Ferric Chloride Pellets, makes 500ml £1.68
also jump wires & matrix board. ** SPECIAL OFFER PRICE £31.02 ** 500g Ferric Chloride Pellets, makes 1lt £3.04
2.5kg Ferric Chloride Pellets, makes 5lt £9.84
PCB Production - Drafting Materials Servisol Products 1.1kg Clear Fine etch crystals, makes 5lt £17.58
A4 Artwork Film (per 10 sheets) Aerosols 90g Tin Plating Powder, makes 1lt £11.58
Clear Manual Film £1.25 200ml Switch Cleaner £1.96 200ml Aerosol Flux spray £3.41
Clear Laser Film £1.75 200ml Freezer £3.97 110ml Aerosol PCB Laquer spray £3.63
White HQ Laser Film £4.62 400ml Foam Cleanser £2.13
Etch Resist Pens 400ml Cleaner / lubricant £2.79 Magnifying Desk Lamp
“Dalo” Pen £2.98 75ml Vide Head Cleaner £1.94 A high quality scratch resistant
“Staedtler” Fine Pen £0.88 200ml Aero Klene £2.85 magnifying glass fitted to a bal-
Etch Resist Transfers 200ml Aero Duster £4.66 anced swivel arm and desk
Seno mixed DIL pads £2.24 250ml Cold Clean £3.14 mount. An integral flourescent
Seno mixed Rnd pads £2.24 200ml Label remover £3.52 tube provides illumination.
Alfac mixed pads £1.84 400ml Isopropyl alcohol £3.36 Magnification: 3x Lens: 120mmØ
Transfer Spatular £1.25 Tubes Tube: 22W Daylight simulation.
25g Heatsink Compound £2.60
We carry the full range of Seno & Alfac PCB transfers, 50g Silicone grease £2.50 Model: 028-205 £28.80
see our catalogue for full details.
Soldering Irons Tools - Cutters & Strippers
We carry in stock a wide range of soldering iron and
soldering accessories. Irons from 12 to 100 Watts. NEW CATALOGUE We carry a wide range of specialist tools for the elec-
tronics industry including:
20W 240V Basic
25W 240V Ceramic
30W 240V Basic
£3.74
£7.14
£4.68
OUT NOW Side Cutters
130mm Low cost
115mm Draper
£1.99
£2.38
115mm Box Jointed £4.26
Desolder Pumps available from www.esr.co.uk 145mm Long reach £3.40
Basic 165 x 18mmØ £2.85 Wire Strippers
Antistatic 195mm £3.92 130mm Low cost £2.30
Antex Mini 198mm £6.02 Educational Kits 150mm Draper 5mmØ £5.86
Antex Pro 210mm £10.26 These kits are an ideal way to start you interset in elec-
tronics. They freature re-useable components which are
attached via springs & wires and easy step by step Tools - Ratchet Crimping Pliers
Digital Multimeter
Model: 121-120 guides to make a range of exciting projects. The 300-in-1 High quality ratchet crimping pliers for various terminals
Price: £11.47 featurs a breadboard for more complex circuits. including Automotive, Data, Power and Data connections.
Red / Blue / Yellow £15.80
A highly featured digital BNC /TNC RF series £15.08
multitester for professional RJ11/12 Data Series £22.32
use. Offers 30 ranges and 8 RJ45 Data Series £20.43
functions including temper- RJ11/12 & 45 Series £12.64
ature, capacitance, diode, CK® Tools Crimp Pliers
continuity and hFE measure- Green/Red/Blue £24.38
ment. Large 3.5 digit LCD Red/Blue/Yellow £22.88
display with automatic po- 0.24-2.5mm² crimps £26.01
larity indicator. Supplied 0.5-6.0mm² crimps £26.01
with shrouded test leads, K Non insulated crimps £24.38
type temperature probe and
shock proof rubber holster. Cable - Ribbon
Technical Specifications 7/0.127mm Grey ribbon cable on a 0.05” 1.27mm pitch
DC voltage 200mV - 1000V with a red identifying stripe. Supplied by 305mm (1ft) or
(±0.5%) on full 30.5m (100ft) reels.
AC volts 2V - 700V (±0.8%) Size per 305mm per Reel
DC current 2mA - 20A (±1.2%) 30-in-1 £13.18 10 Way £0.10 £5.36
AC current 200mA - 20A 50-in-1 £16.80 14 Way £0.14 £7.50
(±1.8%) 130-in-1 £32.29 16 Way £0.16 £8.58
Resistance 200 Ohms - 20M 300-in-1 £55.20 20 Way £0.20 £10.72
Ohms (±0.8%) 26 Way £0.26 £13.94
Capacitance 2000pF - 20µF (±2.5%) Panel Meters 34 Way £0.34 £18.22
Temperature 0°C - 1000°C (±1.5%) High quality analogue panel meters, class 2, zero point 40 Way £0.40 £21.44
Frequency 20kHz (±1%) correction, mirror scale and prewired for panel illumina- 50 Way £0.50 £26.80
Max display 1999 tion. Meter size 46 x 60mm, Cutout size: 38mmØ. 60 Way £0.64 £33.92
Power supply 9V (PP3 battery) Range Int IDC Crimp tool £11.80
Dimensions 88 x 173 x 40 mm 0-50uA 6k5 All meters £5.89 each
0-100uA 1k0 6V Lamps £1.23 /pair CAT5e Networking
CCTV - Complete Systems 0-500uA 430 UTP Cable
We carry the full range of 0-1mA 200 305m Box, conforms to
Micromark Black & White and 0-10mA 2 6 CAT5E 100MHz standard,
Colour CCTV systems for the 0-50mA 1 2 ETA verified TIA/EIA 568-B.2
home or office. 0-100mA 0 65
These complete easy install sys- 0-500mA 0 12 Only £23.93 per box
tems are supplied complete with 0-1A 60m exc carriage.
power supply, cables and all fix- 0-3A 20m
ings. Simple plug-in connections, 0-5A 12m RJ45 Outlet Kit
for use with any TV or Video with 0-15A 4m Backing Box
a scart socket. 0-10V 10k 2 Gang Plate
0-15V 15k RJ45 Module
Black & White Systems 0-30V 30k Blank Module
from £22.97 ±50uA 1k9 Colour coded id
inserts.
CCTV - Black & White Module CCTV - Colour Module special price £2.99
A miniature CMOS camera module A miniature colour CMOS camera mod-
with a 3.6mm F2 Lens, video output & ule with a 3.6mm F1.2 Lens, video output Tools
power via connectors provided. & power via connectors provided. Plastic punch down tool
Specs (660-800) Specs (660-842) & cable stripper £1.40
Power: 12Vdc 50mA Power: 12Vdc 150mA Professional punch down
Video System: CCIR Video System: PAL IDC & trim tool £7.38
Pixels: 352 x 288 Pixels: 628 x 582
Min Illumination: 0.5Lux Min Illumination: 3Lux NOW In Stock
Video Output: 1 Vpp, 75 Video Output: 1 Vpp, 75 Patch & Cross-over leads from £0.50, Full range of outlet
Dims: 35 x 35 x 28mm 20g £16.60 Dims: 28 x 28 x 28mm 20g £36.33 modules/keystone outlets, switches & accessories.

Tel: 0191 2514363 Fax: 0191 2522296 Email: [email protected] http: //www.esr.co.uk

602 Everyday Practical Electronics, September 2005


Editorial Offices:
EVERYDAY PRACTICAL ELECTRONICS EDITORIAL
Wimborne Publishing Ltd., 408 Wimborne Road East, Ferndown,
Dorset BH22 9ND
Phone: (01202) 873872. Fax: (01202) 874562.
Email: [email protected]
Web Site: www.epemag.co.uk
EPE Online (downloadable version of EPE): www.epemag.com
EPE Online Shop: www.epemag.wimborne.co.uk/shopdoor.htm
See notes on Readers’Technical Enquiries below – we regret
lengthy technical enquiries cannot be answered over the tele-
phone.
Advertisement Offices:
EVERYDAY PRACTICAL ELECTRONICS ADVERTISEMENTS
VOL. 34 No. 9 SEPTEMBER 2005 408 Wimborne Road East, Ferndown, Dorset BH22 9ND
Phone: 01202 873872 Fax: 01202 874562
Email: [email protected]

The Wonders of Technology Editor: MIKE KENWARD


Deputy Editor: DAVID BARRINGTON
I’m sat by a swimming pool outside of a four star hotel in Cape Town, courtesy of Technical Editor: JOHN BECKER
South African Airways, writing this. I met our regular contributor Thomas Business Manager: DAVID J. LEAVER
Scarborough, who lives in Cape Town, a couple of days ago following a sports tour Subscriptions: MARILYN GOLDBERG
General Manager: FAY KEARN
I had been on with my wife, who coaches netball, and 21 netball and hockey play- Editorial/Admin: (01202) 873872
ers. Our flight home was cancelled due to an on-going strike by South African Advertising Manager:
Airways staff. Technology has allowed us to stay in touch with home and office dur- STEWART KEARN (01202) 873872
ing the tour and also allowed me to write this and zoom it around the world to be in On-Line Editor: ALAN WINSTANLEY
print a few days later. EPE Online (Internet version) Editors:
CLIVE (MAX) MAXFIELD and ALVIN BROWN
The problem is that, with all SAA International flights cancelled, we have no way
of getting everyone home for a few days until there is space on a BA flight. I guess READERS’ TECHNICAL ENQUIRIES
what we need is a teleport system but even if such a thing were possible it could still E-mail: [email protected]
be defeated by an operator’s strike! We are unable to offer any advice on the use,
purchase, repair or modification of commercial
equipment or the incorporation or modification
Problems of designs published in the magazine. We
regret that we cannot provide data or answer
The problems are further compounded by system overload when everyone wants queries on articles or projects that are more
to use their mobile phones or the Internet. Technology is great when everything is than five years old. Letters requiring a personal
fine but I don’t think we have yet got the systems we need when unusual circum- reply must be accompanied by a stamped
self-addressed envelope or a self-
stances result in exceptional use. And no doubt we will always be in the hands of addressed envelope and international reply
workers who might strike for better pay or conditions. coupons.
Meeting Thomas in Cape Town was a bonus of the tour, he presented me with an
unusual project for future publication and also demonstrated a prototype magnetic PROJECTS AND CIRCUITS
All reasonable precautions are taken to ensure
field detector which he is presently working on. I also met his son Matthew who is that the advice and data given to readers is
responsible for many of the ideas Thomas turns into working projects. reliable. We cannot, however, guarantee it and
EPE is truly international, not only in sales but also with contributors like the we cannot accept legal responsibility for it.
A number of projects and circuits published in
Reverend Thomas that provide the wide variety of unusual projects that make EPE EPE employ voltages than can be lethal. You
what it is today. should not build, test, modify or renovate
any item of mains powered equipment
unless you fully understand the safety
aspects involved and you use an RCD
adaptor.

COMPONENT SUPPLIES
We do not supply electronic components or
kits for building the projects featured, these
AVAILABILITY SUBSCRIPTIONS can be supplied by advertisers (see Shoptalk).
Copies of EPE are available on subscription Subscriptions for delivery direct to any address in the We advise readers to check that all parts
UK: 6 months £16.50, 12 months £31, two years £57; are still available before commencing any
anywhere in the world (see opposite), from all Overseas: 6 months £19.50 standard air service or
UK newsagents (distributed by COMAG) and project in a back-dated issue.
£28.50 express airmail, 12 months £37 standard air ser-
from the following electronic component retail- vice or £55 express airmail, 24 months £69 standard air
ers: Omni Electronics and Yebo Electronics service or £105 express airmail. To subscribe from the ADVERTISEMENTS
(S. Africa). EPE can also be purchased from USA or Canada see the last magazine page. Although the proprietors and staff of
retail magazine outlets around the world. An Online subscriptions, for downloading the magazine via EVERYDAY PRACTICAL ELECTRONICS take
the Internet, $14.99US (approx £8) for one year avail- reasonable precautions to protect the interests
Internet on-line version can be purchased and able from www.epemag.com.
downloaded for just $14.99US (approx £8) per of readers by ensuring as far as practicable
Cheques or bank drafts (in £ sterling only) payable to
year available from www.epemag.com Everyday Practical Electronics and sent to EPE Subs. that advertisements are bona fide, the maga-
Dept., Wimborne Publishing Ltd. 408 Wimborne Road zine and its Publishers cannot give any under-
East, Ferndown, Dorset BH22 9ND. Tel: 01202 873872. takings in respect of statements or claims
Fax: 01202 874562. Email: [email protected]. made by advertisers, whether these advertise-
Also via the Web at: http://www.epemag.wimborne.co.uk. ments are printed as part of the magazine, or
Subscriptions start with the next available issue. We accept in inserts.
MasterCard, Amex, Diners Club, Maestro or Visa. (For past
issues see the Back Issues page.) The Publishers regret that under no circum-
stances will the magazine accept liability for
BINDERS
Binders to hold one volume (12 issues) are available non-receipt of goods ordered, or for late
from the above address. These are finished in blue delivery, or for faults in manufacture.
p.v.c., printed with the magazine logo in gold on the
spine. Price £7.95 plus £3.50 p&p (for overseas readers TRANSMITTERS/BUGS/TELEPHONE
the postage is £6.00 to everywhere except Australia EQUIPMENT
and Papua New Guinea which cost £10.50). Normally
sent within seven days but please allow 28 days for We advise readers that certain items of radio
delivery – more for overseas. transmitting and telephone equipment which
Payment in £ sterling only please. Visa, Amex, Diners may be advertised in our pages cannot be
Club, Maestro and MasterCard accepted. Send, fax or legally used in the UK. Readers should check
phone your card number, card expiry date and card the law before buying any transmitting or
security code (the last 3 digits on or just under the sig- telephone equipment as a fine, confiscation of
nature strip), with your name, address etc. Or order on equipment and/or imprisonment can result
our secure server via our UK web site. Overseas cus-
tomers – your credit card will be charged by the card from illegal use or ownership. The laws vary
provider in your local currency at the existing from country to country; readers should check
exchange rate. local laws.

Everyday Practical Electronics, September 2005 603


Constructional Project

All-Band Radio
Thomas Scarborough

A no frills, low budget, easy-build, sensitive radio with excellent receptioin

O Mini Radio
NE might call this a “dog” of a A regenerative radio is interesting to
radio. It doesn't pretend to any work with. It might be compared with a At the heart of this radio circuit is the
finesse. It doesn’t have high fideli- manual car as opposed to an automatic. 4069UB (unbuffered) hex inverter i.c.
ty sound. However, it has good coverage, In addition to the customary Volume which is able to provide a powerful signal
and good sensitivity. Moreover, it is a control and Tuning dial, it has a third into a crystal earpiece. Therefore, the cir-
robust design that, unlike many others, Regeneration dial to control regenera- cuit obviously has the potential for minia-
does not depend on daintily wound coils, tion. Regeneration “regenerates” the turisation. With this in mind, the author
obscure parts, or a carefully constructed received signal, much as a child on a further designed a p.c.b. layout for a minia-
antenna. swing increases the energy of the swing ture radio (see Fig.4), and it remains to the
Built in Cape Town, South Africa, the with modest kicks of its legs. This type ingenuity of the constructor to fit this into
prototype All-Band Radio brought in a of radio was invented by Major a suitably small plastic case.
good many stations from all around the Armstrong in 1912, bringing about a vast
world – loud and clear. This included the improvement in radio receivers at that Circuit Description
BBC, the Voice of America, Radio time. As mentioned above, the heart of the cir-
China, Radio Iran, the Deutsche Welle, At first it was thought that the set’s cuit is represented by inverting buffer IC1a
and many more besides. Well into the maximum frequency would lie around (see Fig.1). Although this is classed as a
night, it even picked up local Australian 5MHz – that is, the shortwave 60 metre digital device, it may in some situations
stations on the medium waves. band. In practice, however, it picked up serve as an analogue amplifier up to sever-
radio stations above 7MHz. Therefore it al megahertz, albeit without the same qual-
Regeneration has the potential to tune in the following ity of reproduction as a dedicated analogue
Despite its simplicity, this regenera- bands: amplifier i.c.
tive set has sharper tuning and greater Long Wave The full circuit diagram for the All-Band
sensitivity than many other tuned radio Radio is shown in Fig.1. When a station is
frequency (t.r.f.) sets. On the medium Medium Wave
tuned in, variable capacitor VC1 and coil
waves, it works well even without an Marine Band 120 metres L1 resonate at the tuned frequency. In
external antenna or earth, although an 90 metres other words, they present a miniscule alter-
aerial may be attached to very good Short Wave 75 metres nating voltage to the input of IC1a through
effect. Also, while its volume is modest, 60 metres d.c. blocking capacitor C1. Therefore any
it is strong enough to serve as a bedside 49 metres activity in the tuned circuit unsettles both
radio, or in a small workshop. 41 metres the input and the output of IC1a, sending
ripples down the chain IC1a to IC1f, which
are amplified and demodulated as they go.
To bring about regeneration, the tuned
circuit is inserted in the feedback path of
IC1a, while resistor R1 and potentiometer
VR1 serve to balance IC1a at roughly half
the supply voltage. The higher the value of
VR1, the greater IC1a’s potential for being
unsettled, and the greater the regeneration
as the amplified signal at input pin 1 is
passed back through the tuned circuit via
output pin 2.
The purpose of regeneration is to rein-
force the r.f. signal through positive feed-
back. Not only does this make the signal
louder, but it also sharpens it a great deal.
As a matter of interest, Fig.2 shows how
this circuit might have looked if a more
standard tuned radio frequency (t.r.f.) con-
figuration had been used, and it would be
instructive to try this out. The result is
much vaguer tuning, and reduced volume.
When using the radio, regeneration
needs to be held as high as possible with-
Front panel controls for the full version of the All-Band Radio out introducing instability to the circuit.

604 Everyday Practical Electronics, September 2005


Such instability is manifested either enamelled copper wire close-wound on a inductance drops when inductors are wired
through “shrieks” or “juddering” in the 10mm diameter ferrite rod. This does not, in parallel, the frequency of the radio could
loudspeaker or earpiece. Generally speak- however, represent an ideal Q for the tuned be raised simply by wiring coils in parallel
ing, however, it will be possible most of circuit – more later. with the existing coil. Although this is not
the time to turn up regeneration to the max- In order to access higher frequencies, ideal, it is an easy way to experiment.
imum without this occurring. Regeneration thicker gauges of wire would be used, with
will be needed particularly if a longer aer- fewer turns, spaced out more widely on the Going Minature
ial is employed. ferrite rod, or even being air-spaced. The If the miniature version of the Radio
It is possible, with a small modification author accessed the 41 metre shortwave should be built, coil L1 may be com-
to the circuit, to introduce the most radical band with an air-spaced coil which was pressed by using a short stub of 10mm
regeneration, and therefore very sharp tun- wound on a 25mm diameter former, with diameter ferrite rod, pile-winding eighty to
ing (that is, high selectivity). This is done 10 turns of 24s.w.g. (0·56mm) enamelled a hundred turns of 30s.w.g. (0·315mm)
by wiring a 10 megohm resistor between copper wire. This was then stretched out to enamelled copper wire on the stub. The
IC1a pin 1 and IC1b pin 4. However, while 25mm from end to end. a.m. tuning capacitor may further be
this would take the All-Band Radio to its Don’t hesitate to wire up different coils miniaturised by wiring a trimmer capaci-
full potential, it would also make it tricky and a.m. tuning capacitors to see what the tor, in series with a small fixed value
to use in practice. In this case, R1 and VR1 circuit does with them. Also, try experi- capacitor, in its place. The fixed value
would best need to be tweaked for greater menting with different aerials, which could would need to be chosen experimentally so
ease of use. greatly increase the range of the radio. The as to pick up one’s chosen radio station or
Inverter IC1b serves to amplify the radio author picked up many distant stations by stations, since the tuning range would be
frequency (r.f.) signal, while diode D1 pro- winding a length of enamelled copper wire reduced in this case.
vides demodulation (that is, it extracts the a few times round his work room. Even a Theoretically, the tuner may be no more
audio signal). A common disadvantage of tree may serve well as an aerial. In the case than two metal plates with a dielectric (e.g. a
using a simple diode for demodulation is of the tree, the connection is made by sheet of plastic). Many years ago, the author
that this may kill weaker signals through sticking a pin through the bark. bought the Soviet Astrad Orion, which was
its voltage drop; hence the choice of a As a matter of interest, Raymond possibly the smallest radio ever to have
germanium type. Therefore before demod- Haigh’s, series Practical Radio Circuits become widely available. Out of curiosity, it
ulation is applied to this circuit, r.f. ampli- (EPE Sept ’03 P646) gives some examples was opened up to examine the tuning capac-
fier stage IC1b is added. Diode D1 thus of coils which could be tried to bring in itor, and a single metal plate fell out. This,
demodulates a far stronger r.f. signal, and different frequencies. Note also that since together with a plate on the front of the case,
far fewer stations are lost in the process. formed the tuning capacitor.

Tuning-In Q-Factor
One of the particular advantages of this In order to experiment intelligently with
design is that virtually any tuned circuit the All-Band Radio, one should best have
may be tried for VC1 and L1, on condition some understanding of the Q-factor. The
that this is tuned to less than about 8MHz. radio as shown (Fig.1) has been designed
So, for instance, various coils and a.m. for a relatively high Q, although it does not
tuners (tuning capacitors) may be pulled depend on this to work reasonably well.
out of junked radio circuits, and the major- A common definition of Q is “the ratio
ity would be likely to work, possibly with of the reactance of an inductor (in this case
interesting results. coil L1) to its effective series resistance at
The most commonly available a.m. tun- a given frequency”. However, a simple
ing capacitors typically have two separate way of putting this is that Q represents the
sections (that is, two variable capacitors “power” with which the tuned circuit res-
with one common terminal – ask your onates at a given frequency. As in many sit-
component shop to identify the terminal uations, it is one thing to get something to
pins). A tuned circuit for the medium work – it is another to get it to work
waves could use such a tuner with its two efficiently.
separate sections wired in parallel, togeth- The formulae for calculating the ideal Q
er with L1 which would be about eighty to are relatively complex, but two factors are
a hundred turns of 30s.w.g. (0·15mm) Fig.2. Standard t.r.f. configuration especially important for obtaining a good Q.

Fig.1. Complete circuit diagram for the “full version” of the All-Band Radio

Everyday Practical Electronics, September 2005 605


COMPONENTS
Resistors See
R1 1k SHOP
TALK Miscellaneous
R2 1M L1 80 to 100 turns 30s.w.g.
R3,R4 100k (2 off ) page
(0·315mm) enamelled
R5 47k copper wire on a ferrite rod,
R6 1M (see text) size 40mm x 10mm (see
All 0·25W 5% carbon film text)
Potentiometers LS1 8 ohm 1/2W miniature
VR1 1M min. carbon track loudspeaker
or conductive plastic, S1 min. on/off slider or toggle
5mm pitch switch
VR2 4k7 min. carbon track or S2 single-pole multi-way Band
conductive plastic, 5mm pitch selector switch (optional –
see text)
Capacitors
SK1 2·5mm or 3·5mm mono jack socket,
C1 10n polyester or ceramic chassis mounting (optional)
C2,C3,C5, X1 crystal earpiece optional – see text)
C8,C12 100n polyester or ceramic (5 off) B1 9V battery (PP3 type), with clips
C4,C6,C9 1n polyester or ceramic (3 off)
C7 1µ radial elect. 16V Printed circuit boards available from the EPE PCB Service,
C10,C11 100µ radial elect. 16V (2 off) codes 523(Full) and 524(Mini); case, size 130mm x 70mm x
VC1 126p, 141p a.m. variable, with trimmers 40mm approx. ( or to suit Mini version); 8-pin d.i.l. socket; 14-pin
(see text) d.i.l.socket; plastic knob (3 off); aerial wire; screened microphone
cable (about 30cm); cable ties; solder tag; solder pins; solder etc.
Semiconductors
D1 OA91 or similar germanium diode
IC1 4069UB (unbuffered) CMOS hex inverting Approx. Cost

IC2
buffer i.c.
LM386N-1 audio amplifier i.c.
Guidance Only £16
excl case and batts

The first is that fine wire should be used stages filters out high frequencies (includ- network would afford IC2’s internal tran-
for coil L1, or more exactly that skin effect ing radio frequencies) with the use of a sistors ought not to be missed here,
should be avoided – a complaint that small feedback capacitor (C4 and C6). A although constructors of a more nervous
applies to thicker wire gauges, and raises reduction of the values of these capacitors disposition might wish to wire a 10Ω resis-
the effective (a.c.) resistance of the coil. gives a “sharper” sound, arguably increas- tor and a 100nF capacitor in series from
Often, therefore, a coil is wound with sev- ing the clarity of reception. However, this IC2 output pin 5 to the 0V line.
eral strands of fine wire twisted together also increases hiss. The two spare inverter For the miniature version of the Radio,
but insulated from each other, being equiv- gates IC1d and IC1e (IC1 pins 9 and 11) IC2 is completely omitted, leaving a pow-
alent in their total cross-sectional area to are “tied high” to prevent any instability. erful “crystal” set which feeds a crystal ear-
the wires they replace. Note that because this circuit is based on piece (X1), via jack socket SK1, wired
A second factor is to maximise the influ- a cheap CMOS 4000-series i.c. instead of from IC1f output pin 12 to 0V – or an
ence of coil L1 on the tuned circuit, and to dedicated radio and audio i.c.s, its sound inductive earpiece may be used if it is
minimise capacitance and resistance. This quality suffers somewhat, in particular wired in series with a 1µF capacitor.
is done by minimising the value of variable through the introduction of hiss. However, The All-Band Radio’s quiescent current
capacitor VC1, and by maximising the for everyday listening, the quality is quite consumption is relatively high. The minia-
value of coil L1 – as well as minimising adequate. ture version of the radio draws about 30mA
any resistance in the tuned circuit. The two preamplifier stages are followed at 9V, while the fully built version with
Described from a practical point of view, by a Volume control (VR2) and a low-pass amplifier and speaker will consume
some tuned circuits will cause the All-Band filter (C9). A basic hazard of radio circuits upwards of 50mA, depending on the vol-
Radio to pick up stations at full volume, is that the audio amplifier might be fed ume. This means that an alkaline PP3 type
while others will cause it to pick them up with radio frequencies (r.f.) that have 9V battery might last ten or fifteen hours
more quietly. Therefore if you should slipped through the preceding stages, thus for the miniature version, and five or eight
decide to recycle a tuned circuit from overloading the amplifier. The amplifier hours for the fully built version.
another radio, it might be worth taking it thus works too hard with signals that the For regular use, therefore, a regulated
out of a full-sized radio set to obtain good listener is unable to hear. Therefore ade- mains-to-d.c. power supply (mains adap-
Q, and to choose a case for the All-Band quate filtering is important. Notice also the tor) might be considered. If there should be
Radio that is able to accommodate this. decoupling capacitors C8, C11, and C12, any hum as a result of using a power sup-
This will ensure a reasonably strong sound which are not used merely for “good prac- ply, a 10µF capacitor may be wired from
input to the loudspeaker. tice”, but make a noticeable difference to IC2 pin 7 to 0V, and this is likely to
It is known that the Q-factor suffers sound quality. improve matters significantly.
especially when miniaturising the tuned Using the popular LM386 audio ampli- Alternatively, a better quality supply might
circuit, and for this purpose, it is possible to fier i.c., IC2 is capable of providing up to need to be used.
increase the amplification of the All-Band about ½W r.m.s. at 9V into an 8 ohm loud-
Radio. Resistor R2 may be increased up to speaker. If desired, its gain may be Construction – Full Version
about 4M7, R3 may likewise be increased increased by wiring a capacitor between Since this is a radio circuit, it is of prime
up to about 4M7, and R4 may be increased pins 1 and 8 of IC2, the value of which importance that connections to off-board
a little (say to 220kΩ). may be between about 100nF and 10µF. components should be made with screened
The capacitor’s positive terminal is wired microphone cable. The screen is always
Audio Circuit to pin 1. taken to 0V where this applies. The wires
Two preamplifier stages (IC1c and IC1d) The usual Zobel network at the output is from L1 and the battery may be excepted
follow after the r.f. section. Their gain is set omitted for the sake of simplicity. The on condition that these are kept as short as
through resistors R3 and R4. Each of these small measure of protection which a Zobel reasonable.

606 Everyday Practical Electronics, September 2005


Fig.3. Printed circuit board component layout, full-size copper foil master and off-board wiring details for the full version of the
All-Band Radio

The printed circuit board ( p.c.b.) for the holes in the lid (rear) for the small loud- the tag to the p.c.b. This is used later to
fully built version measures 110mm × speaker and then attach it to the rear of the attach an aerial if desired. The author held
33mm, and the component layout, full-size lid (or elsewhere, if a larger case is used). the battery and ferrite coil L1 in place
copper foil master and wiring details are Make sure there is plenty of room between inside the case with cable ties, see photo-
shown in Fig.3. This board is available the rear of the speaker and the circuit graph below.
from the EPE PCB Service, code 523 board. If desired, a number of different coils for
(Full). Prepare a hole in one side wall for the L1 may be switched in and out of use, so as
Begin construction by soldering in posi- on-off switch S1. Drill a hole and bolt a to access the different bands. For this pur-
tion the eight solder pins, five resistors solder tag to the other side wall of the pose, a single-pole multi-way rotary switch
and twelve capacitors, taking note of the case, taking a short length of wire from would be used.
polarity of the electrolytics. Insert and
solder potentiometers VR1 and VR2 on
the p.c.b.
Lastly, solder the germanium diode D1
and the two i.c.s – observing anti-static pre-
cautions for both (ensure that your body
has been discharged to earth). The author
soldered the i.c.s directly to the p.c.b., for
the reason that this is a sensitive radio cir-
cuit, however readers can, if they wish, use
dual-in-line (d.i.l.) sockets.
Attach the loudspeaker LS1 and tuning
capacitor VC1 to the p.c.b. with suitable
lengths of microphone cable. Attach the
battery clip and on-off switch S1 as shown.
Solder the leads of coil L1 to the p.c.b.,
keeping these as short as possible.

Casing-Up
An ABS plastic case of approximately
130mm × 70mm × 40mm was used to
house the prototype p.c.b. Drill three holes
in the front (bottom) of the case for VR1, Internal component layout of the radio showing the battery and ferrite coil held in
VR2 and VC1. Drill a series of “sound” position with cable ties.

Everyday Practical Electronics, September 2005 607


Fig.4. Mini version p.c.b. component layout, wiring and
Completed Mini Radio circuit board copper foil master

Construction – Mini Version an hour or so. Any batteries from 6V to


12V may be used. A possible choice would
If there is excessive regeneration or
instability in the form of “shrieks” or “jud-
The p.c.b. component layout and full-
size copper foil master for the miniature be a standard small keyfob battery, the dering”, first try turning down the volume
version of the Radio, which measures a MN21 or A23. (VR2). If this does not restore stability,
mere 44mm × 23mm, is shown in Fig.4. reduce regeneration by slowly turning back
This board is also available from the EPE Set-Up and Use VR1. Once stability returns, the volume
PCB Service, code 524 (Mini). Begin the setting up procedure by turning may be turned up again. Regeneration
The mini version has potentially the the Regeneration control (VR1) fully clock- needs to be kept as high as possible, so that
same performance as the fully built ver- wise. Turn up the Volume control (VR2) to tuning is as sharp as possible.
sion, except that it uses an earpiece instead about half. Switch on – then turn the tuning
of a loudspeaker. A jack socket SK1 may be dial (VC1) until a station is tuned in.
used for the earpiece X1, or it may be sol- On the medium waves in Europe or
dered directly to the p.c.b., with a dab of North America, there should be no shortage
glue acting as a strain relief for X1’s leads. of stations even without an external aerial.
Commence construction by soldering in However, in Southern Africa or Australia,
position the seven solder pins and five stations may be relatively few and far
resistors. Note that Regen. control VR1 is between – perhaps just one or two until
replaced on this p.c.b. with a one megohm night falls and an aerial is attached. As with
(1MΩ) fixed value resistor, to conserve all medium and short wave sets, reception
space. A 1MΩ potentiometer may by all is very much improved at night, particular-
means be used instead. A 1MΩ fixed value ly as one approaches midnight.
resistor should not cause excessive regen- If without an external aerial nothing at
eration unless a particularly generous all is tuned in on the medium waves, try re-
length of aerial is used. orientating coil L1 for better reception. Once the All-Band Radio is working sat-
Next, insert and solder in position the Alternatively, L1 and tuning capacitor VC1 isfactorily, different coils may be substitut-
seven capacitors, the germanium diode D1 may not be covering the desired frequen- ed for L1, or these may simply be wired in
and IC1, again observing anti-static precau- cies, and another coil might be required. parallel with L1 as described earlier. Avoid
tions with the i.c. Coil L1 and tuning If, even with an aerial, nothing at all is attaching coils with crocodile clips, since
capacitor VC1 may be miniaturised as tuned in, check that all components are cor- such clips are bulky, and may lead to stray
described earlier. rectly placed on the p.c.b., and that there r.f. and capacitive effects that could kill
Finally, a suitable miniature slider or are no solder bridges or dry solder joints. reception completely. Rather use short
toggle type switch is wired up, together Since this is a sensitive radio circuit, it leads which are wired directly to the p.c.b.,
with a battery or batteries. Bear in mind might be worth briefly melting each joint or to solder tags close to the p.c.b.
that current consumption is relatively high, again with the soldering iron. Inadequate
and some smaller batteries might only last joints are seldom visible to the eye. Happy listening! អ

Group of air-spaced variable capacitors

608 Everyday Practical Electronics, September 2005


News . . . A roundup of the latest Everyday
News from the world of
electronics

SOUNDS OF THE FUTURE


As conventional audio sales decline, surprising technological alternatives
could soon be booming. Barry Fox reports

C ONFIDENTIAL trade figures from


JEIDA, the Japanese electronics
industry trade body, show conventional
Home audio sales are slowing world-
wide from 63.7m worldwide to 63m and
62.3m, of which 34.7m, 34.8m and 34.6m
Marantz had given Opsodis the opportu-
nity to talk to the press and demonstrate, to
get feedback. The Opsodis team, including
audio in terminal decline. Sales of multi- are mini/micro systems. Amplifier/receiver Chief Technical Officer Takashi Takeuchi,
speaker systems are flagging. The only sales are stagnant at 5.3m, 5.2m and 5.2m. clearly surprised Marantz by announcing
hope, Japanese manufacturer Marantz told that Marantz would “launch during next
European press and dealers at a seminar in Emotions to the Fore year”, that “many AV manufacturers will
Italy recently, is for the audio trade to take “So what are we going to do to increase join this sound revolution”, and “Marantz
the Swiss watch industry as a model and audio sales?” asks Ishiwata. “The best les- will lead the move”.
completely re-think its business strategy. son is from what happened in the 1970s During a hard-to-understand description
Apple has done it with iPod and Bose when the Japanese watch industry killed of the complex theory behind the system,
has done it with direct sales. Marantz will the Swiss manufacturer’s business. The Opsodis claimed “natural sound quality
not sell direct and Apple tightly controls Swiss came back by offering sexy, attrac- anywhere in a room ... with minimal
the iPod world. The challenge now is to tive products that created desire. It was manipulation” and even quoted a price –
find something for mainstream audio, about emotion. Eu 2500 for a “lifestyle” system including
admits Marantz. “Music is about emotion, too. You can’t a Marantz amplifier with built-in Opsodis
As part of the quest for something new buy Swiss watches on the Internet either. processor and front speaker units.
and appealing, Marantz gave the first It’s time for the specialist audio manufac-
demonstration of a system called Opsodis turers to do something like the Swiss watch Effective Demo – in Part
that was developed by Southampton industry. To make people say – ‘I want Demonstrations were given to groups of
University to deliver surround effects from that’. There has to be a different approach, only five journalists at a time sitting in the
three front speakers. which people feel something is different. room centre, in front of a plasma screen
Apple did it with the iPod. They took away and three bookshelf speakers laying on
Facts and Figures Sony’s market. I really hope we can see their sides like small coffins. The centre
The confidential trade figures came something similar in hi-fi. speaker has two tweeters (left and right)
from Marantz “Brand Ambassador” Ken “Bose have done a wonderful job from a and two mid-range units (left and right);
Ishiwata. Constrained by copyright, business point of view. They knew exactly there are two bass drivers in each of two
Ishiwata only flashed figures on screen for where they were going. They communicat- outer cabinets. The walls of the room were
quick hands to note. ed and created brand awareness. They damped to show that the system did not
Figures for world TV sales, he says, bypassed the distribution and were consis- rely on wall reflections.
show “no drastic drop in CRT sales yet”, tent. They are the most consistent company A demonstration recording of frogs at
especially in the US where they remain in audio”. the front and thunder at the rear was
“very significant”. China is now the Marantz will not even consider direct remarkably effective, and excerpts from
biggest TV market in the world, with 30.4 sales. “Our dealers are our partners” says martial arts fantasy House of Flying
million TV sets sold in 2004, 31.7m Ken Ishiwata. “We have a contract with Daggers sent fight and drum effects waft-
expected in 2005 and 33m anticipated for our European dealers. It was carefully ing round the room. But a recording of a
2006. checked with lawyers. B&O have a similar car driving away gave an image which was
A total of 147m TV sets of all kinds sold control system. If any dealer sells by mail hard to locate. My/our request to hear
in 2004, with 153m expected this year and order, or on the Internet, their contract is music through the system was refused.
190m predicted for 2009. Flat panel dis- terminated. “We have not prepared any music” said
plays were at 10.3m for 2004, 18m for “But there is nothing we can do if a mail Takeuchi.
2005 and 28.4 expected for 2006. order company buys from an authorised He also explained that the use of eight
Of total TV sales worldwide for 2004, dealer and then sells over the Internet” drivers at a spread of different horizontal
7% were flat panels in 2004, with 11.7% admits Ishiwata. “They do that so that they positions was necessary because different
this year and 17.6% due next year. But in can use our name in their lists. They lose frequencies should come from different
Japan the figures are 32%, 48% and 65% money by buying from an authorised deal- directions. “I would prefer more driver
for the same years; while in Western er and then selling on at below cost, but units – ideally an infinite number” said
Europe the figures are 11.6%, 18.9% and they make money in the long run by being Takeuchi.
26.7%, with the US at 9%, 15.8% and able to promise all brands.” Marantz staff said afterwards that they
24.3%. would only be interested in selling the
“The industry trend is towards $40 per Cancelling Surrounded system as a way to create pseudo sur-
inch for flat panels by the end of the Marantz is now evaluating a new tech- round from a lifestyle AV package, with
decade” says Ishiwata. nology called Opsodis, a commercial spin- a single small and stylish speaker unit at
The world market for DVD is still grow- off from Southampton University in the the front – not three large front boxes
ing, with 85m players sold in 2004, 91.6m UK. Opsodis builds on the well-known that users may well find more intrusive
selling in 2005 and 97.1 in 2006. VHS is crosstalk cancellation principle to create than small satellite speakers around the
collapsing from 16m last year to 11.5m in 3D surround from front speakers. Sound room. Terrie O’Connell, MD of Marantz
2005 and 8.2m next year, while DVD from the left channel is reversed in phase Europe, stressed that – despite what
recorder sales have risen from 8.5m in 2004 and added to the right channel so that it Opsodis was saying – Marantz is not yet
to 15.2m this year. There is no breakdown cancels out and the right ear hears only the committed to a launch in the form
from JEIDA on recorder format sales yet. right channel. demonstrated.

610 Everyday Practical Electronics, September 2005


USB PIC Programmer
Smart Radio Microchip has announced its PICkit 2
Starter Kit. This is a PIC development
RF Solutions have and experimentation module for use with
introduced a new intelli- PC’s having a USB connection, and
gent modem FM narrow- operating at full-speed USB 2.0. It does
band transceiver. TRXQ1 not require a separate power supply.
is their latest “Smart PICkit 2 comes with a set of easy-to-
Radio” that greatly sim- understand tutorials. In addition, it can
plifies the implementation easily plug into development boards via
of reliable wireless com- ICSP (In Circuit Serial Programming).
munications. An RF trans- For more information browse
ceiver-only version, the www.microchip.com/tools.
RXQ1 is also available.
The modules are able
to achieve data transfer
at up 20K Baud with a Rapid’s New Products
range of up to 200 Rapid Electronics have sent us their
metres. The TRXQ1 incorporates all also enhanced by excellent interference Summer Edition of New Products. In this
the functions of a complete radio rejection. They operate at 3V to 5V. edition you will find a wide range of
modem and simply requires For more information contact RF product introductions from leading sup-
CMOS/TTL data at its transmitting Solutions, Dept EPE, Unit 21, Cliffe pliers such as Weller, Flinder and Varta
input. A serial data interface with hand- Industrial Estate, South Street, Lewes, for instance. Rapid say that “your feed-
shake and on-board 190-byte buffer are E.Sussex BN8 6JL. Tel: 01273 898000. back has helped us to analyse your
included. Both modules can operate at Fax: 01273 480661 requirements, removing the products you
either 433·92MHz or 434·33MHz and Email: [email protected]. don’t want and introducing the ones you
are crystal controlled. Performance is Web: www.rfsolutions.co.uk. do.”
Rapid’s product portfolio now extends
to well over 32,000 tried and tested lines,
CONRAD’S COMPONENTS Gi’s a Job! which are constantly reviewed, refocused
We are pleased to welcome Conrad- An interesting press release has come in and extended.
Direct as an advertiser in EPE. Conrad about CVmailer.com, “an innovation for For more information contact Rapid
offer a wide variety of electronics finding work in electronics”. Electronics Ltd, Severalls Lane,
components and equipment, “from CVmailer is said to provide far more Colchester, Essex CO4 5JS. Tel: 01206
power supplies and components to benefits at a quarter of the price charged 751166. Fax: 01206 751188. Email:
circuits and accessories”. elsewhere. The software is free to down- sales@ rapidelec.co.uk.
Max Conrad founded the company in load and try, so the job seeker can evaluate Web: www.rapidelectronics.co.uk.
Germany in 1923, aiming to provide his the product before making a decision. Just
customers with everything they needed to by selecting “Electronics” and a geo-
listen to the radio – a newly-introduced graphical location, the user gets CVmailer MERG
feature at that time. Conrad’s first cata- to compose a fully amendable cover letter,
logue was introduced in 1936. personalised and sent with the CV to a The Model Electronic Railway Group
Conrad-Direct are currently also in named contact at an agency. (MERG) have written to thank us for our
Austria, France, Eastern Europe and now The database lists hundreds of agencies last mention of them, and to send their lat-
the UK. They supply their products to and the job seeker can choose how many est newsletter. We feel it’s good to mention
customers in more than 150 countries they want to contact. Carefully vetted MERG again now because of John
world-wide. recruiters are added and categorised daily. Waller’s Controlling Model Railway
In Conrad’s first advert with us (see CVmailer is easy to use, taking an aver- Signals article in this issue. John actually
elsewhere in this issue), you can obtain a age of 10 minutes to complete the process. joined MERG following our telling him
discount of 10% off orders valued at £30 or It works on all versions of Microsoft about the group.
more. You’ll also get the chance to win a Outlook and Outlook Express. So if you’re into model railways, any-
Voltcraft Multimeter worth £139 in For more information browse where in the world, why not find
Conrad’s Prize Draw! www.CVmailer.com or email out more about MERG, browsing
To find out more about Conrad, browse [email protected] (mention EPE). www.merg.org.uk.
www.conrad-direct.co.uk.

Jack Kilby Dies TI officials put the first circuit to the test
on 12 September 1958, with success. In
’Ear ’Ear! Jack Kilby, a retired engineer with 1960, TI announced the first chips for cus-
Well, we really have to agree with the Texas Instruments who invented the inte- tomer evaluation. Two years later, TI won
press release we’ve received from Bim grated circuit, died on 20 June 2005 in its first major i.c. contract to design and
Bam Banana – their Politician’s Ear Piece Dallas. He was 81. build a family of 22 special circuits for the
“alarm is probably one of the most ingen- Jack St. Clair Kilby invented the first Minuteman missile.
ious gadgets for people who nap and fall monolithic i.c., which was to become the Kilby officially retired from TI in 1983,
asleep when they are, for example, driving, foundation for modern microelectronics, but he continued to do consulting work
at a meeting, watching TV/video”! resulting in the world of miniaturization with the company. He held more than 60
The alarm sits on your ear and works as and integration that we know today. He was patents for a variety of electronics inven-
a spirit level. When you start nodding, it awarded the Nobel Prize in Physics in 2000 tions. Among them were the handheld
starts hooting and wakes you up immedi- for his role in the invention of the i.c. electronic calculator and the thermal
ately (and presumably those alongside you TI chairman Tom Engibous said, “If printer, both of which he co-invented. In
too – can’t be bad)! there was ever a seminal invention that addition to the Nobel Prize, he received
For $36 US, you can buy this astonish- transformed not only our industry but our numerous honours and awards for his con-
ing insomnia inducer, and other “latest world, it was Jack’s invention of the first tributions to science, technology and the
gadgets, fantastic innovations, funny giz- integrated circuit.” electronics industry.
mos and cool novelties” at the e-shop Kilby joined TI in 1958, and invented At the time of writing, a report can be read
www.bimbambanana.com, or you can the i.c. that year, apparently while many of at www.reed-electronics.com/electronic
find out more by emailing sales@bimbam- his colleagues were on holiday! Kilby and news/article/CA609808?nid=2019
banana.com (mention EPE).

Everyday Practical Electronics,September 2005 611


Constructional Project

Multicore Cable Tester


David Geary

Solving one of life’s mysteries – how to conveniently check lengthy


multicore cables

Design Motive
T
HE number of fairly complex mul- also a “quick check” for crossover wired
ticore cables in the home and the The idea for this Multicore Cable Tester cables.
workshop is steadily increasing. arose from the author’s apparent new
The workshop PC brings with it a printer, responsibility for an Ethernet network at The unit is designed to test cables
keyboard, mouse and monitor, possibly a his place of work. On changing a network having up to eight cores, with cables
network connection and probably a hub, one leg of the network stopped work- having more than eight conductors
modem line. All of these items require a ing. All other cables plugged to the new being split into groups of tests.
dedicated connector and a multicore cable hub worked fine, except for one. However, eight cores is sufficient for
to connect it all together. As to be expected, the cable in question most, including:
Buying commercially-made leads can ran across a false ceiling, down a riser cup- 1 Ethernet cables
be expensive, and even then, you may not board, under a raised access floor and into
be able to get exactly what you require and 1 Audio cables
a presentation lecturn; therefore changing
have to manufacture your own; with the it to see if that solved the problem was not 1 SCART leads
attendant doubt that all is wired, and wired to be lightly considered! The cable was 15 1 Keyboard and mouse extension
correctly! Testing these leads can be con- metres long and checking with a multime- leads
fusing, especially if there are several to ter was simply not an easy option.
make up of the same type. 1 Computer monitor cables
This tester allows easy identification
Commercially manufactured leads are and testing of multicore cables in a variety 1 Modem/serial leads
just as prone to damage, kinking, and con- of situations so long as at least two cores 1 USB cables, etc.
nector failure as those we make ourselves, are connected. It offers quicker testing than
and if you count up the number of leads traditional continuity methods, using l.e.d. The unit will:
that surround us in the home and at work, indication and sound to check continuity
the result can be quite surprising. and correct connections in cables. There is 1 Identify a cable
1 Check continuity of all cores
1 Identify a “crossover” type cable

All that is required is the right con-


nector for the cable under test.

Cable Types
The tester uses relatively low switching
rates and employs a software delay to allow
settling time from a sharp squarewave test
signal and the consequent capacitive delay.
There is therefore considerable flexibility in
the uses of the device, limited only by the
connectors installed by the user.
As an alternative, it is probably easiest
and quickest to build the tester and pas-
sive/active sockets using 9-pin D-connec-
tors and then make suitable adaptors for
each use. Some suggestions are discussed
later but there is really no limit to the adap-
tors that could be made.

Design Overview
Referring to the main Multicore Cable
Tester circuit diagram in Fig.1, this design
uses a PIC16F84 microcontroller (IC1) for
the testing operations and a 74HC164 shift
register (IC2) to output the l.e.d. display.
The completed Master tester and the small Active/Passive socket that combine to The cable leads to be tested are connect-
make up the Multicore Cable Tester ed to the PIC’s Port B via connector SK1.

612 Everyday Practical Electronics, September 2005


COMPONENTS
Resistors
R1, R3 10k (2 off)
R2, R4,
R13 to R21 1k5 (11 off)
R5 to R12 10k 8-way com-
moned s.i.l.
All 0.25W 5% carbon film unless
marked
Capacitors
C1 10n ceramic disc,
5mm pitch
C2, C3 15p ceramic disc,
5mm pitch (2 off)
C4 100µ radial elect.
10V See
Semiconductors SHOP
TALK
D1, D11, page
D20 to D27 1N4148 signal
diode (10 off)
D2 to D10,
D12 to D19 r.e.d. l.e.d., 5mm
(17 off)
TR1 2N3053 npn
medium power
transistor
TR2 BC171A npn
transistor
IC1 PIC16F84 micro-
controller, prepro-
grammed (see
text)
IC2 74HC164 shift
register
IC3 78L05 +5V
100mA voltage
regulator
Miscellaneous
S1 min. s.p.s.t.
toggle switch
SK1 9-pin D-type
connector, female
SK2, SK3 9-pin D-type
connector, male
(2 off)
WD1 buzzer or
sounder, 6V
B1 9V PP3 type battery
with mounting
clip
X1 3.2768MHz
crystal
Printed circuit boards, available
from the EPE PCB Service, codes
525 (Main), 526 (Active); 18-pin
d.i.l. socket; 14-pin d.i.l. socket;
plastic case, red tinted translucent
150mm x 80mm x 50mm; plastic
case, red tinted translucent
100mm x 49mm x 23mm; connect-
ing wire; solder, etc.

Approx. Cost
Guidance Only £30
excl cases &
battery
Fig.1. Master circuit diagram for the Multicore Cable Tester

Everyday Practical Electronics, September 2005 613


The PIC takes each of the eight cores “high”
in turn, in each case configuring the other
seven pins on Port B as inputs. A delay is
built in to prevent cable capacitance giving
erroneous readings. Port B is biassed nor-
mally-low by resistors R5 to R10, within a
s.i.l. (single-in- line) package.
The results of the eight tests are ORed
together and the tests re-run to ensure
that the results are complete – it is always
possible, indeed likely, that a cable could
be plugged in halfway through a
sequence.
When any combination of connected
cores is found, the results are serially fed
to the shift register (IC2) by Port A and
displayed on eight l.e.d.s, D2 to D9, cor-
responding to each cable core. A “beep”
subroutine then sounds the buzzer WD1
briefly for each digit, extended to a dou-
ble beep for each logic 1 within the
results. General component layout inside the Master unit
The buzzer uses considerably more
current than the PIC could safely drive D10 is activated accordingly via transistor Resistor R1 and capacitor C1 provide
and therefore transistor TR1 is used in TR2, which is controlled by PIC pin RA4. power on reset.
conjunction with back-e.m.f. diode D1, Resistor R3 pulls this “open-collector” pin Shift register IC2 is specified as an HC
and controlled by PIC pin RA3. The normally high. type, which has excellent current drive
buzzer is a low cost model and the type is The unit is powered by a 9V battery, B1, capabilities. Ordinary 5mm red l.e.d.s are
not critical. Using TR1 also allows the with regulator IC3 reducing the voltage to used with simple current limiting resistors
buzzer to be fed “pre-regulator”, from the 5V to suit IC1 and IC2. The battery type is R13 to R20.
9V line. not critical (the prototype uses a recharge-
Finally, a Crossover test routine takes able PP3-type). Passive Socket
four pins of Port B high and tests the other The PIC is crystal controlled (X1). The Both ends of the cable under test must,
half. A “go/no go” test here indicates the crystal frequency should not be critical of course, be connected in some way. The
polarity of the cable and the Port A l.e.d. although others have not been tried. simplest technique is to use a passive
“shorting” connector at the far end, such as
shown in Fig.2a.
Fig.2a. Passive circuit arrangement The wiring for the passive socket,
– see text though, depends on your final use. If using
9-pin D-type connectors follow Fig.2a. For
Ethernet cable testing, however, wire SK2
so that pins 5, 6, 7 and 8 are connected as
one group, with pins 1, 2, 3, 4 connected as
the other, then connect diode D11 between
pins 6 and 3, anode to pin 6.
The principle is to isolate pins into two
halves which are reversed with a cross-
wired cable, and place the diode between
the two halves. Reversing the diode revers-
es the action of the crosswire l.e.d., D10.
Additional passive sockets can be easily
made up using the same principles for
other applications.

Active Socket
Fig.2b(below). Active socket circuit An alternative for the “far end” is to use
arrangement – see text an “active socket” technique, as shown in
Fig.2b. Here additional l.e.d.s. (D12 to
D19) indicate the status of each core con-
nection, so checking not just that up to
eight cores are connected, but also that
they are all connected correctly.
Resistor R21 buffers the l.e.d.s., and
diode D20 to D27 matrix the circuit to suit
the software control.
This unit mirrors the lamp test function
so by turning the main tester off and then
on again, the sequence of l.e.d.s on both
the tester and the active socket should
light in order. This clearly identifies incor-
rect or correct connections, and confirms
cross-connected cables.

Construction
Details of the printed circuit board com-
ponent and track layouts for the Master and
Active units are shown in Fig.3 and Fig.4.
These boards are available from the EPE
PCB Service, codes 525 and 526.

614 Everyday Practical Electronics, September 2005


Whilst the circuits are simple, with a
project of this nature care is needed with
off-board wiring to get correct results from
the finished tester. Fit i.c. sockets and con-
nectors first, followed by resistors, then
capacitors, then semiconductors. The use
of p.c.b. connectors is strongly recom-
mended, although the off-board leads can
be hard-wired.
The prototype used small red translucent
cases, which allow the l.e.d.s to shine
through the case, eliminating the need
to drill holes. Take care to make sure that
both p.c.b.s are correctly wired to the
connectors.
On the cases the l.e.d. positions should
be numbered 1 to 8, to correspond with the
9-pin D-type connector pin numbers.
Once the board has been assembled,
carefully drill holes for the buzzer, cable
connector(s) and switch and wire these to
the p.c.b. connectors. Final assembly then
becomes a simple case of plugging every-
thing together.
In 9-pin serial leads, pin 9 is not normal-
Fig.3. Master
ly used, so the wiring becomes simply pin
circuit board
1 to pin 1, etc, as marked on the rear of the
component
D-type connectors. Given the possible
layout, copper
repeat interwiring of sockets it is useful to
track under-
adopt a standard colour wiring code
side and wiring
throughout the project.
details
Care is required to ensure that the correct
pins from the PIC are connected to the cor-
rect pins on the socket, and therefore the
cable.

Testing
Without connecting a cable, and after a
physical inspection that all is well, switch
on. The unit now goes through a self-test
routine to check that all l.e.d.s and the
internal buzzer are working. The lamp and
buzzer test should operate – a moving
l.e.d. display and eight beeps. The
crossover l.e.d. D10 will light as a power-
on indicator. This self-test is later used for
checking correct connections in the cable
under test.

Prototype
Active/Passive
socket unit

fig.4. Active “socket” printed circuit board details

Everyday Practical Electronics, September 2005 615


Plug a straight-through lead into the master Table 1
unit’s socket SK1. Nothing should happen –
yet! Plug the other end of the lead into the
passive socket, SK2, of the “far end” unit.
You should immediately hear a series of eight
beeps, a short one for each unconnected core
and a long beep for each connected core. An
l.e.d. should be lit for each connected core.
Switch off and on again with the cable
plugged in for the most accurate and reli-
able display without plug-to-socket contact
bounce.

In Use
In use, one end of the cable is plugged
into the master unit, and the other end into
the slave (passive) socket. As soon as the
cable is connected, the buzzer will sound
eight beeps, longer beeps for each connect-
ed core. The 8-wide l.e.d. display will turn
on a corresponding l.e.d. for each core. The
l.e.d. display indicates which cores are con-
nected and which are not in one operation,
however, to eliminate the effects of plug-in
contact bounce, switch the unit off and then Table 2
on to retest the cable.
An audible indication is ideal for identi-
fying “which is which” when wiring
Ethernet cables or other situations where
there are a number of similar cables – plug
the end of the cable you are trying to find
into the master unit, and (we’ve all been
there!), crawl under the desk with the pas-
sive socket trying each in turn. When you
hear the buzzer, you’ve found it; this is cer-
tainly better than the “sharp tug and see if
it moves” method!
If the cable is a “crossover” type, a ninth
l.e.d. on the main unit (D10) will light after
the eight beeps are finished. Table 3
Once a cable is detected, unplugging the
cable at either end resets the tester to detect
another cable so there is no need to switch the
tester on and off between operations (other
than for contact bounce elimination). The
l.e.d. display always shows the last results.

Checking Correct
Connections
If the “active” slave socket (SK3) is
used, the power on self-test can check the
correct connections. The active socket has
eight l.e.d.s which can be numbered exact-
ly as for the master unit. On power on, each
l.e.d. on the master unit lights and a short
beep is heard. Therefore, if a note is made Table 4
of which l.e.d. lights on the active socket in
order, it is simple to establish the connec-
tion sequence. For example, testing a
modem lead was carried out as follows.
Firstly, the passive socket was connected
to one end and the other plugged into the
main unit. Switching the tester on, the
power up sequence completed in a few sec-
onds, followed by seven of the eight l.e.d.s
being lit, with one short beep and seven
long beeps. This indicated, correctly, that
pin 1 was unused and that the subsequent
seven were connected. At the end of the
eight beeps, the crossover l.e.d. lit, indicat-
ing that this lead was a crossover type. Main Active From this, pin pairs 2/3, 4/6 and 7/8 are
Secondly, the passive socket was 1 None swapped but pin 5 remains pin 5 at each end.
swapped for the active socket. Taking a 2 3
piece of paper, and numbering from one to 3 2 Making Up Adaptors
eight from top to bottom, the tester was 4 6 The following information might be use-
switched off and then on again. Writing 5 5 ful for those wishing to use the unit for
down which l.e.d. lit after each beep during 6 4 other common cables.
the startup sequence gave the following 7 8 In order to preserve the crossover func-
results: 8 7 tion it is useful to adopt a procedure for

616 Everyday Practical Electronics, September 2005


working out pin connections. There are two Table 5 Table 6
groups of pins on D-type connectors: 9 pin D connector wiring in each case DIN 9 pin D
SCART A B C 1 1
Group A: 1, 3, 6, 8 2 2
1 2
Group B: 2, 4, 5, 7 3 3
2 1
3 3 4 6
In designing an adaptor for a cable that 5 4
4 4
has a crossover variant, assign either A or B
to each group of pins that may get crossed, 5 6
then substitute the pin numbers above. If 6 5 Table 7
there is no crossover variant, or for the pins 7 1
8 2 6 pin DIN 9 pin D
that are never crossed, the assignment is
9 3 1 1
irrelevant.
10 4 2 2
The principle is that for crossover detec-
11 5 3 3
tion to work, you must ensure that all pairs
12 6 4 4
of pins that may be crossed have one pin
13 7 5 5
“either side” of the detection diode (D11 in
14 8 6 6
Fig.2a). The following instructions are
intended to help design an adaptor for any 15 1
type of lead, and make interpretation of the 16 2
17 3 Table 8
results easier.
Referring to Table 1: 18 4 VGA 9 pin D
19 8 1 1
1. List down the left hand side of the 20 7
page the pin numbers in the connector of 2 2
21 5 3 3
the cable to be tested
4 –
2. Check which pairs would be reversed In the case of a 5-pin DIN connector, use 5 4
in a crossover lead, highlighting each pair Table 6 6 5
perhaps in a different colour highlighting
7 6
pen Keyboard and Mouse Leads 8 6 (generally commoned in
3. Using digits in the range 1 to 8, list in There are no crossover variants with equipment with pins 6,7)
the next column the connections you will keyboard and mouse leads, which are typi- 9 –
make to the Multicore Cable Tester cally 6-pin mini DIN. Therefore pin assign- 10 4 (generally commoned
4. Swap the second column around so ments can be simply those in Table 7. with pin 5
that for each pair that might be reversed in 11 –
the lead, one is connected either side of the VGA Monitor Leads 12 –
detection diode, i.e. one core from each There are no crossover variants for VGA 13 7
group above (A or B) in each pair monitor leads, which are 15-pin, as shown
14 8
in Table 8.
When you run the test, you will get dif- 15 –
ferent active l.e.d.s on the Main unit and USB Leads
the Active socket if the cable is crosswired. Again, there are no crossover variants of Table 9
If you “read back” the l.e.d. number on USB leads, which are as given in Table 9.
either display from your second column to USB 9 pin D
the first column, you will be able to see Expansion 1 1
which pins are connected in the end of the For one copy of the prototype, the unit’s 2 2
cable nearest the display you are reading. use was expanded to network cables by 3 3
installing an RJ45 socket connector in par- 4 4
SCART allel with the 9-pin D-type connector. This Shield 5
Tables 1 to 5 show how to make a enabled the testing of Ethernet cables with-
SCART lead tester. Many cheap leads only out a made up adaptor, and still allowed
make the essential connections, which are adaptors to be easily and quickly made up PCs around the work environment, identi-
all within “Adaptor A” . to suit other applications. There is no tech- fying network patch leads from each other
There are 21 pins for a SCART cable, so nical reason not to add additional sockets and making sure cross-wired cables are
to fully test it requires three 9-pin D-type of varying types to the unit, other than the easily identified. It is a quick and easy tool
connectors – effectively three adaptors in need to keep wiring tidy. to use and can even be used as a “core num-
one. Remember you therefore need two It is remarkably difficult to obtain panel ber” identifier for telephone cables, etc,
SCART connectors and six 9-pin D-type mounting RJ45 sockets, so the prototype using just a crocodile clip connection. The
connectors in total (one for the main unit, used a component which mounts in a con- possibilities are endless!
same again at the slave end). In the tables ventional-size accessory plate. The RJ45
the three adaptors are labelled A, B, and C. standard has eight cores, and while getting Resources
Tables 2 to 4 calculate the results of access to these is easy (thanks to IDC con- Software, including source code files,
power on self-test, and come from exami- nections on the socket), the layout of these for the PIC unit and PC interface is avail-
nation of a SCART wiring diagram (see is far from obvious. able on 3.5inch disk from the Editorial
web links later). The rear connections of the socket used office (a small handling charge applies –
The crossover version is the one most in the prototype relative to the pin connec- see the EPE PCB Service page) or it can be
used. The pins on the SCART connector are tions of the cable, and viewing the socket downloaded free from the EPE Downloads
already marked, so a suggested wiring table from behind, the top line order is 7, 8, 5 and site, accessible via the home page at
would be that in Table 5. 4. For the lower line the order is 6, 3, 2 and www.epemag.co.uk. It is held in the PICs
Crossover indication only works with 1. The shutter pulls down to this end from folder, under Cabletest. Download all the
adaptor A. The active socket will run in above, i.e. the label is below the socket. files within that folder.
sequence, i.e. its l.e.d.s 1 to 8 (D12 to D19) Note that RJ45 patch leads for 10mb/s Some useful websites for those making
with the main unit’s l.e.d.s (D2 to D9) for and 100mb/s only need four of the eight up their own adaptors;
adaptors B and C, confirming the crossover cores, but those for 1000mb/s need all www.netspec.com/helpdesk/wiredoc.html
in the case of adaptor A. eight. Therefore four connected cores may www.ertyu.org/~steven_nikkel/ethernet
be sufficient – cores 1, 2, 3 and 6. cables.html
Audio Leads www.physiol.ox.ac.uk/~trp/pinouts.html
Testing audio leads is simply a case of Conclusion www.leadsdirect.f9.co.uk/scart.htm
assigning pins, as the only crossover (or The tester has become part of the http://homepage.ntlworld.com/another
mirror-image) tends to be with DIN leads. author’s armoury, particularly for moving _world/scart.htm

Everyday Practical Electronics, September 2005 617


Readers’ Circuits

Ingenuity Unlimited
BASED
WIN A PICO PC Our regular round-up of
WORTH £586 readers’ own circuits.
OSCILLOSCOPE 5GS/s Dual Channel Storage We pay between £10 and

Oscilloscope £50 for all material pub-
z Sp e c tr u m lished, depending on length
5 0 M H
Analyser and technical merit. We’re
 Multimeter looking for novel applications and circuit designs, not simply mechani-
ter
 Frequency Me cal, electrical or software ideas. Ideas must be the reader’s own work
n te r fa c e .
U SB I and must not have been published or submitted for publication else -
ou h a v e a n o v el where. The circuits shown have NOT been proven by us. Ingenuity
If y
ch
circuit idea whi Unlimited is open to ALL abilities, but items for consideration in this
to
would be of use column should be typed or word-processed, with a brief circuit
er s t h e n a description (between 100 and 500 words maximum) and include a full
other read
ours. circuit diagram showing all component values. Please draw all circuit
cope could be y
Techno log y P C-based oscillos l b e a w a r d ing a schematics as clearly as possible. Send your circuit ideas to:
Pico
, Pi c o Te chnology wil
Every 12 mo n th s the best IU Ingenuity Unlimited, Wimborne Publishing Ltd., 408 Wimborne Road
ta l s to ra g e oscilloscope for e
PicoScope 3205
d ig i ta Logger/Scop East, Ferndown, Dorset BH22 9ND. (We do not accept submissions
sio n. In a d d it ion a DrDAQ Da u n ne r u p. for IU via email). Your ideas could earn you some cash and a prize!
submis the r
be presented to
worth £59 will

Low-Cost RS232 Interface – On The Face Of It

S ERIAL PC interfaces are appearing


on more and more constructional
projects these days, and most will use the
The logic signals from the microcon-
troller must be inverted to match RS232
signal polarities, and this is implement
The circuit has been found to work suc-
cessfully at data rates up to 115200 with a
1·5M cable.
ubiquitous MAX232 or similar i.c. to by transistors TR1 and TR2. Diode D2 None of the components are critical.
convert between the RS232 and micro- stops TR1 becoming reversed biased by Any small signal npn/pnp transistors
controller voltage levels. the TX signal. As TR1 will be saturated should do, and the diodes could be
The RS232 requires a voltage of at when turned on, resistor R4 helps to turn replaced with 1N4148s or similar.
least +3V for a logic '0' and −3V for a it off quickly on a negative cycle. The reservoir capacitor C1 could be
logic '1'. Measuring the output of several Terminal block TB1 connects to the larger, so long as a working voltage of 35V
PC's, including older desktops and mod- PC's serial port, and TB2 connects to the or greater is used.
ern laptops shows that the actual output microcontroller circuit. It can, of course,
various enormously, from +/−5V to be intergrated directly onto the project Mike Hibbett,
+/−12V. circuit board. Chatham, Kent
A microcontroller circuit has no prob-
lem generating +3V to +5V since this is
often the supply voltage; negative volt-
ages are however not normally avail-
able.The simple circuit diagram shown
in Fig.1 can be used to "highjack" the
required negative supply voltage from
the PC's interface, and provide the signal
buffer and inversion required.
The circuit relies on the fact that the
TX output signal from a PC spends most
of its time at the negative voltage level.
Although this circuit is not smaller than
an equivalent MAX232 the placement of
components is not critical so it may be
easy to place and route on a p.c.b.
Diode D1 and capacitor C1 implement
the negative voltage reference for the
circuit, driven by the negative cycles of
the TX pin. This allows transistor TR2 to
swing between +5V and whatever negative
voltage the PC is using. Fig.1. Circuit diagram for the Low-Cost RS232 Interface

618 Everyday Practical Electronics, September 2005


TV Audio Coupler – Sound Sense
H AVING recently purchased a new TV
with an inbuilt cinema sound decoder,
I was disappointed to find that it was con-
figured to only provide the full "Dolby"
effect when used with its own extension
speakers. I needed a way to use the provid-
ed extension speakers at the rear, but
derive an audio signal controlled by the TV
remote for the front to use my existing Hi-
Fi amplifier and speakers. The alternative
was yet more speakers (my wife was not
impressed) in our room.
The circuit diagram Fig.2 provides a
dummy load (R1/R2 and R3/R4) of 9·4
ohms to 20W maximum dissipation . The
miniature, specified transformer has a d.c.
primary resistance of 660 ohms, which
being high compared with the series
resistance of R1/R2, R3/R4, will mean
that the worst case power dissipation in
the transformer primary will be minimal.
In practice, the added inductance at audio
frequencies will reduce dissipation still
further.
The use of a transformer eliminates any
possibility of "ground loops" or falling foul Fig.2. TV Audio Coupler circuit diagram
of "bridge output" configurations in com-
mercial equipment, where accidentally
grounding either side of a loudspeaker out- In practice the centre tap of the second- thinking speakers are connected, and does
put could cause internal damage. The ary was not required, but would provide a not require a power supply!
transformer is, of course, an inductive load 50% attenuation if necessary. This very
but so are the loudspeakers that are intend- simple solution appears to work extreme- David Geary,
ed to be used! ly well, fooling the TV electronics into Blackheath, London.

PIC-Based Noise Generation – Logically Inverted Silence

I N the good old heyday of electronic


music and disco sirens, electronics
enthusiasts would experiment with differ-
register with XOR feedback from outputs
Q18 and Q23. For this particular set-up,
the pattern of ones and zeros takes over
The code below, when placed in the initial-
isation routine, puts alternate ones and
zeros into the shift register, but you can use
ent circuits to produce strange hissing eight million bits before it repeats itself; any other non-zero seed. You could even
sounds, or “white” and “pink” noise, as it that’s the maximum possible for a 23-bit use the contents of the PIC’s EEPROM to
became known. Applications included register. Amazingly, the PlC code does this provide a seed value which was stored dur-
music keyboards, drum machines and without using any XOR commands: ing a previous use of the program.
even “realistic steam noise” for model The code requires four registers. The MOVLW B’01010101’ ; non zero seed
railways. output can be taken from any pin of MOVWF PORTB
One trick for making “digital noise” PORTB (which contains bits Q1 to Q8 of MOVWF REGB
involved networks of shift registers and the virtual shift register). The other three MOVWF REGC
exclusive-OR (XOR) gates. Nowadays, (user defined) registers are REGB (Q9 to
you can do the job much more quickly Q16), REGC (Q17 to Q23) and TEMP You must also set PORTB to output
using a PIC and applications for this which is used to perform tests on Q18 and mode by clearing TRISB after using the
technique can be found in many Q23. The carry flag (STATUS,C) is used to appropriate bank switches for your type
designs, including test equipment, elec- link together the individual 8-bit registers of PlC. (Remember to restore to Bank 0
tronic games, encryption and, yes – which form the long shift register during afterwards.)
model railways! the RLF (rotate left) operations. Incidentally, if you were wondering why
By way of example, here is an 11-line The program loop repeats every 12 pro- all 24 bits are not used, it’s because the
(device independent) PlC routine which gram cycles (the GOTO needs two cycles). maths would require the sampling of four
produces an 18,23 PRBS (pseudo random However, before running the loop you bits from the shift register (instead of two)
binary sequence) of “maximal length”. In must “seed” the contents of the virtual 23- and this would slow down the routine.
other words, it simulates a 23-bit shift bit shift register with a non-zero condition. The choice of PlC oscillator frequency
will depend upon the application. A 4MHz
crystal will produce a “random” output rate
LOOP MOVF REGC,W ; copy Q17 thru Q23 of 83k Baud which, when passed through a
MOVWF TEMP ; into temp register suitable low-pass filter, gives an audio
BTFSC REGC,6 ; test Q23 noise bandwidth of around 4kHz.
COMF TEMP,F ; invert TEMP if Q23 = 1 If you want to use this code to test your
BCF STATUS,C ; clear carry flag hi-fi you will need to run your PIC at
BTFSC TEMP,1 ; test Q18 20MHz. Perhaps you just need a random
BSF STATUS,C ; set carry if Q18 XOR Q23 = 1 number generator for a bingo machine or
RLF PORTB,F ; ripple up to pick your Lotto numbers. The applica-
RLF REGB,F ; all bits thru tions are endless.
RLF REGC,F ; shift reg Pete Barrett, High Mickley,
GOTO LOOP Northumberland

Everyday Practical Electronics, September 2005 619


TECHNO-TALK MARK NELSON
WHIRLYBLADES
Wind turbines – what’s your opinion of wind harvesting? Mark Nelson
describes both the problems and their ingenious solutions.

EW technologies arouse more pas- countryside is likely to be far less than Fuzzy Fix
F sion among normally docile people
than wind turbines. The arguments
for and against harvesting electricity
the dramatic effect of climate change
with the shrinking coastline caused by
rising sea levels and altered vegetation.
Serious problems call for serious solu-
tions and BAe Systems (the combination
of British Aerospace and Marconi
from the wind are fairly well known but SDC chairman, Jonathon Porritt Defence Systems) has come up with a
the unforeseen problems the turbines argues that climate change will have a solution employing fuzzy logic to min-
cause demand equal attention. devastating impact unless urgent action imise or even eliminate the radar interfer-
Wind farms and their turbines are a is taken to boost the contribution of ence caused by wind turbines. Fuzzy
remarkably emotive subject. The tower renewables, alongside energy efficiency logic’s approach to problems replicates
clusters seen atop the mountains of Mid measures. So the issue is merely a matter the way most people come to firm deci-
Wales for instance are objects of supreme of public education, right? Well, no. sions based more on gut feeling than pure
grace and elegance in my view and the Wind farms pose a serious threat to bird logic by balancing out vague, ambiguous
fact that they generate electricity for migration and to aircraft radar systems, or missing input information to still reach
nothing is a fantastic bonus – the classic or at least they did. It’s a serious a firm conclusion.
“win, win” situation. problem. In this application fuzzy logic is used
But that’s only my opinion. A recent to find and analyse data normally hidden
report by the Sustainable Development Turbulent Times for Turbines in a radar signal to build up a clearer pro-
Commission (SDC) notes that although Urgent research is needed into the file of the object that generated the echo.
there is widespread support for wind locations, numbers and movements of Identified characteristics are then evaluat-
farms from an ecological point of view, birds around our coasts to help us under-
ed to calculate its probability of being a
there is much local resistance. People stand the potential impacts, according to
wind turbine. If the balance of probabili-
argue the noise they make is unbearable, the Royal Society for the Protection of
ties is positive, the on-screen image is fil-
that they spoil the landscape and they Birds. Dr Mark Avery, RSPB Director of
tered to remove the object altogether.
may also kill birds. Conservation, says the government must
Although the current application is for
Simon Clydesdale of Greenpeace is do more to avoid major conflicts over the
quoted as saying, “People do support siting of wind farms. And although the civil airport radars, the technology was
wind energy when a survey is put in front RSPB sees climate change as the greatest first developed for military use, to distin-
of their nose but it’s a question of putting threat to the world’s wildlife, it does guish aircraft from large waves and flocks
that into practice. We don’t give blanket object to any wind farms that seriously of birds. At the time of writing, in-depth
support for all wind farms, they have to threaten important populations of birds tests were scheduled for the end of July,
be sensibly sited.” and their habitats, calling for some form to be held in Wales.
of legal protection. A number of RAF helicopters and
Nimby Alert Bigger birds have even bigger prob- Cessna light aircraft would be monitored
on a Watchman radar operated by the
Not in my back yard then. He does, lems. As The Business newspaper report-
however, agree that wind power is ed recently, significant interference is RAF, noting these signals as well as inter-
“green”, stating: “Wind power is essen- caused to the radar systems that control ference from a number of wind farms in
tial to meet the government’s carbon air traffic by the rotation of the wind tur- the vicinity. If the filtering software is
emission targets and will be one of the bines’ blades. The radar returns or echoes successful only the aircraft should be vis-
cheapest forms of energy out there.” tend to mimic a light aircraft. To confuse ible on the radar screens, with commer-
Renewable energy sources are vital to the radar further, says the report, the tip cial deployment likely some six to 12
meeting the government’s Kyoto target speed (although not that of the whole months later.
of a 12·5 per cent reduction in green- blade) is just below the speed of sound,
house gas emissions from 1990 levels, much the same as an aircraft. Fears Unfounded
averaged over 2008 to 2012, meaning the You might imagine that an object as But what fate lies in store for our feath-
UK must look for cleaner sources of static as a wind farm would not look any- ered friends? According to research pub-
energy. Wind farms could take this figure thing like an aircraft in flight but appar- lished in the scientific journal Biology
to 20 per cent by the year 2020. ently it can do. In the same way, several Letters, birds are not as stupid as we take
The towers occupy very little ground television repeater transmitters built by them to be. Experts at the Danish National
space and when situated away from radio amateurs in the UK have had their Environmental Research Institute have
human occupation, any noise issues are licensing held up by the authorities, used radar to monitor bird migration pat-
irrelevant. The sole issues after that are again because the picture transmissions terns over the Nysted offshore wind farm
the capital cost of erecting the towers and can fool the very sensitive radar on the western side of the Baltic Sea.
dealing with any arguments from the receivers. The verdict is that geese and ducks
NIMBY brigade over visual intrusion. The echoes returned by wind turbines learn to avoid the blades, with less than
There’s no argument that wind farms appear as transient multiple objects that one per cent of the birds found to be at
will indeed alter the British landscape, show up and vanish again. Vast flocks of risk of collision. Even at night the clever
but so did electricity transmission pylons migrating starlings cause the same effect creatures kept their distance from the tur-
and motorways – and the economic ben- from time to time and the unpredictable bines and flew in the corridors between
efit of these is generally seen to outweigh nature of these signals could trigger the structures. Finally this may be the
the visual intrusion. In any case the retaliatory action or the closure of an green light for wind farms. I for one will
change to the appearance of the British airport. be delighted if it is.

620 Everyday Practical Electronics, September 2005


Regular Clinic

Circuit
Surgery
Alan Winstanley and Ian Bell

Our “surgeons” discuss low frequency amplification, looking at op.amp parameters,


and offer a simple low-battery monitor

Low Frequency Amplification inputs) of zero, an op.amp’s output should with temperature and curves on the
also be zero, but in real op.amps there will datasheet to show these changes.
While scanning the EPE Chat Zone typically be a non-zero output. The Input We can also look at the problem from a
forum (www.chatzones.co.uk) recently Offset Voltage VIO is defined as the d.c. noise-versus-frequency perspective. Random
the post “Amplifying <10Hz” from fellow voltage which must be supplied between noise may be classed according to the fre-
contributor Thomas Scarborough caught the inputs to force the quiescent (zero input quency, or range of frequencies present.
our eye: “I’ve done a lot of circuits ampli- signal) open-loop (no feedback resistors) White noise has the same power throughout
fying audio and radio, but am not as famil- output voltage to zero. the frequency spectrum, whereas 1/f noise
iar with amplifying very low frequencies. The input offset voltage is defined with decreases in proportion to frequency; both
I’m wanting to amplify signals in the respect to the input. The error in the output types occur in all amplifiers. It is 1/f noise
region of 0·1Hz to 10Hz. Can you point me voltage due to VIO is equal to the circuit that causes problems when amplifying low
to anything to look at, so that I can famil- gain times VIO (note circuit gain, not frequencies.
iarise myself better?” op.amp gain). So if the datasheet quoted How noise level varies with frequency for
Accurately amplifying low frequency VIO as 500mV max and your circuit had a a typical amplifier is shown in Fig.2. At low
signals can be surprisingly difficult, but gain of 500 you could get a 250mV frequencies the 1/f noise dominates, but as
there are special approaches that can be (0·25V) error on the output. The tempera- frequency is increased we reach a point
very effective. One of these – chopper or ture coefficient of input offset voltage where noise level flattens out. The point at
auto-nulling amplifiers – is this month’s specifies how VIO changes with tempera- which this occurs is called the 1/f corner and
Circuit Surgery topic. We don’t really have ture. The datasheet for an op.amp may also the frequencies beyond this are called the flat
enough information about Thomas’s situa- have a graph showing offset variation with band noise area.
tion to know if this would be the best temperature. For audio and video amplifiers the 1/f
approach for him, but this is an interesting Bipolar op.amps require bias (base) cur- noise is not a problem as long as the 1/f
topic that we hope many readers will find rents for the transistors connected to their corner is sufficiently low (say 20Hz for
useful. inputs, whilst op.amps with f.e.t. inputs audio). This can be achieved with con-
Before we look at the solution, let’s look have leakage currents at the inputs. The ventional amplifiers and the unwanted
at the problem in more detail. A key issue Input Bias Current IIB tells you how large lower frequencies can be blocked by
with low frequency amplifiers is offset, see these currents are, and is defined as the capacitive coupling. From an offset per-
Fig.1. In simple terms offsets are d.c. errors, average current into the two inputs with the spective, offsets are simply blocked by
but the offsets can drift due to changes in output at zero volts. This can vary greatly capacitive coupling.
temperature and other factors that influence for different types of op.amp.
the circuit. The changing offsets are just like Bias currents flow in the external com- Chopper Amplifiers
low frequency signals that are amplified ponents connected to the op.amp and in Chopper amplifiers can achieve lower
along with the signal itself – the offsets act doing so they cause voltage drops. If offsets than conventional amplifiers and –
as low frequency noise. these voltage drops are not equal at the crucially – much lower offset drift (e.g.
Assuming what we want here is some op.amp’s two inputs, they will be ampli- one device is specified at 0·003 microvolts
kind of op.amp with very good low fre- fied by the op.amp and appear as errors at offset per degree temperature drift). From
quency performance, let’s look at offsets in the output. a noise vs. frequency perspective, chop-
the context of op.amps. Ideally with a dif- pers have a flat noise area going right
ferential input (the voltage difference A Different Bias down to d.c., at least in theory, completely
between the inverting and non-inverting In practice, the bias currents are not eliminating the 1/f noise (see Fig.2). On the
equal so we have Input Offset Current other hand, the chopping process does
(IIO) – the difference between the currents introduce some extra wideband noise and
into the two inputs with the output at zero some of the chopping signal may leak
volts. Ideally these currents would be through to the output as indicated by the
equal, but in practice they are not. dashed peak in Fig.2.
The input currents have to flow There are a number of circuit techniques
through the external circuitry and will that fall under the general title of “chopper
cause offsets even if the impedances amplifier” or “auto-nulling amplifier”, but
connected to the two inputs are equal. Fig.3 gives a good idea of the general
Of course, bias current and offset both approach and is the basis of a number of
vary with temperature so we have the i.c.s available today. This circuit contains
temperature coefficient of input offset two amplifiers, the main wideband ampli-
Fig.1. Offset voltage defined current which specifies how IIO changes fier A1 that handles the signal and the

622 Everyday Practical Electronics, September 2005


error compensation circuit out periodically series resistances and Zener diode power
to fix its own errors. The switching fre- ratings, it is best to think of “worst case”
quency is typically units to tens of kilo- conditions, at maximum and minimum
hertz. There are a number of i.c.s available loads.
that are more or less based on this kind of It is easy to use a Zener diode as part of
circuit, but often with additional circuitry a low-voltage monitor by adding a light-
to compensate for imperfections in the emitting diode (l.e.d.) in series across your
basic approach. Next month I will look at power source, see Fig.4b. A high-efficien-
one of those chips. I.M.B. cy l.e.d is best, as these offer a brighter out-
put under low current conditions. When
Low Battery Indication the supply voltage is higher (say, 9V) the
“I run a small piece of self-build kit pow- Zener is conductive and current flows
Fig.2. Amplifier noise versus frequency ered by a 9V battery. I would like some through the l.e.d, which glows. As the sup-
means of measuring when the battery volt- ply voltage falls, the Zener will gradually
age has fallen below some variably preset cease to conduct and the l.e.d will fade out.
level, something like 7V. Has anyone got The l.e.d. typically has a forward voltage
such a circuit with a minimum of compo- of +1·8V or more when illuminated, so if
nents; say something like a resistor or two, you use a series 3V9 Zener diode for
a Zener and an l.e.d.? Kind regards, Mike example, then assuming a 9V supply this
Walker via email.” leaves 3·3V to be dropped across the resis-
The simplest way to detect a voltage tor. If we try a 5mA current then using
reduction is probably to use a light-emit- Ohm’s Law a series resistor of 3·3V /
ting diode that illuminates under normal 0.005A or 660 ohms is needed (680 ohms
conditions and fades away as the battery nearest preferred value). Try a 2·2 kilohm
voltage drops. The trade-off is that it con- trimmer resistor (preset) in series, set
sumes a small (often negligible) amount of midway.
power that can only have a negative impact You’ll need to experiment with Zener
on battery life. Never-the-less, a number of values (try some junkbox values), and as
battery-operated devices use such a sys- these have a poor tolerance, don’t expect
tem, including the Philips waterproof radio too great an accuracy!
used in my shower! You could replace the Zener with ordi-
A Zener diode, D1, with a series resistor nary rectifiers such as the 1N4001, placed
to provide a stable voltage for a small load in series with the l.e.d. Each rectifier drops
is shown in Fig.4. The Zener diode oper- about +0·65V when conducting, so a hand-
ates in reverse-bias mode as shown, in ful of them wired in series will soon pro-
Fig.3. Chopper stabilised amplifier which case the specified Zener voltage will duce a useful voltage drop, and it may be
appear across the device when the supply possible to lower the current consumption
nulling amplifier A2. Both amplifiers have voltage +Vs is sufficient. Series resistor R1 a little as well.
an offset trimming input which can used to limits the current to a safe value. A number of specialist integrated circuits
trim off the offset. The circuit continuous- are available that will do a good job warn-
ly switches between two phases of opera- ing of over voltage or undervoltage. One
tion, nulling and output, under the control place to start is Maxim’s web site
of a clock signal. (www.maxim-ic.com) and search for
When the switches, which are controlled MAX8211 or MAX8212. Their
by the clock, are in the nulling position Application Note 926 shows how to use a
(position A on Fig.3) the inputs of A2 are MAX8212 to disconnect a load from e.g. a
shorted together and its output is connect- battery when the battery voltage has fallen
ed to its own offset trim input forming a below a certain level. A.R.W.
feedback loop that will null the offset. The
trim voltage required to do this is stored on Hanging up the Gown
capacitor C2 so that it can continue to null Sadly this is the last Circuit Surgery col-
A2’s offset during the next phase. During umn that I will be co-writing. I have enjoyed
the nulling phase the trimming voltage for immensely the challenge of trying to answer
A1 is held on capacitor C1. your questions in a fun and non-technical
During the output phase, the switches are way. I hope Circuit Surgery has encouraged
in position B in Fig.3. The voltage across readers to explore the fast-moving and chal-
the inputs of the main amplifier is ampli- lenging world of electronics and computer
fied by A2, without offset error by virtue of technology in more depth, and to pursue this
the trim voltage held on C2, and applied to worthwhile and rewarding hobby as a
the trim input of the main amplifier A1. pastime if not career.
The same input is also amplified directly Like electronics technology itself,
by the main amplifier. Remember that A1 Fig.4. (a) A standard Zener diode Circuit Surgery moves on – rest assured
will be in an external feedback loop (e.g. arrangement. (b) Adding a series that this column will remain in good hands,
the gain setting resistors of a standard high-efficiency l.e.d. to act as a helped along by Ian, and will appear at reg-
op.amp amplifier). We have a more com- voltage monitor ular intervals for the foreseeable future.
plex situation than in the nulling phase, but I will still be actively helping with the EPE
basically the feedback will adjust the trim It is desirable to have a small Zener cur- web site, the EPE Chat Zone, developing
voltage applied to A2 to null its offset. This rent flowing through the device (say, 2mA my popular online Basic Soldering Guide
voltage is held on C2 to during the nulling to 10mA), and the heavier load current and, of course, I shall still be writing Net
phase, keeping A2’s offset trimmed out. passes through the series resistor out to the Work – the Internet column every month,
Note that the main amplifier is never load. However, when the load current which reflects my full-time job in the
switched out of the signal path and is able reduces, then the Zener, which is classed as Internet industry.
to continuously amplify the signal. This a shunt regulator, will “shunt” or carry the I have made many interesting contacts
means that amplifiers of this type can han- excess current away to 0V. and friends along the way. My best wishes
dle quite high frequencies as well as the The operation of Zener diodes was to Circuit Surgery readers everywhere,
low frequencies and d.c. that we have been explained in Circuit Surgery, November especially those from around the world
focusing on (i.e. bandwidth is wide). 2004 issue (back issues or reprints are who have been kind enough to contact me
The main signal is not chopped; the available from the EPE Online Shop at with their support and encouragement over
switching action is used simply to take the www.epemag.co.uk). When calculating the past dozen years. Alan Winstanley.

Everyday Practical Electronics, September 2005 623


The two printed circuit boards are available from the EPE PCB Service,
codes 525 (Main) and 526 (Active) – see page 661. The 9-way D-type connec-
tors, both male and female, are now stock items from most of our components
advertisers. Also, why not visit the web sites given at the end of the article for
more info on cable/socket adaptors.

Snooker and Darts Scoreboard All-Band Radio


It is most important that when ordering the L293DN 16-pin half-H driver chip (also Photographs of the All-Band Radio project show that the author used a poly-
known as a stepper motor driver i.c.), used in the Snooker and Darts Scoreboard, varicon (polythene dielectric) variable tuning capacitor. The most common “tun-
that you emphasize you require one with the DN suffix. The D denotes it is a 16-pin ing” values listed for the a.m. tuners appears to be around 5pF to 126pF and 5pF
device and has diode protection. Do not use other L293 device types as they have to 141pF. They can usually be found listed as “transistor radio” types and are cur-
different characteristics and could be 20-pin versions.The one used in the prototype rently stocked by ESR Components (ᔒ 0191 251 4363 or www.esr.co.uk) , code
was purchased from Rapid Electronics (ᔒ 01206 751166 or www.rapid elec- 896-110 and Sherwood Electronics (see page 664), code CT9.
tronics.co.uk), code 82-0192. It is important that readers purchase the unbuffered version of the 4069 CMOS hex
The 7-stage Darlington line driver type ULN2004A was also purchased from inverting buffer i.c. This is indicated by the suffix UB after its type number (4069UB).
Rapid (see above), code 82-0622. It is also listed by RS (ᔒ 01536 444079 or Small quantities of 30s.w.g. enamelled copper wire can be obtained from JAB
rswww.com), code 652-825. Electronic Components (ᔒ 0121 682 7045 or www.jabdog.com), mail order only.
Note that the PIC microcontroller must be the PIC16F877A version. Be aware The two printed circuit boards are available from the EPE PCB Service, codes
that the software code is not compatible with the ordinary PIC16F877 device. 523 (Full) and 524 (Mini).
However, notes at the end of the article show how to adapt it for the standard device.
For those readers unable to program their own PICs, programmed PIC16F877A
Model Railway Signal Controller
Stepper motors should be widely available. The stepper motor, incorporating a
microcontrollers can be purchased from Magenta Electronics (ᔒ 02083 565435
gearbox, used by the designer in the Model Railway Signal Controller project
or www.magenta2000.co.uk) for the inclusive price of £10 each (overseas add £1
came from Jameco Electronics of America, code 28BYJ02A. Their website is
for p&p). The software, including source code files, is available on a 3·5in. PC-com-
www.jameco.com and email address [email protected].
patible disk (Disk 8) from the EPE Editorial Office for a sum of £3 each (UK), to
Again, many model shops should be able to offer a suitable trackside sema-
cover admin costs (for overseas charges see page 661). The software is also avail-
phore signal tower. The author’s came from Tomar Industries, USA
able for free download via the Downloads link on our UK website at
(www.tomarindustries.com) and is the H-853 (HO scale) signal.
www.epemag.co.uk.
For those readers unable to program their own PICs, programmed PIC16F628
The printed circuit board is available from the EPE PCB Service, code 530 (see
microcontrollers can be purchased from Magenta Electronics (ᔒ 02083 565435
page 661).
or www.magenta2000.co.uk) for the inclusive price of £4.90 each (overseas add
Multicore Cable Tester £1 for p&p). The software, including source code files, is available on a 3·5in. PC-
No “special” components, apart from the PIC, are called-up in the parts list for the compatible disk (Disk 8) from the EPE Editorial Office for a sum of £3 each (UK), to
Multicore Cable Tester project. If you wish to use the same translucent cases cover admin costs (for overseas charges see page 661). The software is also avail-
depicted in the article, these came from Maplin (ᔒ 0870 264 6000 or able for free download via the Downloads link on our UK website at
www.maplin.co.uk).You have a choice of Infra-Red or Ice Blue and the code num- www.epemag.co.uk.
bers for the “red” versions, used in the models, are N72AL (large) and N69AL The printed circuit board is available from the EPE PCB Service, code 529 (see
(small). Blue codes are N67AL and RN32K respectively. page 661).
For those readers unable to program their own PICs, programmed PIC16F84
microcontrollers can be purchased from Magenta Electronics (ᔒ 02083 565435
Back to Basics – Daily Reminder/Whistle Switch
We do not expect any component buying problems to be encountered when
or www.magenta2000.co.uk) for the inclusive price of £5.90 each (overseas add
shopping for parts for this month’s Back to Basics projects. Obviously, the choice of
£1 for p&p). The software, including source code files, is available on a 3·5in. PC-
relay for the Whistle Switch will depend on the rating of the appliance being
compatible disk (Disk 8) from the EPE Editorial Office for a sum of £3 each (UK), to
switched/controlled.
cover admin costs (for overseas charges see page 661). The software is also avail-
The two printed circuit boards are available from the EPE PCB Service, codes
able for free download via the Downloads link on our UK website at
527 (Daily) and 528 (Whistle).
www.epemag.co.uk.

624 Everyday Practical Electronics, September 2005


Constructional Project

Snooker and Darts


Scoreboard
John Becker

Readily display all the scores at your snooker or darts matches

O Circuit Diagram
NE of the interests of being EPE’s Data is entered via the keypad, S1,
Tech Ed is that of hearing directly The circuit diagram for the complete which is monitored by the PIC via Port C.
from readers what they would like Snooker and Darts Scoreboard is shown in Pins RC0 to RC3 are used in input mode,
to see us publish in the way of construc- Fig.1. Basically, score data is entered via a biased normally high by resistors R10 to
tional projects. 4 × 4 matrixed data keypad, S1, processed R13, through which keypad column data
This Snooker and Darts Scoreboard to suit the game type by the PIC, IC2. The is read. Pins RC4 to RC7 are used in out-
resulted from a reader’s phone call in resulting data values are output to a put mode, being set high for the selected
which he asked if we had done a snooker matrixed 8-digit 7-segment l.e.d. array, X1 switch row.
scoreboard recently. The last one was to X8, and an alphanumeric l.c.d. display The keypad software routine is a variant
about 15 years back – too long ago to rec- module, X10. of that described in the author’s Using PICs
ommend for construction now. However, The latter is for the benefit of the scorer With Keypads of Jan ’01. The keypad is read
browsing our “library” revealed that old (adjudicator). It shows, on a 2-line × 16 several thousand times a second to see if a
design and it became apparent that it was character per line screen, all current values key is pressed. When it is, the software
ripe for updating. Discussing it with Editor for the game in progress. Its screen con- jumps to a processing routine appropriate to
Mike, we decided that it was worth doing, trast is set by preset VR1. that key.
and to also add the facilities for darts scor- The l.e.d. array, with its 2-inch Any data resulting from a keypress is
ing as well. (50mm) displays, is ideally suited for stored to the PIC’s memory and sent via
Needless to say, perhaps, it was a job viewing by a small audience. Having Port A for display on the allocated section
ideally suited to a PIC microcontroller, the only eight digits, its displayed data is of the l.c.d. module and, as appropriate to
PIC16F877A in this instance. So, standby shown in blocks selected via the keypad, the l.e.d. block selected, to that as well.
your cues and arrows, here it is! as shown later in Table 1. Ports B and D are jointly responsible for
controlling the l.e.d. digits. The coded
7-segment data (as discussed in the
author’s several PIC Tutorials) is output
from Port B to the voltage level changer
and inverting buffer IC3. The buffer’s
seven output lines are connected via buffer
resistors, R3 to R9, to the respective seg-
ment cathodes of each l.e.d. The cathodes
of each same-lettered segment are com-
moned (connected together).
Which digit is then turned on is deter-
mined by which digit’s common anode is
powered by drivers IC4 and IC5. Port D
controls the digit selection and is synchro-
nised such that the segment code is dis-
played on the correct digit. The cycle
refresh rate is about 100kHz and the eye is
oblivious to this rate of cycling (24Hz or
25Hz are the standard frame-change rates
used for normal film movies).
Note that only the L293DN (observe the
DN suffix) device should be used for IC4
and IC5. There are other L293 devices with
different (or no) suffixes, but they have dif-
ferent characteristics and are not suited to
this design.
The PIC is run at 4MHz, as set by crys-
tal X9 in association with capacitors C3
and C4.
Snooker: Player 1 score 54, Player 2 The PIC can be programmed in situ via
score 35 and cueing, break 35, 142 connector TB2, whose pins are in the
remaining on table in frame 1, No frames author’s standard order. Diode D1 and
yet won by either player resistor R1 protect the 5V power line from
adverse voltages during programming.

626 Everyday Practical Electronics, September 2005


Fig.1. Complete circuit diagram for the Snooker and Darts Scoreboard

Power Supply Because of the high current drawn, oper-


ation of this unit from a small standard bat-
the data signals. A power line connection
for this section is not required.
The unit has been designed for powering
at 12V d.c. Regulator IC1 reduces this to tery is not practical. However, a small 12V Pinouts for common l.c.d. modules are
5V as required by the PIC, l.c.d. and pins rechargeable battery would be ideal. shown in Fig.3, and those for keypad S1 in
16 of IC4 and IC5. Pins 8 of IC4 and IC5, Otherwise, a mains powered adaptor capa- Fig.4.
and pin 9 of IC3, are powered at the basic ble of supplying around 500mA at 12V There should be no difficulty over con-
12V input voltage. could be used. It is not necessary for the nection cable length, although tests on this
The unit may be run at 9V if preferred, 12V supply to be regulated. have not been made. Whilst the data rate
although the l.e.d. ballast resistor (R3 to along the cable is moderately fast (100kHz
R9) values may need changing in order to Construction or so), a cable length of two or three
increase the segment brilliance – a value of Component and track layout details for metres, or perhaps more, should be satis-
220Ω each is suggested. A 15V supply the unit’s printed circuit board are shown factory. The use of colour-coded ribbon
could also be used, but the resistor values in Fig.2. This board is available from the cable is recommended.
should then be increased, to say 470Ω. EPE PCB Service, code 530. Provision for linking the keypad to the
The current consumption is high, main- The board has been designed so that it board via a connector is also made,
ly due to that taken by IC4 and IC5 through may be readily cut into two sections if pre- although with the prototype it was con-
their 5V connections. Over all, with all ferred. In this case the Control section nected directly to the board via a 9-pin sin-
l.e.d. digits showing “8”, the total current could go in one case on the adjudicator’s gle-in-line (s.i.l.) socket.
drawn is about 185mA at 9V, 245mA at table, and the Display in another, posi- Assemble the board in order of link
12V, 300mA at 15V. Because the 5V line tioned some distance away for ease of wires, quite a few of which are placed
current is high, it might be preferable that audience viewing. under i.c. and l.e.d. socket positions, fol-
a small heatsink should be used with regu- It will be seen that provision has been lowed by the sockets. Those for the l.e.d.
lator IC1 (although this was not done with made for pin-header connectors to be used digits are 7-pin s.i.l. sections, cut from 14-
the prototype). at the edges of the two board sections, for pin d.i.l. sockets and filed smooth.

Everyday Practical Electronics, September 2005 627


Fig.2. Component and track layout details
for the Snooker and Darts Scoreboard

COMPONENTS
Resistors
R1 1k
R2, R10 to R13 10k (5 off)
R3 to R9 330Ω (see text) (7 off) See
SHOP
Potentiometer TALK
VR1 10k preset, min. round page
Capacitors
C1 22µ radial elect. 25V
C2 100n ceramic disc, 5mm pitch
C3, C4 10p ceramic disc, 5mm pitch (2 off)
Semiconductors
D1 1N4148 signal diode
IC1 7805 1A +5V voltage regulator
IC2 PIC16F877A microcontroller,
pre-programmed (see text)
IC3 ULN2004A 7-way Darlington line driver
IC4, IC5 L293DN 16-pin Half-H driver (see
text) (2 off)
Miscellaneous
S1 4 x 4 data entry keypad
S2 min s.p.s.t. toggle switch
X1 to X8 7-segment common anode l.e.d.
display, 33mm high, 22mm wide, pins at
side, high brightness suggested (8 off)
X9 4MHz crystal
X10 alphanumeric 2-line x 16-characters
(per line) l.c.d. display module
Fig.3. Alternative l.c.d. pinouts
Printed circuit board, available from the EPE PCB
Service code 530; case as required; 12V d.c. power
source, min 500mA output (see text); 40-pin d.i.l. sock-
et; 16-pin d.i.l. socket (3 off); 7-way s.i.l. socket (see
text) (16 off); 1mm terminal pins or pin-header strips;
p.c.b. supports as preferred; mounting nuts and bolts to
suit application; connecting wire; solder etc.

Approx. Cost
Guidance Only £35
excl case &
Fig.4. Keypad connection details PSU

628 Everyday Practical Electronics, September 2005 Everyday Practical Electronics, September 2005 629
Fit the remaining components in Played score. The next frame can then be Having pressed “D” the l.c.d. screen
ascending order of size. Do not insert the started by pressing the “Blank” key, which shows:
d.i.l. i.c.s, l.e.d. displays, or connect the resets the player frame scores to zero, and
l.c.d. module until a thorough check of the Remaining count back to 147.
the assembly has been made, and the 5V The l.e.d. digits show the current scores,
output from regulator IC1 has been Player 1 on line 1, Player 2 on line 2. The
proved. digits on line 3 show the Frames Played
The type of case(s) chosen to house the count.
units(s) is entirely up to personal preference. Pressing key “B” (Block), the next l.e.d.
digits block displays the current Break
Snooker Program count on line 1. Line 2 shows the frames in which both players score values are
With all components present, connect won by Player 1, a hyphen symbol (“–”), shown as the selected starting value (501,
power and recheck that powerline voltages and then the frames won by Player 2. Line or other) on line 1. At the centre of line 1 is
are correct, that the l.c.d. module shows 3 again shows the current Frames Played shown a question mark (“?”). This is where
two lines of data (adjust preset VR1 to set count. It is assumed that neither player’s each throw count is temporarily displayed.
the best contrast), and that the l.e.d. digits frames won score will exceed nine before At either side of Line 2 are shown the cur-
have some values present. the game is won (a 19 frame game). rent legs won count for each player (0) and
By default, the software runs the Pressing key “B” again reveals the third the number of the current leg (#1) in the
Snooker program (darts selection is cov- l.e.d. digits display block, in which the cur- centre.
ered presently). For snooker, the opening rent Remaining value is shown on line 1. The The l.e.d. digits show 501 (or other) on
l.c.d. display is: other digits have no function for this display lines 1 and 2, and the legs count on line 3.
block and just show hyphen symbols. The throw score is entered in standard
The next press of key “B” reveals the calculator fashion. Enter the required value
first display block again. It is a 3-step using any of the numbered keys (0 to 9) and
repeating cycle. then press “D” (again being used as the
Keys 0, 8, 9 and D have no function for <ENTER> key). The entered value is
snooker. deducted from the current player’s running
total.
Darts Program While the throw score is being entered,
in which all values are in their reset (pre- The Darts program can only be selected the value is progressively shown at the cen-
game) state. Screen line 1 shows, in order, when the unit’s power is being switched on. tre of l.c.d. line 1, clearing back to “?”
the “>” symbol, indicating that Player 1 is With the power off, press key “D” (Darts) when “D” is pressed.
the current active player. Then follow the and hold it pressed. Switch on the power When a player’s total reaches zero, their
values of Player 1’s score, the current while keeping “D” pressed. Once the l.c.d. legs won count is automatically increased
Break count (followed by “B”), and screen has data on it, release “D”. The pro- by one, as is the total legs count.
Player 2’s score, all zero at present. To the gram is now in Darts mode and can only be If an error is made in keying the correct
right of Player 2’s score a blank cell exited by switching off the power. number, continue by keying in “0” until the
should be shown. On entry to the Darts program, the screen value reads 000, then key in the cor-
The bottom line shows the number of l.c.d. will show the score for each player rect number. If after “D” is pressed it is
frames won by player 1 (0), a “#” symbol from which their throws are to be deduct- realised that the wrong value has been
and the current frame count number (1), the ed (the “leg” count starting value). The entered, press key “A” (Add) to add the
current value of the balls remaining on the values are each 501 by default until value back to the current player’s score.
table (147) and followed by “R” changed. The lower line shows the mes- Although experienced darts players can
(Remaining), and then the frames won by sage SET HUNDREDS, as below: calculate double and triple scores in their
Player 2 (0). head, for the sake of those who are less
Pressing any of the keys numbered 1 to able, another option is provided. Key in the
7 (ball values) causes that value to be basic number scored and press “D”, then
added to the current player’s score. press the “·” key to add the same value to
Simultaneously, the Remaining value is the score again (double score). A second
reduced by the same amount. The excep- press of “·” adds the same value again
tion is when a foul has been called, which (triple score).
does not affect the Remaining count. As with snooker, player change is done
Change between players is caused by The l.e.d. digits show the 501 value on by pressing “C” (Change). Similarly l.e.d.
pressing key “C” (Change Player). If the line 1, with lines 2 and 3 showing hyphen display block change is done by pressing
change is from Player 1 to Player 2, the symbols (no function). “B”. There are only two display blocks for
lefthand “>” on line 1 becomes blank At this point, the leg count starting value darts. The second shows the throw score on
and to the right of Player 2’s score is can be changed. In a professional darts game line 1 as it is being keyed in. Line 2 shows
shown “<”. Pressing key “C” repeatedly the value is typically 501. In many amateur the legs won scores, and line 3 shows the
cycles back and forth between players. games, though, 301 might be selected. Other total legs count (both as with snooker).
Each press of “C” also resets the Break values ending in 01 might also be chosen, Pressing the blank key terminates a leg,
count. depending on the expertise of the players. incrementing the legs count and resetting
Errors in pressing keys 1 to 7 can be For simplicity, the program allows any player starting scores back to their chosen
corrected by pressing key “A” (Amend), hundreds value from 101 to 1001 to be value (501, or other).
which causes the last value keyed to be selected by pressing the appropriate num-
deducted from the active player’s score, ber key, e.g. “3” for 301. Note that “0” Software Aspects
and added back to the Remaining count. must be pressed for 1001. The selected There are some aspects of the software
Fouls can be actioned by first pressing value is displayed in the Player counts on code that may be of interest to PIC pro-
the dot key (“·”), then pressing the key l.c.d. line 1, and on the l.e.d. digits line 1 gramming readers. The first is the keypad
value appropriate to that to be awarded to (1001 will only show as 001, though). reading routine. This is set out in full in
the other player, whose score is then Once the required value is shown, press Listing 1. The comments alongside various
updated by that amount. Once that has “D” (now used as the <ENTER> key). The command lines should be self-explanatory.
happened, further presses of 1 to 7 are value is then stored to the PIC’s non- It must be noted that the code is specific
awarded to the current player as usual. volatile EEPROM (electrically erasable to the Port pins hardwired on the p.c.b. In
The Remaining count is unaffected for programmable read-only memory) where it other applications, in which other pin allo-
Foul calls. remains for future recall, even after the cations have been made, the code will need
When the Remaining count has reached power has been switched off. It is the value to be modified. Examples of other codings
zero, the player active at that moment is that will be the default next time the pro- can be found in the author’s Using PICs
awarded the frame and their frame score is gram is run. But it may be changed at that with Keypads referred to earlier, and his
incremented, and so too is the Frames time in the same way as above. PIC Controlled Intruder Alarm (Apr ’02).

630 Everyday Practical Electronics, September 2005


The routine in Listing 2 shows the LISTING 1
coding that controls the l.e.d. 7-segment
display digits. It too is believed to be ;******* GET KEYPAD VAL ROUTINE *******
self-explanatory, but it is worth noting
how the common anode control has to GETKEY: clrf SWITCHVAL ; clear monitoring register
turn off the digits (clrf PORTD) before movlw %11110000 ; set outputs RC7 to RC4 high
writing the 7-segment data to them via movwf PORTC
Port B. Failure to do so results in “ghost- nop ; pause to allow PORTC to stabilise
ing” of the previous digit’s value as well movf PORTC,W ; get PORTC inputs
as the required value. andlw 15 ; isolate bits 0 to 3 (RC0 to RC3)
In relation to perhaps using the 7-seg- btfsc STATUS,Z ; is result NOT zero (are any keys pressed)?
ment control routine in another application, return ; no, so return to main prog
note that the segment codes are specific to movlw %00010000 ; yes, find key pressed, trying bit 4 high first
common anode displays and the PIC pins movwf PORTC ; output initial val for RC7-RC4
to which their segment pins are connected. movwf KEYSTORE ; and store into KEYSTORE
In this application they are in the order clrf ROW ; clear the Row count
which best suited ease of p.c.b. layout.
A further point of interest regarding the GK2: movf PORTC,W ; get PORTC inputs
l.e.d. display is that two sets of registers andlw 15 ; isolate bits 0 to 3
have been used for the respective Player btfss STATUS,Z ; is result zero (keys not pressed)?
Scores and other data storage variables. goto GK3 ; no
One set is usually in binary, using one or movlw MATRIX ; yes, add keypad matrix size (4 for 4x4)
two registers (MSB and LSB), depending addwf ROW,F ; to Row count
on the size of the value to be stored. The rlf KEYSTORE,F ; rotate RC7-RC4 value left
other set is basically in BCD (binary coded movf KEYSTORE,W ; get it
decimal) order and typically needing three andlw %11110000 ; isolate bits 7-4
bytes (MSB, NSB, LSB). movwf PORTC ; output to PORTC
These registers hold the 7-segment btfss STATUS,C ; has KEYSTORE high bit entered Carry?
code for decimal values, obtained when goto GK2 ; no, so repeat search
the binary values are converted to deci- return ; yes, so return to main prog
mal for the l.c.d. display. This arrange-
ment considerably speeds the rate at GK3: movwf STORE ; put current KEYSTORE value into STORE
which the LEDSONA routine is actioned. clrf COL ; clear column number count
Without this pre-conversion, the routine
would need to include its own calls to the GK4: bcf STATUS,C ; clear Carry flag
conversion routines prior to updating rrf STORE,F ; rotate right STORE val
each digit display – a very time consum- btfsc STATUS,C ; is Carry flag set?
ing process as LEDSONA is called so goto SUMIT ; yes, so this key pressed, go finish answer
frequently. incf COL,F ; no, so try again
goto GK4 ; repeat search
Main Loop
Listing 3 shows the main loop which SUMIT: movf ROW,W ; sum up results to single answer
repeatedly updates the l.e.d. digits, reads addwf COL,W ; add ROW to COL (total value between 0 and 15)
the keypad and calls the routines which call CONVERTKEY ; convert this val to actual number of key
update score and display data as required. movwf SWITCHVAL ; (as given in called table), and store it
Measurements show that the typical return ; return to main program
cycling rate is about 100kHz.
Calls to the processing routines when LISTING 2
keys are pressed momentarily slow down
the multiplexed display cycling, but do not ;******* SHOW 7-SEGMENT DIGITS ********
have a significant visual impact on the mul-
tiplexing. As a precaution, though, a few LEDSONA: movf DIGITNUMBER,W ; get digit count value
extra calls to the LEDSONA display rou- call ITEMNUMBER ; get address of register to be displayed
tine are set into some longer sub-routines movwf FSR ; put into indirect access register
called by keypresses. movf INDF,W ; get segs val from reg pointed to
In particular, such a call is repeatedly clrf PORTD ; turn off 7-seg anode enable (IC4/5)
made while the WAITSWITCHA routine is movwf PORTB ; put segs data out to PORTB
waiting for a key to be released. Similarly, call DIGSHW ; get which digit to show it on
the PAUSIT delay routine, called following movwf PORTD ; set PORTD digit select code accordingly
WAITSWITCHA’s completion, also makes incf DIGITNUMBER,F ; increment digit select multiplex count
repeated calls to LEDSONA. PAUSIT at bcf DIGITNUMBER,3 ; restrict to 0 to 7
this point is used to eliminate keypress return ; return to main program
release bounce.
LISTING 3
RESOURCES
Software, including source code files, for ;****** MAIN SNOOKER LOOP *************
this design is available on 3.5inch disk from
the Editorial office (a small handling charge MAIN: call LEDSONA ; display current l.e.d. digit
applies – see the EPE PCB Service page) or call GETKEY ; get key pressed if any
it can be downloaded free from the EPE movf SWITCHVAL,W ; get result value
Downloads site, accessible via the home btfsc STATUS,Z ; is it greater than zero (key pressed)?
page at www.epemag.co.uk. It is held in the goto MAIN ; no, not pressed, repeat for next digit
PICs folder, under Snooker Scoreboard. andlw %00001111 ; yes, key pressed
This month’s Shop Talk provides infor- movwf SWITCHVAL ; isolate val in bits 0 to 3
mation about obtaining pre-programmed call ROUTESWITCH ; process routine pointed to by this val
PICs and component buying advice. call WAITSWITCHA ; wait until key is released
The PIC program source code (ASM) goto MAIN ; repeat the loop
was written using EPE Toolkit TK3 soft-
ware (also available via the Downloads

Everyday Practical Electronics, September 2005 631


Table 1: L.E.D. Array Block Data Display Cycle site) and a variant of the TASM dialect. It
Block Line Snooker Darts may be translated to MPASM via TK3 if
1 1 Player 1 score Player 1 score preferred. The run-time assembly is sup-
1 2 Player 2 score Player 2 score plied as an MPASM HEX file, which has
1 3 Frames count Legs count configurations embedded in it (crystal XT,
2 1 Break count Current throw WDT off, POR on, all other values off). If
2 2 Frames won scores Legs won scores you wish to program the PIC yourself, sim-
2 3 Frames count Legs count ply load this HEX file into the PIC using
3 1 Balls remaining - your own PIC programming software and
3 2 – - hardware.
3 3 – - Be aware that the code, which has been
written for a PIC16F877A, is not compati-
Table 2: Keypad Switch Use ble with the ordinary PIC16F877 device.
However, readers familiar with PIC pro-
Snooker Darts gramming can make it compatible by just
1 to 7 ball numbers 0 to 9 score value entry (calculator style) two changes. At the head of the ASM list-
0, 8, 9 No action A (Add) add back last score value entry ing are the statements
A (Amend) subtract last entry B (Block) change LED display block
B (Block) Change LED Display Block C (Change) change player List P = PIC16F877A
C (Change) change player D (Deduct) (Enter) subtract score from include P16F877A.inc
D No action countdown
ɀ Foul ɀ Deduct value again (for doubles/triples) in which the “A” should be deleted:
អ (blank key) increment Frame count អ (blank key) increment Leg count
List P = PIC16F877
Table 3: Prototype Measurents include P16F877.inc
9V 12V 15v PIC and regulator only 8mA
All Digits Off 95mA 95mA 95mA Each L293DN draws approx 40mA Assembling the ASM code will now
All 8s On 188mA 245mA 300mA Heatsink recommended for IC1 (see text) generate a HEX file suitable for the
standard PIC16F877 device. អ

'XQ/DRJKDLUH Please
&ROOHJHRI)XUWKHU(GXFDWLRQ
&XPEHUODQG6WUHHW
'XQ/DRJKDLUH
HPDLOLQIR#GOFIHLHZHEZZZGOFIHLH mention EPE
&R'XEOLQ,UHODQG 7HOHSKRQH
when replying to

$'9$1&('&(57,),&$7( 6XEMHFWVLQFOXGHWKHIROORZLQJ advertisements
LQ
0,&52(/(&7521,&6 &20387,1* $QDORJXH(OHFWURQLFV
'LJLWDO(OHFWURQLFV
\HDUIXOOWLPHFRXUVH 0LFURFRQWUROOHU6\VWHPV $WPHO 
To advertise your
/LQNVWR'HJUHH&RXUVHV &RPSXWHU0DLQWHQDQFH company
WKURXJK 1HWZRUNLQJ Contact:
+LJKHU/LQNV6FKHPH
&RPSXWHU3URJUDPPLQJ Stewart Kearn
Tel: 01202 873872
ZZZGOFIHLH
Email:
[email protected]

632 Everyday Practical Electronics, September 2005


PRACTICALLY SPEAKING
Robert Penfold looks at the Techniques of Actually Doing It!

T school we learned about metres or picofarads. A nanofarad is one This is most likely to occur with elec-
A and kilograms, or for those of my
generation and older it was feet, inch-
thousandth of a microfarad, and a
picofarad is one thousandth of a
trolytic components, which often have
all the values given in microfarads in
es, pounds and ounces that we learned nanofarad or one millionth of a micro- component catalogues.
to use. The units of measurement used farad in other words.
in electronics are less widely taught.
Consequently, many people making a Abbreviation
start in the hobby of electronics con- The micro, nano, and pico prefixes “A nanofarad (nF) is one
struction would not have learned about are not specific to capacitance. They
are used generally in metric mea-
thousandth of a microfarad”
Ohms, Farads, and Henries at school.
Matters are complicated by the fact surement to indicate one millionth, a
that some of the basic units of mea- thousand-millionth, and a million-mil-
surement used in electronics are either lionth of something. Letter Imperfect
very small or huge. One minute you The abbreviation for micro is the Capacitors often have other mark-
might be soldering a 5,600,000 ohm Greek letter mu (µ), but a lower case ings, such as the maximum voltage rat-
resistor to a circuit board, and the next letter “u” is often used instead. On a ing and their tolerance. The latter is
you could be fitting a 0·000000001 circuit diagram or in a components simply the maximum amount that the
farad capacitor! list a 47 microfarad capacitor would actual value of the component can dif-
The range of values covered is therefore have its value given in the fer from its marked value.
immense for some components. With form “47µF” or “47uF”. Presumably With capacitors the tolerance is often
resistors, for instance, the highest working on the basis that the farad is indicated by a single letter and a simple
value that is generally available is a always the basic unit of measurement method of coding, so be careful not to
hundred million times larger than the for a capacitor, this value would often interpret a tolerance code letter as part
lowest available value. The equivalent be given as just “47µ” or “47u”. of the value. These are the tolerance
figure for capacitors is over one thou- The respective abbreviations for ratings for the common code letters:
sand million! nanofarads and picofarads are “n”
and “p”, and these letters should Code Letter Tolerance
High Capacity always be in lower case. A value of F +/- 1%
This can all be a bit confusing at first, 680 picofarads would therefore G +/- 2%
but it all becomes very straightforward if appear as “680pF” or just “680p” on a H +/- 3%
things are rationalised. circuit diagram. A value of 22 nano- J +/- 5%
Taking capacitors first, the basic unit farads would be marked as “22nF” or K +/- 10%
of measurement is the farad, but for “22n”. M +/- 20%
normal electronic circuits this is a huge Space on circuit diagrams tends to
amount of capacitance. The highest be strictly limited, so things are often Capacitor value markings are some-
value I have ever used is a mere taken a stage further with the unit of times in the form of a three-digit num-
0·0047 farads. measurement indicating the position ber. The first two digits of the label are
High value capacitors normally have of the decimal point. For example, simply the first two digits of the value.
their values expressed as so many values of 2·7 picofarads and 4·7 The third digit is the number of zeros
microfarads, and one microfarad is nanofarads are often given as “2p7” that have to be added to the basic two-
equal to a millionth of a farad. The and “4n7” respectively. digit value.
0·0047 farad capacitor mentioned pre- For example, a capacitor marked
viously would normally have its value On Your Marks “223” has “22” as the first two digits of
given as 4700 microfarads. The value markings on capacitors the value, and three zeros must be
Even a microfarad is a substantial can be something less than obvious at added to these in order to provide the
amount of capacitance by normal first glance. A 330 picofarad capacitor full value. This gives an answer of
electronic standards. Many capaci- could and in many cases would have 22000, and as the value is in pico-
tors have values given in nanofarads its value shown as “330p”. Particularly farads this is what would normally be
with ceramic regarded as a 22 nanofarad capacitor.
capacitors, it is The example shown in Fig.1 is
quite likely to be marked “471”, indicating that it has a
marked as “n33”. In value of 470 picofarads. It is pictured
other words, the beside the one-millimetre markings of
value is 0·33 nano- a ruler, and the lettering is only a little
farads, which is over one-millimetre high. There are
actually the same plenty of modern capacitors that are
as 330 picofarads. far smaller than this example, so even
Capacitors hav- those with good eyesight might find it
ing values from 100 necessary to use a magnifier of some
nanofarads to 820 kind.
nanofarads have a At one time it was common for
similar problem. A some types of capacitor to have their
“470n” component value, voltage, and tolerance ratings
might be specified marked using a system of colour
in a components coding. This method was based on
list, but this value the system of coding used for resis-
could be given as tors, and had its advantages.
The three digit marking of 471 on this miniture capacitor (pic- 0·47 microfarads in However, it fell from favour some
tured beside the one-millimeter markings of a ruler) indicate some component years ago and does not seem to be
it has a value of 470pF – 47 plus one zero catalogues. in use any more.

634 Everyday Practical Electronics, September 2005


Resistance
The basic measurement of resis-
tance is the Ohm. Normal resistors are Fig.2. The standard
generally available with values from four-band colour coding
about 1 ohm to 10 million ohms. High- used for resistors
power resistors are only available with
relatively low values, going down to
about 0·1 ohms.
The Greek letter omega (Ω) is used
to indicate that a value is in ohms, so a
330Ω resistor has a value of 330 ohms.
There can be practical difficulties in
using anything other than normal
alphanumeric characters, so the letter Colour Code Table 1: Resistor Colour Code
“R” is often used in place of omega. A While there are some resistors that Colour Band Band Band
value of 330 ohms would therefore have the value written on the body, 1/2 3 4
appear on a circuit diagram or in a com- together with a tolerance rating or code
letter, this method is mainly restricted to Black 0 x1 -
ponents list as either “330Ω” or “330R”, Brown 1 x10 1%
or perhaps even as just “330”. (EPE high power resistors. Resistors having a
power rating of about one watt or less Red 2 x100 2%
always uses the omega symbol.) Orange 3 x1000 -
almost invariably use colour coding to
indicate the value and tolerance rating. Yellow 4 x10000 -
The standard four-band coding uses the Green 5 x100000 0.5%
“A picofarad (pF) is one system shown in Fig.2. Table 1 shows Blue 6 x1000000 0.25%
the meaning of each colour, but some Violet 7 - 0.1%
thousandth of a nanofarad Grey 8 - -
colours are only used in certain bands.
or one millionth of a At one time it was normal for band 4 White 9 - -
to be well separated from the others, Gold - 0.1 5%
microfarad (µF)” but these days there is more or less Silver - 0.01 10%
equal spacing of the bands. There None - - 20%
should still be no risk of getting bands 1 instance, if the four bands give an answer
As with capacitance, it is now stan- and 4 confused and reading the colours of 22k, the resistor is actually a 220k
dard practice for the character denoting backwards. Band 1 is much nearer to component. Ending up with a mixture of
the unit of measurement to also indicate its end of the body, and in some cases normal four-band resistors and compo-
the position of the decimal point. A 5·6 is right at one end of the body. nents that use this five-band method of
ohm resistor would therefore have its As an example of a colour code, sup- coding would be likely to produce confu-
value given in the form “5Ω6” or “5R6”. pose a resistor has bands that are sion and errors. If possible, avoid resistors
The basic ohm is used when dealing green, blue, orange, and gold. Bands 1 that use this form of five-band coding.
with resistors of several hundred ohms and 2 provide the first two digits of the
or less, but kilohms and megohms are value, which in this case are green (5)
used for higher value components. The and blue (6). The first two digits of the “The abbreviation for ohm is
prefixes “kilo” and “mega” are used in the value are therefore “56”. The third band
metric system to respectively denote provides the multiplier, and in this exam- Ω, for kilohm is kΩ and for
one thousand and one million of some- ple it is orange (x1000). This gives a final
thing. A kilometre is a thousand metres, value of 56 x 1000, which is 56000 ohms megohm is MΩ”
and a kilohm is a thousand ohms. or 56kΩ. The fourth band is gold, indi-
The abbreviation for kilohm is “kΩ” or cating that the resistor’s value has a tol-
just “k”, and the abbreviation for erance of plus and minus 5%. It is worth Choked Up
megohm is “MΩ” or just “M”. Again, the bearing in mind that it is perfectly Inductors, which are also called
letter indicating the unit of measurement acceptable to use a component that has chokes, are not used a great deal in
is often used to show the position of the a tighter tolerance than the one speci- electronic projects. The basic unit of
decimal point. A value of 4·7 kilohms fied in the components list. For instance, inductance is the Henry, which is a very
would normally be marked on a circuit a 1% component can be used instead of large amount of inductance. Most
diagram as “4k7”, and a value of 3·9 a 5% type, but a 5% component should inductors have their value given in
megohms would be marked as “3M9”. not be used in place of a 1% type. microhenries, which are millionths of a
Some resistors have a fifth band, but henry. Large inductors have the value
this only indicates the temperature coeffi- specified in millihenries (thousandths of
cient of the component, which is normally a henry).
of no great consequence. Therefore, you Large inductors mostly have the
can just ignore the fifth band and use the value written on the component, possi-
first four in the normal way. bly will other parameters included such
There is another five band version of as a maximum operating current.
the resistor colour code that seems to Physically small inductors for use in low
pop up every now and then. It uses power applications often have the value
three bands to provide the first three marked using colour coding. The sys-
digits of the value. The other two bands tem used is essentially the same as the
then provide the multiplier and toler- standard four-band resistor colour
ance rating in the usual way. code, but it gives a value in nanohen-
The point of having three rather than ries. Divide by one thousand to obtain a
two initial digits is that it enables non- value in microhenries, or by one million
standard values to be accommodated, for an answer in millihenries.
which is probably of no practical impor- For example, suppose an inductor has
tance to project builders. With normal the colour code yellow, violet, red, and
(preferred) values the third band is always gold. The first three colours provide a fig-
black (0). The value can therefore be cal- ure of 4700 (47 × 100), and dividing this
culated by ignoring the third band, and by one thousand gives a value of 4·7
Using a magnifier can also be useful in using the other four bands in the normal microhenries. The gold band indicates
identifying really small capacitor way. This figure is then multiplied by ten in that the tolerance rating of the compo-
markings order to give the actual value. For nent is plus and minus five percent.

Everyday Practical Electronics, September 2005 635


Constructional Project

Controlling Model Railway


Signals
John Waller

Using stepper motors to control the semaphore signals used


with model railways

I Stepper Motor
N modern railways semaphore signals motor. A plastic piece 30mm by 8mm, and
have mostly given way to coloured-light The 4-phase unipolar stepper motor 2mm thick is cut to fit over the shaft and
signals, or no signals at all, at least those used here is shown in Photo 1. The overall glued into place. The semaphore wire is
at the side of the track. But in the model case is about 30mm in diameter. It is sup- bent at 90º and inserted through a hole in
railway world there is a desire to include plied by 12 volts and each of the four coils the plastic and bent again to keep it in
semaphore signals since part of the attrac- has a resistance of 200Ω. The output shaft place.
tion of the hobby is the ability to show the is offset from the centre of the housing, The hole is 6mm from the shaft centre.
way things were. indicating there is a gearbox inside. The The motor is mounted by means of slots
This article follows on from that by the shaft itself is rectangular, 5mm by 3mm, and is positioned, with the semaphore at
late Andy Flind, PIC Quickstep (June ’04), with rounded corners. This makes it simple caution, to make the plastic piece approxi-
which gave a very good introduction to to attach something to the shaft. mately horizontal. Also shown are two
stepper motors and the means of testing The motor comes with wires already mechanical stops, about which more will be
them. Here a specific application for step- connected to a 5-pin female header, with said presently. Looking at the shaft end, the
per motors is described, using them to con- red as the common lead. motor turns anticlockwise to raise the sem-
trol the movement of semaphore signal aphore arm.
arms. Semaphore Signal
A number of matters are covered which Photo 2 shows the signal before con-
will need to be considered for any stepper nection to the motor. It is made by Tomar
motor application. Even if a reader is not Industries, type H-853 (HO scale). The
interested in model railway signals, the quadrant contains coloured lenses to show
solutions adopted herein may be a useful Photo 2. The H-853 red, yellow, and
guide. semaphore signal, green for the stop,
courtesy of Tomar caution, and safe
Signal Positions Industries (www. positions, respec-
The signal being controlled here is of the tomarindustries.com) tively, by being
upper quadrant type, and is set to one of aligned to a white
three positions to assert train control: lamp. Thus it is
ɀ The semaphore is set horizontally, and important to posi- Photo 3. Connecting the signal to the
shows a red light, to signify danger; trains tion the quadrant motor
must stop in front of the signal to bring the
ɀ The semaphore is set to 45º up, and appropriate lens Motor Controller
shows a yellow light, to signify caution or in front of the The controller closely follows the con-
“approach”; trains may proceed past the lamp assembly. cepts described by Andy Flind. A
signal, but not exceeding a designated The lamp assembly itself PIC16F628 is used with internal 4MHz
speed contains an incandescent clock, and all available pins, 16 in number,
ɀ The semaphore points upright, and bulb supplied by 1·4 volts. configured for digital I/O (input/output),
shows a green light, for safe or “clear”; The mast contains the two noting that RA5 can only be an input. The
train speed is unlimited by the signal alone. wires for the lamp, and a circuit diagram for the Model Railway
There are, of course, always other limita- piano wire. Pulling the wire Signal Controller is shown in Fig.1.
tions on train speed down raises the semaphore The employment of 16 pins allows two
The semaphore signal is thus a good can- (and pushing it up lowers complete motors to be driven, via transis-
didate for stepper motor control. the semaphore). The attrib- tors TR1 to TR8 which are buffered by
ute of an upper-quadrant resistors R3 to R10. There are also two out-
signal in real life is that it puts (RA6, RA7) for the lamps fitted to
will fall to the danger posi- each signal, which allow the lamps to be
tion if the driving mecha- flashed to warn trains that automatic block
nism fails. There is mostly and signal control has failed, and trains
too much friction in a model must proceed slowly as if in an uncon-
to do this. trolled yard.
The values for resistors R13 and R14
Connecting the should be chosen to suit the current drawn
Signal by the signal lamps. A value of 390Ω was
Photo 3 shows details of needed with the prototype.
Photo 1. The stepper motor used in this the mechanical connection The transistors may be any small npn type
controller between the signal and the capable of driving motors and lamps, such as

636 Everyday Practical Electronics, September 2005


COMPONENTS
Resistors
R1 to R12 1k (12 off)
R13, R14 to suit signal
lamps 0·5W (see
text) (2 off)
R15 to R23 1k (9 off) (test only,
see text) See
All 0·25W 5% carbon film SHOP
TALK
Capacitors page
C1, C4 100n ceramic disc,
5mm pitch (2 off)
C2 100µ radial elect.
25V
C3 1000µ radial elect.
25V
C5 1µ radial elect.
25V (test only, see
text)
Semiconductors
D1, D3 to D10 1N4001 rectifier
diode (9 off)
D2 1N4148 signal
diode
D11 to D14 red l.e.d. (4 off)
(test only, see text)
TR1 to TR10 ZN4400 or ZTX653
npn transistor (10 off)
IC1 78L05 +5V 100mA
voltage regulator
IC2 PIC16F628
microcontroller,
pre-programmed
(see text)
Miscellaneous
TB1 to TB8 1mm terminal pins
or pin header blocks
S1 to S5 s.p.s.t. min. toggle
switch (5 off) (test
only, see text)
Printed circuit board available from
the EPE PCB Service, code 529;
semaphore signal, Tomar Industries,
type H-853 (HO scale) or to suit;
stepper motor; 18-pin d.i.l. socket;
connecting wire; solder, etc.

Approx. Cost
Guidance Only £16
excl signal &
case

Table 1: PIC Input/Output Allocation

Pin Direction Function


RA0 O motor 1 pole A
RA1 O motor 1 pole B
RA2 O motor 1 pole C
RA3 O motor 1 pole D
RA4 O Busy to host
Fig.2. Circuit diagram for the Model Railway Signal Controller RA5 I RUN/KILL from host
RA6 O Semaphore 1 lamp
ZN4400 or ZTX653 and having the same pin The RUN/KILL input from the host sys- RA7 O Semaphore 2 lamp
order as required by the printed circuit board. tem is used as follows: RB0 O motor 2 pole A
Diodes D3 to D10 suppress back e.m.f. ɀ RUN, with RA5 set, indicates the host RB1 O motor 2 pole B
pulses generated by the motor coils. system is operating normally, and sema- RB2 O motor 2 pole C
phore position orders should be obeyed RB3 O motor 2 pole D
Controller I/O Allocation RB4 I position 1 order from host
The PIC’s input/output allocation is ɀ KILL, with RA5 cleared, indicates an RB5 I position 1 order from host
itemised in Table 1, and the position orders abnormal condition. Semaphore position RB6 I position 2 order from host
from the host system are shown in Table 2. orders are ignored and both signals are set to RB7 I position 2 order from host

Everyday Practical Electronics, September 2005 637


Table 2: Position Orders from
Host System

Order RB4 and RB6 RB5 and RB7


No action 0 0
Danger 1 0
Caution 1 1
Safe 0 1

piano wire, with some in the motor gearbox.


The user will have some control here
according to the size of the hole in the arm
attached to the motor shaft (Photo 3).
Making the hole larger increases the back-
lash, decreasing it increases the friction.
The stiff piano wire should also be bent
very carefully. The mechanical stop at the
clear position is set so the signal semaphore
arm is upright. The calibration procedure
(see later) allows the number of steps, from
any position to any other position, to be
adjusted. These measures help to overcome
the effects of backlash.

Software
The author used John Becker’s simula-
tion facility that has been part of his TK3
PIC programmer since V3.00. It was dis-
cussed in the March ’05 issue, PIC Toolkit
3.30in (84mm) TK3 Simulator and PIC18F Upgrade.
Such a simulation is particularly useful
529 for a PIC16F628 where all I/O (input/out-
put) pins are allocated, with none to spare,
for example to drive an alphanumeric liquid
crystal display module, which can be very
useful for debugging.
The high-level flowchart of the signal
control program is shown in Fig.3. A timing
loop circulates continuously, initiating
2.40in
action every eight milliseconds. At each
(61mm) such interval, the stepper motors are turned
off, whether either are on or not from the
previous interval. If required, a different
pole piece in a motor is then energized. The
operations which take place may be
summarised as follows:

Prototype
p.c.b. mounted
on enclosure
Fig.2. Component and track layout details for the Model Railway Signal holding the
Controller printed circuit board stepper motor
internally, and
clear with the lamps flashing. This message using small angled plates bolted to the back- signal on top.
also goes to the train digital command control ing plate. Software is set to cut out the motor The p.c.b. dif-
(DCC), which removes the control and power at the correct points, but the end stops prevent fers slightly
signal from the train tracks; see the author’s undue force being applied to the signal lever. from the pub-
article Digital Command Control for Model lished version
Trains (Aug ’03). All trains stop (no doubt real Initialising the Signal
railways would relish having this capability!). The host system starts up with RUN
cleared. The signal moves to the clear posi-
Construction tion, and the lamp flashes. The number of
Component and track layout details for motor steps assigned to this operation is suf-
the Model Railway Signal Controller print- ficient that the signal will reach the clear
ed circuit board are shown in Fig.2. This position no matter where it starts from. All or
board is available from the EPE PCB part of this operation will be with the stepper
Service, code 529. motor driving against the stop (see Photo 3).
Assemble the board in the usual order of No damage occurs here, and the condi-
ascending component size, taking care to tion only lasts for about a second. But it
position the diodes, transistors and elec- guarantees putting the signal into a known
trolytic capacitors correctly as shown. Use position regardless of where it has been left
a socket for the PIC, but do not insert the with the power off. It is easy to turn the
PIC until the board has been double- motor by hand, for example.
checked for correct component positioning,
and that the output from regulator IC1 is at Backlash
5V, within a few millivolts. Any mechanical system has some degree
Minimum and maximum motor rotation of backlash, or “lost motion”. Most of the
end stops can be fitted alongside the motor, backlash with the signal is at the ends of the

638 Everyday Practical Electronics, September 2005


Fig.3. High-level flowchart of the signal control program Fig.4. Calibration circuit diagram

ɀ With RUN cleared, the semaphores are The test box simulates the commands
driven to the clear position (upright) and the from the host system, as shown in Table 1.
signal lamp is toggled, as already explained, The power for the box comes from the
to indicate the host system is waiting to run, 5V/0V pins allocated on the p.c.b.
or has lost control over automatic opera- In Fig.4, switch S1 controls the
tions. Once the motors have moved the RUN/KILL command, and the other four
number of steps designated for red to green simulate the commands given in Table 2.
motion, no further motor action occurs. If The test box provides all of the functionali-
RUN is set before this occurs, the operation ty pertaining to normal operations; the
will always be completed first. switches and other components are mount-
ɀ With RUN set, the signal lamps are ed in a utility box.
always on and the controller awaits a new Again following Andy Flind, a useful test
order from the host system, always com- device is shown at Fig.5 for monitoring out-
pleting an existing order before starting a puts to a motor. It is inserted in the five-way
new one. cable between the controller and the motor,
using compatible male and female headers.
In practice, even in a model railway envi- The l.e.d.s flash as the motor steps. Fig.5. Motor test display circuit
ronment, the motors spend most of their
time idle. The time interval of eight mil- Calibration calibration software has a timing loop similar
liseconds is adjustable by factors of two, by Because of the mechanical tolerances in to the main timing loop, but which runs much
changing the value of a mask in the soft- the system, especially backlash, the test box more slowly. The procedure is as follows:
ware. The software is contained in the file also provides means of calibrating each ɀ Make sure the semaphore has already
stepmtre.asm (available as stated later). movement of the signal, as a number of been set to the required start position. For
The issue of completing an existing oper- steps stored in the PIC’s EEPROM. The user example, if the steps green to red or yellow
ation before commencing a new one could would start with nominal values as given in are being calibrated, it is best to power on
be contentious, especially if the new opera- the file stpmtr.msg, which is loaded sepa- with RUN cleared, whereby the semaphore
tion is to set a signal to danger. There is no rately into the PIC, using TK3’s facility for is set hard against the stop in the upright
queue of pending operations; the one that is this, or that of other programmers. position, as already explained, then reset the
present when the current operation is com- At each step of the calibration, the user controller with power off, set RUN, then
pleted is the one executed next. The author selects the movement to be tested by setting power on again, to get back to calibrate. In
will review this aspect after gaining experi- the switches as given in Table 3. The switch other instances, the semaphore might
ence with the controller. Interruption of an settings column is the result of treating the already be in the yellow or red position
existing operation would be possible. switch positions as a binary sequence, as from a previous calibration operation.
shown in the first four columns. Switch set-
ɀ Set the test box switches for the desired
Testing tings of 12 or greater are ignored.
movement and signal from Table 3.
The stepper motor controller is tested and To run the calibration the motor controller
calibrated with a test box whose circuit dia- is powered on with the RUN switch (S1) ɀ Close the RUN switch and observe the
gram is shown in Fig.4. Constructional closed, and then opened after the signal lamp movement of the semaphore.
details for this are not offered, and it may be lights. Normal operations with the host sys- ɀ When the semaphore is in the required
readily assembled on stripboard. tem are powered on with RUN cleared. The position, open the RUN switch; this stops

Everyday Practical Electronics, September 2005 639


the movement and the number of steps for Table 3: Selecting Calibration Movement
that movement is loaded automatically into
the PIC’s EEPROM, where it stays even RB7 RB6 RB5 RB4 Switch settings Semaphore Movement
after the power has been removed. S2 S3 S4 S5
The procedure may be repeated as often 0 0 0 0 0 1 green to red
as needed. The additional mechanical stop 0 0 0 1 1 2 green to red
shown in Photo 3 should be used to prevent 0 0 1 0 2 1 green to yellow
the motor moving the semaphore too far 0 0 1 1 3 2 green to yellow
below the horizontal; the stress of a stalled 0 1 0 0 4 1 red to green
motor is better taken by the stop and not the 0 1 0 1 5 2 red to green
signal mechanism. 0 1 1 0 6 1 red to yellow
As a matter of perception, it looks bad 0 1 1 1 7 2 red to yellow
if the arm is not truly upright or truly hor- 1 0 0 0 8 1 yellow to green
izontal, for clear and danger positions, 1 0 0 1 9 2 yellow to green
respectively. Conversely, the average 1 0 1 0 10 1 yellow to red
observer will not notice if the arm is not 1 0 1 1 11 2 yellow to red
exactly at 45º in the caution position,
provided the yellow lens is aligned to the
lamp, and there is some tolerance in this.
Table 4: Number of steps values for upper quadrant signals H-853
The calibration procedure provides
means for setting the number of steps to
1 ; High count (A) green to red
reach the clear position. The author prefers
20 ; Low count (A) green to red
to set default values here which ensure the
1 ; High count (B) green to red
semaphore will initialise to green from
20 ; Low count (B) green to red
anywhere, as already explained. But the
0 ; High count (A) green to yellow
user can choose otherwise, and may also
138 ; Low count (A) green to yellow
adjust step numbers in the stpmtr.msg file
0 ; High count (B) green to yellow
and load it into EEPROM (see Table 4). If
138 ; Low count (B) green to yellow
TK3 is used for this, it is possible to read
1 ; High count (A) red to green
the PIC’s EEPROM contents after a cali-
20 ; Low count (A) red to green
bration session.
1 ; High count (B) red to green
Resources 20 ; Low count (B) red to green
Software, including source code files, 0 ; High count (A) red to yellow
for the Signals Controller is available on 138 ; Low count (A) red to yellow
3.5inch disk from the Editorial office (a 0 ; High count (B) red to yellow
small handling charge applies – see the 138 ; Low count (B) red to yellow
EPE PCB Service page) or it can be 0 ; High count (A) yellow to green
downloaded free from the EPE 138 ; Low count (A) yellow to green
Downloads site, accessible via the home 0 ; High count (B) yellow to green
page at www.epemag.co.uk. It is held in 138 ; Low count (B) yellow to green
the PICs folder, under Train Signals. 0 ; High count (A) yellow to red
Download all the files within that folder. 138 ; Low count (A) yellow to red
This month’s Shoptalk provides informa- 0 ; High count (B) yellow to red
tion about obtaining pre-programmed PICs. 138 ; Low count (B) yellow to red
If programming the PIC in situ, normal
operating connections are removed from available via the Downloads site) and a PIC16F configurations embedded in it. If
TB3/4 in order to connect the programming variant of the TASM dialect. It may be you wish to program the PIC yourself,
leads. translated to MPASM via TK3 if pre- simply load this HEX file into the PIC
The PIC program source code was writ- ferred. The run-time assembly is supplied using your own PIC programming soft-
ten using EPE Toolkit TK3 software (also as an MPASM HEX file, which has ware and hardware. អ

Obtaining EPE
An initiative in the UK is designed to help you obtain your favourite magazines from newsagents.
Called Just Ask! its aim is to raise awareness that newsagents can stock, order and often home
deliver magazines.
To raise awareness we will be including the Just Ask! logo in the pages of this and future issues and
have included a newsagent order form to help you to obtain copies.
So keep a look out for the logo and next time you visit your newsagent remember to Just Ask! about
obtaining copies of your chosen magazines.

NEWSAGENTS ORDER FORM


Please reserve/deliver a copy of Everyday Practical Electronics for me each month

Signed .......................................................................................................................................................................................

Name and Address ...................................................................................................................................................................

...................................................................................................................................................................................................

..................................................................... Post Code ......................................... Tel ...........................................................

Everyday Practical Electronics is published on the second Thursday of each month and distributed S.O.R. by COMAG
Make sure of your copy of EPE each month – cut out or photostat this form, fill it in and hand it to your newsagent.

640 Everyday Practical Electronics, September 2005


READOUT WIN AN ATLAS LCR ANALYSER
WORTH £69
Email: [email protected] An Atlas LCR Passive Component
Analyser, kindly donated by Peak Electronic
John Becker addresses some Design Ltd., will be awarded to the author
of the general points readers of the Letter Of The Month each month.
have raised. Have you anything The Atlas LCR automatically measures
interesting to say? inductance from 1µH to 10H, capacitance
from 1pF to 10,000µF and resistance from
Drop us a line! 1Ω to 2MΩ with a basic accuracy of 1%.

ᗂ LETTER OF THE MONTH ᗂ


Digital Terrestrial TV The broadcasting industry and enthusiasts first cut their teeth making a
Dear EPE, Government, that’s who. Why are they so basic radio receiver? Maybe I’m stretching
Thank you for Barry Fox’s article keen? Money. The Government sees the a point, but it is just possible for an interest-
Digital TV Switchover in the June issue. possibility of licensing a whole new raft of ed amateur to put together a TV if he really
This subject has been a bee in my bonnet services, and releasing the old frequencies tried, from scratch and first principles.
for a considerable time. for even more. That is absolutely not possible for digital
Barry says: “...A survey...of 4,000 The broadcasters see new advertising or TV, and who says that radio broadcasts
viewers found that more than 70% are subscription revenue streams from new would not eventually go the same way?
angry about [analogue] switch-off and channels. Also (and get this one), once the What happens in a national state of emer-
suspicious of the Government’s motives.” analogue broadcasts are gone there is no gency, when some disaster has crippled the
I can’t speak for the 2,800 in the survey, guarantee that Freeview will remain free! communications infrastructure and there is
but I’ll nail my banner to the same flag Encrypted subscription-only TV becomes a nobody to get a digital TV/radio to work?
pole and tell things as they appear to me. distinct possibility. It doesn’t matter We could cope if analogue was still
“Why did colour TV come in so whether the money comes from direct sub- available.
quickly and so well?” I’ll tell you why. scription, frequency licensing, or adverts –
It was because nobody was forced to the result is the same in the end: we (the Poorly Explained
give up B&W if they didn’t want to. A consumers) pay. Where is the imperative for analogue
B&W TV still works today, because the I don’t think the average man in the switch-off coming from? Am I missing
colour signal remains compatible with street has woken up to the full conse- something? The Government should at
the original B&W standard. That is how quences of analogue turn-off yet. He is still least be called to account by our political
it was designed. It would be far more rel- being seduced by the idea of lots more TV, opposition, and yet there seems to be no
evant to compare digital switch-over but is gradually finding that most of it is opposition at all. As far as I know, neither
with the change from 405 to 625 lines, utter pap. And, let’s face it, you can only the case for nor the case against has formed
which meant a period of simultaneous watch one channel at a time. He has yet to part of any of the party manifestos leading
transmission on VHF and UHF until the realise that every TV and video recorder up to the recent general election.
population of active VHF receivers throughout the house will have to be There has been a general lack of consul-
diminished below what was reasonable. replaced, or at least converted with a set- tation, and the Government should explain
top box. Just one box for the whole house to us why they are doing this – in terms
Out of Line? will not do, because that would mean the other than “wouldn’t it be nice if...”. They
The change from 405 to 625 lines, and kids upstairs have to watch the same thing should at the same time explain why on the
then the introduction of colour, both con- as everyone else. one hand they wish to get the nation fitter
veyed significant improvements to the ser- VCRs are not amenable to set-top boxes by taking more exercise and becoming
vice that rewarded the audience with a either, because there is no way to persuade involved in community activities, and yet
much better viewing experience. Can the the box to change channel and record on the other hand be seeking to provide
same honestly be said for digital terrestrial something else unattended. These func- more reasons (?) to be couch potatoes.
TV? As far as I can see, the consequences tions will have to be part of a VCR specifi- Perhaps it is some kind of weird reverse
of having more channels to fill are that the cally designed for digital terrestrial. What is logic aversion therapy.
existing resources are diluted across them. the cost of replacing all the receivers in a I, for one, am 100% against analogue
Witness the BBC having to trim its pro- household? £1500? Hands up caravan switch-off. There is no need of additional
duction teams, basically to find the funds owners with a TV, or people who use pock- services beyond what’s already available
to buy in more rubbish to populate the et TVs out and about at sports venues or on cable and satellite, and what might be
schedules. Witness also the migration of whatever. You’ll have no joy there when possible with broadband (just another form
the traditional quality viewing away from analogue is pulled. of cable really).
the old traditional (analogue!) channels. The publicly funded BBC should focus
It seems to me that nobody has made a No-Go Nooks on putting quality programmes on its core
rational case for why we want digital ter- There are nooks and crannies in Britain services and forget about expanding into
restrial at all. Anyone who really wants that manage on a mediocre signal now, but umpteen other channels. If there is a real
lots of channels to surf can do so already, will be no-go for digital. An analogue sig- consumer demand, let private enterprises
because they will have been drawn to nal degrades gracefully, and has to go down serve it by whatever means available (Sky,
satellite or cable before now. What other a long way before it becomes totally inde- NTL) and charge for it, but leave the exist-
case (for the consumer) can there be? cipherable. Not so with digital: lose enough ing service alone. I for one will join the
Improved picture quality? Maybe, but bits that the error correction gives up, and ranks of giving up telly altogether if ana-
does anybody seriously have anything to that’s it. Nothing. Ask people with digital logue goes – I can’t find the time to watch
complain about with 625-line PAL how often a bird on the aerial interrupts the the bits I would like to as it is.
colour? Does anyone really need DVD programme. You could feed more power Ken Wood, via email
picture quality on a broadcast channel? into each digital channel, but actually the
broadcasters just want to spread it over Editor Mike replied to Ken:
Gainers and Losers more channels.
Having established in my thesis that the I’ll go out on a limb here and suggest that Thank you for a very interesting letter –
consumer has no need of it, and that the analogue switch-off is also a nail in the cof- I am fully in agreement with you, even
content will be worse as a result of it, who fin for electronic engineering in general. though I would like better quality pictures
is driving it forward? Tell me how many professionals and if possible.

642 Everyday Practical Electronics, September 2005


Crossword Update professional applications, but I find the Rotary Encoders
Dear EPE, freeware version adequate for most hobby- Dear EPE,
As a result of chatting with several read- ists, supporting schematic layout and auto- I’d like to make a suggestion to anyone
ers I have made some updates to the matic generation of a “rat’s nest” to developing PIC projects. Many PIC pro-
Crossword Solver (May ’05) code. These facilitate artwork layout for a double-sided jects feature a pair of Up/Down pushbutton
changes address the following issues: p.c.b. up to 4in × 4in (10cm × 10cm) in switches which are used to set various para-
size. It also has an extensive library that can meters, the number being displayed on an
1. The l.c.d. access routines would not be easily expanded. Full details and the l.c.d. However, this is not always very user-
always start properly on powerup. This was freeware download link can be found at friendly, particularly if a parameter has to
due to some critical timing issues associat- www.cadsoft.de. be changed frequently.
ed with using the l.c.d. in 4-bit mode. John Harris Rotary encoders look much like poten-
tiometers, but contain a pair of switches
2. Words greater than 16 characters had a I suggest that Robert takes a look at which operate as the control is turned. By
character missing when displayed. www.openoffice.org. Their drawing pro- counting pulses, a PIC can tell how far the
gram is extremely good. I have used it on control has been turned, and by watching
3. The unit did not reject a request for a numerous occasions, although I have not the order in which the switches operate, the
word longer than its biggest entry, resulting drawn a circuit diagram. PIC can tell whether the control has rotated
in rubbish being displayed. Victor Moisey, clockwise or anti-clockwise. Now instead
All these are fixed in this release. University of Cape Town of pressing a button 30 times, one simply
Mike Hibbett, via email dials up the required number.
I can recommend ePanorama website Rotary encoders also have the advan-
Thanks Mike, your new code has been (www.epanorama.net/links/software.ht tages of reducing the number of holes in the
put on our Downloads site and has also ml) as an excellent resource. This site lists a front panel, and constructors can choose
been sent to Magenta. range of packages in each category, for both from a wide range of knobs to give the pro-
Linux and Windows, with prices ranging ject the desired appearance.
TK3 Link to Proton+ Rob Strange,
Dear EPE, from the free to the expensive professional
packages. Many of the paid-for packages Kenilworth, via email
You may be interested to know that I
have produced a Toolkit TK3 link for PDS. do include free demonstrations, so you can
try before you buy. Yes, Rob, the problem of communicating
The design of this link was not to modify with a PIC can be significant in some cases
the TK3 source code but instead to change Gavin Wheeler, Pembrokeshire
and a multitude of options are available. A
the file TK3settings.txt. TK3Link acts as rotary encoder can be one answer, provid-
the programmer by transferring the HEX I recommend Matt Pyne’s excellent open
source program TinyCad for Windows. This ing its starting position is always known
and ASM files compiled by PDS along with (not actually the case with all such
the PIC type used in the code. Once this is a full featured schematic design program
which is described on Matt’s site as follows: devices).
information has been transferred, TK3 will
be automatically launched. You can down- “TinyCAD is a program to help you Frequency Calc Prog
load from: www.thefoxnet.co.uk. draw circuit diagrams. It comes complete Dear EPE,
Your articles have been a great source of with symbol libraries to get you started Looking at July ’05 page 483 (LF and
inspiration to me over the years, great work, straight away. As well as being able to sim- VLF Converter) there’s the usual resonant-
thank you. ply print your designs, you can use frequency formula. Some time ago I wrote
Paul Fox, via email TinyCAD to publish your drawings by an HTML/Javascript program for this cal-
copying and pasting into a Word document, culation. Feel free to invite readers to
Thanks Paul, that’s a great idea imple- or saving as a PNG bitmap. obtain a copy from me by sending a flop-
mented. I’ve also put your code on our “You can use TinyCAD as a front end to py and stamped/addressed envelope.
Downloads site, in the TK3 folder. a p.c.b. layout program (see the links), by Godfrey Manning, 63 The Drive,
getting TinyCAD to create a netlist of your Edgware, Middlesex, HA8 8PS.
CADs Galore circuit. It is fully open-source so you can
Robert B. Fairbairn in Readout July ’05 use it for free and you can download the Another useful offering Godfrey, thank
was asking about good low-cost CAD soft- source code for use in your own projects.” you!
ware for drawing p.c.b.s, etc. Lots of read- Matt was extremely helpful with my
ers kindly responded, as follows. Thanks installation problem in Win98 first edition
everyone. (the latest issue solves the problems I expe- PC PWM PSU
rienced) and the program can export netlists Dear EPE,
Serif DrawPlus is a program which is to various freeware programs including I am building Robert Penfold’s
easy to use and said to be as good as SPICE, p.c.b. and stripboard layout soft- Computer Controlled PWM Power Supply
CorelDraw (usual disclaimer). I believe ware. These can be reached by links from from June ’05. I would be grateful if you
they are up to DrawPlus 9 or 10 now, but a Matt’s site:http://tinycad.sourceforge.net. could explain to me the reason for using
free version of DrawPlus 4 can be down- David Howse the 4k7 resistor between the emitter of the
loaded from Serif’s website at TIP121 transistor and ground. The article
www.freeserifsoftware.com/default.asp. Provided Robert can access a Linux explains that this resistor is required to
Alan Jones, London machine I would suggest he takes a good maintain a significant load on the TIP121.
look at the gEDA suite at Why is a “significant load” required?
I have used Microsoft’s Visio to produce www.geda.seul.org. This is licenced Noel Dillon, via email
schematic drawings for support documents under the GPL and therefore free to down-
whilst working in the UK electricity supply load and use. It has a circuit capture pro- Robert explains:
industry. It is fairly intuitive to use and I gram “gshem”, a p.c.b. layout program
managed to obtain an OEM (no paper man- “PCB” and various other related tools. The A power transistor does not usually
ual) CD ROM of Visio 2000 at a computer learning curve is a bit steep but there is an operate properly unless it passes a current
fair for around £35 for home use. Coming active support group. of a milliamp or two. The load resistor
from the MS stable it has the advantage that A 79MB CD ROM ISO image is avail- simply ensures that this condition is
it is compatible with Word, Excel, able via this site. To show what is possible always met. In practice it is likely that
PowerPoint etc. AutoCAD is the de facto with this, take a look at http://dlhamon. there would be sufficient loading on the
CAD standard in most industries, but is com/dspcard/index.html. This site also output anyway. It is only if (say) the output
quite expensive and (in my experience) is has links to some interesting information was checked using an oscilloscope or
not as intuitive. on reflow soldering of multipin surface other high resistance load that the load
Dave Reeves, Sutton Coldfield mount components using cheap sandwich resistor would be required. If you leave it
ovens. out, the supply will still work properly in
Freeware software called Eagle should Colin Ager, Garboldisham, most situations.
meet Robert’s needs. The full version is for Norfolk Robert Penfold, via email

Everyday Practical Electronics, September 2005 643


EPE IS PLEASED TO BE ABLE TO OFFER YOU THESE

ELECTRONICS CD-ROMS
ELECTRONICS PROJECTS ELECTRONICS
Electronic Projects is split into two main sections: Building Electronic Projects CAD PACK
contains comprehensive information about the components, tools and techniques
used in developing projects from initial concept through to final circuit board
production. Extensive use is made of video presentations showing soldering and
construction techniques. The second section contains a set of ten projects for
students to build, ranging from simple sensor circuits through to power amplifiers. A
shareware version of Matrix’s CADPACK schematic capture, circuit simulation and
p.c.b. design software is included.
The projects on the CD-ROM are: Logic Probe; Light, Heat and Moisture Sensor;
NE555 Timer; Egg Timer; Dice Machine; Bike Alarm; Stereo Mixer; Power
Amplifier; Sound Activated Switch; Reaction Tester. Full parts lists, schematics
and p.c.b. layouts are included on the CD-ROM.
Logic Probe testing

ELECTRONIC CIRCUITS & COMPONENTS V2.0 PCB Layout


Provides an introduction to the principles and application of the most common types of
Electronics CADPACK allows users to
N2 electronic components and shows how they are used to form complete circuits. The
VERSIO virtual laboratories, worked examples and pre-designed circuits allow students to
design complex circuit schematics, to view
circuit animations using a unique SPICE-
learn, experiment and check their understanding. Version 2 has been considerably
based simulation tool, and to design
expanded in almost every area following a review of major syllabuses (GCSE, GNVQ,
printed circuit boards. CADPACK is made
A level and HNC). It also contains both European and American circuit symbols.
up of three separate software modules.
Sections include: Fundamentals: units & multiples, electricity, electric circuits,
(These are restricted versions of the full
alternating circuits. Passive Components: resistors, capacitors, inductors,
Labcenter software.) ISIS Lite which
transformers. Semiconductors: diodes, transistors, op.amps, logic gates. Passive
provides full schematic drawing features
Circuits. Active Circuits. The Parts Gallery will help students to recognise common
including full control of drawing
electronic components and their corresponding symbols in circuit diagrams.
appearance, automatic wire routing, and
Included in the Institutional Versions are multiple choice questions, exam style
over 6,000 parts. PROSPICE Lite
Circuit simulation screen questions, fault finding virtual laboratories and investigations/worksheets.
(integrated into ISIS Lite) which uses
unique animation to show the operation of
any circuit with mouse-operated switches,
pots. etc. The animation is compiled using
ANALOGUE ELECTRONICS a full mixed mode SPICE simulator. ARES
Analogue Electronics is a complete learning resource for this most difficult Lite PCB layout software allows
branch of electronics. The CD-ROM includes a host of virtual laboratories, professional quality PCBs to be designed
animations, diagrams, photographs and text as well as a SPICE electronic circuit and includes advanced features such as
simulator with over 50 pre-designed circuits. 16-layer boards, SMT components, and
Sections on the CD-ROM include: Fundamentals – Analogue Signals (5 an autorouter operating on user generated
sections),Transistors (4 sections), Waveshaping Circuits (6 sections). Op.Amps Net Lists.
– 17 sections covering everything from Symbols and Signal Connections to
Differentiators. Amplifiers – Single Stage Amplifiers (8 sections), Multi-stage
Amplifiers (3 sections). Filters – Passive Filters (10 sections), Phase Shifting
Networks (4 sections), Active Filters (6 sections). Oscillators – 6 sections from ROBOTICS &
Positive Feedback to Crystal Oscillators. Systems – 12 sections from Audio
Pre-Amplifiers to 8-Bit ADC plus a gallery showing representative p.c.b. photos. MECHATRONICS
Complimentary output stage

DIGITAL ELECTRONICS V2.0


N2
VERSIO
Digital Electronics builds on the knowledge of logic gates covered in Electronic
Circuits & Components (opposite), and takes users through the subject of digital
electronics up to the operation and architecture of microprocessors. The virtual
laboratories allow users to operate many circuits on screen.
Covers binary and hexadecimal numbering systems, ASCII, basic logic gates,
monostable action and circuits, and bistables – including JK and D-type flip-flops.
Multiple gate circuits, equivalent logic functions and specialised logic functions.
Introduces sequential logic including clocks and clock circuitry, counters, binary
coded decimal and shift registers. A/D and D/A converters, traffic light controllers, Case study of the Milford
memories and microprocessors – architecture, bus systems and their arithmetic logic
Instruments Spider
units. Sections on Boolean Logic and Venn diagrams, displays and chip types have
been expanded in Version 2 and new sections include shift registers, digital fault
finding, programmable logic controllers, and microcontrollers and microprocessors. Robotics and Mechatronics is designed to
The Institutional versions now also include several types of assessment for enable hobbyists/students with little
supervisors, including worksheets, multiple choice tests, fault finding exercises and previous experience of electronics to
Virtual laboratory – Traffic Lights examination questions. design and build electromechanical
systems. The CD-ROM deals with all
aspects of robotics from the control
ANALOGUE FILTERS systems used, the transducers available,
motors/actuators and the circuits to drive
Analogue Filters is a complete course in designing active and passive filters that them. Case study material (including the
makes use of highly interactive virtual laboratories and simulations to explain NASA Mars Rover, the Milford Spider and
how filters are designed. It is split into five chapters: Revision which provides the Furby) is used to show how practical
underpinning knowledge required for those who need to design filters. Filter robotic systems are designed. The result
Basics which is a course in terminology and filter characterization, important is a highly stimulating resource that will
make learning, and building robotics and
classes of filter, filter order, filter impedance and impedance matching, and effects
mechatronic systems easier. The
of different filter types. Advanced Theory which covers the use of filter tables, Institutional versions have additional
mathematics behind filter design, and an explanation of the design of active worksheets and multiple choice questions.
filters. Passive Filter Design which includes an expert system and filter ɀ Interactive Virtual Laboratories
synthesis tool for the design of low-pass, high-pass, band-pass, and band-stop ɀ Little previous knowledge required
Bessel, Butterworth and Chebyshev ladder filters. Active Filter Design which ɀ Mathematics is kept to a minimum and
includes an expert system and filter synthesis tool for the design of low-pass, all calculations are explained
Filter synthesis high-pass, band-pass, and band-stop Bessel, Butterworth and Chebyshev ɀ Clear circuit simulations

PRICES Hobbyist/Student ...................................................£45 inc VAT


Institutional (Schools/HE/FE/Industry)..............£99 plus VAT
Prices for each of the CD-ROMs above are: Institutional 10 user (Network Licence) ..........£249 plus VAT
(Order form on third page) Site Licence........................................................£499 plus VAT
(UK and EU customers add VAT at 17.5% to “plus VAT’’ prices)
Everyday Practical Electronics, September 2005 645
PICmicro TUTORIALS AND PROGRAMMING
HARDWARE

VERSION 3 PICmicro MCU


DEVELOPMENT BOARD
Suitable for use with the three software packages
listed below.
This flexible development board allows students to learn
both how to program PICmicro microcontrollers as well as
program a range of 8, 18, 28 and 40-pin devices from the
12, 16 and 18 series PICmicro ranges. For experienced
programmers all programming software is included in the
PPP utility that comes with the development board. For
those who want to learn, choose one or all of the packages
below to use with the Development Board.
 Makes it easier to develop PICmicro projects
 Supports low cost Flash-programmable PICmicro devices
 Fully featured integrated displays – 16 individual l.e.d.s,
quad 7-segment display and alphanumeric l.c.d. display
 Supports PICmicro microcontrollers with A/D converters £158 including VAT and postage
 Fully protected expansion bus for project work
 USB programmable supplied with USB cable and
 Can be powered by USB (no power supply required) programming software
SOFTWARE
NEW V3 Suitable for use with the Development Board shown above.

ASSEMBLY FOR PICmicro V3 ‘C’ FOR PICmicro FLOWCODE FOR PICmicro V2


(Formerly PICtutor) VERSION 2 Flowcode is a very high level language
Assembly for PICmicro microcontrollers V3.0 The C for PICmicro microcontrollers CD- programming system for PICmicro
(previously known as PICtutor) by John ROM is designed for students and microcontrollers based on flowcharts.
Becker contains a complete course in professionals who need to learn how to Flowcode allows you to design and simulate
programming the PIC16F84 PICmicro program embedded microcontrollers in C. complex robotics and control systems in a
microcontroller from Arizona Microchip. It The CD contains a course as well as all the matter of minutes.
starts with fundamental concepts and software tools needed to create Hex code Flowcode is a powerful language that uses
extends up to complex programs including for a wide range of PICmicro devices – macros to facilitate the control of complex
watchdog timers, interrupts and sleep modes. including a full C compiler for a wide range devices like 7-segment displays, motor
The CD makes use of the latest simulation of PICmicro devices. controllers and l.c.d. displays. The use of
techniques which provide a superb tool for Although the course focuses on the use of macros allows you to control these
learning: the Virtual PICmicro micro- the PICmicro microcontrollers, this CD- electronic devices without getting bogged
controller. This is a simulation tool that ROM will provide a good grounding in C down in understanding the programming
allows users to write and execute MPASM programming for any microcontroller. involved.
assembler code for the PIC16F84  Complete course in C as well as C Flowcode produces MPASM code which is
microcontroller on-screen. Using this you programming for PICmicro microcontrollers compatible with virtually all PICmicro
can actually see what happens inside the  Highly interactive course  Virtual C programmers. When used in conjunction
PICmicro MCU as each instruction is PICmicro improves understanding  with the Version 2 development board this
executed which enhances understanding. Includes a C compiler for a wide range of provides a seamless solution that allows
 Comprehensive instruction through 45 PICmicro devices  Includes full Integrated you to program chips in minutes.
tutorial sections  Includes Vlab, a Virtual Development Environment  Includes  Requires no programming experience
PICmicro microcontroller: a fully functioning MPLAB software  Compatible with most  Allows complex PICmicro applications to
simulator  Tests, exercises and projects PICmicro programmers  Includes a be designed quickly  Uses international
covering a wide range of PICmicro MCU compiler for all the PICmicro devices. standard flow chart symbols (ISO5807) 
applications  Includes MPLAB assembler Full on-screen simulation allows debugging
 Visual representation of a PICmicro and speeds up the development process
showing architecture and functions   Facilitates learning via a full suite of
Expert system for code entry helps first time demonstration tutorials  Produces ASM
users  Shows data flow and fetch execute code for a range of 18, 28 and 40-pin
cycle and has challenges (washing devices  Professional versions include
machine, lift, crossroads etc.)  Imports virtual systems (burglar alarm, buggy and
MPASM files. maze, plus RS232, IrDa etc.).

Minimum system requirements for these


items: Pentium PC running Windows 98,
NT, 2000, ME, XP; CD-ROM drive;
64MB RAM; 10MB hard disk space.
Virtual PICmicro Burglar Alarm Simulation

Hobbyist/Student £45 inc VAT


PRICES Flowcode V2 Hobbyist/Student £57 inc VAT
InstItutional (Schools/HE/FE/Industry) £99 plus VAT
Prices for each of the CD-ROMs above are: Flowcode Professional £99 plus VAT
Institutional/Professional 10 user (Network Licence) £300 plus VAT
(Order form on next page) Site Licence £599 plus VAT
(UK and EU customers add VAT at 17.5% to “plus VAT’’ prices)

646 Everyday Practical Electronics, September 2005


TEACH-IN 2000 – LEARN ELECTRONICS WITH EPE DIGITAL WORKS 3.0
EPE ’s own Teach-In CD-ROM, contains
the full 12-part Teach-In series by John FREE BOOK
Becker in PDF form plus the Teach-In
interactive software (Win 95, 98, ME and WITH TEACH-IN Counter
above) covering all aspects of the series.
We have also added Alan Winstanley’s 2000 CD-ROM project
highly acclaimed Basic Soldering Guide
which is fully illustrated and which also
includes Desoldering. The Teach-In
series covers: Colour Codes and
Resistors, Capacitors, Potentiometers, Digital Works Version 3.0 is a graphical
Sensor Resistors, Ohm’s Law, Diodes design tool that enables you to construct
and L.E.D.s, Waveforms, Frequency and digital logic circuits and analyze their
Time, Logic Gates, Binary and Hex Logic,
Op.amps, Comparators, Mixers, Audio behaviour. It is so simple to use that it will
and Sensor Amplifiers, Transistors,
Sine wave relationship values take you less than 10 minutes to make your
Transformers and Rectifiers, Voltage first digital design. It is so powerful that you
Regulation, Integration, Differentiation, 7-segment Displays, L.C.D.s, Digital-to-Analogue. will never outgrow its capability  Software
Each part has an associated practical section and the series includes a simple PC for simulating digital logic circuits Create
interface (Win 95, 98, ME ONLY) so you can use your PC as a basic oscilloscope with your own macros – highly scalable Create
the various circuits. your own circuits, components, and i.c.s
A hands-on approach to electronics with numerous breadboard circuits to try out. Easy-to-use digital interface Animation
£12.45 including VAT and postage. Requires Adobe Acrobat (available free from brings circuits to life Vast library of logic
the Internet – www.adobe.com/acrobat). macros and 74 series i.c.s with data sheets
Powerful tool for designing and learning.
FREE WITH EACH TEACH-IN CD-ROM – Electronics Hobbyist Compendium 80-page Hobbyist/Student £45 inc. VAT.
book by Robert Penfold. Covers Tools For The Job; Component Testing; Oscilloscope
Basics. Institutional £99 plus VAT.
Institutional 10 user £249 plus VAT.
Site Licence £599 plus VAT.
ELECTRONICS IN CONTROL
Two colourful animated courses for students on one CD-ROM. These cover Key Stage 3 and GCSE syllabuses. Key ELECTRONIC
Stage 3: A pictorial look at the Electronics section featuring animations and video clips. Provides an ideal introduction
or revision guide, including multi-choice questions with feedback. GCSE: Aimed at the Electronics in many Design &
COMPONENTS PHOTOS
Technology courses, it covers many sections of GCSE Electronics. Provides an ideal revision guide with Homework A high quality selection of over 200 JPG
images of electronic
Questions on each chapter. Worked answers with an access code are provided on a special website. components. This
Single User £29 inc. VAT. Multiple User £39 plus VAT selection of high
Student copies (available only with a multiple user copy) £6 plus VAT resolution photos can be
(UK and EU customers add VAT at 17.5% to “plus VAT’’ prices) used to enhance
projects and
presentations or to help
MODULAR CIRCUIT DESIGN VERSIO with training and
Contains a range of tried and tested analogue and digital circuit modules, together with the N3 educational material.
They are royalty free for
knowledge to use and interface them. Thus allowing anyone with a basic understanding of circuit symbols to use in commercial or
design and build their own projects. Version 3 includes data and circuit modules for a range of popular PICs; includes personal printed projects, and can also be
PICAXE circuits, the system which enables a PIC to be programmed without a programmer, and without removing it used royalty free in books, catalogues,
from the circuit. Shows where to obtain free software downloads to enable BASIC programming. magazine articles as well as worldwide web
Essential information for anyone undertaking GCSE or “A’’ level electronics or technology and for hobbyists who want pages (subject to restrictions – see licence for
to get to grips with project design. Over seventy different Input, Processor and Output modules are illustrated and fully full details).
described, together with detailed information on construction, fault finding and components, including circuit symbols, Also contains a FREE 30-day evaluation of
pinouts, power supplies, decoupling etc. Paint Shop Pro 6 – Paint Shop Pro image
Single User £19.95 inc. VAT. Multiple User £34 plus VAT editing tips and on-line help included!
(UK and EU customers add VAT at 17.5% to “plus VAT’’ prices)
Price £19.95 inc. VAT
Minimum system requirements for these CD-ROMs: Pentium PC, CD-ROM drive, 32MB RAM, 10MB hard disk space. Windows 95/98/NT/2000/ME/XP, mouse, sound card, web browser.

Please send me: CD-ROM ORDER FORM ORDERING


 Electronic Projects
 Electronic Circuits & Components V2.0 ALL PRICES INCLUDE UK
 Analogue Electronics Version required: POSTAGE
 Digital Electronics V2.0  Hobbyist/Student
 Filters  Institutional
 Electronics CAD Pack  Institutional/Professional 10 user Student/Single User/Standard Version
 Robotics & Mechatronics  Site licence price includes postage to most
 Assembly for PICmicro V2 countries in the world
 ‘C’ for PICmicro V2 EU residents outside the UK add £5 for
 Flowcode V2 for PICmicro airmail postage per order
 Digital Works 3.0

 PICmicro Development Board V2 (hardware)


 Development Board UK plugtop power supply Institutional, Multiple User and Deluxe
 Development Board 25-way connecting lead Versions – overseas readers add £5 to the
basic price of each order for airmail postage
 Teach-In 2000 + FREE BOOK (do not add VAT unless you live in an EU
 Electronic Components Photos (European Union) country, then add 17½%
 Electronics In Control – Single User VAT or provide your official VAT registration



Electronics In Control – Multiple User
Modular Circuit Design – Single User
Modular Circuit Design – Multiple User
} Note: The software on each version is
the same, only the licence for use varies.
number).

Send your order to:


Direct Book Service
Full name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Wimborne Publishing Ltd
Address: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
408 Wimborne Road East
. . . . . . . . . . . . . . . . . . . . . . . . . . . .Post code: . . . . . . . . . . . . . . . .Tel. No: . . . . . . . . . . . . . . . . . . . . Ferndown, Dorset BH22 9ND
Signature: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . To order by phone ring
 I enclose cheque/PO in £ sterling payable to WIMBORNE PUBLISHING LTD for £ 01202 873872. Fax: 01202 874562
 Please charge my Visa/Mastercard/Amex/Diners Club/Switch: £ Goods are normally sent within seven days
Valid From: . . . . . . . . . . . . . . . . . . . .Card expiry date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-mail: [email protected]
Card No: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Switch Issue No. . . . . . . . . . Online shop:
www.epemag.wimborne.co.uk/shopdoor.htm
Card Security Code . . . . . . . . . . (The last 3 digits on or just under the signature strip)

Everyday Practical Electronics, September 2005 647


Constructional Project

Back to Basics – CMOS


Logic Devices
Bart Trepak

Part 6 – Daily Reminder and Whistle Switch


Illustrates how useful circuits can be designed simply
using CMOS logic devices as the active components

T
HIS little Daily Remider gadget has
been designed to be a reminder for
doing regular events, such as taking
medication. It not only indicates the day
of the week but also sounds an alarm once
each day. When the reset button is
pressed, the alarm is cancelled and will
not sound again until the following day.
The unit may also be useful as a week-
days-only reminder, in which the alarm
can be disabled at weekends. Although it
is possible to set the day of the week, it is
not possible with this simple circuit to set
or show the time of day. The day of the
week therefore changes and the alarm
sounds every 24 hours from the time the
unit is first started. It is an easy matter to
start the unit at, say, 7.30 a.m. on the first
day and it will then continue to sound the
alarm at this time every day.
To save battery power, the display is Fig.6.1. Block diagram for the Daily Reminder
only enabled when a switch is pressed.
The alarm, however, will sound each day the decoded outputs of this drive seven Alternatively, it is possible to rewire
(unless disabled at weekends) and will l.e.d.s to provide the day of the week dis- the monostable to function as a bistable,
sound for one minute unless silenced by play. It also triggers a monostable which in which case the alarm will sound con-
pressing the reset switch. enables an oscillator to sound the alarm tinuously until disabled by pressing the
for a preset time. The alarm continues reset switch. This may be useful in situa-
Basic Operation until it is acknowledged by pressing the tions where an alarm sounding for only a
The basic operation of the unit is shown reset switch or the monostable times out. short period may be missed.
in the block diagram of Fig.6.1. The first
part is a binary counter which provides
the timebase for the circuit, dividing the
input frequency to provide one pulse per
day.
The clock signal to the counter is indi-
rectly derived from the 50Hz (or 60Hz)
a.c. mains frequency. The high input
impedance of CMOS devices is used to
advantage to pick up the frequency signal
without the need for a direct connection to
the mains supply. Of course, a mains elec-
tricty supply must be within the vicinity!
Since we are not concerned here with
seconds or hours, the outputs of the count-
er are decoded for a count of 4,320,000
(or 5,184,000 for a 60Hz input) which is
the number of mains cycles that occur in
one day. The output of the decoder is used
to reset the counter at the end of this
count, following which it begins counting
from zero again.
The daily reset pulse is also used to
advance a divide-by-seven counter and

648 Everyday Practical Electronics, September 2005


Circuit Description
The circuit diagram for the Daily
Reminder is shown in Fig.6.2, where
counters IC1 and IC2 form the divider
chain. Resistor R1 provides additional
static protection for the floating input of
the circuit.
Strictly speaking, a CMOS input
should never be left “floating”, and a
pull-down resistor of at least 50MΩ from
the aerial to the 0V line may be fitted if
preferred.
The very high input impedance of IC1
enables it to respond to the 50Hz mains
field normally present around house
wiring. If the local field is not strong
enough to trigger the counter, the aerial
wire (which need only be a few centime-
tres long) may be wrapped around a near-
by mains cable which is permanently
energised, such as the power cable to a
fridge or freezer.
Output Q7 (pin 4) of counter IC1,
which divides the input frequency by 64,
flashes l.e.d. D17 via resistor R8 at just
under once per second when the display
switch S3 is pressed giving a good indica-
tion that the counter is operating. This
switch is included to reduce the current
consumption of the circuit which would
be quite high if the l.e.d.s were driven
continuously.
The two counters form a 24-stage
divider which is capable of counting up to
16,777,216 in binary. Table 6.1 shows the
number of clock input pulses required for
each output to go high for the first time
following a reset, so that Q12 (the last
output of IC1) for example, will first go
high after 2048 input pulses while Q24
(the last output of IC2) would not go high
until 8,388,608 clock pulses had been
counted, although in this circuit this will
never occur.
Selected outputs of the counter are
connected to an 8-input wired-AND

Table 6.1

Output Ratio 50Hz 60Hz


Q1 1
Q2 2
Q3 4
Q4 8
Q5 16
Q6 32
Q7 64
Q8 128
Q9 256 ᗂ
Q10 512 ᗂ #
Q11 1024
Q12 2048 ᗂ #
Q13 4096 #
Q14 8192 ᗂ
Q15 16384 ᗂ
Q16 32768 ᗂ
Q17 65536 ᗂ #
Q18 131072 #
Q19 262144 #
Q20 524288 #
Q21 1048576
Q22 2097152
Q23 4194304 ᗂ #
Q24 8388608

ᗂ Outputs used for 50Hz input


# Outputs used for 60Hz input Fig.6.2. Complete circuit diagram for the Daily Reminder

Everyday Practical Electronics, September 2005 649


COMPONENTS
DAILY REMINDER
Resistors See
R1, R5 1M (2 off) SHOP
TALK
R2, R3, R6,
page
R9 100k (4 off)
R4, R7 10k
R8 390Ω
All 0·25W 5% carbon film
Capacitors
C1, C3, C4 100n ceramic disc, 5mm pitch (3 off)
C2, C5 100µ axial elect. 16V (2 off)
Semiconductors
D1 to D9 1N4148 signal diode (9 off)
D10 to D17 red or green l.e.d. (8 off)
IC1, IC2 4040 binary ripple counter (2 off)
IC3 4017 decade counter
IC4 4093 quad Schmitt NAND gate
Miscellaneous
S1, S3, S4 min. push-to-make switch, p.c.b.
mounting (3 off)
S2 see text
WD1 piezo sounder (passive)

Printed circuit board, available from the EPE PCB


Service, code 527; 14-pin d.i.l. socket, 16-pin d.i.l. sock-
et (3 off); 9V battery and connector, connecting wire;
solder, etc.

Approx. Cost
Guidance Only £15
excl case and
batts

Fig.6.3. Printed circuit board component layout, wiring


details and full-size copper foil master for the Daily
Reminder

responds to the IC4a goes high, triggering the 4017 decade


reset pulse faster counter, IC3, causing its next output (e.g.
than the others Q1, Tuesday) to go high, and its previous
and its output goes output (e.g. Q0, Monday) to go low. This is
to zero, the output indicated on the respective l.e.d. (D10 to
of the AND gate D16) when the display switch S3 is
would go low pressed.
again, which Output Q7 of the 4017 counter is con-
could result in a nected to its reset input so that after Q6
partial reset of the (Sunday) the counter will be reset and
counter. output Q0 (Monday) will go high.
gate, formed by diodes D1 to D8 plus In this circuit, therefore, the output of Since the clock input of IC3 is mostly
resistor R3. Since these will all be the AND gate is connected to IC4a, which held high, the counter can also be
switching high and low at various times, functions as an inverter so that its output advanced on the negative transition of the
the output of this AND gate will normal- goes low when the above count is reached. CI input and this is used as a convenient
ly hold IC4a input pins 1 and 2 low since This sets the monostable formed by IC4b way of setting the day display as required,
at least one output of the counter will be and IC4c, causing the output of IC4c to go using switch S4. Note that the counter will
low at any one time. high, resetting the counter chain via advance each time S4 is released rather
After 4,320,000 clock pulses, however, capacitor C1. The C1/R4 combination than when it is pressed.
all of the selected outputs will be high ensures that a pulse long enough to reset
together for the first time, so that the out- both counters is produced, after which Weekend Break
put of the AND gate will go high. they start counting from zero all over The COUT (carry) output is also used in
In theory, this output could be used to again. this circuit. This output is high when out-
reset the counters, but in practice if one With the counters reset, the output of the puts Q0 to Q4 are high, but goes low when
counter (or even one stage in the chain) AND gate goes low again and the output of Q5 or above is high. This is the case when

650 Everyday Practical Electronics, September 2005


the Q5 or Q6 (Saturday and Sunday) out- push-to-make switches S1, S3 and S4, made from a suitable length of insulated
puts are reached and so this output thus while S2 is implemented as a wire link wire to prevent unintended connections to
forms a convenient “weekend” output. which should be fitted if the alarm is not components along its length.
When the output of IC4c goes high, the required at weekends. In applications
oscillator formed by IC4d is enabled, where this requirement could change Testing
sounding the alarm and alerting the user often, a miniature slide or toggle switch When assembly is complete and fully
that a “new day” has begun (dependent on could be fitted on flying leads instead. checked, a battery should be connected
the time that the unit is first switched on). Care should be taken to ensure that all and the Display switch (S3) pressed. The
If switch S2 is closed, however, diode of the diodes are connected the correct Monday l.e.d. should be lit and l.e.d. D17
D8 will ensure that the oscillator remains way around. The layout diagram shows should flash at around 1Hz. If D17 does
disabled at weekends because the low the position of the diodes D1 to D8 not light, the aerial should be placed close
logic level at COUT will prevent the con- required for correct operation with a 50Hz to a mains field such as exists around the
trol input from going high. In this way the mains frequency. power cable to an appliance.
alarm can be disabled during weekends in Connections are provided on the p.c.b. In some cases, the aerial may need to be
applications that require this. to position the diodes for 60Hz operation wrapped around the cable a few times to give
Once the alarm is sounding, it can be if required and this will involve not fitting reliable results. It does not matter if the appli-
silenced by pressing switch S1, which diodes D1, D4, D5 and D6 as shown but in ance is switched on or not as long as it is
resets the monostable IC4b/IC4c and dis- the alternative positions instead, num- plugged in and the supply is not switched off
ables the oscillator. If this is not done, the bered with an “a” suffix. Diodes D2, D3, at the socket. In this respect it is therefore
alarm will switch off automatically after a D7 and D8 should remain in the positions best to utilise an appliance which is never
time determined by capacitor C2 and shown for 50Hz operation. switched off, such as a fridge/freezer.
resistor R5, which with the component Normal precautions regarding static Once D17 is flashing, Set Day switch
values shown will be around 70 seconds. electricity should be observed with the S4 should be pressed repeatedly until the
This period may be extended by i.c.s and these should be fitted into sockets correct day is displayed (S3 should be
increasing the value of C2 or R5, or made rather than soldered directly to the board. kept pressed to enable the display). The
indefinite by replacing C2 with a wire The piezo sounder WD1 should be sol- setting up is now complete and the circuit
link. This will effectively change the dered to the pads provided and here, will sound the alarm every 24 hours from
monostable built around IC4b/IC4c into a although it may have black and red leads, this time. Switch S1 should be pressed to
bistable and cause the alarm to sound con- the orientation is not important. cancel the alarm after it has sounded.
tinuously until silenced by pressing S1. A short piece of sleeved copper wire Since the circuit will only sound the
should be soldered to the pad provided to alarm after 24 hours, which is a rather
Construction act as an “aerial”. A single core wire is inconveniently long time to spend testing
Printed circuit board component layout better for this because it is stiffer and may the rest of the unit, things may be speeded
and track details for the Daily Reminder are be wrapped around a mains cable more up somewhat by temporarily removing
shown in Fig.6.3. This board is available easily should this be required. IC2. This will cause the display to change
from the EPE PCB Service, code 527. Seven links are required in the layout and the alarm to sound after only 2816
All of the components (with the excep- and these can be made from discarded input pulses, or about 56 seconds with a
tion of the sounder and battery) are component leads, except the long one 50Hz input enabling the operation of the
mounted on the board. This includes the (between C1 and R6). This should be unit to be checked rather more quickly.

Whistle Switch
M
OST modern remote controls use
either infra-red or radio as the
transmission medium because
there are fewer natural interference
sources of such radiation to upset the
working of the system. They do, however,
all have the major disadvantage in that a
special transmitter is required to operate
the link.
The system to be described here differs
in that it uses sound as the medium so that Fig.6.4 Whistle Switch block schematic diagram
no special transmitter is required. Unlike
most sound-operated switches, which can
be triggered by any sound of sufficient
amplitude, this circuit is sensitive only to For those who have difficulty in the circuit could be designed to determine
sound in a relatively narrow frequency whistling, a simple tin whistle can provide the frequency quite accurately, in this
band. It is specifically designed to respond a handy transmitter. application it would not be desirable as
to a whistle and will therefore ignore A relay, RLA, allows external devices few people are able to whistle consistent-
many naturally occurring sounds of other to be controlled by this unit. Note though ly at a given pitch.
frequencies. that a.c. mains powered devices should The counter’s measurement cycle is
The frequency range to which the unit only be connected by those who are controlled by an oscillator which periodi-
responds can be made quite small, allow- suitably qualified or supervised. cally resets the counter to initiate the next
ing a number of units to be used in the measurement. The counter is coupled to a
same area. The sensitivity is such that Basic Operation decoder which determines if the expected
operation from another room is possible. A block diagram of the Whistle Switch count is received within a given time.
In practice, however, the difficulty in pro- is shown in Fig.6.4. The output of the decoder is sampled at
ducing a whistle of exactly the right fre- The input signal is picked up by a the end of each measurement period by a
quency means that the frequency range to microphone and amplified before being re-triggerable monostable. This ensures
which the receiver responds has to be applied to the clock input of a counter. The that only one output transition is obtained
broadened somewhat, thus limiting the counter circuit assesses whether the fre- during each whistle command, which may
possible number of independent receivers. quency is within a certain range. Although extend over a number of measurement

Everyday Practical Electronics, September 2005 651


cycles. The monostable’s output is
applied to a bistable which drives a relay
switching it on or off each time a whistle
in the correct frequency range is detected.

Circuit Diagram
The Whistle Switch circuit diagram
shown in Fig.6.5 effectively uses the first six
stages of a type 4040 binary counter, IC1, to
determine the frequency of the signal. The
whistle sound is detected by a piezo element,
MIC1, amplified by the high gain amplifier
formed around transistors TR1 and TR2, and
then used to trigger the counter.
The amplifier uses relatively high
value collector load resistors to achieve
high gain and low current consumption
(about 150µA) making it ideal for battery
operation. The prototype easily worked
over ranges in excess of seven metres,
not necessarily within line of sight.
An oscillator built around Schmitt trig-
ger NAND gate IC2a produces short
pulses which regularly reset the counter
via its pin 11. The pulse’s mark-space
width is determined by the imbalance
between the charging and discharging
rates of capacitor C3. The charging is
principally via diode D5 and resistor R7.
Discharging is via R7 and preset VR1,
the latter slowing the rate. The pulse
width is further modified by the action of
resistor R6 and capacitor C2.
The waveforms in Fig.6.6 illustrate
those that appear at various points in the
circuit when an input in the required fre-
quency range is detected. Starting at the
end of each reset pulse, the counter
counts the incoming clock signal (c)
causing the counter’s Q1 to Q6 outputs to
change as shown (d to i).
The number of input cycles since the
reset is shown above waveform (a). Diodes
D2 and D3 on the outputs Q4 and Q5,
together with resistor R5, form an AND
gate whose output is shown in waveform
(j). It will be seen that the output of the
decoder will only go high after 24, but less
than 32, input pulses have been received.
The dashed waveforms in (d) to (j) indicate
what would happen if the next reset pulse
did not occur at the time shown.
If the output of IC2a goes high during
this time window, the output of NAND
gate IC2b will go low as shown (k).
Following a short delay (set by R6 and
C2), the counter is reset via pin 11, caus-
ing all of its outputs and the output of the
decoder to go low. The output of IC2b
will therefore go high again so that only a
short pulse is produced. The pulse dura-
tion is determined by the difference in
time between IC2a going high and the
counter being reset.
If too few input pulses (frequency too
low) occur before IC2a output goes high,
the output of the decoder will remain low
and no output pulse will appear on IC2b
output before the counter is reset.
The width of the decoder window may
be made narrower by adding diode D4 to
the decoder so that its output will go
high only after 28 (but less than 32)
input pulses have been detected, or
wider by leaving out D3, producing an
output after 16 clock pulses. Decoding
counter outputs Q2 and Q1 could make
the window narrower still, but in this
Fig.6.5. Circuit diagram for the Whistle Switch application this would require a very

652 Everyday Practical Electronics, September 2005


R8, but when a correct put will switch high, turning on TR3 and
frequency whistle is energising the relay.
detected and the output If the whistle now ceases, the voltage
of IC2b goes low, C4 is across C4 will rise, C5 and C6 will dis-
quickly discharged via charge and the circuit will remain in this
diode D6. Provided the new state. If another short whistle is now
whistle continues to be detected the process would be repeated
received, C4 is unable and the output state would not change.
to recharge via R8 and However, if the whistle now lasts long
the voltage across it enough for the voltage across C5 to reach
remains low. This low the lower logic threshold of IC2c, its out-
logic level is applied to put will go high and discharge C6 via D7,
the input of the bistable
formed by the remain-
ing gates IC2c, IC2d
and transistor TR3,
which also serves as a
relay driver.
COMPONENTS
Bistable
If IC2d inputs 12 WHISTLE SWITCH
and 13 are high, its Resistors
precise whistle frequency to operate the output will be low and TR3 switched off See
causing its collector (c) to be high. This R1 270k SHOP
unit. TALK
will keep IC2d’s inputs high via feedback R2 390k
If more than 31 input pulses occur page
resistor R12 and the circuit will remain in R3 3k9
before the reset pulse (i.e. the input fre-
this state indefinitely. If on the other hand R4 22k
quency is too high), outputs Q1 to Q5 will
IC2d’s inputs go low, its output will go R5, R6 100k (2 off )
go low and output Q6 will go high. This
high, TR3 will switch on and its low col- R7 15k
will “short out” R4 via diode D1 prevent-
lector voltage will keep IC2d input low so R8, R12 1M (2 off)
ing further input pulses from being count-
that the circuit will also be stable in this R9, R10 560k (2 off)
ed so that the output of the decoder will
state. R11 10k
remain low and prevent IC2b generating
Assuming that the inputs of IC2d are R13 1k
an output pulse when the reset pulse
high (relay off), when the voltage across All 0·25W 5% carbon film
occurs. Higher whistle frequencies will
therefore also be ignored. C4 goes low, capacitors C5 and C6 charge Potentiometer
The time between reset pulses, and thus via R9 and R10, causing the voltage at VR1 1M skeleton
the range of input frequencies which will IC2c and IC2d inputs to fall. The charging preset
be detected, can be varied by means of resistors are equal in value, but since C6
Capacitors
preset VR1 which sets the frequency of has a much smaller value than C5, the
the oscillator. voltage at IC2d’s inputs will fall much C1 10µ radial elect. 16V
When the output of IC2b is high, capaci- faster and will reach the lower logic C2 1n ceramic disc,
tor C4 is charged at the rate set by resistor threshold first. Consequently, IC2d’s out- 5mm pitch
C3, C6 100n ceramic
disc, 5mm pitch
(2 off)
C4, C5 2µ2 radial elect.
16V (2 off)
a. C7 100µ radial elect.
16V
b. Semiconductors
D1 to D7 1N4148 signal
c. diode (7 off)
D8 1N4001 rect. diode
D9 red l.e.d.
d. TR1 to TR3 2N3904 npn
transistor (3 off)
IC1 4040 12-stage
e. ripple counter
IC2 4093 quad Schmitt
f. NAND gate
Miscellaneous
g. MIC1 piezo element
disc, passive
RLA relay (see text)
h. S1 s.p.d.t. toggle switch
Printed circuit board, available
i. from the EPE PCB Service, code
528; 14-pin d.i.l. socket, 16-pin d.i.l.
j. socket (3 off); 9V battery and con-
nector (see text), connecting wire;
solder, etc.
k.

Approx. Cost
Guidance Only £12
excl case, relay
and batts
Fig.6.6. Whistle Switch circuit waveforms

Everyday Practical Electronics, September 2005 653


Completed prototype Whistle Switch circuit board. The two
unconnected pads at the top right go to the relay coil

forcing IC2d input high thus switching the The circuit may
relay off. be tested using a
The relay can therefore be switched on battery supply. A
by means of a short whistle, while a relay need not be
longer one will switch the relay off. fitted at this stage
Indication of the relay’s state is provided as l.e.d. D9 will
by l.e.d. D9, which is buffered by R13. indicate its correct
Diode D8 inhibits back-e.m.f. genera- operation. If an
tion when the relay switches off. oscilloscope is not
available should
Construction fault finding be
Printed circuit board component layout needed, a digital
and track details for the Whistle Switch voltmeter connect-
are shown in Fig.6.7. This board is avail- ed across capacitor
able from the EPE PCB Service, code 528. C4 can indicate
Construction should proceed with normal when a whistle in
precautions being taken to observe the cor- the correct fre-
rect polarity of semiconductors and elec- quency range has
trolytic capacitors. The polarity of the piezo been detected.
sounder is unimportant. Observe the normal The upper volt- Fig.6.7. Whistle Switch printed circuit board component lay-
antistatic precautions when handling the age across C4 out, wiring and full-size copper foil master
i.c.s. Do not insert the i.c.s. until the board varies with the sup-
has been fully checked for errors. ply voltage, but it
The type of relay fitted will depend on will be seen to fall to below 2V when a
the type of load to be controlled and the correct frequency whistle is received.
output contacts should be rated to handle Adjust preset VR1 until the circuit
the current and voltage to be switched. responds, with l.e.d. D9 turning on and off
The relay coil should be connected to the accordingly.
circuit board with flying leads and diode Because of the relatively high values of
D8 fitted on the board. resistance in the circuit, the capacitors in the
The circuit will operate from a range of bistable can take a few moments to charge or
voltages from 5V to 12V and the relay discharge between operations. This means
should be chosen for the voltage used, that the circuit cannot be switched on and off
although in practice most relays will operate in quick succession. This is not a problem in
from a range of voltages. Higher resistance normal use but should be borne in mind
coils are to be preferred as these will draw when testing the unit.
less current. The completed unit should be mounted
The circuit draws less than 1mA from a in a suitable box and the choice of this
9V supply, but this rises substantially will be dictated as much by personal
when a relay is switched on so that in most preference as by the application to which
applications a small d.c. mains adapter the unit is to be put. Remember to leave a
will be a more practical proposition. hole near the microphone to allow the
sound to enter.
Testing

Get your magazine “instantly” anywhere in the world – buy and


download from the web.
TAKE A LOOK, A FREE ISSUEIS AVAILABLE
A one year subscription (12 issues) costs just $14.99 (US)
www.epemag.com

654 Everyday Practical Electronics, September 2005


DIRECT BOOK SERVICE NOTE: ALL PRICES INCLUDE UK POSTAGE
FREE Electronics Hobbyist Compendium
book with Teach-In 2000 CD-ROM
Circuits and Design
PREAMPLIFIER AND FILTER CIRCUITS A BEGINNER’S GUIDE TO TTL DIGITAL ICs
R. A. Penfold R. A. Penfold
Provides circuits and background information for a range This book first covers the basics of simple logic circuits in
of preamplifiers, plus tone controls, filters, mixers, etc. general, and then progresses to specific TTL logic inte-
The use of modern low noise operational amplifiers and grated circuits. The devices covered include gates, oscilla-
a specialist high performance audio preamplifier i.c. tors, timers, flip/flops, dividers, and decoder circuits. Some
results in circuits that have excellent performance, but practical circuits are used to illustrate the use of TTL
which are still quite simple. All the circuits featured can devices in the “real world’’.
be built at quite low cost. The preamplifier circuits fea- 142 pages Order code BP332 £5.45
tured include: Microphone preamplifiers (low impedance,
high impedance, and crystal). Magnetic cartridge pick-up

EPE TEACH-IN preamplifiers with R.I.A.A. equalisation. Crystal/ceramic


pick-up preamplifier. Guitar pick-up preamplifier. Tape
head preamplifier.
PRACTICAL ELECTRONICS CALCULATIONS AND
FORMULAE
F. A. Wilson, C.G.I.A., C.Eng., F.I.E.E., F.I.E.R.E., F.B.I.M.
Bridges the gap between complicated technical theory,
2000 CD-ROM
The whole of the 12-part Teach-In 2000 series by John
Other circuits include: Audio limiter. Passive tone con-
trols. Active tone controls. PA filters (highpass and low-
pass). Scratch and rumble filters. Loudness filter. Mixers.
and “cut-and-tried’’ methods which may bring success in
design but leave the experimenter unfulfilled. A strong
practical bias – tedious and higher mathematics have been
Becker (published in EPE Nov ’99 to Oct 2000) is now Volume and balance controls. avoided where possible and many tables have been
available on CD-ROM. Plus the Teach-In 2000 interactive included.
software (Win 95, 98, ME and above) covering all aspects 92 pages Temporarily out of print The book is divided into six basic sections: Units and
of the series and Alan Winstanley’s Basic Soldering Guide Constants, Direct-Current Circuits, Passive Components,
(including illustrations and Desoldering). Alternating-Current Circuits, Networks and Theorems,
Teach-In 2000 covers all the basic principles of elec- MICROCONTROLLER COOKBOOK Measurements.
tronics from Ohm’s Law to Displays, including Op.Amps, Mike James
Logic Gates etc. Each part has its own section on the inter- The practical solutions to real problems shown in this cook- 256 pages Order code BP53 £5.49
active software where you can also change component book provide the basis to make PIC and 8051 devices real-
values in the various on-screen demonstration circuits. ly work. Capabilities of the variants are examined, and ways
to enhance these are shown. A survey of common interface
The series gives a hands-on approach to electronics
with numerous breadboard circuits to try out, plus a sim-
devices, and a description of programming models, lead on
to a section on development techniques. The cookbook
The books listed have
ple computer interface (Win 95, 98, ME only) which
allows a PC to be used as a basic oscilloscope.
offers an introduction that will allow any user, novice or expe- been selected by Everyday
rienced, to make the most of microcontrollers.
ONLY £12.45 including VAT and p&p Practical Electronics edi-
Order code Teach-In CD-ROM
240 pages Order code NE26 £23.99 torial staff as being of
special interest to every-
one involved in electronics
Computing & Robotics and computing. They are
supplied by mail order
WINDOWS XP EXPLAINED the floor. Learn to use additional types of sensors includ- direct to your door. Full
N. Kantaris and P. R. M. Oliver ing rotation, light, temperature, sound and ultrasonic and
If you want to know what to do next when confronted with also explore the possibilities provided by using an addi- ordering details are given
Microsoft’s Windows XP screen, then this book is for you. It tional (third) motor. For the less experienced, RCX code
applies to both the Professional and Home editions. programs accompany most of the featured robots. on the last book page.
The book was written with the non-expert, busy person in However, the more adventurous reader is also shown
mind. It explains what hardware requirements you need in how to write programs using Microsoft’s VisualBASIC
order to run Windows XP successfully, and gives an
overview of the Windows XP environment.
running with the ActiveX control (Spirit.OCX) that is pro-
vided with the RIS kit.
FOR A FURTHER
The book explains: How to manipulate Windows, and how to
use the Control Panel to add or change your printer, and con-
Detailed building instructions are provided for the fea-
tured robots, including numerous step-by-step pho-
SELECTION OF BOOKS
trol your display; How to control information using WordPad, tographs. The designs include rover vehicles, a virtual SEE THE NEXT TWO
Notepad and Paint, and how to use the Clipboard facility to pet, a robot arm, an ‘intelligent’ sweet dispenser and a
transfer information between Windows applications; How to colour conscious robot that will try to grab objects of a ISSUES OF EPE
be in control of your filing system using Windows Explorer specific colour.
and My Computer; How to control printers, fonts, characters,
multimedia and images, and how to add hardware and soft-
ware to your system; How to configure your system to com-
298 pages Order code BP902 £14.99
All prices include UK
municate with the outside world, and use Outlook Express
for all your email requirements; How to use the Windows PIC YOUR PERSONAL INTRODUCTORY COURSE postage
Media Player 8 to play your CDs, burn CDs with your SECOND EDITION John Morton
favourite tracks, use the Radio Tuner, transfer your videos to Discover the potential of the PIC micro-
your PC, and how to use the Sound Recorder and Movie controller through graded projects – this book could
Maker; How to use the System Tools to restore your system revolutionise your electronics construction work! NEWNES PC TROUBLESHOOTING
to a previously working state, using Microsoft’s Website to A uniquely concise and practical guide to getting up POCKET BOOK – THIRD EDITION
update your Windows set-up, how to clean up, defragment and running with the PIC Microcontroller. The PIC is Howard Anderson, Mike Tooley
and scan your hard disk, and how to backup and restore your one of the most popular of the microcontrollers that are All the essential data for PC fault-finding and upgrading.
data; How to successfully transfer text from those old but transforming electronic project work and product This book provides a concise and compact reference that
cherished MS-DOS programs. design. describes, in a clear and straightforward manner, the prin-
Assuming no prior knowledge of microcontrollers and ciples and practice of fault-finding and upgrading PCs and
268 pages Order code BP514 £7.99 introducing the PICs capabilities through simple projects, peripherals. The book is aimed at anyone who is involved
this book is ideal for use in schools and colleges. It is the with the installation, configuration, maintenance, upgrad-
INTRODUCING ROBOTICS WITH LEGO MINDSTORMS ideal introduction for students, teachers, technicians and ing, repair or support of PC systems. It also provides non-
Robert Penfold electronics enthusiasts. The step-by-step explanations technical users with sufficient background information,
Shows the reader how to build a variety of increasingly make it ideal for self-study too: this is not a reference book charts and checklists to enable the diagnosis of faults and
sophisticated computer controlled robots using the bril- – you start work with the PIC straight away. help to carry out simple modifications and repairs. In order
liant Lego Mindstorms Robotic Invention System (RIS). The revised second edition covers the popular repro- to reflect rapid changes in computer technology (both
Initially covers fundamental building techniques and grammable EEPROM PICs: P16C84/16F84 as well as hardware and software) this new edition has been com-
mechanics needed to construct strong and efficient the P54 and P71 families. pletely revised and rewritten.
robots using the various “click-together’’ components
supplied in the basic RIS kit. Explains in simple terms 270 pages Order code NE36 £15.99 256 pages Order code NE41 £19.99
how the “brain’’ of the robot may be programmed on
screen using a PC and “zapped’’ to the robot over an INTRODUCTION TO MICROPROCESSORS NEWNES INTERFACING COMPANION
infra-red link. Also, shows how a more sophisticated John Crisp
Tony Fischer-Cripps
Windows programming language such as Visual BASIC If you are, or soon will be, involved in the use of
may be used to control the robots. microprocessors, this practical introduction is essential A uniquely concise and practical guide to the hardware,
Detailed building and programming instructions pro- reading. This book provides a thoroughly readable intro- applications and design issues involved in computer inter-
vided, including numerous step-by-step photographs. duction to microprocessors. assuming no previous facing and the use of transducers and instrumentation.
knowledge of the subject, nor a technical or mathemat- Newnes Interfacing Companion presents the essential
288 pages – large format Order code BP901 £14.99 ical background. It is suitable for students, technicians, information needed to design a PC-based interfacing sys-
engineers and hobbyists, and covers the full range of tem from the selection of suitable transducers, to collection
modern microprocessors. of data, and the appropriate signal processing and
MORE ADVANCED ROBOTICS WITH LEGO After a thorough introduction to the subject, ideas are conditioning.
MINDSTORMS – Robert Penfold developed progressively in a well-structured format. All Contents: Part 1 – Transducers; Measurement systems;
Covers the Vision Command System technical terms are carefully introduced and subjects Temperature; Light; Position and motion; Force, pressure
which have proved difficult, for example 2’s comple- and flow. Part 2 – Interfacing; Number systems; Computer
Shows the reader how to extend the capabilities of the ment, are clearly explained. John Crisp covers the com- architecture; Assembly language; Interfacing; A to D and D
brilliant Lego Mindstorms Robotic Invention System plete range of microprocessors from the popular 4-bit to A conversions; Data communications; Programmable
(RIS) by using Lego’s own accessories and some simple and 8-bit designs to today’s super-fast 32-bit and 64-bit logic controllers; Data acquisition project. Part 3 – Signal
home constructed units. You will be able to build robots versions that power PCs and engine management processing; Transfer function; Active filters; Instrumentation
that can provide you with ‘waiter service’ when you clap systems etc. amplifier; Noise; Digital signal processing.
your hands, perform tricks, ‘see’ and avoid objects by
using ‘bats radar’, or accurately follow a line marked on 222 pages Order code NE31 £21.99 320 pages Order code NE38 £26.99

Everyday Practical Electronics, September 2005 655


Testing, Theory and Reference
THE AMATEUR SCIENTIST CD-R PRACTICAL ELECTRONIC FAULT FINDING AND TROUBLESHOOTING
CD-ROM OM Robin Pain
The complete collection of The Amateur To be a real fault finder, you must be able to get a feel for what is going on in
Scientist articles from Scientific American the circuit you are examining. In this book Robin Pain explains the basic tech-
magazine. Over 1,000 classic science pro- niques needed to be a fault finder.
jects from a renowned source of winning Simple circuit examples are used to illustrate principles and concepts fun-
projects. All projects are rated for cost, dif- damental to the process of fault finding. This is not a book of theory, it is a
ficulty and possible hazards. book of practical tips, hints and rules of thumb, all of which will equip the read-
Plus over 1,000 pages of helpful science er to tackle any job. You may be an engineer or technician in search of infor-
techniques that never appeared in mation and guidance, a college student, a hobbyist building a project from a
Scientific American. magazine, or simply a keen self-taught amateur who is interested in electron-
Exciting science projects in: Astronomy; ic fault finding but finds books on the subject too mathematical or specialised.
Earth Science; Biology; Physics; Chemistry; The fundamental principles of analogue and digital fault finding are
Weather . . . and much more! The most complete described (although, of course, there is no such thing as a “digital fault” – all
resource ever assembled for hobbyists, and profes- faults are by nature analogue). This book is written entirely for a fault finder
sionals looking for novel solutions to research problems. using only the basic fault-finding equipment: a digital multimeter and an oscil-
Includes extensive Science Software Library with even more science loscope. The treatment is non-mathematical (apart from Ohm’s law) and all
tools. jargon is strictly avoided.
Suitable for Mac, Windows, Linux or UNIX. 32MB RAM minimum, 274 pages Order code NE22 Temporarily out of £25.99
print
Netscape 4.0 or higher or Internet Explorer 4.0 or higher.
Over 1,000 projects Order code AS1 CD-ROM £19.95 ELECTRONIC TEST EQUIPMENT HANDBOOK
Steve Money
In most applications of electronics, test instruments are essential for checking
BEBOP BYTES BACK (and the Beboputer Computer the performance of a system or for diagnosing faults in operation, and so it is
Simulator) CD-ROM CD-R
OM important for engineers, technicians, students and hobbyists to understand
Clive (Max) Maxfield and Alvin Brown how the basic test instruments work and how they can be used.
This follow-on to Bebop to the Boolean Boogie is a The principles of operation of the various types of test instrument are
multimedia extravaganza of information about how explained in simple terms with a minimum of mathematical analysis. The book
computers work. It picks up where “Bebop I’’ left covers analogue and digital meters, bridges, oscilloscopes, signal generators,
off, guiding you through the fascinating world of counters, timers and frequency measurement. The practical uses of these
computer design . . . and you’ll have a few instruments are also examined.
chuckles, if not belly laughs, along the way. In 206 pages £9.95
addition to over 200 megabytes of mega-cool Order code PC109
multimedia, the CD-ROM contains a virtual DIGITAL GATES AND FLIP-FLOPS
microcomputer, simulating the motherboard Ian R. Sinclair
and standard computer peripherals in an This book, intended for enthusiasts, students and technicians, seeks to estab-
extremely realistic manner. In addition to a lish a firm foundation in digital electronics by treating the topics of gates and
wealth of technical information, myriad nuggets of flip-flops thoroughly and from the beginning.
trivia, and hundreds of carefully drawn illustrations, Topics such as Boolean algebra and Karnaugh mapping are explainend,
the CD-ROM contains a set of lab experiments for the demonstrated and used extensively, and more attention is paid to the subject
virtual microcomputer that let you recreate the experiences of early comput- of synchronous counters than to the simple but less important ripple counters.
er pioneers. If you’re the slightest bit interested in the inner workings of com- No background other than a basic knowledge of electronics is assumed,
puters, then don’t dare to miss this! and the more theoretical topics are explained from the beginning, as also are
Over 800 pages in Adobe Acrobat format Order code BEB2 CD-ROM £21.95 many working practices. The book concludes with an explanation of micro-
processor techniques as applied to digital logic.
DIGITAL ELECTRONICS – A PRACTICAL APPROACH 200 pages Order code PC106 £9.95
With FREE Software: Number One Systems – EASY-PC FREE
Professional XM and Pulsar (Limited Functionality) SOFTWARE UNDERSTANDING ELECTRONIC CONTROL SYSTEMS
Richard Monk Owen Bishop
Covers binary arithmetic, Boolean algebra and logic gates, combination logic, Owen Bishop has produced a concise, readable text to introduce a wide range
sequential logic including the design and construction of asynchronous and of students, technicians and professionals to an important area of electronics.
synchronous circuits and register circuits. Together with a considerable prac- Control is a highly mathematical subject, but here maths is kept to a minimum,
tical content plus the additional attraction of its close association with with flow charts to illustrate principles and techniques instead of equations.
computer-aided design including the FREE software. Cutting edge topics such as microcontrollers, neural networks and fuzzy
There is a ‘blow-by-blow’ guide to the use of EASY-PC Professional XM (a control are all here, making this an ideal refresher course for those working in
schematic drawing and printed circuit board design computer package). The Industry. Basic principles, control algorithms and hardwired control systems
guide also conducts the reader through logic circuit simulation using Pulsar are also fully covered so the resulting book is a comprehensive text and well
software. Chapters on p.c.b. physics and p.c.b. production techniques make the suited to college courses or background reading for university students.
book unique, and with its host of project ideas make it an ideal companion for The text is supported by questions under the headings Keeping Up and Test
the integrative assignment and common skills components required by BTEC Your Knowledge so that the reader can develop a sound understanding and
and the key skills demanded by GNVQ. The principal aim of the book is to pro- the ability to apply the techniques they are learning.
vide a straightforward approach to the understanding of digital electronics. 228 pages Order code NE35 £20.99
Those who prefer the ‘Teach-In’ approach or would rather experiment with
some simple circuits should find the book’s final chapters on printed circuit HOW ELECTRONIC THINGS WORK – AND WHAT TO DO WHEN THEY DON’T
board production and project ideas especially useful. Robert Goodman
250 pages Temporarily out of print You never again have to be flummoxed, flustered or taken for a ride by a piece
of electronics equipment. With this fully illustrated, simple-to-use guide, you
OSCILLOSCOPES – FIFTH EDITION will get a grasp on the workings of the electronic world that surrounds you –
Ian Hickman and even learn to make your own repairs.
Oscilloscopes are essential tools for checking circuit operation and diagnos- You don’t need any technical experience. This book gives you: Clear expla-
ing faults, and an enormous range of models are available. nations of how things work, written in everyday language. Easy-to-follow, illus-
This handy guide to oscilloscopes is essential reading for anyone who has to trated instructions on using test equipment to diagnose problems. Guidelines
use a ’scope for their work or hobby; electronics designers, technicians, anyone to help you decide for or against professional repair. Tips on protecting your
in industry involved in test and measurement, electronics enthusiasts . . . Ian expensive equipment from lightning and other electrical damage. Lubrication
Hickman’s review of all the latest types of ’scope currently available will prove and maintenance suggestions.
especially useful for anyone planning to buy – or even build – an oscilloscope. Covers: colour TVs, VCRs, radios, PCs, CD players, printers, telephones,
The contents include a description of the basic oscillscope; Advanced real- monitors, camcorders, satellite dishes, and much more!
time oscilloscope; Accessories; Using oscilloscopes; Sampling oscilloscopes; 394 pages Order code MGH3 £21.99
Digital storage oscilloscopes; Oscilloscopes for special purposes; How
oscillocopes work (1): the CRT; How oscilloscopes work (2): circuitry; How
oscilloscopes work (3): storage CRTs; plus a listing of Oscilloscope manufac- VINTAGE RADIOS – COLLECTING ɀ SERVICING ɀ RESTORING
turers and suppliers. Tony Thompson
288 pages Order code NE37 £22.99 The essential guide to collecting, repairing and restoring vintage valve radios.
These receivers are becoming ever more popular as collectibles, this is a
SCROGGIE’S FOUNDATIONS OF WIRELESS good thing because it means that a very large piece of technological history
AND ELECTRONICS – ELEVENTH EDITION is being reclaimed when at one time many thought it lost forever. If you look
S. W. Amos and Roger Amos around, you will find plenty of valve radio sets just waiting for a loving restora-
Scroggie’s Foundations is a classic text for anyone working with electron- tion. They may not yet be the most highly prized, and they are unlikely to be
ics, who needs to know the art and craft of the subject. It covers both the in top condition, but they can be yours and, if you develop the skills outlined
theory and practical aspects of a huge range of topics from valve and tube in this book, you will possess radio receivers to be proud of.
technology, and the application of cathode ray tubes to radar, to digital The book covers radio history, styling, faultfinding, chassis and cabinet
tape systems and optical recording techniques. restoration, types of set.
Since Foundations of Wireless was first published over 60 years ago, it 124 pages spiral bound Order code TT1 £13.50
has helped many thousands of readers to become familiar with the princi-
ples of radio and electronics. The original author Sowerby was succeeded
by Scroggie in the 1940s, whose name became synonymous with this
classic primer for practitioners and students alike. Stan Amos, one of the
fathers of modern electronics and the author of many well-known books in
All prices include
the area, took over the revision of this book in the 1980s and it is he, with
his son, who have produced this latest version.
UK P&P
400 pages Temporarily out of print

656 Everyday Practical Electronics, September 2005


Project Building
ELECTRONIC PROJECT BUILDING ELECTRONIC PROJECTS FOR EXPERIMENTERS or simply have fun building some electronic music gad-
FOR BEGINNERS R. A. Penfold gets, the designs featured in this book should suit your
R. A. Penfold Many electronic hobbyists who have been pursuing their needs. The projects are all easy to build, and some are so
This book is for complete beginners to electronic project hobby for a number of years seem to suffer from the dread- simple that even complete beginners at electronic project
building. It provides a complete introduction to the practical ed “seen it all before’’ syndrome. This book is fairly and construction can tackle them with ease. Stripboard lay-
side of this fascinating hobby, including the following squarely aimed at sufferers of this complaint, plus any outs are provided for every project, together with a wiring
topics: other electronics enthusiasts who yearn to try something a diagram. The mechanical side of construction has largely
Component identification, and buying the right parts; bit different. been left to the individual constructors to sort out, simply
resistor colour codes, capacitor value markings, etc; advice The subjects covered include:- Magnetic field detector, because the vast majority of project builders prefer to do
on buying the right tools for the job; soldering; making easy Basic Hall effect compass, Hall effect audio isolator, Voice their own thing.
scrambler/descrambler, Bat detector, Bat style echo loca- None of the designs requires the use of any test
work of the hard wiring; construction methods, including
tion, Noise cancelling, LED stroboscope, Infra-red “torch’’, equipment in order to get them set up properly. Where
stripboard, custom printed circuit boards, plain matrix
any setting up is required, the procedures are very
boards, surface mount boards and wire-wrapping; finishing Electronic breeze detector, Class D power amplifier, Strain
straightforward, and they are described in detail.
off, and adding panel labels; getting “problem’’ projects to gauge amplifier, Super hearing aid.
Projects covered: Simple MIDI tester, Message grab-
work, including simple methods of fault-finding. ber, Byte grabber, THRU box, MIDI auto switcher,
138 pages Order code BP371 £5.45
In fact everything you need to know in order to get start- Auto/manual switcher, Manual switcher, MIDI patchbay,
ed in this absorbing and creative hobby. MIDI controlled switcher, MIDI lead tester, Program
135 pages Order code BP392 £5.49 PRACTICAL FIBRE-OPTIC PROJECTS change pedal, Improved program change pedal, Basic
R. A. Penfold mixer, Stereo mixer, Electronic swell pedal, Metronome,
While fibre-optic cables may have potential advantages Analogue echo unit.
over ordinary electric cables, for the electronics 138 pages Order code PC116 £5.45
BUILDING VALVE AMPLIFIERS enthusiast it is probably their novelty value that makes
Morgan Jones them worthy of exploration. Fibre-optic cables provide an
The practical guide to building, modifying, fault-finding and innovative interesting alternative to electric cables, but in VIDEO PROJECTS FOR THE ELECTRONICS
repairing valve amplifiers. A hands-on approach to valve most cases they also represent a practical approach to CONSTRUCTOR
electronics – classic and modern – with a minimum of the- R. A. Penfold
the problem. This book provides a number of tried and Written by highly respected author R. A. Penfold, this book
ory. Planning, fault-finding, and testing are each illustrated tested circuits for projects that utilize fibre-optic cables. contains a collection of electronic projects specially designed
by step-by-step examples. The projects include:- Simple audio links, F.M. audio link, for video enthusiasts. All the projects can be simply con-
A unique hands-on guide for anyone working with valve P.W.M. audio links, Simple d.c. links, P.W.M. d.c. link, structed, and most are suitable for the newcomer to project
(tube in USA) audio equipment – as an electronics experi- P.W.M. motor speed control, RS232C data links, MIDI link, construction, as they are assembled on stripboard.
menter, audiophile or audio engineer. Loop alarms, R.P.M. meter. There are faders, wipers and effects units which will add
Particular attention has been paid to answering questions All the components used in these designs are readily sparkle and originality to your video recordings, an audio
commonly asked by newcomers to the world of the vacu- mixer and noise reducer to enhance your soundtracks and
available, none of them require the constructor to take out
um tube, whether audio enthusiasts tackling their first a basic computer control interface. Also, there’s a useful
a second mortgage. selection on basic video production techniques to get you
build, or more experienced amplifier designers seeking to 132 pages Order code BP374 £5.45 started.
learn the ropes of working with valves. The practical side of Circuits include: video enhancer, improved video enhancer,
this book is reinforced by numerous clear illustrations video fader, horizontal wiper, improved video wiper, negative
throughout. ELECTRONIC MUSIC AND video unit, fade to grey unit, black and white keyer, vertical
MIDI PROJECTS wiper, audio mixer, stereo headphone amplifier, dynamic
368 pages Order code NE40 £21.99 noise reducer, automatic fader, pushbutton fader, computer
R. A. Penfold
control interface, 12 volt mains power supply.
Whether you wish to save money, boldly go where no
musician has gone before, rekindle the pioneering spirit, 124 pages Order code PC115 £5.45

Theory and BOOK ORDERING DETAILS


Reference All prices include UK postage. For postage to Europe (air) and the rest of the world (surface)
please add £2 per book. For the rest of the world airmail add £3 per book. CD-ROM prices include
VAT and/or postage to anywhere in the world. Send a PO, cheque, international money order
(£ sterling only) made payable to Direct Book Service or card details, Visa, Mastercard, Amex,
Diners Club or Maestro to:
DIRECT BOOK SERVICE, WIMBORNE PUBLISHING LTD.,
COIL DESIGN AND CONSTRUCTIONAL MANUAL 408 WIMBORNE ROAD EAST, FERNDOWN, DORSET BH22 9ND.
B. B. Babani
A complete book for the home constructor on “how to Books are normally sent within seven days of receipt of order, but please allow 28 days for deliv-
make’’ RF, IF, audio and power coils, chokes and trans- ery – more for overseas orders. Please check price and availability (see latest issue of Everyday
formers. Practically every possible type is discussed Practical Electronics) before ordering from old lists.
and calculations necessary are given and explained in
detail. Although this book is now twenty years old, with For a further selection of books see the next two issues of EPE.
the exception of toroids and pulse transformers little Tel 01202 873872 Fax 01202 874562. Email: [email protected]
has changed in coil design since it was written.
Order from our online shop at: www.epemag.co.uk
96 pages Order code BP160 £4.49

GETTING THE MOST FROM YOUR MULTIMETER


R. A. Penfold
This book is primarily aimed at beginners and those of lim-
BOOK ORDER FORM
ited experience of electronics. Chapter 1 covers the basics
of analogue and digital multimeters, discussing the relative Full name: ...............................................................................................................................................
merits and the limitations of the two types. In Chapter 2
various methods of component checking are described,
including tests for transistors, thyristors, resistors, capaci- Address: ..................................................................................................................................................
tors and diodes. Circuit testing is covered in Chapter 3,
with subjects such as voltage, current and continuity
checks being discussed. .................................................................................................................................................................
In the main little or no previous knowledge or experience
is assumed. Using these simple component and circuit
testing techniques the reader should be able to confident- .................................................................................................................................................................
ly tackle servicing of most electronic projects.
.............................................. Post code: ........................... Telephone No: .............................................
96 pages Temporarily
Order code BP239 out of print
£5.49
Signature: ................................................................................................................................................
PRACTICAL ELECTRONIC FILTERS
Owen Bishop អ I enclose cheque/PO payable to DIRECT BOOK SERVICE for £ ...................................................
This book deals with the subject in a non-mathematical
way. It reviews the main types of filter, explaining in simple
អ Please charge my card £ ...................................................... Card expiry date..................................
terms how each type works and how it is used.
The book also presents a dozen filter-based projects
with applications in and around the home or in the Card Number ............................................................................... Switch/Maestro Issue No.....................
constructor’s workshop. These include a number of audio
projects such as a rythm sequencer and a multi-voiced
electronic organ.
Card Security Code ......................................... (the last three digits on or just under the signature strip)
Concluding the book is a practical step-by-step guide to
designing simple filters for a wide range of purposes, with Please send book order codes: ..............................................................................................................
circuit diagrams and worked examples.
.................................................................................................................................................................
188 pages Order code BP299 £5.49 Please continue on separate sheet of paper if necessary
If you do not wish to cut your magazine, send a letter or copy of this form

Everyday Practical Electronics, September 2005 657


PIC N’ MIX
Our periodic column for your PIC programming enlightenment
JOHN BECKER

Using a DS1267 dual digital potentiometer with a PIC

T
HIS month and next we examine Table 1: DS1267 Pin integer multiple) of data must always be
how a digital potentiometer chip can Descriptions transmitted. Transmissions which do not
be interfaced to a PIC. The device send a complete 17-bits (or multiple) will
chosen is the Maxim DS1267 dual digital L0, L1 low end of resistor leave the register incomplete and possi-
potentiometer. This is available in three H0, H1 high end of resistor bly an error in the desired wiper posi-
standard dual-in-line (d.i.l.) pinned ver- W0, W1 wiper terminal of resistor tions.
sions, in which the two pots each have SOUT stacked configuration output After a transmission has been complet-
basic values of 100k (DS1267-100), or RST serial port reset input ed, the RST signal should be taken low
50k (DS1267-50) or 10k (DS1267-10). DQ serial port data input again for the new wiper position to
The one chosen by the author for use CLK serial port clock input become valid. On device power-up, the
in a forthcoming design for EPE is the COUT cascade port output wiper positions are set at 50% of the total
DS1267-100. For the sake of this demo, +5V +5V supply input (range resistance, or binary value 10000000
any of the three devices may be used. 4.5V to 5.5V) (decimal 128).
The DS1267 consists of two digitally GND ground (0V)
controlled solid-state pots. Each pot con- VB substrate bias voltage Demo Program
sists of 256 resistive sections. Between (range -5.5V to 0V) The demo program, whose main code
each section on both ends of the pot are is shown in Listing 1, illustrates how
tap points which are accessible to the data can be written to the pots. It was
wiper. The position of the wiper on the DS1267. The CLK line provides timing written for a PIC16F628, but can equally
resistive array is set by an 8-bit value. synchronisation for data input and output. well be used with other PICs, such as the
Control of the device is via a 3-wire The DQ line is used to transmit data to the PIC16F8x and PIC16F87x families. All
serial interface. This interface allows the 17-bit shift register. that is necessary is to change the PIC
device wiper position to be written or The 3-wire protocol is illustrated in type references at the head of ASM code.
read. Fig.3a. As shown, the 3-wire port is inac- As written, the demo uses PIC pins
Both potentiometers can be connected tive when the RST signal input is low. RB0 to RB2, but other pins may be allo-
in series or stacked for an increased total Communication via the port requires the cated instead. The connections between
resistance with the same resolution. The RST input to be in a high state. Data is the DS1267 and the PIC are shown in
DS1267 can be cascaded or daisy- then entered into the device on the low to Fig.4. The PIC may be run with any
chained. Its pinout diagram is shown in high transition of the CLK line. Basic tim- clock rate, crystal or RC controlled, with
Fig.1 and the pin descriptions are given in ing is shown in Fig.3b. the configuration settings value amended
Table 1. It is worth noting that although timing to suit. The prototype was run at 4MHz,
notations are quoted in Fig.3b, and quan- although the code has also been run on a
tified in the full datasheet, the controlling 16F877 at 10MHz.
PIC code shown in Listing 1 does not Note that if a −5V supply is not avail-
need these values to be actively consid- able, the −5V supply pin(s) may be con-
ered. The demo software has been used nection to the 0V line.
successfully with a DS1267 and a PIC
running at 10MHz.

Shift Register
Data written to the DS1267 is stored in
the 17-bit I/O shift register (Fig.2). Bit 0
Fig.1. Pinouts for the DS1267 of the register contains the stack select
bit, discussed presently. Bits 1 to 8 con-
tain the wiper position for pot 1. Bit 1 is
Operation the MSB and bit 8 is the LSB. Bits 9 to
The two 8-bit wiper values and the 16 contain the wiper position for pot 0,
stack select bit are written to a 17-bit I/O with bit 9 as the MSB and bit 16 as the
(input/output) shift register. The register LSB.
arrangement is shown in Fig.2. Data transmission always begins with
The controlling serial interface consists the stack select bit, followed by the pot 1
of three input signals, RST, CLK and DQ. and then pot 0 wiper positions. When
The RST control line must be high to wiper data is to be written to (or read Fig.4. Demo connections
begin any communication with the from) the DS1267, 17 bits (or some

Fig.2. Internal register arrangement for the DS1267

658 Everyday Practical Electronics, September 2005


The code is essentially a loop in which
different values are written cyclically to
the DS1267 pots. When the outputs of
the pot wipers are viewed on an oscillo-
scope, a falling sawtooth will be seen on
wiper W0, and rising sawtooth on W1.
In Listing 1, the registers which hold
the code to be written to the pots are
named POTVAL0 and POTVAL1. In the
PIC initialisation routine (not shown)
they are first set to zero.
On entry to the routine starting at SET-
POTS, the RST line is taken high, and the
stack bit is cleared (bcf PORTB,POT-
DATA). The CLK line is then toggled up
and down in sub-routine CLKPOT. This
sets the stack bit into the DS1267 as bit
b0.
Next POTVAL0’s value is copied into
W, the POTOUT routine is called, and the
contents of W copied into STORE. A loop
counter is now set for eight cycles.
Within the loop the POTDATA bit is first
cleared and the STORE register rotated
left and into CARRY. If CARRY is set, so
the POTDATA bit is also set. The CLK
line is again toggled to send the data bit
to the DS1267.
The loop counter is then decremented
and, if not zero, the process is repeated
for the next bit in STORE. When all eight
bits have been sent (bits b1 to b8), a
return from loop occurs. The process is
then repeated for the PORTVAL1 value
(bits b9 to b16).
Following the return from this loop the
Fig.3. Control waveforms for the DS1267 POTVAL0 value is then incremented and
POTVAL1 decremented. A jump is then
LISTING 1. Demo Code made to ENDPOT, at which point the
RST line is taken low, completing the
SETPOTS: bsf PORTB,POTRST ; set to dig pot to receive data
sending of all 17 bits.
bcf PORTB,POTDATA ; clear stack bit The data sending routine is then repeat-
call CLKPOT ; send stack bit ed by a jump back to label SETPOTS.
movf POTVAL1,W ; send pot 1 val (chip 1) This continues indefinitely until the
call POTOUT power is switched off. The result is the
movf POTVAL0,W ; send pot 0 val (chip 1) rising and falling ramp waveforms from
call POTOUT the wipers as stated above.
incf POTVAL0,F ; inc pot 0 val The ten commands following goto
decf POTVAL1,F ; dec pot 1 val ENDPOT will be discussed next month.
goto ENDPOT ; delete this if sending to 2 digipot chips
bcf PORTB,POTDATA ; clear stack bit
Stack Waveform
The output at stack register pin SOUT
call CLKPOT ; send stack bit depends on the value of the stack register
movf POTVAL3,W ; send pot 3 val (chip 2) bit (b0). If b0 = 0 then the waveform at
call POTOUT SOUT is the same as that at wiper W0.
movf POTVAL2,W ; send pot 2 val (chip 2) With b1 = 1 then the output is the same as
call POTOUT at W1. This can be proved by monitoring
movlw 3 W0 and SOUT while the PIC holds the
addwf POTVAL2,F demo code as illustrated. Now, in the
movlw 5 ASM code, amend the line:
addwf POTVAL3,F
ENDPOT: bcf PORTB,POTRST ; disable dig pot from receiving data bcf PORTB,POTDATA ; clear stack bit
goto SETPOTS ; repeat to:
bsf PORTB,POTDATA ; set stack bit
POTOUT: movwf STORE ; copy W into STORE
movlw 8 ; set loop for 8 actions Re-compile the code to HEX and send
movwf LOOP that to the PIC. Now monitor SOUT and
DIGLOOP0: bcf PORTB,POTDATA ; clear data bit W1 to prove that the waveform of W1 is
rlf STORE,F ; rotate store left (MSB out first) now being output at SOUT.
btfsc STATUS,C ; is CARRY set?
bsf PORTB,POTDATA ; yes, set data bit Resources
call CLKPOT ; send data bit Software for this demo can be down-
decfsz LOOP,F ; dec loop, is it 0? loaded free from the EPE Downloads
goto DIGLOOP0 ; no, repeat for next bit site, accessible via the home page at
return www.epemag.co.uk. It is held in the
PICnMix folder, under PNMSEP05.
CLKPOT: bsf PORTB,POTCLK ; take dig pot clk high The complete datasheet for the DS1267
bcf PORTB,POTCLK ; take dig pot clk low can be download from www.maxim-
return ic.com.

Everyday Practical Electronics, September 2005 659


Surfing The Internet

Net Work
Alan Winstanley

A Growing Band only <screenname>@aol.co.uk/.com succeeds as a FROM:


address. Incidentally, AOL users are not compelled to use AOL's
In the UK, the number of broadband users has outstripped dial-
up (narrowband) customers for the first time. Last month I proprietary email and browser programs. They can use Microsoft
described how – at last! – ADSL broadband suddenly arrived in my Outlook, Outlook Express, Eudora or other IMAP compatible soft-
worklab after many years of frustration and eager anticipation. The ware to handle emails, and can also fire up MSIE to surf the web
service (Tiscali's 512k) is bearing up well, although there have after connecting to the net through AOL.
been a few worries about the reliability of outbound email. Other outbound mail problems suffered by the author include
One practical problem relates to the conversion of the fax line mail bouncing due to the temporary blacklisting of a Tiscali SMTP
for broadband. A microfilter is used to enable the fax machine – an server, perhaps the after-effects of a spam campaign. The problem
unreliable HP 6110 all-in-one – to function on the broadband line. for the author, then, was to find an alternative and more reliable
Annoyingly, some fax machines now have problems negotiating way of sending multiple domain emails that short-circuited Tiscali.
properly when trying to send a fax to the author, whilst other
machines are perfectly fine. Talk about one step forward… ISP-Independent Mailing
This month I suggest a way in which outgoing emails can be
Outward Bound sent regardless of which service provider is used to connect to the
The other problem experienced after the broadband conversion Internet. AuthSMTP (www.authsmtp.net) is a service designed
has been the sending of email. This has proved somewhat unreli- specially for those who suffer SMTP problems with their ISP.
able at times, possibly due to maintenance or overloaded servers, Instead of using your ISPs' server, send all outgoing mail through
but it has occasionally been a trial to send mails through Tiscali's AuthSMTP instead. The cost of the service is trivial at entry level,
outbound mailservers. Problems come and go in phases. just £14 or $25 per year, allowing up to ten FROM: addresses and
As regular Net Work readers will know, outgoing emails are usu- 1,000 mails/100MB of outbound mail per month. At the other end
ally handled by the ISP’s own SMTP (Simple Mail Transfer of the scale, for £4,505 or $8,009 per year, you can send up to half
Protocol) server. If this were not the case, then users could connect a million emails per month, or 50GB worth.
to the Internet through any ISP and then potentially burden anoth- After completing the online sign-up procedure, which includes
er ISP’s outgoing mail server with spam. a rigorous verification of email addresses, AuthSMTP was
Other strange outbound mail problems can arise due to a num- enabled, although there were initially some frustrating problems
ber of reasons. BT’s own Internet Service Provider has been when trying to get the author’s Eudora mail software to use
known to cause erratic problems when trying to send mail under a AuthSMTP properly. These were eventually overcome and no such
user’s own domain name. Outbound mails with a FROM: address problems are anticipated with e.g. Microsoft Outlook.
of <me>@mydomain.co.uk may fail to be sent, and only by send- The author has nothing but praise for the pre-sales and technical
ing it as FROM:<username123>@btconnect.com (or similar) will support supplied by AuthSMTP, who delivered very rapid responses
mails be successfully transmitted. even in the early hours of the morning.
In one case that the writer had to deal with, after a long spell with- Their SMTP service provides a very simple control panel that enables
out any problems at all, BT’s broadband service suddenly blocked usage to be monitored or new addresses to be set up. All outbound email
the transmission of a business customer’s domain mail, and in a problems have been eliminated, and two months of testing have shown
rather unusual move, BT validated the registration details of the said how AuthSMTP complements the broadband connection well, handling
domain name by searching Nominet's database. BT is checking up attachments and domain mail flawlessly. And remember that using
on its customers. Not convinced by what they found, mail relaying AuthSMTP means that you can connect to the net using any ISP and
is still denied by BT and the customer is still unable to send his own simply configure your email program to send out via AuthSMTP. This
domain mail, effective- could be an ideal solution for
ly being treated as a many users that suffer prob-
serial spammer. lems sending mail, or even if
If your ISP does not you use a laptop around the
allow outbound mail country (world), you can fire
relaying then it will not all your email through the
be possible to use your same SMTP server regardless
domain name as a of how you connect to the
sender's address. Internet. Users can sign up for
Amongst other ISPs, a 14-day trial.
Tiscali, Demon and My thanks to reader David
Wanadoo (formerly Sims who suggests a freeware
Freeserve, and due to program called Netmeter
change its name to which helps you to gauge
Orange) will all allow monthly usage. Similar to the
own domain mails to be DU Meter program I men-
sent successfully without tioned last month, you can
problems. download it from
AOL users who also http://readerror.gmxhome
have their own domain .de/.
name have the same AuthSMTP is an independent SMTP server that may solve many You can email me at
mail relaying problem: problems with outgoing emails [email protected].

660 Everyday Practical Electronics, September 2005


PCB SERVICE
Printed circuit boards for most recent EPE constructional projects are available from
the PCB Service, see list. These are fabricated in glass fibre, and are fully drilled and
PROJECT TITLE
刂Crossword Solver
20W Amplifier Module
Back-To-Basics 2 – Water Level Alarm
– Burglar Alarm
刂PIC Ultrasonic Scanner
MAY ’05

JUN ’05
Order Code
499
500
501
502
503
Cost
£6.66
£5.14
£5.39
£5.87
£6.66
roller tinned. All prices include VAT and postage and packing. Add £1 per board for 刂Radio Control Model Switcher 504 £5.87
airmail outside of Europe. Remittances should be sent to The PCB Service, Back-To-Basics 3 – Scarecrow 505 £5.55
Everyday Practical Electronics, Wimborne Publishing Ltd., 408 Wimborne Road – Digital Lock 506 £6.66
East, Ferndown, Dorset BH22 9ND. Tel: 01202 873872; Fax 01202 874562; CompactFlash Interface Board 507 £6.66
Email: [email protected]. On-line Shop: www.epemag. LF/VLF Converter JUL ’05
wimborne.co.uk/shopdoor.htm. Cheques should be crossed and made payable to
Everyday Practical Electronics (Payment in £ sterling only). – Fixed Capacitor Board 508 £5.71
NOTE: While 95% of our boards are held in stock and are dispatched within – Mixer/Oscillator Board 509 £5.86
seven days of receipt of order, please allow a maximum of 28 days for delivery – Buffer Amplifier 510 £5.23
– overseas readers allow extra if ordered by surface mail. – Q-Multiplier 511 £5.23
Back numbers or photostats of articles are available if required – see the Back – Tuning Capacitor Board 406 £4.28
Issues page for details. We do not supply kits or components for our projects. Back-To-Basics 4 – Doorchime 512 £6.34
Please check price and availability in the latest issue. – Electronic Dice 513 £6.02
A large number of older boards are listed on our website. 刂Cybervox 514 £6.82
Boards can only be supplied on a payment with order basis. Multi-Clap Switch 515 £6.66
Audio System AUG ‘05
– Preamplifier 516 £6.02
PROJECT TITLE Order Code Cost – Mic. Supply Board 517 £5.23
– Power Amp 518 £6.02
Infra-Guard APR ’04 439 £5.07 刂Pain Monitor 519 £7.14
刂Moon Clock 442 £5.71 MotorAmp 520 £7.45
刂Teach-In ’04 Part 6 – Software only – – Back-To-Basics 5
刂EPE Seismograph Logger APR ’04 – Kitchen Timer 521 £5.87
Control Board 440
Sensor Amp. Board 441 }
pair £6.50 – Room Thermometer
All-Band Radio – Full Version SEPT ’05
522
523
£6.02
£5.71
In-Car Lap-Top PSU MAY ’04 443 £4.60 – Mini Version 524 £5.23
Beat Balance Metal Detector 444 £4.60 Multicore Cable Tester – Main 525 £6.19
Teach-In ’04 Part 7 – Transmitter 445 £4.91 – Active 526 £5.55
Receiver 446 £4.75 Back-To-Basics 6 – Daily Reminder 527 £6.19
Moisture 447 £4.44 – Whistle Switch 528 £5.87
刂PIC Quickstep JUNE ’04 448 £5.71 刂Model Railway Signal Control 529 £6.19
Body Detector MkII 449 £4.91 刂Snooker/Darts Scoreboard 530 £8.72
刂Teach-In ’04 Part 8 – Software only – –
刂MIDI Synchronome – Software only – –
Hard Drive Warbler JULY ’04 450 £4.60
刂Bongo Box
Portable Mini Alarm – Sensor
451
452
£6.02
£5.23
EPE SOFTWARE
– Counter 453 £5.07
Software programs for EPE projects marked with a single asterisk 刂 are
刂Teach-In ’04 Part 9
PIC Combination Lock Alarm Monitor 454 £5.07
available on 3·5 inch PC-compatible disks or free from our Internet site. The
刂EPE Magnetometry Logger 455 £5.71
following disks are available: PIC Tutorial V2 (Apr-June ’03); EPE Disk 3
(2000); EPE Disk 4 (2001 – excl. PIC Toolkit TK3); EPE Disk 5 (2002); EPE
Keyring L.E.D. Torch AUG ’04 456 £4.12
Disk 6 (2003 – excl. Earth Resistivity and Met Office); EPE Disk 7 (2004);
刂Teach-In ’04 Part 10 – PIC Curtain or Blind Winder 457 £5.39 EPE Disk 8 (Jan 2005 to current cover date); EPE Earth Resistivity
Simple F.M. Radio – F.M. Tuner 458 £5.07
Logger (Apr-May ’03); EPE PIC Met Office (Aug-Sept ’03); EPE
– Tone Control 459 £4.75
Seismograph (Apr-May ’04); EPE Magnetometry Logger (July-Aug ’04);
– Audio Power Amp (TDA2003) 347 £4.60
EPE Teach-In 2000; EPE Spectrum; EPE Interface Disk 1 (October ’00
– Power Supply 460 £5.39
issue to current cover date). EPE Toolkit TK3 software is available on the
刂EPE Scorer – Control Board 461 £6.66
– Display Board 462 £7.93
EPE PIC Resources CD-ROM, £14.45. Its p.c.b. is order code 319, £8.24.
– Slave Board 463 £5.55 刂刂The software for these projects is on its own CD-ROM. The 3·5 inch
刂PIC to Mouse/Keyboard – Software only – – disks are £3.00 each (UK), the CD-ROMs are £6.95 (UK). Add 50p each for
EPE Wart Zapper SEPT ’04 464 £4.60 overseas surface mail, and £1 each for airmail. All are available from the
刂Radio Control Failsafe 465 £4.76 EPE PCB Service. All files can be downloaded free from our Internet FTP
刂AlphaMouse Game 466 £4.60 site, accessible via our home page at: www.epemag.co.uk.
刂Rainbow Lighting Controller – Software only – –
刂Moon and Tide Clock Calendar OCT ’04 467 £5.55
Volts Checker
刂Smart Karts – Software only
468

£4.20 EPE PRINTED CIRCUIT BOARD SERVICE
Logic Probe NOV ‘04 469 £4.76 Order Code Project Quantity Price
Thunderstorm Monitor 470 £5.39
MW Amplitude Modulator .....................................................................................
– V.F.O./Buffer 471 £4.76
– Modulator/PA 472 £5.07 Name ...........................................................................
– Power Supply 473 £4.76
Super Vibration Switch DEC ‘04 474 £4.75 Address .......................................................................
Wind Direction Indicator 475 £6.18 ..............................................................................
刂PIC Flasher Mk2 – Control Board 476 £4.75
– Transmitter 477 £4.44
– Multipurpose Board 478 £4.75 Tel. No. .........................................................................
– Simple Cycler 479 £4.44
– Luxeon V Controller 480 £4.44 I enclose payment of £................ (cheque/PO in £ sterling only) to:
– Power Supply 473 £4.76
Light Detector
刂Camera Watch
JAN ‘05 481
482
£4.44
£6.03
Everyday
Gate Alarm – Oscillator
– Delay/Timer
483
484
£4.92
£4.92
Practical Electronics
刂Sneaky – Transmitter FEB ‘05 485 £4.60 MasterCard, Amex, Diners
– Receiver 486 £4.91
刂PIC Electric Mk2 – Control 487 £5.87 Club, Visa or Switch/Maestro
– Sensor 488 £5.71
Sound Card Mixer 489 £7.29 Card No. ................................................................................
Headphone Monitor MAR ’05 490 £5.71 Valid From ....................... Expiry Date ...............................
EPE Cat Flap 491 £6.02
刂Bingo Box – Main 492 £9.04 Card Security Code ............. Switch/Maestro Issue No .........
– Big Digit Display 493 £10.31
(The last 3 digits on or just under the signature strip)
Spontaflex Radio– Tuner APR ‘05 494 £5.55
– Coil Pack 495 £5.71 Signature ..............................................................................
– Audio Amplifier 496 £5.55
– Tuning Capacitor Board 406 £4.28 NOTE: You can also order p.c.b.s by phone, Fax, Email or via our
刂Safety Interface 497 £6.18 Internet site on a secure server:
Back-To-Basics 1– Fridge/Freezer Door Alarm 498 £5.39
http://www.epemag.wimborne.co.uk/shopdoor.htm

Everyday Practical Electronics, September 2005 661


BACK ISSUES
We can supply back issues of EPE by post, most issues from the past three years are available. An EPE index for the last five years is also available at
www.epemag.co.uk or see order form below. Alternatively, indexes are published in the December issue for that year. Where we are unable to provide a
back issue a photocopy of any one article (or one part of a series) can be purchased for the same price. Issues from Nov. 98 are available on CD-ROM –
see next page – and issues from the last six months are also available to download from www.epemag.com.
Please make sure all components are still available before commencing any project from a back-dated issue.
DID YOU MISS THESE?
MAY ’04 MAY ’05
PROJECTS ɀ Beat Balance Metal Detector ɀ In-Car PROJECTS ɀ Crossword Solver ɀ DAB Radio
Laptop PSU ɀ Low-Frequency Wien Oscillator ɀ Aerial ɀ 20W Amplifier Module ɀ Smart Karts - 8
EPE Experimental Seismograph Logger–2. ɀ Water Level Detector ɀ Burglar Alarm
FEATURES ɀ Coping With Lead-Free Solder FEATURES ɀ Back To Logic Basics - 2 ɀ Circuit
ɀ Teach-In 2004 – Part 7 ɀ Ingenuity Unlimited Surgery ɀ Ingenuity Unlimited ɀ Passive Component
ɀ Techno Talk ɀ Circuit Surgery ɀ Practically Testing ɀ Practically Speaking ɀ Techno Talk ɀ Net
Speaking ɀ Pic-N’-Mix ɀ Net Work – The Internet Work – The Internet Page
Page.
JUNE ’05
JUNE ’04 Photocopies only PROJECTS ɀ PIC Ultrasonic Radar ɀ Radio
PROJECTS ɀ PIC Quickstep ɀ Crafty Cooling ɀ Control Model Switcher ɀ Super-Ear Audio
MIDI Synchronome ɀ Body Detector Mk2. Telescope ɀ Electronic Scarecrow ɀ Digital Lock
FEATURES ɀ Clinical Electrotherapy ɀ Ingenuity FEATURES ɀ Catch the Wave (Tsunami) ɀ Back To
Unlimited ɀ Teach-In 2004 – Part 8 ɀ Interface Basics – 3 ɀ Digital TV Switchover ɀ Programming
ɀ Circuit Surgery ɀ Techno Talk ɀ PIC-N’-Mix ɀ Net
JAN ’05 PIC 18F Interrupts ɀ Circuit Surgery ɀ Interface ɀ
Work – The Internet Page. PROJECTS ɀ Speed Camera Watch ɀ Gate Alarm Ingenuity Unlimited ɀ Net Work – The Internet Page
ɀ Light Detector ɀ Smart Karts - 4.
JULY ’04 Photocopies only FEATURES ɀ Practially Speaking ɀ 32-Bit Signed
Integer Maths for PICs ɀ Ingenuity Unlimited ɀ
PROJECTS ɀ Portable Mini Alarm ɀ Bongo Box ɀ Circuit Surgery ɀ Techo Talk ɀ PIC ‘N’ Mix ɀ
Hard Drive Warbler ɀ EPE PIC Magnetometry Picoscope 3205 Review ɀ Net Work – The Internet
Logger–1. Page
FEATURES ɀ Making Front Panel Overlays ɀ
Practically Speaking ɀ Teach-In 2004 – Part 9 ɀ
Ingenuity Unlimited ɀ Circuit Surgery ɀ Techno Talk FEB ’05
ɀ PIC-N’-Mix ɀ Net Work – The Internet Page. PROJECTS ɀ PIC Electric MK2 Pt1 ɀ Sneaky ɀ
Sound Card Mixer ɀ Smart Karts - 5.
FEATURES ɀ Interface ɀ Circuit Surgery ɀ Ingenuity
Unlimited ɀ Techno Talk ɀ PIC ‘N’ Mix ɀ E-Blocks and
Flowcode V2.0 Reviews ɀ Net Work – The Internet
Page

MAR ’05
PROJECTS ɀ Cat Flap ɀ Stereo Headphone Monitor
JULY ’05
ɀ PIC Electric Mk2 Pt2 ɀ Smart Karts - 6 ɀ Bingo Box. PROJECTS ɀ Cybervox ɀ LF and VLF Converter
FEATURES ɀ TK3 Simulator and PIC18F Upgrade ɀ Multi-Clap Switch ɀ Doorchime ɀ Electronic Dice
ɀ Circuit Surgery ɀ Ingenuity Unlimited ɀ Techno FEATURES ɀ Discovering PICs Reviewed ɀ Back
Talk ɀ PIC ‘N’ Mix ɀ Practically Speaking ɀ Net Work To Basics – 4 ɀ Digital TV Switchover ɀ Practically
– The Internet Page Speaking ɀ Circuit Surgery ɀ Interface – The
Internet Page
APR ’05 AUG ’05
AUG ’04 PROJECTS ɀ Spontaflex Radio Receiver ɀ
PROJECTS ɀ EPE Scorer ɀ Keyring L.E.D. Torch ɀ PROJECTS ɀ Motor Amplifier ɀ Pain Monitor ɀ
Safety Interface ɀ Fridge/Freezer Door Alarm ɀ Audio System-Communications ɀ Kitchen Timer ɀ
Simple F.M. Radio ɀ EPE PIC Magnetometry Smart Karts - 7.
Logger – 2. Room Thermometer
FEATURES ɀ Back To Logic Basics - 1 ɀ Circuit
FEATURES ɀ PIC To PS/2 Mouse and Keyboard Surgery ɀ Ingenuity Unlimited ɀ Interface ɀ PIC18F FEATURES ɀ Back To Basics – 5 ɀ Circuit Surgery
Interfacing ɀ Techno Talk ɀ Circuit Surgery ɀ Teach- Microcontroller Family Introduction ɀ Techno Talk ɀ ɀ Interface ɀ Ingenuity Unlimited ɀ Techno Talk ɀ
In 2004 – Part 10 ɀ Interface ɀ Ingenuity Unlimited Net Work – The Internet Page PIC ‘N’ Mix ɀ NetWork – The Internet Page
ɀ PIC-N’-Mix ɀ Net Work – The Internet Page.

SEPT ’04 BACK ISSUES ONLY £3.80 each inc. UK p&p.


PROJECTS ɀ EPE Wart Zapper ɀ Radio Control
Failsafe ɀ Rainbow Lighting Control ɀ Alphamouse Overseas prices £4.50 each surface mail, £5.50 each airmail.
Game. We can also supply issues from earlier years: 2000 (except Feb., Mar., July, Oct.), 2001 (except Feb., May, Aug., to
FEATURES ɀ Light Emitting Diodes – Part 1 ɀ High Nov.), 2002 (except Feb., June, Aug. to Nov.), 2003 (except June), 2004 (except June, July, Oct. and Dec). Where
Speed Binary-To-Decimal For PICs ɀ Practically we do not have an issue a photocopy of any one article or one part of a series can be provided at the same price.
Speaking ɀ Ingenuity Unlimited ɀ Techno-Talk ɀ
Circuit Surgery ɀ PIC-N’-Mix ɀ Network – The
Internet Page ORDER FORM – BACK ISSUES – PHOTOCOPIES– INDEXES
.
អ Send back issues dated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OCT ’04 Photocopies only អ Send photocopies of (article title and issue date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PROJECTS ɀ EPE Theremin ɀ Smart Karts – Part
1 ɀ Volts Checker ɀ Moon and Tide Clock Calendar. អ Send copies of last five years indexes (£3.80 for five inc. p&p – Overseas £4.50 surface, £5.50 airmail)
FEATURES ɀ Light Emitting Diodes – 2 ɀ Circuit
Surgery ɀ Interface ɀ Ingenuity Unlimited ɀ Techno Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Talk ɀ PIC-N’-Mix ɀ Network – The Internet Page ɀ
ROBOTS – Special Supplement Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

NOV ’04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


PROJECTS ɀ Thunderstorm Monitor ɀ M.W.
Amplitude Modulator ɀ Logic Probe ɀ Smart Karts - 2. អ I enclose cheque/P.O./bank draft to the value of £ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FEATURES ɀ Light Emitting Diodes-3 ɀ Floating
Point Maths for PICs ɀ Ingenuity Unlimited ɀ PE អ Please charge my Visa/Mastercard/Amex/Diners Club/Switch £ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40th Anniversary ɀ Circuit Surgery ɀ Techno Talk ɀ
PIC-N’-Mix ɀ Net Work – The Internet Page. Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Switch Issue No . . . . . . . . . . . . . . . .

Valid From . . . . . . . . . . . . . . . . .Card Expiry Date . . . . . . . . . . . . Card Security Code . . . . . . . . . .


DEC ’04 Photocopies only (The last 3 digits on or just under the signature strip)
PROJECTS ɀ Super Vibration Switch ɀ Versatile SEND TO: Everyday Practical Electronics, Wimborne Publishing Ltd., 408 Wimborne Road East, Ferndown, Dorset BH22 9ND.
PIC Flasher ɀ Wind Direction Indicator ɀ Smart Tel: 01202 873872. Fax: 01202 874562.
Karts - 3.
FEATURES ɀ Light Emitting Diodes-4 ɀ Ingenuity E-mail: [email protected] On-line Shop: www.epemag.wimborne.co.uk/shopdoor.htm
Payments must be in £ sterling – cheque or bank draft drawn on a UK bank. Normally supplied within seven days of receipt of order.
Unlimited ɀ Circuit Surgery ɀ Interface ɀ PIC ‘N’ Mix
Send a copy of this form, or order by letter if you do not wish to cut your issue.
ɀ Techno Talk ɀ Net Work – The Internet Page ɀ M09/05
INDEX Vol. 33.

662 Everyday Practical Electronics, September 2005


CLASSIFIED
Everyday Practical Electronics reaches twice as
many UK readers as any other UK monthly hobby
electronics magazine, our sales figures prove it.
We have been the leading monthly magazine in
this market for the last twenty years.

If you want your advertisements to be seen by the largest readership at the most economical price our classified and semi-display pages
offer the best value. The prepaid rate for semi-display space is £10 (+VAT) per single column centimetre (minimum 2·5cm). The prepaid rate
for classified adverts is 40p (+VAT) per word (minimum 12 words).
All cheques, postal orders, etc., to be made payable to Everyday Practical Electronics. VAT must be added. Advertisements, together with
remittance, should be sent to Everyday Practical Electronics Advertisements, 408 Wimborne Road East, Ferndown, Dorset BH22 9ND.
Phone: 01202 873872. Fax: 01202 874562. Email: [email protected]
For rates and information on display and classified advertising please contact our Advertisement Manager, Stewart Kearn as above.

TOTALROBOTS
ROBOTICS, CONTROL &
ELECTRONICS TECHNOLOGY
High quality robot kits and components
UK distributor of the OOPic microcontroller
Secure on-line ordering
Rapid delivery
Highly competitive prices
Visit www.totalrobots.com
Tel: 01737 371688
Miscellaneous
MAKE YOUR HOBBY PAY. Assemble units
X-10 ® Home Automation for the partially sighted. Local customers, sole
We put you in control TM area, instruction manual, material supplies and
completed units supplied. Details: 02392 830158
Why tolerate when you can automate?
An extensive range of 230V X-10 products VALVES AND ALLIED COMPONENTS IN
and starter kits available. Uses proven Power STOCK. Phone for free list. Valves, books and
Line Carrier technology, no wires required. magazines wanted. Geoff Davies (Radio), tel.
01788 574774.
Products Catalogue available Online.
Worldwide delivery. FREE! PROTOTYPE PRINTED CIRCUIT
BOARDS! Free prototype p.c.b. with quantity
Laser Business Systems Ltd. orders. Call Patrick on 028 9073 8897 for details.
E-Mail: [email protected] Agar Circuits, Unit 5, East Belfast Enterprise
http://www.laser.com Park, 308 Albertbridge Road, Belfast BT5 4GX.
Tel: (020) 8441 9788
Fax: (020) 8449 0430 PRINTED CIRCUIT BOARDS – QUICK
SERVICE. Prototype and production artwork
raised from magazines or draft designs at low
cost. PCBs designed from schematics.
Production assembly, wiring and software pro-
gramming. For details contact Patrick at Agar
Microcontroller Circuits, Unit 5, East Belfast Enterprise Park,
Microcontroller kits, 8052 core, no
development tools needed, runs
308 Albertbridge Road, Belfast BT5 4GX.
BASIC in firmware, I2C, LCD and Phone 028 9073 8897, Fax 028 9073 1802,
Infrared drivers built in. Program in Email [email protected]
BASIC and then run stand alone.
N.R. BARDWELL LTD
Prices from £14.95 + P & P ELECTRONIC COMPONENT SUPPLIES
Stock of l.e.d.s, Semiconductors, Resistors, WANTED URGENTLY
www.byvac.com
Capacitors and many more items. Old half inch ferrite rods. Must be half inch
Send 44p for lists or visit out secure online diameter and be six inches long or more. Will
ordering of www.bardwells.co.uk pay very good money for the rods.
288, Abbeydale Road, Sheffield. S7 1FL Contact Peter Tankard on Tel 0114 2316321
Email - [email protected]
www.pawbooks.co.uk between 9am and 10pm.

Using ICs. Pinout diagrams. ½ PRICE VALVES AND RADIO &


BTEC ELECTRONICS ELECTRONIC COMPONENTS
Numeric control. TECHNICIAN TRAINING Catalogues available for £1 refundable on 1st
Interactive Demonstrations. order. Over 1480 different valves and over 500
Write, save, load your own programs. NATIONAL ELECTRONICS radio/electronic components.
See ICs working on screen. VCE ADVANCED ICT W. Burcher, 676 Foxhall Road, Ipswich,
HNC AND HND ELECTRONICS Suffolk, IP3 8NQ.TEL: 01473 272218
FOUNDATION DEGREES
NVQ ENGINEERING AND IT NARROW BANDWIDTH TELEVISION
BOWOOD ELECTRONICS LTD DESIGN AND TECHNOLOGY
ASSOCIATION. Build your own television cam-
Suppliers of Electronic Components eras and display units. Ring 0115 9282896 for
Place a secure order on our website or call our sales line LONDON ELECTRONICS COLLEGE leaflet or visit www.nbtv.org
All major credit cards accepted
Web: www.bowood-electronics.co.uk
20 PENYWERN ROAD
EARLS COURT, LONDON SW5 9SU KITS, TOOLS, COMPONENTS. S.A.E
Unit 1, McGregor’s Way, Turnoaks Business Park, catalogue. SIR-KIT ELECTRONICS, 52
Chesterfield, S40 2WB. Sales: 01246 200222 TEL: (020) 7373 8721 Severn Road, Clacton, CO15 3RB.
Send 60p stamp for catalogue www.lec.org.uk www.geocites.com/sirkituk

Everyday Practical Electronics, September 2005 663


Rechargeable Batteries With Solder Tags
NIMH NICAD
ADVERTISERS
AA 2000mAh ......................£2.82
C 4Ah ...................................£4.70
AA 650mAh ...................... £1.41
C 2.5Ah ...............................£3.60
INDEX
AUDON ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . .641
D 9Ah ...................................£7.60 D 4Ah ...................................£4.95 AVIT RESEARCH . . . . . . . . . . . . . . . . . . . . . . . . . . . .641
PP3 150mAh ..................... £4.95
BETA-LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624
Instrument case with edge connector and screw terminals BITZ TECHNOLOGY . . . . . . . . . . . . . . . . . . . . . . . . .632
BREADBOARDING . . . . . . . . . . . . . . . . . . . . . . . . . .633
Size 112mm x 52mm x 105mm tall BULL GROUP . . . . . . . . . . . . . . . . . . . . . . . . . .Cover (ii)
This box consists of a cream base with a PCB slot, a cover plate to pro- CONRAD ELECTRONICS . . . . . . . . . . . . . . . . . . . . .625
tect your circuit, a black lid with a 12 way edge connector and 12 screw DISPLAY ELECTRONICS . . . . . . . . . . . . . . . . . . . . . 599
terminals built in (8mm pitch) and 2 screws to hold the lid on. The cream DUNLAOGHAIRE COLLEGE . . . . . . . . . . . . . . . . . . .632
bases have minor marks from dust and handling price £2.00 + EASYSYNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .624
VAT(=£2.35) for a sample or £44.00+VAT (=£51.70) for a box of 44.
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . .602
FAST COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . .599
FOREST ELECTRONIC DEVELOPMENTS . . . . . . . .594
JAYCAR ELECTRONICS . . . . . . . . . . . . . . . . . .Cover (iv)
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . .664
LABCENTER . . . . . . . . . . . . . . . . . . . . . . . . . . .Cover (iii)
MAGENTA ELECTRONICS . . . . . . . . . . . . . . . . .600/601
MICROCHIP TECHNOLOGY INC. . . . . . . . . . . . . . . .621
NURVE NETWORKS LLC . . . . . . . . . . . . . . . . . . . . . .654
866 battery pack originally intended to be PEAK ELECTRONIC DESIGN . . . . . . . . . . . . . . . . . .644
used with an orbitel mobile telephone it PICO TECHNOLOGY . . . . . . . . . . . . . . . . . . . . . . . . .641
contains 10 1·6Ah sub C batteries (42 x QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . .596/597
22 dia. the size usually used in cordless
screwdrivers etc.) the pack is new and RD RESEARCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . .609
unused and can be broken open quite SHERWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . .664
easily £7.46 + VAT = £8.77 STEWART OF READING . . . . . . . . . . . . . . . . . . . . . .599
Please add £1.66 + VAT = £1.95 postage & packing per order
ADVERTISEMENT OFFICES:
JPG Electronics 408 WIMBORNE ROAD EAST, FERNDOWN, DORSET BH22 9ND
Shaws Row, Old Road, Chesterfield, S40 2RB. PHONE: 01202 873872
Tel 01246 211202 Fax 01246 550959 FAX: 01202 874562
www.JPGElectronics.com EMAIL: [email protected]
Mastercard/Visa/Switch
Callers welcome 9.30 a.m. to 5.30 p.m. Monday to Saturday For Editorial address and phone numbers see page 603

SHERWOOD ELECTRONICS EPE SUBSCRIPTIONS


SAVE 71p AN ISSUE OVER UK NEWSTAND PRICES
Buy 10 x £1 Special Packs and choose another one FREE ON A UK ONE YEAR SUBSCRIPTION
SP1 15 x 5mm Red LEDs SP135 5 x Miniature slide switches Subscriptions for delivery direct to any address in the UK:
SP2 12 x 5mm Green LEDs SP136 3 x BFY50 transistors
SP3 12 x 5mm Yellow LEDs SP137 4 x W005 1·5A bridge rectifiers 6 months £16.50, 12 months £31, two years £57; Overseas:
SP5 25 x 5mm 1 part LED clips SP138 20 x 2·2/63V radial elect. caps. 6 months £19.50 standard air service or £28.50 express airmail,
SP6 15 x 3mm Red LEDs SP140 3 x W04 1·5A bridge rectifiers 12 months £37 standard air service or £55 express airmail,
SP7 12 x 3mm Green LEDs SP142 2 x CMOS 4017
SP8 10 x 3mm Yellow LEDs SP143 5 Pairs min. crocodile clips 24 months £69 standard air service or £105 express airmail.
SP9 25 x 3mm 1 part LED clips (Red & Black) Cheques or bank drafts (in £ sterling only) payable to Everyday
SP10 100 x 1N4148 diodes SP144 5 Pairs min.crocodile clips
SP11 30 x 1N4001 diodes (assorted colours) Practical Electronics and sent to EPE Subs. Dept., Wimborne
SP12 30 x 1N4002 diodes SP146 10 x 2N3704 transistors Publishing Ltd., 408 Wimborne Road East, Ferndown, Dorset
SP18 20 x BC182 transistors SP147 5 x Stripboard 9 strips x
SP20 20 x BC184 transistors 25 holes BH22 9ND. Tel: 01202 873872. Fax: 01202 874562. Email:
SP23 20 x BC549 transistors SP151 4 x 8mm Red LEDs [email protected]. Also via the Web at
SP24 4 x CMOS 4001 SP152 4 x 8mm Green LEDs
SP25 4 x 555 timers SP153 4 x 8mm Yellow LEDs http://www.epemag.wimborne.co.uk. Subscriptions start with
SP26
SP28
4 x 741 Op.Amps
4 x CMOS 4011
SP154
SP156
15 x BC548 transistors
3 x Stripboard, 14 strips x
the next available issue. We accept MasterCard, Amex, Diners
SP29 3 x CMOS 4013 27 holes Club, Switch or Visa. (For past issues see the Back Issues page.)
SP33 4 x CMOS 4081 SP160 10 x 2N3904 transistors
SP34 20 x 1N914 diodes SP161 10 x 2N3906 transistors
SP36
SP37
25 x 10/25V radial elect. caps.
12 x 100/35V radial elect. caps.
SP164
SP165
2 x C106D thyristors
2 x LF351 Op.Amps
ONLINE SUBSCRIPTIONS
SP38 15 x 47/25V radial elect caps SP166 20 x 1N4003 diodes Online subscriptions, for downloading the magazine via the
SP39 10 x 470/16V radial elect. caps. SP167 5 x BC107 transistors
SP40 15 x BC237 transistors SP168 5 x BC108 transistors Internet, $14.99US (approx. £8) for one year available from
SP41 20 x Mixed transistors SP171 8 Metres 18SWG solder www.epemag.com.
SP42 200 x Mixed 0·25W C.F. resistors SP172 4 x Standard slide switches
SP47 5 x Min. PB switches SP173 10 x 220/25V radial elect. caps
SP49
SP101
4 x 5 metres stranded core wire
8 Metres 22SWG solder
SP174
SP175
20 x 22/25V radial elect. caps
20 x 1/63V radial elect. caps. USA/CANADA SUBSCRIPTIONS
SP102 20 x 8-pin DIL sockets SP177 10 x 1A 20mm quick blow fuses
SP103 15 x 14-pin DIL sockets SP178 10 x 2A 20mm quick blow fuses To subscribe to EPE from the USA or Canada please telephone
SP104 15 x 16-pin DIL sockets SP181 5 x Phono plugs – asstd colours Express Mag toll free on 1877 363-1310 and have your credit
SP105 4 x 74LS00 SP182 20 x 4·7/63V radial elect. caps.
SP109 15 x BC557 transistors SP183 20 x BC547 transistors card details ready. Or fax (514) 355 3332 or write to Express
SP112 4 x CMOS 4093 SP187 15 x BC239 transistors Mag, PO Box 2769, Plattsburgh, NY 12901-0239 or Express
SP115 3 x 10mm Red LEDs SP189 4 x 5 metres solid core wire
SP116 3 x 10mm Green LEDs SP192 3 x CMOS 4066 Mag, 8155 Larrey Street, Anjou, Quebec, H1J 2L5.
SP118 2 x CMOS 4047 SP195 3 x 10mm Yellow LEDs Email address: [email protected].
SP124 20 x Assorted ceramic disc caps SP197 6 x 20 pin DIL sockets Web site: www.expressmag.com.
SP126 6 x Battery clips – 3 ea. SP198 5 x 24 pin DIL sockets
PP3 + PP9 SP199 5 x 2·5mm mono jack plugs USA price $60(US) per annum, Canada price $97(Can) per
SP130 100 x Mixed 0·5W C.F. resistors SP200 5 x 2·5mm mono jack sockets annum – 12 issues per year.
SP131 2 x TL071 Op.Amps
SP133 20 x 1N4004 diodes Everyday Practical Electronics, periodicals pending, ISSN 0262 3617 is
SP134 15 x 1N4007 diodes 2 0 0 5 Catalogue available £1 inc. published twelve times a year by Wimborne Publishing Ltd., USA agent
RESISTOR PACKS – C.Film P&P or FREE with first order. USACAN at 1320 Route 9, Champlain, NY 12919. Subscription price in
RP3 5 each value – total 365 0·25W £3.30 P&P £1.50 per order. NO VAT
US $60(US) per annum. Periodicals postage paid at Champlain NY and at
RP7 10 each value – total 730 0·25W £4.55 Cheques and Postal Orders to:
RP10 1000 popular values 0·25W £6.45 additional mailing offices. POSTMASTER: Send USA and Canada
RP4 5 each value-total 345 0·5W £4.20
Sherwood Electronics,
address changes to Everyday Practical Electronics, c/o Express Mag., PO
RP8 10 each value-total 690 0·5W £6.85 7 Williamson St., Mansfield,
Box 2769, Plattsburgh, NY, USA 12901-0239.
RP11 1000 popular values 0·5W £8.70 Notts. NG19 6TD.

Published on approximately the second Thursday of each month by Wimborne Publishing Ltd., 408 Wimborne Road East, Ferndown, Dorset BH22 9ND. Printed in England by Apple Web Offset Ltd.,
Warrington, WA1 4RW. Distributed by COMAG Magazine Marketing, Tavistock Rd., West Drayton, UB7 7QE. Subscriptions INLAND: £16.50 (6 months); £31 (12 months); £57 (2 years). OVERSEAS: Stan-
dard air service, £19.50 (6 months); £37 (12 months); £69 (2 years). Express airmail, £28.50 (6 months); £55 (12 months); £105 (2 years). Payments payable to “Everyday Practical Electronics’’, Subs Dept,
Wimborne Publishing Ltd. Email: [email protected]. EVERYDAY PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent
of the Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold,
hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.

You might also like