Everyday Practical Electronics 2015-11 - PDF Free Download (2024)

CURRAWONG VALVE AMPLIFIER • Stereo 2 x 10W per channel • Low distortion and noise • Easy-to-build design • Remote control option

WIN A MICRO CHIP MOTO R CON TR START ER KIT OL WITH mTOU CH SE N SIN DEMO BOARD G

48V DUAL PHANTOM POWER SUPPLY Superb design for microphones and preamplifiers

PROGRAMMABLE MAINS TIMER Versatile switch to control power as and when you need it

Electronic Building Blocks P LU S TEACH-IN 2015, PRACTICALLY SPEAKING, CIRCUIT SURGERY, NET WORK, AUDIO OUT, TECHNO TALK, HOT BEANS & PIC n’ MIX NOV 2015 Cover .indd 1

NOV 2015 £4.40

16/09/2015 14:15

Digi-Key NOV 2015.indd 1

16/09/2015 10:04

ISSN 0262 3617  PROJECTS  THEORY   NEWS  COMMENT   POPULAR FEATURES  VOL. 44. No 11

November 2015

INCORPORATING ELECTRONICS TODAY INTERNATIONAL

www.epemag.com

Projects and Circuits THE CURRAWONG 2 × 10W STEREO VALVE AMPLIFIER – PART 1 by Nicholas Vinen A fantastic design for audiophiles – the best of old-style amplifier design coupled with modern technology and construction techniques. 48V DUAL PHANTOM POWER SUPPLY FOR DI BOXES AND CONDENSER MICROPHONES by John Clarke Build this superb power supply for high-quality live music electronic equipment. PROGRAMMABLE MAINS TIMER WITH REMOTE SWITCHING by John Clarke This versatile, easy-to-program timer offers a cornucopia of useful applications for remote-controlled mains switches.

12

24

30

Series and Features TECHNO TALK by Mark Nelson 11 Copper mountains and zinc whiskers TEACH-IN 2015 – DISCRETE LINEAR CIRCUIT DESIGN 40 by Mike and Richard Tooley Part 10: Summing up NET WORK by Alan Winstanley 48 Fifty shades of grey icons... Command prompt Dangerous deliveries... An inside job? PRACTICALLY SPEAKING by Robert Penfold 52 Circuit diagrams and symbols CIRCUIT SURGERY by Ian Bell 56 Analogue switches – Part 1 PIC n’ MIX by Mike O’Keeffe 60 Review of PIC32 Touch Development Board AUDIO OUT by Jake Rothman 64 Speaking volumes – Part 1 MAX’S HOT BEANS by Max The Magnificent 74 mCookie Monster... Simblee delightful, my dear ELECTRONIC BUILDING BLOCKS by Julian Edgar 76 Electronic stethoscope for machinery

Regulars and Services Electronic Building Blocks By Julian Edgar

© Wimborne Publishing Ltd 2015. Copyright in all drawings, photographs and articles published in EVERYDAY PRACTICAL ELECTRONICS is fully protected, and reproduction or imitations in whole or in part are expressly forbidden.

Our December 2015 issue will be published on Thursday 5 November 2015, see page 80 for details.

Everyday Practical Electronics, November 2015

Contents (MP 1st & SK) – NOV 2015.indd 1

SUBSCRIBE TO EPE and save money 4 EDITORIAL 7 Back to the thermionic future NEWS – Barry Fox highlights technology’s leading edge 8 Plus everyday news from the world of electronics MICROCHIP READER OFFER 23 EPE Exclusive – Win a Microchip Motor Control Starter Kit With mTouch Sensing Demo Board EPE TEACH-IN 6 51 EPE BACK ISSUES 63 DIRECT BOOK SERVICE 68 A wide range of technical books available by mail order, plus more CD-ROMs CD-ROMS FOR ELECTRONICS 70 A wide range of CD-ROMs for hobbyists, students and engineers EPE BACK ISSUES CD-ROM 73 EPE PCB SERVICE 78 PCBs for EPE projects ADVERTISERS INDEX 79 NEXT MONTH! – Highlights of next month’s EPE 80

Readers’ Services • Editorial and Advertisem*nt Departments

7

1

18/09/2015 11:19

Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP, United Kingdom Tel: 01279 467799 Fax: 01279 267799 E-mail: [emailprotected] Web: www.quasarelectronics.co.uk

All prices INCLUDE 20.0% VAT. Postage & Packing Options (Up to 0.5Kg gross weight): UK Standard 3-7 Day Delivery - £3.95; UK Mainland Next Day Delivery - £8.95; Europe (EU) - £12.95; Rest of World - £14.95 (up to 0.5Kg). Order online for reduced price Postage (including FREE over £35+VAT) Payment: We accept all major credit/debit cards. Make PO’s payable to Quasar Electronics Limited. Please visit our online shop now for full details of over 1000 electronic kits, projects, modules and publications. Discounts for bulk quantities.

Card Sales Line Solutions for Home, Education & Industry Since 1993

Ho! Ho! Ho! Christmas 2015 is on it's way but We have some fantastic gift ideas for young (and older) enquiring minds

Mechanical Motorised Wooden Kits

Electronic Project Labs

An electronics course in a box! All assume no previous knowledge and require NO solder. See website for details

Robot Sensor 20 Lab £25.95 (Code EPLR20)

Electronic Bell Kit £11.95 (Code EAKEB)

Future engineers can learn about the operation of transmissions steered through gears or pulleys. Easy to build, no glue or soldering

Festive Fun Electronic Project Kits

Choose from 500 plus electronic kits. Soldering required.

Electronic Motor Kit £11.95 (Code EAKEM) Digital Recording Laboratory £35.95 (Code EPLDR)

30 in ONE Project Lab £24.95 (Code EPL030)

Solderless Projects

Automech Kit £15.95 (Code C21-605) Generator Kit £11.95 (Code EAKEG)

Coptermech Kit £15.95 (Code C21-604)

130 in ONE Project Lab £55.96 (Code EPL130)

AM-FM Radio Kit £14.95 (Code ERKAF)

300 in ONE Project Lab £79.95 (Code EPL300) Short Wave Kit £14.95 (Code ERKSW)

Crystal Radio Kit £11.95 (Code ERKC)

Flashing LED Christmas Tree Kit £4.62 (Code MK100)

Room Alarm Kit £4.95 (Code EAKRA)

Hand Held Metal Detector (Assembled) £7.95 (Code ELMDX7)

Trainmech Kit £15.95 (Code C21-606)

Robomech Kit £15.95 (Code C21-603)

500 in ONE Project Lab £1789.95 (Code EPL500)

Musical LED Jingle Bells Kit £21.95 (Code 1176KT)

Metal Detector Kit £8.95 (Code ELMD)

Tyrannomech Kit £15.95 (Code C21-601)

Riding Santa Kit £13.14 (Code MK116)

60 LED Multi-Effect LED Star Kit £11.94 (Code MK170)

See website for even more great gift ideas!

Secure Online Ordering Facilities ● Full Product Listing, Descriptions & Photos ● Kit Documentation & Software Downloads

NOV 2015.indd 1

16/09/2015 10:00

Tools & Equipment

Sound LED Star Kit

£10.74 (Code MK172) Soldering Set £12.95 (Code 749.939)

0-20V, 2A Regulated Bench Power Supply £65.28 (Code 650.673)

The Electronic Kit Specialists Since 1993

LED Roulette Kit £11.46 (Code MK119)

Robot Kits

These educational electronic robot kits make a great introduction to the exciting world of robotics. Some require soldering. See website for details

Hobby Tool Set £20.16 (Code 749.300)

Hobby Test Meter £7.67 (Code 600.006)

20 Piece Electronics Tool Set £34.96 (Code 710.368)

Solar Energy Experimenter Kit £15.42 (Code EDU02)

MP3 Jukebox Module £14.34 (Code VM202)

Digital Echo Chamber Kit £10.74 (Code MK182)

USB Tutor Project £54.24 (Code EDU05)

Digital Clamp Meter £11.96 (Code DMC616)

Robotic Arm Kit £41.81 (Code C9895)

Oscilloscope Tutor Project £17.40 (Code EDU06) Crawling Bug Kit with Case £14.34 (Code MK165)

Rectangular Illuminated Bench Top Magnifier £45.12 (Code 700.015)

USB 3D LED Cube Kit £20.34 (Code MK193)

Classic TV Tennis Game with Analogue Bats Kit £15.54 (Code MK191)

Helping Hands Tool £4.01 (Code 710.165) One Chip AM Radio Kit £16.96 (Code 3063KT)

Crawling Bug Kit £11.94 (Code MK129) 48W LED Soldering Station £54.24 (Code 703.100)

Universal Battery Tester £3.17 (Code 690.393)

More Projects & Gadgets

Running Microbot Kit £8.34 (Code MK127)

Solar Bug Kit £9.06 (Code MK185)

Advanced Personal Scope, 2 x 240MS/s Probes, Cables, Battery Pack, PSU & User Manual Included £263.72 (Code APS230)

Soldering Starter Pack (inc. 2 electronic kits & soldering tools) £26.32 (Code EDU03)

Stereo Valve Amplifier Kit (Chrome Version) £908.68 (Code K4040)

Pocket Beta & Gamma Radioactivity Monitor £149.95 (Code VM200)

3 x 5 Amp RGB LED Controller (+RS232) Kit £24.95 (Code 8191KT)

This is a very small selection from our huge range of electronic kits & projects. Please see website for full details.

Secure Online Ordering Facilities ● Full Product Listing, Descriptions & Photos ● Kit Documentation & Software Downloads

NOV 2015.indd 2

16/09/2015 10:00

UK readers you can SAVE 81p on every issue of EPE How would you like to pay £3.59 instead of £4.40 for your copy of EPE ?

L-o-o-o-n-g gATIng TIMEs for ThE 12-DIgIT hIgh-rEsoLuTIon counTEr

niRvana valve sounD simulatoR • Create ‘valve sound’ using semiconductors • Avoid real valves’ heat, fragility and high voltages • Four different speaker responses or design your own

• upgrade our frequency/period counter • Easy-to-fit add-on module • Measure with 100-microhertz resolution • Achieve 10,000-seconds gating times

Threshold VolTage swiTch simple but versatile relay switching

M WIN P ICR A DE ICDE OCHIP MO M LC NS D BO TRA 2 AR TIO D N

DIGITAL EFFECTS PROCESSOR FOR GUITARS AND MUSICAL INSTRUMENTS

OPTO-THEREMIN – PART 1 • Create your own electronic music • Master eerie Sci-Fi sounds • Brand new updated design • Optical proximity sensor controls volume

• 10 effects to choose, including echo, reverb, vibrato and overdrive • Echo up to 1.2 seconds • Low noise and two power supply options • Optional headphone output WIN A

COURTESY LED LIGHTS DELAY FOR CARS

WIDEBAND, ACTIVE DIFFERENTIAL OSCILLOSCOPE PROBE

MIC MPLA ROCHIP B KIT FO STARTER R PIC 24F

Add a touch of class with this handy design

High-performance, low-cost probe with a bandwidth of more than 80MHz

Construction, testing and adjustment

Electronic Building Blocks

tempmasteR mk3

construction and use of our super recorder

MINI 10W CLASS-D AUDIO AMPLIFIER

electronic thermostat – converts chest freezers into energy-efficient wine coolers, controls heaters in home-brew setups or fish tanks

TEAch-In 2015 – ParT 6

• understand discrete linear circuit design • learn about power and power measurement JULY 2015 £4.40

PluS

Peaking at 91% efficiency, this pint-sized amp delivers an amazing audio punch!

PLUS AUG 2015 £4.40

CirCuit Surgery, Net work, audio out, PiC N’ MiX, teChNo talk, Cool beaNS, teaCh-iN 2015 & iNterfaCe

CirCuit Surgery, Net work, audio out, PiC N’ MiX, teChNo talk, readout & PraCtiCally SPeakiNg JULY 2015 Cover.indd 1

Combine resistance and capacitance in one box – choose R, C or both, in series or parallel

A WIN HIP 0 OC MICR 56DA21T EN 4FJ2 PIC2 LOPM DEVE ARD BO

OPTO-THEREMIN – PART 2

Touch-screen digiTal audio recorder – ParT 2

PluS

ResistoR-CapaCitoR DeCaDe substitution box

WIN dsP MICR A O DE ICDE CHIP vE M M lO C BO PME SM AR D Nt

19/05/2015 13:09:59

AUG 2015 Cover.indd 1

15/06/2015 11:25:15

PRACTICALLY SPEAKING, CIRCUIT SURGERY, NET WORK, AUDIO OUT, TECHNO TALK, HOT BEANS & TEACH-IN 2015 SEPT 2015 Cover.indd 1

SEPT 2015 £4.40

29/07/2015 10:47

PLUS TEACH-IN 2015, INTERFACE, CIRCUIT SURGERY, NET WORK, AUDIO OUT, TECHNO TALK, READOUT, COOL BEANS & PIC n’ MIX

OCT 2015 £4.40

OCT 2015 Cover V3.indd 1

10/08/2015 23:18

Well you can – just take out a one year subscription and save 81p an issue, or £9.80 over the year. You can even save £1.08 an issue if you subscribe for two years – a total saving of £26.10.

Overseas rates also represent exceptional value. You also: • Avoid any cover price increase for the duration of your subscription • 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 online from www. epemag.com (go to the Online Shop).

SUBSCRIPTION ORDER FORM

SUBSCRIPTION PRICES Subscriptions for delivery direct to any address in the UK: 6 months £23.50, 12 months £43.00, two years £79.50; Europe Airmail: 6 months £27.00, 12 months £50.00, 24 months £95.00; Rest Of The World Airmail: 6 months £37.00, 12 months £70.00, 24 months £135.00. Cheques or bank drafts (in £ sterling only) payable to Everyday Practical Electronics and sent to EPE Subs. Dept., Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset, BH21 1UU. Tel: 01202 880299. Fax: 01202 843233. Email: [emailprotected]. Also via the Web at: www.epemag.com. Subscriptions start with the next available issue. We accept MasterCard, Maestro or Visa. (For past issues see the Back Issues page.)

ONLINE SUBSCRIPTIONS Online subscriptions, for reading the magazine via the Internet, £19.99 for one year, visit www.epemag. com for more details.

4

Subs page.indd 4

 6 Months: UK £23.50, Europe £27.00 (Airmail), Rest Of The World £37.00 (Airmail)  1 Year: UK £43.00, Europe £50.00 (Airmail), Rest Of The World £70.00 (Airmail)  2 Years: UK £79.50, Europe £95.00 (Airmail), Rest Of The World £135.00 (Airmail) To: Everyday Practical Electronics, Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU Tel: 01202 880299 Fax: 01202 843233 E-mail: [emailprotected]

I enclose payment of £ .............. (cheque/PO in £ sterling only), payable to Everyday Practical Electronics  Please charge my Visa/Mastercard/Maestro My card number is: ....................................................................... Please print clearly, and check that you have the number correct

Signature ...................................................................................... Card Security Code .................. Valid From Date........................ (The last 3 digits on or just under the signature strip)

Card Ex. Date ...................................Maestro Issue No. .............. Name ............................................................................................ Address ........................................................................................ Post code .................................. Tel. ........................................... Subscriptions can only start with the next available issue.

Everyday Practical Electronics, November 2015

15/09/2015 17:31

Mikroelektronika – NOV 2015.indd 1

16/09/2015 10:44

USB PIC Programmer

Kits Boards Shields Accessories

A PICKit™2 Development Programmer. Features on board sockets for many types of PIC® µcontrollers. Also provided is an ICSP connector, to program your onboard device. USB Powered.

Offical Arduino Dealer.

£40.15

Call for best prices

Inc Delivery* & VAT

Quote: EPEUSBP

Arduino Starter Kit

Official Starter kit including 170 page Book, Uno Board Rev3, Breadboard, Components and cables. Everything to get you going with 15 Projects to control the physical world!.

£69.90

Inc Delivery* & VAT

2.4GHz Frequency Counter 0.01Hz to 2.4GHz 8 Digit LED Display Gate Time: 100ms to 10s 2 Channel Operating mode Power Supply: 110-220Vac 5W Quote: EPE24G

£81.00

Inc Delivery* & VAT

Quote: EPEARDSK

Velleman LAB1 & LAB2 Bench Instruments

3in1 bench equipment, all you need in a single unit. LAB1- Multimeter, Power Supply & Soldering Station LAB2 - Oscilloscope, Function Generator & PSU

£109.20

£146.22

Inc Delivery* & VAT

Inc Delivery* & VAT

Quote: EPEBLAB1

Quote: EPEBLAB2

s

Di

e od

o ist

s

Re

or

rs a Tr

n

t sis

s

Over 1100 Components

£77.62

Inc Delivery* & VAT

Breadboard & Components Starter Pack

A High Quality Large Breadboard with binding posts, a 140 piece Jump Wire Kit and 6 Component Packs with over 1100 components. Quote: EPEBCS

30V 5A Programmable PSU

Dual LED (Voltage & Current) Displays Course & Fine V /A Adjustment 5 Programmable Memories PC Link via USB or RS232 Output: 0-30Vdc 0-5A Quote: EPEPSU

£99.90

Inc Delivery* & VAT

07/ 11

www.esr.co.uk

ESR – NOV 2015.indd 1

/15

rs

a

p Ca

or

p Ca

it ac

s

s

D LE

Build your own Oscilloscope

A new self assembly kit, ideal for education and way to visualise signals. Features: Markers, Frequency, dB, True RMS readouts Timebase range: 10µs-500ms/division (15 steps) Input sensitvity: 100mV-5V/division (6 steps) Max Input voltage: 30Vpp Max Sample Rate: 1ms/s repetitive signal, 100ks/s real time signal Dim: 80 x 115 x 40mm Quote: EPESCOPE

10

o cit

Tel: 0191 2514363 Fax: 0191 2522296 [emailprotected]

£50.10

Inc Delivery* & VAT

ESR Electronic Components Ltd

Station Road, Cullercoats, Tyne & Wear. NE30 4PQ

Prices INCLUDE Delivery* & VAT. *Delivery to any UK Mainland address, please call for delivery options for Highland & Island, Northern Ireland, Ireland, Isle of Man, Isle of Wight & Channel Islands

16/09/2015 10:42

EDI T OR I AL VOL. 44 No. 11 NOVEMBER 2015 Editorial Offices: EVERYDAY PRACTICAL ELECTRONICS EDITORIAL Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset, BH21 1UU Phone: 01202 880299. Fax: 01202 843233. Email: [emailprotected] Website: www.epemag.com See notes on Readers’ Technical Enquiries below – we regret technical enquiries cannot be answered over the telephone. Advertisem*nt Offices: Everyday Practical Electronics Advertisem*nts 113 Lynwood Drive, Merley, Wimborne, Dorset, BH21 1UU Phone: 01202 880299 Fax: 01202 843233 Email: [emailprotected] Editor: MATT PULZER Subscriptions: MARILYN GOLDBERG General Manager: FAY KEARN Graphic Design: RYAN HAWKINS Editorial/Admin: 01202 880299 Advertising and Business Manager: STEWART KEARN 01202 880299 On-line Editor: ALAN WINSTANLEY Publisher:

MIKE KENWARD

READERS’ TECHNICAL ENQUIRIES Email: [emailprotected] We are unable to offer any advice on the use, purchase, repair or modification of commercial equipment or the incorporation or modification of designs published in the magazine. We regret that we cannot provide data or answer queries on articles or projects that are more than five years’ old. Letters requiring a personal reply must be accompanied by a stamped selfaddressed envelope or a self-addressed envelope and international reply coupons. We are not able to answer technical queries on the phone. PROJECTS AND CIRCUITS All reasonable precautions are taken to ensure that the advice and data given to readers is reliable. We cannot, however, guarantee it and we cannot accept legal responsibility for it. A number of projects and circuits published in EPE employ voltages that can be lethal. You should not build, test, modify or renovate any item of mainspowered 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 can be supplied by advertisers. We advise readers to check that all parts are still available before commencing any project in a backdated issue.

Back to the thermionic future Well, it’s been a long time coming, but here at last is a really good valve project for audiophiles to sink their teeth into. Ever since I became editor, requests for projects have come in at a steady pace, and rarely has a year passed without a good handful of pleas for valve-based amplification. Unfortunately, providing a good valve amp project is not that easy – first, you need a reliable source of valves and specialist transformers; and second, you need a good, safe design that is relatively easy to build and handles the high voltages involved in a responsible manner. Well, our Silicon Chip friends from Down Under have excelled themselves with their ‘Currawong’ stereo amplifier (it’s an Australian songbird; and yes, I had to Google that!). It’s a very nice design that manages to marry the best of contemporary technology and construction methods with traditional amplification components –thermionic valves. The use of a PCB to avoid old-fashioned point-to-point wiring is a very nice touch and… well, I won’t repeat the article here – just have a read of the first part in this issue to get a feel for this excellent project. Sourcing parts This brings me to the second issue around valve amplifiers – sourcing the parts. I’m pleased (and very relieved) to say that a full kit is available from altronics.com.au, which is almost certainly the most reliable way to assemble the necessary components. Delivery from Australia adds roughly 20% to the cost, which is not trivial, but nor, I hope, is it a deal breaker. Here in the UK, Tandy will be stocking some of the parts, including the valves (www.tandyonline.co.uk). If any readers find good sources of parts then do please share your discoveries on our Chat Zone forum. This is a great project and I hope many are built, but please do remember it is not for novices – the voltages involved are high and you need to be careful in its construction and testing. Songbird For those of you with an ornithological streak, the rather lovely sound of a Currawong can be found at: http://tinyurl.com/phpsgoa.

ADVERTIsem*nTS Although the proprietors and staff of EVERYDAY PRACTICAL ELECTRONICS take reasonable precautions to protect the interests of readers by ensuring as far as practicable that advertisem*nts are bona fide, the magazine and its publishers cannot give any undertakings in respect of statements or claims made by advertisers, whether these advertisem*nts are printed as part of the magazine, or in inserts. The Publishers regret that under no circ*mstances will the magazine accept liability for non-receipt of goods ordered, or for late delivery, or for faults in manufacture. TRANSMITTERS/BUGS/TELEPHONE EQUIPMENT We advise readers that certain items of radio transmitting and telephone equipment which may be advertised in our pages cannot be legally used in the UK. Readers should check the law before buying any transmitting or telephone equipment, as a fine, confiscation of equipment and/or imprisonment can result from illegal use or ownership. The laws vary from country to country; readers should check local laws.

EPE Editorial_100144WP.indd 7

7

18/09/2015 13:03

NEWS

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

New gadget highlights – report by Barry Fox uried among the overkill deluge B of new devices and software continually being launched, a few

products stand out from the noise – but sadly often spoiled because the designers can never have done the simple thing of watching how a first-time user copes with out-ofthe-box setup. Test in sunlight Fitness wristwatch wearables are all the rage. They connect to a smartphone by Bluetooth, and log walking steps and sleep patterns, as well as telling the time. Do, however, try in sunlight before buying. I recently strapped on the Huawei TalkBand B2, which costs around £150. It’s undeniably clever and stylish, but in anything halfway to bright light the display is completely unreadable. It reminds of all those digital cameras that have no direct viewfinder, just an LCD screen that flattens the battery and is useless in bright light. Home camera CCTV home security is a continuing growth area. Wired cameras, which show on a screen who is at the

Huawei’s stylish Talkband B2 – clever, but unreadable under bright sunlight

8

News (MP 1st, SK & MK) – NOV 2015.indd 8

door, are old hat. Wireless cameras are taking over because they can be connected to a home network, or to the Internet to give a sight of home from across town or across the world, on a computer, tablet or smartphone. Last year, I tried the YCam Cube HD camera, costing around £250. Small, white and neat, with an SD slot for local storage, the camera connects by Wi-Fi to a home network. But it is not weatherproof, so can only be used indoors. YNetgear’s new Arlo system comes with two cameras that Cam Cubes also need a low are weatherproof and self-powered, with built-in batteries, voltage power supply, so and a wireless indoor base station they remain in effect wired cameras, which limits positioning. The cameras have no internal storAlso, the setup routine is a daunting age (and no audio) but can be set to obstacle course and the instructions sense motion and record what they that came with the camera were imsee to a cloud store, while optionally penetrably bad. To get it to work, and sending an email alert to the owner. remember how I had got it working, I All this is set up and controlled by wrote my own instructions and sent a secure web page. The proprietary a copy to the makers who said they base station is needed to reduce Wiwere grateful. But I’ve heard nothing Fi power drain, so the camera batterfurther, so I’ve no idea whether cusies should last six months. tomers now get something more useSetup is relatively easy. I found a ful with their cameras. few practical problems; eg, camera control worked better with a Chrome Netgear’s Arlo browser than Internet Explorer, and The new Netgear Arlo system (at it takes some trial and error to get around the same price for two camjust enough but not too many email eras) is far more practical. The neat alerts. Netgear has been very helpful little cameras are weatherproof and and diligent in finding fixes. self-powered, with built-in batterI’d certainly recommend Arlo to ies. The cameras have magnetic anyone wanting to build their own swivel mounts so they can easily security or surveillance system; I’ve be moved round a house, driveway been using it to watch wild bird or garden. They connect wirelessfeeders. ly to an indoor base station which then connects by Ethernet cable to a NAS home networking home network, and from there to the Next, home networking, which is Internet for local or remote monitoralso big business, often implementing of the camera view. ed with an NAS (Network Attached

Everyday Practical Electronics, November 2015

18/09/2015 13:31

New gadget highlights – continued Storage device) storing music and movies and ‘serving’ them to ‘client’ players round the home or round the world. Dutch company DVBLogic (one of the many spinoffs from Philips) has developed TVButler – a digital TV dongle that plugs into an NAS and turns it into a TV receiver/ recorder/player. It’s a clever idea, but so far let down by poor instructions. A month after the company website went live, essential Get Started Help links were still broken. Also, be warned that not all NAS devices have sufficient processing power to work with TVButler; so some are not supported.

Windows 10 Microsoft made Windows 8 (and the 8.1 upgrade) so unnecessarily different from previous Windows XP and 7, that it quickly became hugely unpopular, and deterred people from buying new PCs. So Microsoft is now giving away free upgrades to Windows 10, and thrusting the offer at existing Windows users. Although anything would be better than Windows 8, there are several practical pitfalls to upgrading and more emerging every day. I’ll give a full rundown next month. Suffice to say, for now, don’t rush into upgrading an existing Windows PC to 10.

Lighting the future with quantum dots dvances discovered at Oregon A State University in manufacturing technology for ‘quantum dots’ may

soon lead to a new generation of LED lighting that produces a more user-friendly white light, while using less-toxic materials and lowcost manufacturing processes that take advantage of simple microwave heating. The cost, environmental, and performance improvements could finally produce solid-state lighting systems that consumers really like and help cut lighting bills almost in half, researchers say, compared to the cost of incandescent and fluorescent lighting. The same technology may also be widely incorporated into improved lighting displays, computer screens, smart phones, televisions and other systems. A key to the advances, which have been published in the Journal of Nanoparticle Research, is use of both a ‘continuous flow’ chemical reactor,

H

The orange color in the letters ‘OSU’ is produced from quantum dots viewed under a microscope, as they absorb blue light and emit the light as orange

and microwave heating technology that’s conceptually similar to the ovens that are part of almost every modern kitchen. The continuous flow system is fast, cheap, energy efficient and will cut manufacturing costs. And the microwave heating technology will address a problem that so far has held back wider use of these systems, which is precise control of heat needed during the process. The microwave approach will translate into development of nanoparticles that are exactly the right size, shape and composition.

Microchip adds security

icrochip has announced its M new PIC24F GB4 family of lowpower microcontrollers. Features

include an integrated hardware crypto engine for secure key storage, up to 256KB of Flash memory and a direct drive for segmented LCD displays. A random number generator is used for generating random keys for data encryption, decryption and authentication, enabling a higher level of security. Its advanced features make the GB4 family ideal for designers of portable applications that require secure data transfer and storage, and a long battery life. For more information, visit Microchip’s website at: www.microchip.com

Sinclair’s new child coding scheme

new interactive educational A initiative called ‘Every Child Can Code’ has been announced for

teaching children to code computers, catering for children from age seven or even younger. Sir Clive Sinclair’s team at Retro Computers Ltd, which recently launched the ZX Vega games console, plans to encourage and enable children to code their own games programs. The children can then exchange their games with each other via email, and the company will put the best games submitted to it on the website www.EveryChildCanCode.org for everyone to enjoy.

New Hammond ‘stomp’ boxes

ammond Electronics’ newly launched 1590 stomp die-cast aluminium enclosures are designed to accept the most commonly used switches for stomp-box applications. ‘Stomp boxes’, also known as guitar effect pedals, are, as the name suggests, foot-operated equipment used by electric guitarists to produce preset effects such as distortion, wah-wah, delay, chorus and phaser. Many players will have a bank of up to 20 stomp boxes, each providing a different effect. The 1590 stomp boxes are available in rectangular, trapezoidal and octagonal designs. All are rugged,

easy-to-machine enclosures, able to cope with the demanding on-stage environment in which they will be used. They are finished in a smooth gloss polyester powder paint, which does not chip after machining and provides a good surface for labels and silk screening. A lap joint seals the units to IP54, protecting against the ingress of dust and water, and if required, the rectangular versions can have enhanced IP65 protection through the addition of an optional sealing gasket kit. For further details on the stomp range, visit: www.hammondmfg.com

Everyday Practical Electronics, November 2015 9

News (MP 1st, SK & MK) – NOV 2015.indd 9

18/09/2015 13:31

Make No Compromises Increase Your Design’s Functionality with 8-bit PIC® MCUs

In embedded system design, reality demands that compromises are made at every phase. Tradeoffs between performance, functionality and cost often prevent you from bringing your best ideas to market. We believe there’s a better way. That’s why we’ve architected our latest 8-bit PIC® microcontrollers (MCUs) with flexible, “core independent” blocks of hardware intelligence that react quickly, consume very little power and are much more code-efficient than a software-based approach. In essence, Core Independent Peripherals help you easily combine many complex system functions onto a single MCU, increasing speed and flexibility, while reducing power consumption and cost. Design with 8-bit PIC MCUs, and you won’t have to compromise. Enable system functions with: Maximum flexibility Minimum latency

Reduced cost

www.microchip.com/8-bit The Microchip name and logo, the Microchip logo and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners. © 2015 Microchip Technology Inc. All rights reserved. DS30010101A. MEC2030Eng08/15

NOV 2015 Page 2.indd 1

16/09/2015 10:13

Copper mountains and zinc whiskers

Mark Nelson

There’s a metallic ring to this month’s column, in which Mark Nelson encounters a hidden copper mountain that’s right under your nose and some wayward whiskers that can destroy electronic equipment.

H

AVE YOU EVER CONTEMPLATED what the least-reliable element in modern electronics might be? Think about it. I’ll return to this subject at the end of this article and you can check if you were right. Urban this, urban that! If you follow techie jargon, you’re probably familiar with the term ‘urban canyon’. It’s defined as a place where a city street is flanked by tall buildings on both sides, creating a canyon-like environment. Urban canyons are classic ‘not-spots’, where mobile phones and GPS devices struggle to find a signal. A classic urban canyon is central London’s Farringdon Road, where the ‘next stop’ announcements that you hear aboard buses go haywire and allege you are approaching a location that’s in fact several miles away. But urban canyons are old hat now; the new thing is ‘urban mining’, exploiting the dormant ‘copper mountains’ buried beneath streets and inside offices, colleges, hospitals and industrial premises. It may sound crazy but it’s not. Copper calamity For many in-building communications purposes, copper is still preferable to (and more economical than) optical fibre. But the amount of virgin copper remaining to be taken from the earth is finite. Typically, it takes a tonne or ore to produce one kilo of pure copper, leaving 999 kilos of rock to be disposed of. What’s more, all the ‘low-hanging fruit’ of ‘quick win’ copper ore has now been extracted, meaning the remaining reserves are less concentrated, pushing up the price (and environmental fall-out) of making new copper cable. It’s a highly unwelcome prospect, one that makes urban mining in dear old Britain (or whichever country you live in) look highly attractive. So what exactly is urban mining? A fascinating article in trade magazine Network Communications News spilled the beans. As Kennedy Miller of cable manufacturer BrandRex explained, new in-building cabling systems were generally laid alongside older ones, without removing and recovering the redundant wires. This means there are literally millions

of tonnes of copper lying unused in cableways all over the world. Factor in redundant telecomms and power cables, and you can see a massive and highly valuable resource that could be far easier to remove, recover and recycle. And as Miller says, recycled copper has a CO2 factor 40 per cent lower than virgin material. A proof-of-concept exercise at two disused data centres indicated that 91 per cent of the power and comms cables recovered were converted back to saleable copper, with nothing sent to landfill. Recycling copper involves no loss of quality, making the case for mining urban copper a no-brainer – and the decent thing to do. Worrisome whiskers Whisker-like growths of metallic crystals of tin and zinc were first discovered in the 1940s. At first, they were treated largely as curiosities – but disaster soon stuck. In the January 2008 issue of this magazine I mentioned the train of destruction caused by ‘tin whiskers’, tiny strands of tin measuring typically less than a millimetre long erupting from tinbased materials such as solder. An Associated Press report stated they were causing havoc with consumer gadgets, heart pacemakers and even a crucial part of a space shuttle. And back in the 1950s and 60s these whiskers were a primary reason causing electrical shorts that led to the failure of diodes and transistors made from germanium. Whiskers are back in the news again, up to their old tricks, but in a different fashion. This time, the whiskers are tiny filaments of zinc (not tin) that occur on the surface of all kinds of galvanised items, including industrial cable trays and the so-called computer flooring made of wooden floor tiles with a zinc-plated steel upper surface. These are not found in a home environment, garage, den or personal workshop but are commonplace in commercial buildings. Conductive, thus destructive Tim Brown of British cable management company Unitrunk explains: ‘Zinc whiskers grow from galvanised (electroplated) metal surfaces at a rate of up to 1mm a year.

Everyday Practical Electronics, November 2015

TechnoTalk-Nov15 (MP 1st, AE & SK).indd 11

Even the slightest touch can dislodge zinc whiskers, which creates the opportunity for them then to be drawn into computer equipment. Once inside the equipment, the zinc whiskers – which are of course conductive and can carry tens of milliamps before melting – can settle onto exposed circuit boards, where they can and do, cause short circuits. Symptoms of zinc-whisker-related failures range from minor data corruption or anomalies to catastrophic hardware failures. Equipment malfunctions can be ongoing and intermittent, which makes diagnosis difficult.’ Fortunately there is a solution, but it comes at a cost. The way to go is to eliminate galvanised products altogether and opt for stainless steel. As Tim Brown sums up, this will not be the most popular solution commercially and in these difficult times even more so. However, if selected as the solution, you can be sure of no more close shaves with zinc whiskers! Weakest point Well, did you guess the prime weakness in electronic apparatus? A recent survey of system failure in business IT installations pointed the finger at unreliable power supply equipment. We’re talking about industrial systems here, but the most common failure mechanisms are likely to apply in other branches of electronic apparatus. According to the British data centre company Timico, the most common causes of IT outages in the UK are a result of unreliable power supplies – followed by software and hardware failures. Alongside these, other common causes were human error, natural disaster and even malicious activity. Judging by recent problems involving mobile phone and fibre broadband power supplies exploding and catching fire, you might think that switch-mode PSUs are not yet a mature technology. Of course, that cannot be the case, so I can only conclude that the shortcomings are due to quality control issues... or else with bean counters, who procure the cheapest and nastiest components and PSUs on the market. Caveat emptor – let the buyer beware!

11

15/09/2015 17:21

Constructional Project

I

This progress view of the amplifier shows it sitting in its timber plinth but without the protective perspex covers in place to protect the PCB and protect the user from high voltages.

By Nicholas Vinen

– Part 1 •  10W per channel •  Low distortion •  Good performance •  Easy to build

N DESIGNING this amplifier, we wanted to present a unit which is straightforward to build and which has a good appearance. To satisfy the first requirement, most of the circuitry, with the exception of the power transformers, is mounted on a large double-sided PCB. Hence there is no need for point-to-point wiring from valve sockets, tag-strips, tag-boards or any of that stuff from 60 years ago. Using the large PCB also means that we have avoided the need for an expensive metal chassis. Instead, the PCB slides into a timber plinth stained as rosewood (although you can have any timber finish you desire). As a nice finishing touch, most of the PCB will be covered and protected by a perspex cover. This will prevent little fingers from touching any part of the circuit and remove any risk of electric shock which would otherwise be possible. We hope you will like the appearance. There are two toroidal power transformers used to power the Currawong, and these are concealed underneath the PCB, towards the back of the unit. Control panel At the front of the timber plinth, there is a small control panel suspended below the main PCB. This carries the volume control, the on/off switch, a bi-colour red/green LED, a blue LED and the headphone socket. And while it might seem like a waste to use the Currawong Stereo Valve Amplifier to drive headphones, we know from long experience that readers will definitely want this feature. By the way, the red/green LED comes into play when you first turn the amplifier on. There is an initial delay while the valves heat up and during this time, no HT (high tension or high voltage) is applied to the plates of the valves which could otherwise suffer damage in the long term. So, during this delay, the LED is red. Then, when the HT is applied, the LED changes colour to green, indicating that normal operation is possible. The other LED is lit when the headphones are in use. Plugging into the headphone socket enables a relay which disconnects the loudspeakers and connects the headphones via 220Ω resistors. At the rear of the timber plinth is another panel which accommodates the RCA input sockets, the binding post terminals for the loudspeakers

Everyday Practical Electronics, November 2015

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 13

and a fused IEC socket for the mains cord. Both the front and rear panels are made from PCB material to provide a high-quality finish. The overall performance is summarised in an accompanying panel and three graphs. It gives very good performance for a valve amplifier. Circuit concept A major difficulty in the design of the Currawong has involved the out­put transformers. As valve aficionados will be aware, the output transformer is usually the most expensive component in the circuit, apart from the valves themselves. Similarly, these days the power transformer is also very expensive, simply because there is no locally available off-the-shelf unit which can be pressed into service. Yes, you can purchase imported power and output transformers, but if we had specified these, the total cost of the amplifier would have been a great deal higher. Instead, we have taken a very unusual approach in selecting the output transformer by employing a standard off-the-shelf 15W line transformer (Altronics M1115) which would normally be employed with a professional solid-state PA amplifier to drive 100V lines. As a line driver, the transformer’s primary winding is driven by a solidstate amplifier and it steps up the voltage in its multi-tapped secondary winding. In the Currawong though, we drive the transformers back to front, with the push-pull valve output stages driving the 100V windings and the primary windings becoming the lowimpedance drive for the loudspeakers. Conveniently, the 100V winding has a centre-tap, which is necessary for push-pull operation. In addition, we use some of the other taps for the ‘ultra-linear’ connection. Make no mistake though; while these are low-cost, mass-produced transformers, they have grain-oriented steel cores, a wide frequency response and low harmonic distortion. Better still, the taps on the primary winding enable it to be connected for ultra-linear push-pull operation. On the other hand, selection of this transformer is one of the two limiting factors in the maximum output power of the Currawong, at close to 10W per channel. The other factor is the power transformer selection. We would have liked to use a transformer with much higher

13

16/09/2015 13:54

Constructional Project Features and Specifications •  Channels: 2 (stereo) •  Valve line-up: 4 × 12AX7 twin triodes, 4 × 6L6 beam power tetrodes •  HT supply: ~310V, actively filtered •  Tested load impedances: 4Ω, 6Ω, 8Ω •  Output power: 2 × 10W (8Ω, 6Ω), 2 × 9W (4Ω) (see Fig.3) •  Operating mode: Class-A (8Ω), Class-A/AB (6Ω, 4Ω) •  Input sensitivity: ~1V RMS (8Ω, with feedback enabled) •  Signal-to-noise ratio: 77dB •  Channel separation: >60dB, 20Hz-20kHz (4Ω, 6Ω and 8Ω) •  Harmonic distortion: typically <0.1%, 6Ω and 8Ω (see Figs.3 and 4) •  Frequency response: ±0.6dB, 30Hz-20kHz (see Fig.5) •  Damping factor: >20 (8Ω), >10 (4Ω) •  Mains power draw: typically 120-130W •  Other features: ultra-linear outputs, remote volume control option, delayed HT, HT soft-start

•  Dimensions: 294 × 304 × 186mm (W × D × H) including protrusions secondary voltages but a speciallydesigned power transformer would be much larger and more expensive, as already noted. Having said that, there is future potential for this amplifier to be upgraded with better (more expensive) transformers to enable it to deliver substantially more output power. The valves can be replaced without any disassembly. Their sockets are mechanically mounted to the thick (2mm) PCB to prevent the solder joints from breaking loose during valve removal or insertion. The thick PCB also helps to support the relatively high weight of the output transformers, which are mounted on the board for ease of construction. Temperature-sensitive components such as electrolytic capacitors have been kept away from the high-dissipation components, primarily the 6L6 valves and associated 5W cathode resistors. However, due to the compact size we have not been 100% successful; one of the large filter capacitors is near the output valves. Checks of its temperature during extended operation show that direct heat transfer is minimal and should not be a problem. Semiconductors There are some semiconductor components in this circuit, but not in the audio signal path. Mostly, these perform power supply filtering, to get rid of ripple and keep the amplifier quiet.

14

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 14

The HT delay and soft-start circuit is also built using solid-state components. We should acknowledge considerable input to the design of this amplifier from Allan Linton-Smith. Allan built the first hard-wired prototype and the concept was then considerably refined and transferred to the final PCB featured in these pages. Allan also suggested using the Altronics line transformers, based on a discovery by Grant Wills that they could be used as cheap and effective ultra-linear valve output transformers – see http://home.al phalink.com.au/~cambie/6AN8amp/ Grant_Wills_6CM5amp.htm Circuit description Fig.1 only shows the circuit for the left channel signal path. The right channel is identical and the corresponding component numbers are provided in blue. The line-level input signal from RCA socket CON1 has a 1MΩ DC bias resistor to ground, in case the signal source is floating. The signal then passes through an RF-rejecting lowpass filter comprising a 120Ω series resistor and 100pF ceramic capacitor. The signal is then AC-coupled to VR1, a (nominally) 20kΩ logarithmic volume-control potentiometer, by a 1.5µF MKT capacitor. This gives a –3dB low-end roll-off at 5Hz. Note that depending on part availability, a motorised potentiometer with a value

as low as 5kΩ may be used, in which case the –3dB point rises to 21Hz. The wiper terminal of VR1 is connected to ground via a 1MΩ resistor so that if it briefly goes open circuit during volume changes, the grid of V1a does not float. The signal is fed to this grid via a 22kΩ RF stopper resistor. V1a and V1b form the preamplifier. Essentially, this consists of two common-cathode amplifier stages in series, with negative feedback around both. V1’s plates are fed from a filtered HT rail of around 224V DC, somewhat less than the 308V DC main HT rail due to voltage drops across the two RC filter resistors (6.8kΩ and 47kΩ). These filters reduce coupling between channels, reduce coupling from the output stage to the preamp stages and minimise supply ripple reaching the preamp. The preamp is the most noise-sensitive section as the signal level is lowest here. In fact, because hum can be picked up from AC-powered heater filaments, we are running the 12AX7 filaments from regulated 12V DC. Self biasing All valves in the circuit are self-biased. V1a’s anode runs at around 120V, ie, 224V minus the drop across the 270kΩ resistor. With zero bias, a 12AX7 will conduct around 3mA at this voltage, dropping to near-zero with a gridcathode bias of around –2.2V. With a 3.3kΩ cathode resistor, V1a’s operating point tends to settle at about 0.3mA and thus the cathode is 1.2V above ground. The output signal from V1a’s anode is coupled to V1b’s grid by a 220nF capacitor and this grid is DC biased using a 1MΩ resistor to ground. V1b runs at a higher power than V1a, with a 680Ω cathode resistor giving an operating current of around 1mA. Therefore, its anode load resistance is lower at 100kΩ. The output at V1b’s plate is coupled back to V1a’s cathode via a pair of parallel 470nF polyester capacitors (ie, around 1µF) in series with a 9.1kΩ resistor. This sets the closed-loop gain of the preamp section at around 2.75, so that the following phase splitter receives around 3V RMS at maximum volume. Note, however, that there is also a feedback path from the amplifier’s output, which we will cover later. Phase splitter The phase splitter is another 12AX7 twin triode, V2. The phase splitter

Everyday Practical Electronics, November 2015

16/09/2015 13:54

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 15

Everyday Practical Electronics, November 2015

1M

120Ω

100pF

VR1a 20k

(VR1b)

1.5 µF MKT

1M

2

3 4

1W

3.3k

1.2V

22k 1W

+12V 1W

1M

1W

RFB 9.1k

630V

220nF

630V

VEE

7

6

(V5b)

630V

220nF

1W

100k

1W

680Ω

0.7V

5 8

V1b

+120V

2x 470nF

V1 12AX7/ECC83

+120V

(V5a) V1a 1

1W

270k 1W

1W

1M

2

1 6

1W

6.8k

CURRAWONG STEREO VALVE AMPLIFIER

BLUE

LED2

HEADPHONES

22k 1W

630V

1W

1M

1W

1M

220nF

(AMPLIFIER SECTION)

63V

470nF

7

630V

220nF

400V

39 µF

K

λ

A

3

D6 1N4007

16V

100 µF

1W

47Ω

TP4

50V

100 µF

50V

SPEAKER/HEADPHONE SWITCHING

A

K

4

(V8)

V4 6L6/KT66

5

1W

TP3

47Ω

100 µF

+22V (TP6)

7 2 8

5W

330Ω

5W

4

+22V (TP5)

7 2 8

330Ω

5

330Ω

10k 1W

12.2V AC

10k 1W

3 (V7)

V3 6L6/KT66

6.8k 1W

OUTPUT STAGE (V3-V4,T3 / V7-V8,T4)

15W

5W

2.5W

RLY2a

E

C

A

K

1N4007

Q9 BC547

RLY2

1

8Ω

1W

220Ω

4

3

2

CON6

(T4) T3 M1115

+308V

B

RLY1 470Ω

(RIGHT CHANNEL)

(100V)

K A

LED2

1W

470Ω

S

R

T

LK3

E

CON3

B

+12V

C

BC547

TO "IN" (PIN 3) OF REG1

CON5

HEADPHONES

(CON4)

2

1

LEFT CHANNEL OUTPUT

A

D9 1N4004

K

82Ω 1W

1W

220Ω

RLY1a (RLY2b)

LK4 (LK5)

FEEDBACK

+HT

Fig.1: the left channel circuit of the Currawong Stereo Valve Amplifier (the right channel is identical). The incoming signal passes through a low-pass RC filter and volume pot VR1 and is then fed into V1 (a 12AX7 twin triode) which provides signal preamplification in two stages. Its output is then fed to V2 (another 12AX7 twin triode) which operates as a phase splitter and gain stage to drive push-pull output pair V3 and V4 (both 6L6 or KT66 tetrodes). Output transformer T3 has tapped connections to the output valve screens for ultra-linear operation. The transformer output is switched to either the speaker terminals (via CON3) or to the headphone socket by relay RLY1.

20 1 4

SC 

(AMPLIFIER SECTION)

+288V

V2b (V6b)

+255V

1W

5 8

+12V

VEE

+255V

V2 12AX7/ ECC83

3 4

(V6a) V2a

120k

220k

PHASE SPLITTER (V2/V6)

CURRAWONG STEREO VALVE AMPLIFIER

WARNING:VOLTAGES IN EXCESS OF 300V DC ARE PRESENT WHEN THIS CIRCUIT IS POWERED.

NOTE: LEFT CHANNEL ONLY SHOWN. THE RIGHT CHANNEL IS IDENTICAL (ALTERNATIVE PART NUMBERS ARE SHOWN IN BLUE).

(CON2) LEFT INPUT CON1

400V

39 µF

+224V

47k 1W

1.25W COM

PRE-AMPLIFIER STAGE (V1/V5)

Constructional Project

15

16/09/2015 13:55

16

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 16

E

FUSE

FUSED IEC MAINS MALE SOCKET

N

12V AC

12V AC

A

80VA TOROID

230V AC

T2

116V AC

1

2

3

4

5

F2

A

K

A

K

LK6

12.2V AC

~

BR1

1A SLOW

F1

D2 1N5408

K

10k

F3

5A SLOW

3A SLOW

1N4007

CON8

1

2

3

CON7

A

D1 1N5408

+

W04

VEE

~

400V

470 µF

400V

470 µF

+310V

K

A

6

5

CURRAWONG STEREO VALVE AMPLIFIER

(POWER SUPPLY SECTION)

K A

MKT

1M

E

B C

λ λ LED1

VEE

K

LK2

VEE

1k

470Ω

10k 1W

120Ω

16V

1

14

B

C E

STX0560

OUT

ADJ

3

1k

C

E

E

C

IC1c

10

IN

B

B

C

13

12

E

1M

E +308V

7

IC1d

+12V

K

C

~

+

VEE

11

A

D4 1N4007

1M

B

KSC5603DTU

Q8

B

B

Q7

OUT

LM1084/LT1084

IC1: 4093B

9

8

E

* OR BUJ303A

B

E

Q3 STX0560

C

Q5, Q7: BC547 Q6, Q8: BC557

C

E

E

C

B

A

D5 1N4007

100 µF 2 IC1a

150k

Q6

B

B

Q5

E

C

Q4 STX0560

BC547, BC557

100nF

16V

100 µF

LEDS 3-6

560Ω

120Ω

+12V

630V

470nF

1W

1M

C

Q2 STX0560

C

Q1 KSC5603DTU*

~

1

1

W04

4

3

2

TO REMOTE PCB CON10

2

DC OUT CON9

400V

39 µF

+HT

Fig.2: the secondaries of toroidal power transformers T1 and T2 are connected in series and rectified using a voltage doubler to produce a 310V HT rail. Most of the ripple is filtered out by a capacitance multiplier comprising high-voltage transistors Q1-Q3 and a 470nF polyester capacitor. T2’s remaining 12VAC secondary drives the 6L6 filaments directly in a series/parallel configuration, while the 12AX7 filaments run from a regulated 12V rail produced by bridge rectifier BR1, a 2200μF filter capacitor and linear regulator REG1. IC1 provides an HT turn-on delay and soft start.

20 1 4

SC (POWER SUPPLY SECTION) 

K

LK1

4

470Ω

TAB

OUT ADJ

IC1b

25V

IN

1N5 40 8 A

K

λ LED6 BLUE

BLUE

λ LED5 K A

A

REG1 LM/LT1084-ADJ

2200 µF

K

BLUE

λ LED4

A

BLUE

λ LED3

1W

47k

1W

47k

CURRAWONG STEREO VALVE AMPLIFIER

WARNING: LETHAL VOLTAGES ARE PRESENT ON THIS CIRCUIT WHILE IT IS OPERATING!

S1

15V AC

15V AC

37V AC

37V AC

160VA TOROID

230V AC

T1

Constructional Project

Everyday Practical Electronics, November 2015

16/09/2015 13:55

Constructional Project

Output stage V3 and V4 are self-biased using 330Ω 5W cathode resistors, with around 22V across each. This gives an operating current of about 65mA. Each output valve is powered from the main HT rail of around 308V, via the primary windings of T3, for a quiescent power of around 20W each. Note that DC and AC currents flow in the two halves of the push-pull winding since both plates of the tetrodes are fed from the transformer centre-tap connection. However, the magnetic fields produced by these direct currents are cancelled, as they flow in

10

09/10/14 14:40:21

Filter: 240VAC AP AUX-0025 mains, 1kHz + 20Hz-80kHz signal, 20Hz-20kHz bandpass BW w/AUX-0025, both channels driven

2 1 0.5

0.2

4

0.1

8

0.05

0.02 0.01 0.1

0.2

0.5

1

2

5

10

20

Power ( W atts)

Fig.3: distortion versus power for a 1kHz sinewave into 4Ω, 6Ω and 8Ω load impedances. Again, both channels are driven for a realistic test. As you can see, distortion remains low at under 2W and then rises slowly until the onset of clipping at around 8-10W, depending on load impedance. The best power delivery is actually for 8Ω loads, with 6Ω being virtually identical and 4Ω being a little lower, clipping at around 9.5W/channel. This is partly due to output transformer drive impedance mismatch.

opposite directions. This is important, because otherwise the transformer would be magnetically saturated. As the current split between V3 and V4 changes in response to the input signal however, an AC magnetic field is induced which is coupled into T3’s secondary. The resultant voltage drives the speakers or headphones. Since the output valve quiescent power of 20W is around twice the amplifier’s power output of 10W per channel into 8Ω, this gives Class-A operation. With lower load impedances (for example, 4Ω), V3 or V4 may be fully cut off during signal peaks, giving Class-AB operation. When the input signal swing is positive, pin 1 of V2a has a negative swing and so the current through V3 drops. At the same time, pin 6 of V2b has a positive swing and thus the current through V4 increases. This causes an increase in current flow from the top (dotted) side of T3’s primary to the other, resulting in a positive swing at the dotted side of the secondary. Thus, the output of the amplifier is in phase with the input.

Everyday Practical Electronics, November 2015

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 17

Currawong THD+N vs Power

5

Total Harmonic Distortion + Noise (%)

provides some gain, but its main job is to produce two similar drive signals with opposite phase for the grids of the push-pull output stage valves. Signal is coupled to this phase splitter from V1b’s anode via another 220nF polyester capacitor. V2a operates as an inverter, to generate the out-of-phase drive signal. Like V1a and V1b, it is configured as a common-cathode amplifier. It runs from a higher HT rail of around 288V DC which comes from the first HT RC filter stage (6.8kΩ/39µF). Its grid is tied to ground by a 1MΩ resistor, with the voltage across the shared 6.8kΩ cathode resistor providing the required bias potential. This resistor is shared with V2b (and both cathode currents flow through it). V2b’s grid is connected straight to ground, so when its cathode voltage increases, the grid-cathode bias voltage decreases. As such, when V2a’s cathode current increases and its anode voltage drops, V2b’s bias increases and thus V2b’s anode/cathode current decreases, causing the voltage at its anode to rise. So, the signal at V2b’s anode has the opposite phase to that at V2a’s anode, ie, it is in phase with the signal from the preamp. The 220kΩ anode resistor value has been selected so that the two output signals have a similar swing and so that V2a and V2b both operate with as high an anode voltage as possible, to give maximum drive amplitude for the following stage. These drive signals are applied to the grids of 6L6 output valves V3 and V4 via 220nF polyester capacitors. These grids are again tied to ground by 1MΩ resistors and there are 10kΩ series stopper resistors to prevent parasitic oscillation.

T3 also has taps approximately halfway between each end and the centre (HT) tap. These are connected to the screens of V3 and V4 via 47Ω stopper resistors, providing the ultra-linear connection mentioned earlier. This negative feedback from the transformer to V3 and V4 cancels out some of the transformer distortion. Note that while the feedback signals are high amplitude, the screen gain is much less than for signals applied to the grid, so the feedback doesn’t overpower the drive signals. Because the signal levels in the output stage are much higher and since 6L6 valves require much more filament current than 12AX7s, we run the filaments of V3 and V4 (and V7/V8) from 6.1V AC, slightly shy of the nominal 6.3V, due to compromises made in power transformer selection. It still works fine; it just takes a little longer for the valves to reach full emission after switch-on. Speaker connections and feedback A 470Ω 1W resistor across T3’s secondary ensures that there is some load

17

16/09/2015 13:55

Constructional Project Parts List Chassis/power supply 1 timber plinth with base (details to come) 1 top cover cut from 3mm clear acrylic (details to come) 1 small tube acrylic glue 1 front panel, available from the EPE PCB Service, code 01111142, 249 × 30mm 1 rear panel, available from the EPE PCB Service, code 01111143, 248 × 53mm 1 160VA 37+37+15+15V toroidal transformer 1 80V A 12+12V toroidal transformer 4 screw-on 30mm equipment feet 4 M4 × 15mm machine screws and nuts (for feet) 1 15mm anodised aluminium knob to suit VR1 1 snap-in fused IEC mains male socket for 1.6mm panels 2 M205 250V AC 1A slow-blow fuses (one spare) 1 red chassis-mount RCA/RCA socket 1 white chassis-mount RCA/RCA socket 2 red RCA line plugs 2 white RCA line plugs 2 red binding posts 2 black binding posts 1 SPST ultra-mini rocker switch, 250V AC rated 1 1m length 2-core mains flex 1 1m length 3-core mains flex

1 200mm length 3mm diameter black heatshrink tubing 1 200mm length 8mm diameter black heatshrink tubing 1 200mm length 20mm diameter black heatshrink tubing 1 1m length heavy duty red hookup wire 1 1m length heavy duty black hook-up wire 1 1m length single-core shielded cable 1 1m length medium duty black hook-up wire 1 12-way screw terminal strip 6 M3 × 25mm nylon screws and nuts 1 M4 × 6mm machine screw 2 M4 nuts 2 4mm ID shakeproof washers 1 4mm ID eyelet crimp connector 3 red 6.4mm crimp spade connectors 12 4G × 9mm self-tapping screws 10 small nylon cable ties Main board 1 double-sided PCB, available from the EPE PCB Service, code 01111141, 272 × 255mm 2 15W 100V line transformers (T1,T2) (Altronics M1115 – do not substitute) 2 5V DC coil 3A contact SPDT micro relays (RLY1,RLY2) 6 M205 fuse clips (F1-F3) 1 1A M205 slow-blow fuse (F1)

1 3A M205 slow-blow fuse (F2) 1 6A M205 slow-blow fuse (F3) 1 white vertical RCA socket (CON1) 1 red vertical RCA socket (CON2) 2 2-way vertical pluggable terminal blocks (CON3,CON4) 1 PCB-mount switched 6.35mm stereo jack socket with long pins (CON5) 1 3-way vertical pluggable terminal block (CON7) 1 5-way vertical pluggable terminal block (CON8) 4 chassis-mount phenolic 9-pin valve sockets with bracket (V1,V2,V5,V6) 4 chassis-mount ceramic 8-pin valve sockets with bracket (V3,V4,V7,V8) 6 2-way pin headers, 2.54mm pitch (LK1-LK6) 2 shorting blocks (LK4-LK5) 1 5-50kΩ 16mm dual gang log pot* (VR1) 2 6073B-type mini flag heatsinks 4 M4 × 10mm machine screws 4 M4 shakeproof washers 4 M4 nuts 8 M3 × 15-16mm machine screws 10 M3 × 10mm machine screws 12 M3 shakeproof washers 12 M3 nuts 14 M3 nylon nuts 22 3mm inner diameter nylon flat washers 8 6.3mm M3 nylon tapped spacers 2 TO-220 insulating washers and bushes

The Currawong contains some hard-to-source components. A kit is available from altronics.com.au – code K5528, which is much the easiest way to assemble the parts. Readers who wish to buy parts individually should consider: www.tandyonline.co.uk for valves; www.siliconchip.com.au/Shop/7/2877 for various items; and Altronics for the all-important specified transformers T1, T2.

even if there is no speaker connected. This is necessary because operating a push-pull transformer-coupled amplifier with no load can lead to very high AC voltages at the valve plates and subsequent flash-over in the valve sockets. T3’s secondary connects to the speaker terminals via the normally closed contacts of RLY1 and pluggable terminal block CON3. RLY1 is energised if headphones are plugged into the front panel socket, disconnecting the speaker and re­

18

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 18

directing the signal to headphone socket CON5 via a 220Ω resistor. If LK4 is fitted (and we recommend that it is), feedback is applied from T3’s secondary to V1a’s cathode via a 470nF capacitor and 22kΩ resistor. Since the output is in phase with the input, by applying some of the output signal to V1a’s cathode, we effectively reduce the drive for V1a, giving about 14dB of negative feedback. There is a limit to how much feedback can be applied in this manner due to the phase shift created by the

inductance of T3. We have set the feedback to give as much distortion cancellation as possible, while keeping it stable with capacitive loads. The circuit as presented is stable with several microfarads across the load, even when driving it with a square wave. Note that the 470nF capacitor in the feedback path is important as it damps shifts in valve bias in response to changes in mains voltages and valve temperatures. With feedback enabled, input sensitivity is around 1V RMS. Typical CD/

Everyday Practical Electronics, November 2015

16/09/2015 13:55

Constructional Project

1 1m length medium duty blue hookup wire (250V ;/AC rated) 1 1m length shielded audio cable 1 200mm length 3mm diameter blue heatshrink tubing 6 small green nylon cable ties (maximum 2mm wide) 2 small blue nylon cable ties * ≥ 20kΩ recommended; substitute motorised pot for remote control option (see details in Part 2 next month) Valves 4 12AX7 dual triodes (V1,V2,V5,V6) 4 6L6 beam tetrodes – matched pairs if possible (V3,V4,V7,V8) (the valves listed above are available from www.tandyonline. co.uk) Semiconductors 1 4093B quad NAND Schmitt trigger IC (IC1) 1 LM/LT1084-ADJ 5A adjustable low-dropout regulator (REG1) 1 KSC5603D 800V 3A high-gain NPN transistor (Q1) 3 STX0560 600V 1A NPN highgain transistors (Q2-Q4) 3 BC547 100mA NPN transistors (Q5,Q7,Q9) 2 BC557 100mA PNP transistors (Q6,Q8) 1 red/green 2-lead bi-colour 3mm LED with diffused lens (LED1) 5 blue diffused lens 3mm LEDs (LED2-LED6) 1 W04 1.5A bridge rectifier (BR1) 2 1N5408 3A 1000V diodes (D1,D2) 3 1N4007 1A 1000V diodes (D4-D6) 1 1N4004 silicon diode (D9)

DVD/Blu-ray players produce around 2V RMS, so this should be plenty in most circ*mstances. With LK4 removed, the overall gain is much higher and the input sensitivity is around 350mV RMS for full power. However, distortion rises to around 0.5% at 1kHz and >1% at lower frequencies. Note that the 470nF series capacitors in the feedback network are important. These form high-pass filters in combination with the feedback resistors, with a –3dB point of around 15Hz. If DC feedback is used, the bias time

Capacitors 1 2200µF 25V electrolytic 2 470µF 400V snap-in electrolytic 4 100µF 50V electrolytic 3 100µF 16V electrolytic 5 39µF 400V low-profile snapin electrolytic (Nichicon LGJ2G390MELZ15) (Mouser) 2 1.5µF 63V MKT 5 470nF 630V polyester 2 470nF 63V MKT 8 220nF 630V polyester 1 100nF 63V MKT or 50V multi-layer ceramic 2 100pF ceramic disc Resistors (1W, 5%) 9 1MΩ 2 9.1kΩ 2 270kΩ 4 6.8kΩ 2 220kΩ 2 3.3kΩ 2 120kΩ 2 680Ω 2 100kΩ 2 470Ω 6 47kΩ 2 220Ω 2 22kΩ 1 82Ω 4 10kΩ 4 47Ω 4 330Ω (5W, 10%) Resistors (0.25W, 1%) 7 1MΩ 1 560Ω 1 150kΩ 3 470Ω 2 10kΩ 1 330Ω 2 1kΩ 4 120Ω

Warning! Note: parts of this circuit operate at over 300V DC. Do not touch any components or any part of the PCB while the unit is operating or immediately after switch off. The blue LEDs in the circuit indicate when dangerous voltages are present.

constants in the circuit form a type of relaxation oscillator and the bias voltages never quite settle down, leading to asymmetric clipping and other undesirable behaviour. Power supply The separate power supply circuit is shown in Fig.2. All components, except the two power transformers T1 and T2, power switch S1 and the fused IEC mains socket, are on the main board. There are three main power requirements for this circuit: the 310V HT

Everyday Practical Electronics, November 2015

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 19

rail, the ~12V DC filament supply for the 12AX7s (at around 1A) and ~6V AC for the 6L6 filaments, at around 4A. We also use the 12V DC rail to power various ancillary circuits, as described below. All of T1’s secondaries are connected in series, along with one of T2’s secondaries, to produce 114V AC. T2’s other secondary provides a little over 12V AC, to run the 6L6 filaments at around 6.1V AC each, in series pairs. The 12V AC is also rectified, filtered and regulated to provide the 12V DC rail (actually about 12.3V DC), for the 12AX7 filaments and DC-powered circuitry. The 114VAC from CON7 is rectified in a half-wave voltage doubler consisting of 1000V 3A diodes D1 and D2 and two 470µF 400V capacitors, giving about 310V across both capacitors with several volts of ripple. Fuse F1 provides some protection against faults. There are two 47kΩ series-connected bleeder resistors to discharge the 470µF capacitors when power is removed. Four blue LEDs are connected in series with the two 47kΩ 1W resistors. The blue LEDs indicate the presence of HT and also illuminate output transformers T3 and T4 (very effective in a room with subdued lighting). The output stage has no HT lowpass filter, unlike the preamplifier and phase splitters. So to prevent HT ripple in the output stage from affecting the signal, we are using an active ripple filter. This is a capacitance multiplier filter built around high-voltage, highcurrent transistor Q1, configured as an emitter-follower. The traditional HT filter is a large iron-cored choke, but these are heavy and expensive, not to mention hard to find these days. Our transistor-based method is more effective and cheaper. Q1 is driven by Q2 and Q3 which are high-voltage high-gain signal transistors, in a ‘Triplington’ configuration; it’s like a Darlington but with an extra stage. The higher the gain in this buffer, the more effective the filter. Base bias comes from an RC low-pass filter across the incoming HT rail, consisting of a 1MΩ resistor and 470nF polyester capacitor. Q2 and Q3 have a gain of around 70-100 each, while Q1 has a gain of around 30. So the overall gain is about 70 × 70 × 30 = 147,000 which multiplies the effect of the 470nF capacitor to act as if it is 69,000µF! In practice, it

19

16/09/2015 13:56

Constructional Project Reproduced by arrangement with SILICON CHIP magazine 2015. www.siliconchip.com.au

Most of the parts except mainly the power transformers are mounted on a single large PCB to make the assembly easy. The optional remote volume control is built on a separate PCB.

isn’t quite as good as this as the 470nF capacitor discharges slightly through the three base-emitter junctions at the trough of each ripple cycle, but despite this, the ripple at Q1’s emitter is just a few hundred millivolts. Q1 has an integral emitter-collector diode so that when the unit is switched off, the output filter capacitors can safely discharge back into the input filter capacitors without doing any damage. D4 protects Q2, while D5 provides similar protection for Q3 but also has a role in the start-up delay, which we’ll explain later. Note that this arrangement also results in HT ‘soft-start’ as it takes a few hundred milliseconds for the 470nF capacitor to charge and the HT rail tracks this voltage. Turn-on delay We have also incorporated a 20-second (or so) turn-on delay, to allow the valve

20

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 20

filaments to heat up before HT is applied. Part of the rationale for this is to prevent ‘cathode stripping’, which can occur with cold cathodes, although the existence of this phenomenon is somewhat controversial. But since the valves aren’t ‘ready’ to operate immediately anyway, it certainly doesn’t hurt to delay the application of HT. IC1 is a quad Schmitt-input NAND gate, which runs from the 12V rail and provides the turn-on delay. Note that ground for the 12V rail is labelled VEE and will be close to, but not necessarily at, GND (0V). IC1a is connected as an inverter with a 100µF capacitor from its input to ground. A 150kΩ resistor charges this capacitor from the 12V rail, while a 1MΩ resistor discharges it when power is switched off. It takes about 20 seconds for this capacitor to charge to a sufficient voltage for the output of IC1a to go low. During this time, IC1a’s output is

high. This is inverted by IC1c and then again by IC1d, so Q4 (another 600V transistor) is switched on initially. This keeps the 470nF capacitor in the HT filter from charging until the delay has ended. Diode D5 in the HT filter prevents the base of Q3 from being pulled below GND when VEE is (slightly) negative. IC1a and IC1c also drive LED1 via two pairs of complementary emitterfollowers (Q5-Q8). LED1 is a bi-colour device and consists of a red LED and green LED on the same die, connected in inverse parallel. Since inverter IC1c is between them, one inverter is always driving one end of LED1 high and the other is driving it low. Thus, LED1 is red initially at turn-on and switches to green once the time-out period has expired and the HT rail is powered up. A 1kΩ resistor sets the LED current to about 10mA, while another 1kΩ resistor partially isolates the bases of Q5

Everyday Practical Electronics, November 2015

16/09/2015 13:56

Constructional Project and Q6 from IC1a’s output. This allows the optional remote control board to independently drive LED1, in order to flash it to acknowledge infrared command reception. The remote control board connects via CON10 and will be described next month.

Unused linking options Note that the supply was also designed to operate with the regulated rail at 6V DC rather than 12V. This would require a different transformer

The PCB is slid into a slot that runs around the top inside edge of the timber plinth. Perspex covers will be used to protect the PCB and speaker transformers.

10

09/10/14 14:35:26

240VAC mains, output level 1W, 20Hz-80kHz bandwidth, both channels driven

2 1 0.5 4

0.2

8

0.1 0.05

0.02 0.01 20

50

100

200

500

1k

2k

5k

10k

20k

Frequency (Hz)

Fig.4: distortion versus frequency, with both channels driven at 1W into three different resistive loads. As you can see, the distortion is pretty low for a valve amplifier, especially between 100Hz and 10kHz. Below 100Hz, distortion rises steeply due primarily to the output transformer’s non-linear response. Distortion into lower impedances is only slightly worse than that for 8Ω. Note the 80kHz bandwidth used, to ensure that higher frequency harmonics are included in the measurements.

(ie, 6V AC rather than 12V AC) and the option was provided as there are some 12AX7-compatible valves with 6.3V-only filaments (rather than the

Everyday Practical Electronics, November 2015

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 21

Currawong THD+N vs Frequency

5

Total Harmonic Distortion + Noise (%)

Low-voltage supplies 5-pin pluggable terminal block CON8 provides separate low-voltage AC connections for the 6L6 filaments (pins 1 and 3) and the regulated supply (pins 4 and 5). Each is fused on the board. However, we ultimately decided to use one transformer winding to power both, hence they are wired in parallel despite the separate connections. The 12V AC from pins 4 and 5 of CON8 is rectified by BR1, a 1.5A bridge rectifier and filtered with a 2200µF capacitor to produce around 15-16V DC with about 1V ripple. This is regulated to provide a nice smooth rail by REG1, a low-dropout, high-current equivalent to the LM317. Pins 1 and 3 of CON8 connect straight to the series/parallel-connected 6L6 filaments and as a result, they get about 6.1VAC each. One end of this AC supply is grounded for noise immunity. Now, because of this ground connection and the fact that the same transformer secondary is used to feed BR1, the negative end of BR1 actually floats between about +0.7V and –15V. Hence, the need to disconnect VEE from GND. If two separate 12V transformers or windings were used, LK6 could be fitted and thus VEE would be at the same potential as GND. LK6 must not be fitted with the supply arrangement shown here! The circuit will work the same regardless as to whether VEE is connected to GND, as Q4 is the only connection between the two supply ‘domains’. The DC supply is also used to power relays RLY1 and RLY2 when headphones are plugged in. These are 5V relays, so an 82Ω series resistor drops the 12V DC to an appropriate voltage. LED2 is also connected across the relay coils, in series with a 330Ω currentlimiting resistor, to indicate when the speakers are disconnected.

typical arrangement with a 12.6V centre-tapped filament). However, given the relative rarity of these valves, we aren’t going to go

21

16/09/2015 13:56

Constructional Project

+3

Currawong Frequency Response

09/10/14 14:58:07

+2.5 +2

Amplitude Variation (dBr)

+1.5 +1 +0.5 +0.0 -0.5

8

-1 -1.5 -2 -2.5 -3

10

20

50

100

200

500

1k

2k

5k

10k

20k

50k 100k

Frequency (Hz)

Fig.5: the frequency response is pretty flat in the audible range (note: the vertical scale is only ±3dB for the entire diagram). Roll-off at the high frequency end is –3dB at around 50kHz, while the low-end –3dB point is below 10Hz. The peak at around 20Hz is partly due to the AC-coupled global feedback and partly due to greatly increased waveform distortion below about 30Hz due to the output transformers. However, the peak amplitude is only around +1.5dB and 20Hz signals are barely audible.

into details as to how to reconfigure the supply except to say that LK1-LK3 are fitted for this purpose. Normally, they are left out. PCB layout We wanted to put as many parts on the PCB as possible to make this amplifier easy to build. Soldering parts

to a PCB is certainly a lot easier than point-to-point wiring! It minimises the chances of mistakes and also means that performance will be consistent between amplifiers. The PCB layout was a bit tricky though, due to the voltages involved. We have kept tracks with voltages that may differ by over 60V apart by

2.54mm to prevent arcing, while in other areas, low-voltage tracks need to be closer together so they can fit. We also used ‘star’ earthing as much as possible to avoid hum and ripple injection into the preamp stages. Most of the grounds on the board converge on the main power supply filter capacitor negative pin. The board has been designed with plated slots for the valve socket pins so that they fit snugly and neatly. All connectors have been placed along the back of the board, on the underside, to keep the chassis wiring neat. The input signals run from the back of the board to the front (where the volume pot is mounted) through shielded cables that are strapped to the underside of the board, to prevent the low-level input signals from picking up ripple, hum and buzz. We have also used low-profile components where possible, so that a clear perspex shield can be fitted over the top, to prevent prying fingers from getting a shock, as mentioned earlier. The valves, main filter capacitors and output transformers will pass through cutouts in this shield, with perspex boxes around the transformers. The rest of the components will be safely underneath. Next month That’s all we have room for this month. Over the next couple of months we will present the main PCB layout diagram, describe the assembly procedure, explain how to build the plinth and finish the wiring. We’ll also go through the testing and troubleshooting procedure and describe the optional infrared remote control which uses a motorised potentiometer.

Enclosures for the hobbyist • • • • •

Raspberry Pi specific Arduino specific plastic die-cast aluminium many designs and sizes

+ 44 1256 812812 • [emailprotected] • www.hammondmfg.com 22

Currawong AmplifierPt1 1114 (MP 1st & SK).indd 22

Everyday Practical Electronics, November 2015

16/09/2015 13:56

Constructional Project

By JOHN CLARKE

48V Dual Phantom Power Supply for DI boxes and Condenser Microphones Lots of audio equipment needs phantom power. As well as condenser microphones, it’s also required for active DI boxes, preamplifiers and effects units. This phantom power supply runs from a 24VAC plugpack transformer and delivers a regulated 48V DC via XLR sockets.

P

UBLIC ADDRESS systems in theatres, churches and halls all require microphones, preamplifiers and possibly powered DI (direct injection) boxes and effects pedals for musicians. Many microphones are dynamic types that do not require a power source, but the more sensitive condenser microphones require power and the same goes for other items of equipment. While these can often be run from batteries, it is far more convenient to have a ‘phantom supply’. This avoids the need to check batteries that can go flat at the most inconvenient times, ie, when you need ‘em! So what’s a phantom supply? Well, it’s a handy way of providing power to

24

Phantom Power1114 (MP 1st & SK).indd 24

equipment via balanced signal leads. ‘Phantom’ refers to the apparently invisible manner in which power is applied. 48V DC is the favoured phantom supply standard in the commercial sound industry. 24V and 12V are also used, but these are not popular. Fig.1 shows how it’s done. The 48V DC supply is applied via 6.8kΩ resistors to the hot (non-inverted) and cold (inverted) signal leads for the device being powered. The output signal leads from the unit are capacitively coupled to the following device, so that the DC voltage is removed from the signal. Phantom supplies should not be confused with the bias voltage applied

to electret microphones. A bias supply is applied to an unbalanced lead comprising a shield and signal wire, rather than to a balanced signal line with a shield. Additionally, such a bias supply is typically around 1.5V and has a current of 1mA or less. More information about this can be found at: http://blog.shure.com/shure-notes/ shure-tech-tip-phantom-power-vsbias-voltage/ So what happens if a phantom supply is connected to a dynamic microphone? Will it be damaged by current flow? The answer is ‘no’. Fig.2A shows this connection. A dynamic microphone employs a coil that’s floating and not connected to the

Everyday Practical Electronics, November 2015

15/09/2015 17:18

Constructional Project grounded shield. With 48V applied to both sides of the coil, no DC current flows through it. Problems can arise when a dynamic microphone or the connecting lead is wired incorrectly, with one side of the microphone coil connected to ground, as shown in Fig.2B. Current would then flow in the coil, leading to magnetisation that may permanently affect the microphone. Problems also occur if a centretapped microphone coil is incorrectly connected to ground at the centre tap (Fig.2C). In this case, a different current may flow in each half of the coil due to slight differences in the values of the 6.8kΩ resistors and imbalances in the coil windings. Getting back to Fig.2A, matching the 6.8kΩ resistors will also improve noise rejection due to more equal impedance matching in the two signal leads. For those unfamiliar with balanced audio leads, the twisted pair wires in the balanced lead carry out-of-phase signals. At the receiving end, the out-of-phase signals are ‘subtracted’ and this has the effect of ‘adding’ the two signals. In addition, because they are twisted, the signal wires each tend to pick up the same level of hum and this is cancelled by the subtraction at the receiving end. A shield wire that’s connected to ground further minimises hum and noise pick-up. Some mixing desks do include a phantom supply for microphones. However, even if you do have such a mixing desk, it may not have sufficient capacity. This new 48V Dual Phantom Power Supply can be used with two phantom-powered devices. As shown in the photos, the 48V Dual Phantom Power Supply is housed in a diecast box, for ruggedness and for shielding. It has two female XLR sockets and two male XLR sockets. The

Fig.1: how phantom power is applied. The 48V DC supply is applied via 6.8kΩ resistors to the balanced signal leads of the device being powered.

2

6.8k

6.8k

2

POWERED APPLIANCE

SIGNAL OUTPUT

3 1

48V supply is applied to the female XLR sockets, while the male sockets provide the signal output with the DC voltage blocked by 22µF electrolytic capacitors. Circuit details Now take a look at Fig.3 for the full circuit details. As shown, the incoming 24VAC from the plugpack transformer is connected to a half-wave voltage doubler rectifier, comprising diodes D1 and D2 and two 470µF 63V electrolytic capacitors. This will result in a nominal DC voltage of about 67V, but will typically be much higher at around 75V DC, depending on the incoming mains voltage and the plugpack’s voltage regulation. REG1, an LM317 3-terminal adjustable regulator, is used to derive the 48V DC supply. This device is rated for a maximum differential of 40V between its input and output. With a 75V input and a 48V output, the input to output difference is a comfortable 27V, but when power is initially applied, the regulator circuit’s input can be 75V or more, while the output can be as low as 1.3V. This is due to REG1’s adjust terminal being initially held at 0V via a 1µF bypass capacitor. Since the LM317 cannot cope with this admittedly brief overload, a pre-regulator comprising Darling-

+48V DC

6.8k

+48V DC

2 = ‘HOT’ (IN PHASE) 3 = ‘COLD’ (OUT OF PHASE) 1 = GROUND

+48V DC

6.8k

6.8k DYNAMIC MICROPHONE

ton transistor Q1 and 33V zener diode ZD1 is used to protect it from over-voltage. Q1 acts as an emitter follower, while ZD1 has its anode connected to REG1’s output, thereby limiting the voltage across the regulator to about 31.7V (after allowing for the voltage drop across the two base-emitter junctions in Darlington transistor Q1). Following the pre-regulator, the circuit involving REG1 is fairly standard. REG1’s supply input is decoupled using a 100nF MKT capacitor, while the output and adjust terminals are bypassed using 1µF 63V electrolytic capacitors. The minimum load current for REG1 to give its specified performance is 12mA. Since the voltage between the output and adjust terminals could be as low as 1.2V, we would normally connect a 100Ω resistor between these two terminals to provide this minimum current. However, this wouldn’t allow us to use convenient standard resistor values for the adjustto-ground resistors and so we have used a 150Ω resistor instead. This provides a minimum load of 8mA, with the remaining 4mA required being added by the current through power indicator LED1. In fact, assuming a 48V output and 2V across LED1, the LED current will actually be 4.6mA.

2

+48V DC

6.8k

6.8k DYNAMIC MICROPHONE

6.8k DYNAMIC MICROPHONE

2

CT

3 1

3

A

3

B

C

Fig.2: a correctly wired dynamic microphone coil is shown at (A) but problems occur if the microphone is incorrectly wired as shown at (B) and (C) due to current flowing in the coil.

Everyday Practical Electronics, November 2015

Phantom Power1114 (MP 1st & SK).indd 25

25

15/09/2015 17:18

Constructional Project

D3 1N4004 SCREW TERMINALS

D1 1N4004

A

K

Q1 TIP122 C

K

E

IN

K CON1 24V AC INPUT

A

D2 1N4004

470 µF

B

0.5W

ZD1

K

OUT K

ADJ

100nF

4.7k

63V

A

REG1 LM317T

A

λ K

63V

2.4k

SOCKET

63V

A

POWER LED1

A

33V 1W

470 µF

1 µF

D4 1N4004

150Ω

0.5W

1 µF 63V

TP1 10k

GND

0.5W

2.7k

0.5W

LED

* MATCH EACH PAIR OF THESE

VR1 1k

RESISTORS TO WITHIN 27Ω

OUTPUT ADJUST

K A

+48V

6.8k*

6.8k*

0.5W

6.8k*

0.5W

6.8k*

0.5W

22 µF 63V

0.5W

22 µF 63V

22 µF 63V 3

2 1

22 µF 63V 3

XLR FEMALE SOCKET1

1

SHIELD

20 1 4

100k

3

XLR MALE SOCKET1 SHIELD

10Ω

SC 

2

2 1

SHIELD

10Ω

100k

1N4004

A

48V DUAL PHANTOM POWER SUPPLY

48V DUAL PHANTOM POWER SUPPLY

XLR MALE SOCKET2

1

SHIELD

100k

Reproduced by arrangement with SILICON CHIP magazine 2015. www.siliconchip.com.au

2

3

XLR FEMALE SOCKET2

B K

LM317T

TIP122

K

ZD1 A

100k

C C

E

OUT

ADJ

OUT

IN

Fig.3: the circuit of the 48V Dual Phantom Power Supply. The 24V AC supply input is rectified by voltage doubler D1 and D2 and fed to an LM317T adjustable regulator (REG1) via a pre-regulator consisting of Darlington transistor Q1 and ZD1. The resulting 48V DC output from REG1 is then fed to pins 2 and 3 of the female XLR sockets via 6.8kΩ resistors.

Trimpot VR1 (1kΩ) allows the output voltage to be adjusted from 40.8V to 48.8V if the output-to-adjust terminal voltage is at its 1.2V minimum. If the output-to-adjust terminal voltage is at its 1.3V maximum, the current through the adjust resistors is 8.66mA and the output voltage can be adjusted using VR1 from 44.2V to 52.8V. These calculations do not include the current flowing from the adjust terminal itself. This is typically 45µA, but can be as high as 100µA. For the adjust terminal to ground resistance used, this can add an extra 0.61V to the output. Note that the output voltage is required to be between 44-52V in order for the phantom supply to comply with the DIN EN 61938 standard.

26

Phantom Power1114 (MP 1st & SK).indd 26

Diodes D3 and D4 are included as standard protection. D3 allows current flow from the output back to the input if the regulator’s input is shorted. Similarly, D4 allows current to flow from the 1µF bypass capacitor at the adjust terminal if the output is shorted. XLR sockets The 48V DC supply is fed to the XLR sockets via 6.8kΩ resistors. These limit the short-circuit current to a nominal 7mA (6.5-7.7mA range) for each supply pin (pins 2 and 3 on the XLR sockets). Ideally, each 6.8kΩ resistor pair should be matched to within 27Ω to comply with the 0.4% tolerance allowed

by the phantom power specifications. That can be easily achieved by using resistors that are from the same manufacturer’s batch. In practice, the resistor values are checked with a digital multimeter before installation. The resistors in each pair do not need to be within 27Ω of 6.8kΩ; just within 27Ω of each other. As mentioned previously, 22µF electrolytic capacitors are used to block the 48V DC on the balanced signal lines from being fed to the XLR male output sockets, and these work in company with 100kΩ bias resistors from the outputs to ground. The 22µF capacitors ensure a low-frequency roll-off that’s well below 20Hz for a typical sound mixer or amplifier input impedance

Everyday Practical Electronics, November 2015

15/09/2015 17:18

Constructional Project

TP1

22 µF 63V

2.7k 1 µF 63V

6.8k

6.8k

6.8k

10Ω

REG1 LM317T

10Ω

22 µF 63V 22 µF 63V

A

100nF

D4

2.4k

1k

1 µF 63V

C 2014

GND

VR1

4004

4004

150Ω

CON1

Q1 TIP122

ZD1

22 µF 63V

2

3

1

1

3

2

SHIELD

2

XLR MALE SOCKET2

3

SHIELD 100k

1

100k XLR FEAMALE SOCKET2

1

SHIELD

3

XLR MALE SOCKET1

XLR FEMALE SOCKET1

10k

2

SHIELD 100k

LED1

D3

100k T NA HP V 8 4 YLPPUS M OSUPPLY 1 4 1 2 1 1 8 148V PHANTOM

4004

4004

33V

470 µF 63V

470 µF 63V

6.8k

24VAC

4.7k

+

Construction The 48V Dual Phantom Supply is built on a double-sided plated-through PCB, which is availble from the EPE PCB Service, coded 18112141 and measuring 56.5 × 113mm. This is housed in a diecast box measuring 122 × 66.5 × 39mm and a panel label (113 × 56mm) is affixed to the lid. Fig.4 shows the parts layout on the PCB. Begin by installing the resistors, zener diode ZD1 and diodes D1-D4. A digital multimeter should be used to check the resistor values before they are installed. As mentioned above, you will need to select two pairs of 6.8kΩ resistors that are within 27Ω of each other. Make sure the diodes are all installed with the correct polarity. The banded end of each diode must be oriented as shown on the layout diagram. The PC stakes for TP1 and GND can go in next, followed by REG1 and Q1 (don’t get these latter two parts mixed up). As shown, REG1 and Q1 are mounted horizontally, with their leads bent down by 90° so that they go through their respective PCB holes. Be sure to secure the metal tab of each device to the PCB using an M3 × 6mm

D2 D1

+

of 10kΩ. The 10Ω resistors isolate the ground connections between each pair of female and male XLR sockets to prevent high-level ground loop currents. By contrast, the shield connections of each XLR socket pair are connected together (but not to each other). In other words, the Female Socket1 shield connects to the Male Socket1 shield and the Female Socket2 shield connects to Male Socket2 shield. There is no interconnection between the two sets of shields. In practice, the Socket1 pair shield is also connected to the metal case used to house the circuit. This connection is made via one of the mounting screws that’s used to secure the XLR female socket to the case.

Fig.4: follow this diagram to install the parts on the PCB. LED1 should be mounted with the top of its lens 30mm above the board so that it will later protrude through the lid of the case.

This view shows the completed PCB assembly. Note that the top of each 470μF capacitor must be covered with insulating tape (12mm-diameter) to ensure that they cannot later short to the case lid.

machine screw and nut before soldering their leads. Trimpot VR1 can now be installed, followed by the capacitors. Make sure the electrolytics are installed with the correct polarity. The 2-way screw terminal block (CON1) is next on the list (wire entry holes towards the adjacent edge of the

PCB). Alternatively, a DC socket can be fitted instead. A screw terminal block would normally be used, since AC plugpacks are usually supplied with bare leads. Next, install the XLR sockets – make sure that they all sit flush against the PCB before soldering their leads. LED1 can then go in; it must be fitted with

Table 1: Resistor Colour Codes

  o o o o o o o o o

No.   4   1   4   1   1   1   1   2

Value 100kΩ 10kΩ 6.8kΩ 4.7kΩ 2.7kΩ 2.4kΩ 150Ω 10Ω

Everyday Practical Electronics, November 2015

Phantom Power1114 (MP 1st & SK).indd 27

4-Band Code (1%) brown black yellow brown brown black orange brown blue grey red brown yellow violet red brown red violet red brown red yellow red brown brown green brown brown brown black black brown

5-Band Code (1%) brown black black orange brown brown black black red brown blue grey black brown brown yellow violet black brown brown red violet black brown brown red yellow black brown brown brown green black black brown brown black black gold brown

27

15/09/2015 17:18

Constructional Project

The PCB is installed in the case by mounting it on two M3 × 6mm tapped spacers (secured with M3 × 12mm countersink screws) at the rear and by fitting six M3 × 12mm screws (one nylon, the rest metal) into the XLR sockets at the front.

+ +

+

XLR socket holes: 22mm diameter

13mm

+

+

+ +

+

Preparing the box Before installing the PCB in the case, it’s necessary to drill mounting holes for the XLR sockets and the two rear PCB mounting points. A hole is also required is the lefhand side of the case to accept a cable gland (for the 48VAC supply leads) or a DC plug, while a 3mm hole must be drilled in the lid for the power indicator LED. Fig.5 shows the drilling template for the XLR sockets, while Fig.6 (the front panel artwork) shows the location of the LED (these can also be downloaded in PDF format from the EPE website). As shown, the XLR sockets require 22mm-diameter clearance holes, with +

+

+

Test and adjustment Before going any further, check that all components are oriented correctly and that you haven’t missed any solder joints. That done, apply 24VAC power and check that LED1 lights. If it does, connect your multimeter between TP1 and GND and adjust trimpot VR1 for a reading of 48V. Check that 48V is also present at pins 2 and 3 of the XLR female sockets; ie, by measuring between each pin and GND. Now check pins 2 and 3 of the XLR male sockets. They should each be at

a low voltage and this should continue dropping over time as the 22µF capacitors fully charge. In fact, they may take several minutes to drop below 50mV, due to capacitor leakage current. If the voltage on one or more pins remains higher than 100mV, change the relevant capacitor. You can use low-leakage 50V capacitors if necessary.

+

the correct polarity and with the top of its lens 30mm above the PCB so that it later just protrudes through the lid of the case. Note that the longer lead is the anode. The PCB assembly can now be completed by covering the top of each 470µF capacitor with a circular piece of insulating tape cut to a diameter of 12mm. This is necessary to ensure that the capacitors cannot later short to the lid of the case.

XLR mounting holes: 3mm diameter

Fig.5: the drilling and cutout template for the front side of the case. This can also be downloaded in PDF format from the EPE website.

28

Phantom Power1114 (MP 1st & SK).indd 28

3mm-diameter holes for the mounting screws. The 22mm holes can be easily cut using an Irwin Speedbor or similar drill. These are intended for use in timber, but they also work well on aluminium. Drill just down to a depth where the internal ribs of the box begin; any further and the drill will begin to wobble. The inside piece can then be forced sideways in several directions by inserting a screwdriver in the centre hole and applying leverage. Do this until the inside piece eventually gives way and falls out, then clean up the hole with a round file. If you don’t have a Speedbor drill, drill a series of small holes around the inside perimeter of the hole, then knock out the centre piece and file the job to a smooth finish. Each XLR female socket also requires a cut-out between the top of its 22mm hole and the top edge of the box (see Fig.5). This cut-out is necessary to allow the ‘push to release’ lever on each XLR female socket to be inserted. It’s just a matter of making these cutouts using a hacksaw after the 22mm holes have been drilled. The two mounting holes for the rear of the PCB are marked out after the XLR cut-outs have been made. It’s just a matter of temporarily fitting the PCB assembly into the case, marking out the two holes, then removing the PCB and drilling them to 3mm. Deburr the holes using an oversize drill, then countersink them from the outside to suit countersink-head M3 screws.

Everyday Practical Electronics, November 2015

15/09/2015 17:18

Constructional Project (righthand) mounting hole of XLR female socket2 (see photos). This is necessary to prevent the screw from making a connection between this socket’s shield and the case, thereby creating an earth loop (and causing hum). That’s because the lower mounting hole of each female socket connects the shield to the case when a metal screw is used. By the way, you will have to cut a thread in the plastic of XLR female socket2 with one of the M3 metal screws before replacing this with the nylon screw. Do all the screws up so that there is a gap of about 2.5-3mm between the socket and the case, so that the lip on the inside of the lid will fit between them.

NYLON SCREW

Next, drill the hole in the side of the case for the power cable (either to accept a cable gland or a DC power plug). This hole should be positioned towards the rear of the case; it must be directly in-line with the DC socket (if used).

24V AC

Final assembly Once all the holes have been drilled, the PCB assembly can be mounted in the case. The first step is to install two M3 × 6mm tapped spacers to support the rear edge of the PCB. Secure these using M3 × 12mm countersink head screws inserted up through the base of the case, then drop the PCB into position and fit nuts to hold the assembly in place. The PCB assembly is secured to the front of case by fitting M3 × 12mm mounting screws to the XLR sockets. Seven of these screws are metal but a nylon screw must be used for the lower

Front panel label The front-panel label can be produced by printing it onto photo paper. This is then affixed to the case lid using a suitable glue or neutral-cure silicone and the hole cut out for the LED. For a more rugged label, print a mirror image onto clear overhead projector film, so the print side will be on the back of the film when the label is affixed to the lid (eg, using silicone sealant). Alternatively, you can print onto an A4 sized synthetic ‘Dataflex’ self-adhesive label if you have an inkjet printer or onto a ‘Datapol’ self-adhesive label if you have a laser printer. Further information on where to buy these labels is in the panel in the Mains Switch Timer article published elsewhere in this issue. Once the label is in place, it’s then just a matter of attaching the lid using the four countersunk M3 screws provided and the 48V Dual Phantom Power Supply is ready for use.

48V Dual Phantom Power Supply

+ Power

Input 1

Output 1

Input 2

Output 2

Fig.6: the front-panel artwork is also available on the EPE website. You will need to drill a hole in the case lid for the power LED.

Everyday Practical Electronics, November 2015

Phantom Power1114 (MP 1st & SK).indd 29

Parts List 1 PCB, code 18112141, 113 × 56.5mm, available from the EPE PCB Service 1 panel label, 113 × 56mm 1 diecast box 122 × 66.5 × 39mm 1 24V AC plugpack (50mA minimum rating) 2 XLR female 3-pin connectors (compact, PCB mount, 90°) 0875) (Female Socket1, Female Socket2) 2 XLR male 3-pin connectors (PCB-mount, 90°) (Male Socket1,Socket2) 1 2-way PCB-mount screw terminal block with 5.08mm spacings (CON1) 1 cable gland (3-6.5mm dia. cable) 1 PCB-mount DC socket, 2.1mm or 2.5mm 2 M3 × 6mm spacers 2 M3 × 10mm machine screws (to secure REG1 and Q1) 7 M3 × 12mm machine screws (for XLR socket mounting) 1 M3 × 12mm nylon or polycarb­ onate screw (lower right female XLR socket mounting) 2 M3 × 12mm countersink-head screws (rear PCB mounting) 4 M3 nuts 2 PC stakes 1 25mm length of insulation tape 1 1kΩ mini horizontal trimpot (VR1) Semiconductors 1 LM317T adjustable regulator (REG1) 1 TIP122 NPN Darlington transistor (Q1) 4 1N4004 1A diodes (D1-D4) 1 33V 1W zener diode (ZD1) 1 green 5mm LED (LED1) Capacitors 2 470µF 63V PC electrolytic (26.5mm height maximum) 4 22µF 63V PC electrolytic 2 1µF 63V PC electrolytic 1 100nF MKT polyester Resistors (0.25W, 1%) 4 100kΩ 1 2.7kΩ 0.5W 1 2.4kΩ 0.5W 1 10kΩ 0.5W 4 6.8kΩ 0.5W* 1 150Ω 2 10Ω 1 4.7kΩ 0.5W * Select each pair to be within 27Ω of each other

29

15/09/2015 17:19

Constructional Project

The Jaycar remote controlled mains switch comes with a 3-channel hand-held remote. MS-6142 comes with three mains sockets, while MS-6145 has one socket. UK readers must ensure they use a UK-socket version (see text).

or with a number of sockets. Alternatively, the additional sockets have to be purchased separately. The remote controls each socket individually and it’s just a matter of either using a learning procedure to set the socket’s channel number or setting a channel switch on the rear of the socket. The Altronics A0340, Jaycar MS6145 and Jaycar MS-6142 are typical of the units currently available. (UK readers will of course need a UK version, eg, eBay number 331065350352.) How does it work? This Remote Switch Timer is designed to activate any pair of on/off switches on the remote control. It does this by controlling two small relays which have their contacts wired across the desired on and off switches on the remote’s PCB. Basically, it’s just a matter of removing the remote’s PCB from its case and housing it together with the Remote Switch Timer inside a plastic utility case. The two are then wired together and powered from an external 12V DC plugpack and an optional internal 9V back-up battery. As well as using the new automatic timing functions, you can still manually control the mains socket using separate On and Off pushbuttons on the Remote Switch Timer. Alternatively, another hand-held remote can be used. In preset-time mode, the Remote Switch Timer is used to send an ‘on’ or ‘off’ signal to the remote mains socket

after a set period of time. You simply program when you want the socket to switch on or off and then press the Set/Start button. The timer then automatically switches after the preset time, which can range from a minimum of one minute to a maximum of 255 hours and 59 minutes (that’s more than 10 days!). During the time-out period, the displayed time decreases by one every minute until the timer reaches zero. The relay for that timer function then closes and the UHF signal from the remote is sent to the mains socket. To set the time-out period, you first select either the On or Off timer using the Next pushbutton. The separate Up and Down hours and minutes pushbuttons are then used to set the required timing period. If you want more complexity, the Remote Switch Timer can use both its timers. One timer can be set to turn the mains socket on after a preset time, while the other can be set to then turn it off (or vice versa). In addition, the On and Off pushbuttons can be used to set the initial status of the remote control mains socket; ie, you can start with the mains power on or off. Default timing cycle The default timing cycle for the unit is for it to run once only. This is where the timers are set to their required values and decrease over time until they reach zero. Once a timer has counted down to zero, there is no more control from that timer unless it’s set to a new value.

Everyday Practical Electronics, November 2015

MainsSwitchTimer1114 (MP 1st & SK).indd 31

The Altronics A0340 has an 8-channel remote control and is supplied with a single mains socket. Additional mains sockets can be purchased separately.

Note that the timer will just show dashes when the time-out is zero. The default setting can be changed from ‘once only’ to ‘repeat’. This is where the timers are returned to their original settings after both timers have timed out. As an example, let’s say that you’ve set the On timer to two minutes and the Off timer to three minutes. This means that after two minutes, the On timer will have counted down to zero and sent an ‘on’ signal to the mains socket to turn on the power. The Off timer now continues to count down and when it too reaches zero (ie, after one minute more), an ‘off’ signal will be sent to the mains socket. Both timers will then be reset to their original 2-minute and 3-minute settings and so the cycle repeats every three minutes. The on and off timers for this countdown style of timing are called the ‘ON IN’ and ‘OFF IN’ timers (ie, on in a certain period and off in a certain period). The once only and repeat timer options are predictably named ‘ONCE ONLY’ and ‘REPEAT’. This style of timer is quite useful (and simple to use) for many timer applications. However, for even more flexibility, a ‘real-time’ timer mode is also included. This is similar to setting an alarm clock and allows you to set the time of day for the on/off switching to occur. In order to do this, a real-time clock is required and the one used here is in 24-hour format.

31

16/09/2015 12:10

Constructional Project Parts List 1 double-sided, plated-through PCB, available from the EPE PCB Service, code 19112141, 104 × 76mm 1 front panel PCB, code 19112142, 157 × 94mm* OR 1 front panel label, 144 × 84mm* 1 UB1 plastic utility case, 158 × 95 × 53mm* 6 M3 × 9mm tapped spacers* 1 LCD module with backlighting (Altronics Z-7013, Jaycar QP5512 or similar) 1 UHF remote-controlled mains switch with 12V powered remote controls (eBay: item 331065350352; amazon.co.uk: search under ‘Watts Clever’) 2 SPST DIP 5V reed relays (RLY1,RLY2) 1 4MHz low-profile crystal (HC49US case) (X1) 10 click-action pushbutton PCB switches (white) 1 12V DC plugpack (>100mA) 1 16-way SIL pin header with 2.54mm pin spacing 1 panel-mount DC socket (2.1 or 2.5mm to suit plugpack) 4 2-way polarised headers (2.54mm pin spacing) 4 2-way polarised header plugs (2.54mm pin spacing) (CON1CON4) 12 M3 × 5mm machine screws (2 preferably countersunk for the rear of the box) 1 100mm cable tie 1 400mm length of medium-duty black hook-up wire 1 200mm length of medium-duty red hook-up wire Real-time switching For this mode, we call the real-time timers ‘ON AT’ and ‘OFF AT’ (ie, on at a certain time and off at a certain time). You can set either one timer or both. The timers are also in 24-hour format and are compared against the time on the clock. When the clock and timers match, an on or off signal is sent to the mains socket. Note that in this mode, the timer values do not change during the timeout period. Instead, they are simply compared with the clock for a timeout match. Note that a 00h:00m setting for either timer will show as dashes on

32

MainsSwitchTimer1114 (MP 1st & SK).indd 32

Semiconductors 1 PIC16F88-I/P microcontroller programmed with 1911214A. hex (IC1) 1 LP2950ACZ-5.0 low-dropout 5V regulator (REG1) 1 BC337 NPN transistor (Q1) 6 1N4148 diodes (D1,D2,D4-D7) 2 1N4004 1A diodes (D3,D8) Capacitors 2 10µF 16V PC electrolytic 1 100nF MKT polyester 2 33pF C0G (NP0) ceramic Resistors (0.25W, 1%) 1 100kΩ 1 330Ω 0.5W 1 10kΩ 2 100Ω 1 2.2kΩ 1 10kΩ miniature horizontal trimpot (VR1)

*Alternative enclosure parts

1 sealed polycarbonate case with clear lid 115 × 90 × 55mm 1 front panel label, 103 × 78mm 4 M3 × 12mm tapped spacers

Optional parts for battery back-up

1 9V battery snap with lead 1 9V battery (522/6LR61) 1 9V U-clamp battery holder 1 2-way polarised header and plug (2.54mm pin spacing) (CON5) 1 M3 × 6mm machine screw 1 M3 nut Reproduced by arrangement with SILICON CHIP magazine 2015. www.siliconchip.com.au

the LCD and there is no on or off switching for this setting. 00h:00m also corresponds to midnight, so it is not possible to have the timer switch at precisely midnight. However, switching times one minute before (23h 59m) and one minute after midnight (0h 1m) are possible. This rather minor shortcoming allows for simplified timer operation because it doesn’t require an extra selection as to whether you want a timer to be operational or not. There are two possible settings for real-time switching: (1) where the sequence occurs once only; and (2)

where the on and off cycle is repeated each day. As before, these options are called ‘ONCE ONLY’ and ‘REPEAT’. For the once-only selection, the timer will revert to zero (with the LCD showing dashes) once that timer has matched the clock. For the repeat selection, the timer will remain at its time setting so that it can repeat the switching sequence each day. Clock accuracy The long-term timing accuracy depends on the accuracy of the crystal timebase used in the Remote Switch Timer. This in turn is dependent on the crystal tolerance and on temperature variations throughout the year. For a standard ±50ppm crystal, the clock could be fast or slow by up to 130s (ie, two minutes and 10 seconds) over a period of 30 days. However, the timing accuracy can be easily adjusted by changing a value in the software that runs in the PIC microcontroller used in the Remote Switch Timer. Basically, the Remote Switch Timer can be adjusted to run faster or slower in 1ppm steps, up to a maximum of ±99ppm. A 1ppm change represents about 2.6s in 30 days, while the 99ppm maximum adjustment corresponds to 256s in 30 days. Adjusting the clock accuracy may be necessary if you want the ‘ON AT’ and ‘OFF AT’ timers to switch the unit at certain times of the day. However, it will not usually be necessary for the ‘ON IN’ and ‘OFF IN’ timers, which are used to switch the unit in a certain time period. Battery back-up An option is to include a battery backup for the Remote Switch Timer. That way, all settings will be retained and timing will continue in the event of a black-out or if mains power is removed from the unit. Of course, the mains socket will not be powered in the event of a blackout and so it will not respond to any on or off signals from the unit. However, when power is restored, the last on or off signal is sent again after a short delay. That way, the mains socket will switch to the required setting for the present time. Note that the backlighting for the LCD module is switched off to conserve the battery when the unit is running from battery power alone. Without battery back-up, the Remote Switch Timer will reset with all

Everyday Practical Electronics, November 2015

16/09/2015 12:10

MainsSwitchTimer1114 (MP 1st & SK).indd 33

K

2

RLY 2

C K A

16 OSC1

15 OSC2

RB1

Vss 5 RB5

RB4

11

RB2 8

S8

S6

S4

S10 S9

A

S7

D6

S2

A

S3

A

D4 D5

K K K

S1

A

S5

D7 4x 1N4148 K

20 1 4

S1: S2: S3: S4: S5: 4 14 13 12 11 6 7–10 5 1

SC REMOTE REMOTE SWITCH SWITCH TIMER TIMER

HOUR UP HOUR DOWN MINUTES UP MINUTES DOWN SET/START

S6: NEXT S7: CYCLE S8: ON S9: OFF S10: BACKLIGHT

10

RB0

6

RA2

RA3

1

RA4

2

3

18

RA1

IC1 PIC1 6F8 8 PIC16F88

RB6

RA0

7

12

17

33pF

X1 4.0MHz

B

2.2k

RB3/PWM

Vdd RA5/MCLR

13

LED 16 CATHODE D7 D6 D5 D4 EN RS GND R/W D0–D3

3

16 x 2 LCD MODULE

CONTRAST

RB7

4

14

9

100nF LCD CONTRAST 10k VR1 10k 330 Ω 1W LED 15 ANODE Vdd

2

1N4148

33pF

100Ω

E

C

Q1 BC337

100Ω

10V

10 µF

E

B

BC 33 7

D2 1N4148

K

A

6

2 A D1 1N4148

(POWER DETECT)

GND

A

1N4004

7,8

1,14

7,8

1,14 RLY 1

6 K

100k

16V

10 µF

IN

Fig.1: the circuit is based on PIC16F88-I/P microcontroller IC1 and an LCD module. IC1 monitors switches S1-S10, drives the LCD, controls the timing and drives miniature relays RLY1 and RLY2. The relays have their contacts wired across the On and Off buttons of a UHF remote control module.

OUT IN

GND

CON2

CON1

LP2950

UHF REMOTE OFF SWITCH

UHF REMOTE ON SWITCH

UHF REMOTE SUPPLY

+ –

A K

D8 1N4004

CON5

CON4

+ –

TO 9V BATTERY SNAP

12V DC TO SOCKET

+ – CON3 A K

D3 1N4004

Everyday Practical Electronics, November 2015

OUT

REG1 LP2950ACZ–5.0

Circuit details Take a look now at Fig.1 for the circuit details of the Remote Switch Timer. It’s quite simple and is based on a PIC16F88-I/P microcontroller (IC1), an LCD module, a couple of miniature relays, 10 pushbutton switches and a few other parts. Most of the complexity is hidden inside the software that’s programmed into IC1. This allows the micro to monitor the switch inputs and drive the LCD module and relays according to the actions required by the switches and internal timers. IC1’s RA2, RA3, RA4 and RB0 data lines send character data to the LCD module. In addition, the RA1 and RB7 lines drive the Enable (EN) and Register Select (RS) inputs. The LCD is set to run using four bits of data to save on outputs from IC1. The necessary data bits are sent to the LCD as two separate transfers, to make up the eight bits necessary to fully drive the display. The RA2, RA3, RA4 and RB0 lines also drive a matrix based on pushbutton switches S1-S10 and diodes D4-D7. To check if a switch is closed, the RA2, RA3, RA4 and RB0 lines are driven low and the RB2, RB4 and RB5 inputs monitored. These latter inputs are normally pulled high (to +5V) via internal pull-ups, but one of these inputs will go low (ie, close to 0V) if a switch is closed. When a low is detected, the RA2, RA3, RA4 and RB0 lines are taken high again and then taken low one at a time while IC1 continues monitoring RB2, RB4 and RB5. This allows the micro to determine which switch button is being pressed. For example, if S3 is closed, this will be detected when RA4 goes low and in turn pulls RB4 low. Diodes D4-D7 are there to prevent shorts between the RA2, RA3, RA4 and RB0 lines if two switches are pressed at the same time. Shorts between these lines would not only affect switch detection but would also affect the drive signals to the LCD and cause corrupted characters to be displayed. Ports RB1 and RB6 drive relays RLY1 and RLY2 via 100Ω resistors. The NO

+5V

timers set to zero when a black-out ends. In addition, the mains socket will be reset with the power off. In summary, it’s an incredibly versatile unit that’s easy to program. It should cover a very wide range of timing applications.

(OPTIONAL)

Constructional Project

33

16/09/2015 12:10

Constructional Project

ON

14121191 H CLCD TI WMODULE S S NIA M F HZ-7013 U R OF R(B/L) E MI T 16X2

ALTRONICS

RLY1 SY4030

D1 OFF

4148

D5

4004

4148

D6

4148

D7

UP

HOURS

S1

BACKLIGHT

100nF

IC1 PIC16F88–I/P

10k DOWN

100Ω UP

S2

S3

Q1

S7

S8

CYCLE

ON

S6

S9

NEXT

DOWN MINUTES S4

S5

OFF

SET/START

TIMER FOR UHF MAINS SWITCHES FRONT VIEW TO REMOTE’S ON SWITCH

CON1

(LCD MODULE UNDER)

CON2

TO REMOTE’S OFF SWITCH

DC INPUT SOCKET

19112141 TIMER FOR UHF MAINS SWITCH

UHF

+

SUPPLY

POWER FOR UHF REMOTE

GND

CON4

CON3

(IC1 UNDER)

+12V

4148

VR1 10k

S10

100Ω

D2

4148

SUPPLY

+ – 330Ω

19112141 C 2014

D4

UHF

2.2k

33pF

10 µF

33pF

4148

4004

+ – Backup

CONTRAST

100k

D8

4MHz

BC337

D3

X1 GND LP2950 ACZ-5.0

+12V

REG1 10 µF

RLY2 SY4030 14 13 12 11 10 9 8 7 6 5 4 3 2 1 16 15

CON5

– STRESS RELIEF HOLES FOR BATTERY SNAP LEADS

+

FOR 9V BATTERY SNAP LEAD (OPTIONAL)

REAR VIEW

Fig.2: install the parts on the PCB as shown here. Be sure to use a socket for IC1 and make sure that all polarised parts are correctly oriented. The 2-way header sockets (CON1-CON5) are the only parts that mount on the rear of the board.

(normally open) contacts of the relays go to CON1 and CON2 and these in turn are wired in parallel with the ON and OFF switches respectively on the UHF remote’s PCB. Diodes D1 and D2 prevent damage to RB1 and RB6 by clamping the back-EMF generated by the coils when the relays switch off. The 100Ω resistors in series with the relay coils also help protect IC1’s RB1 and RB6 outputs. They are not needed in normal operation, but will limit the back-EMF current from a relay coil if its associated diode fails or develops a dry joint connection.

34

MainsSwitchTimer1114 (MP 1st & SK).indd 34

Timing A 4MHz crystal (X1) between pins 15 and 16 of IC1 is used to provide an accurate reference for the timing oscillator. It’s loaded with fixed 33pF capacitors to ensure it starts correctly. Normally, the crystal would be trimmed to a precise 4MHz using a trimmer capacitor in place of one of the fixed values. However, without suitable calibrated test equipment, it’s not possible to accurately adjust the trimmer without a great deal of trial and error. As a result, as previously

stated, we chose to use a software adjustment procedure instead. If the 4MHz crystal is precisely on frequency, the program runs at exactly 1MHz. The software uses a counter (Timer1) that overflows after a count of 40,000 or after 1/25th of a second if the clock frequency is precisely 1MHz (ie, 25 of these 40,000 counts will take 1s). If the crystal runs too fast or too slow, it’s just a matter of altering the 40,000 number used in the counter to provide the correct 1s period. For example, for a 1ppm adjustment, the number for Timer1’s overflow counter must either be 40,001 (ie, one more) if the crystal is too fast or 39,999 (ie, one less) if the crystal is too slow. Note that this change is only done for one of the 25 overflow counts that make up one second for Timer1. The remaining 24 counts still use 40,000 as the count. As stated, the overall adjustment range is from –99ppm to +99ppm. In operation, the software then adds or subtracts the ppm correction value from 40,000 in order to compensate for the crystal frequency. The overflow ppm adjustment is done via the front-panel switches as described later, with the setting shown on the LCD. The correction required is determined by comparing the time of the Remote Switch Timer against a known accurate clock over a set period. Each 2.592 seconds in 30 days that it is off is equivalent to 1ppm. Note that the clock on the Remote Switch Timer shows the seconds, so that the clock’s accuracy can be checked. The timing functions, however, are only to the nearest minute. Backlighting Backlighting is provided for the LCD so that the timer can be used in the dark. This can be adjusted in 16 steps from fully off through to full brightness by pressing the Backlight pushbutton (S10). This brings up the backlighting value which is shown as a number ranging from 0-15, with 15 being full brightness. A bargraph is also used to show the brightness setting. For brightness levels between 1-14, the backlight LEDs are driven using PWM (pulse-width modulation). Pin 9 (PWM) of IC1 provides the PWM waveform and this drives the cathodes of the backlight LEDs via transistor Q1 and a 330Ω current-limiting resistor.

Everyday Practical Electronics, November 2015

16/09/2015 12:11

Constructional Project to power up and for the companion mains socket to power up if there has been a blackout. Construction All the parts (except for the UHF remote) are installed on a PCB coded 19112141 and measuring 104 × 76mm, which is available from the EPE PCB Service. Fig.2 shows the parts layout on the PCB. Begin by installing the resistors and diodes. Table 1 shows the resistor colour codes, but we recommend that you also check each one using a DMM before installing it. Be sure to install the diodes with the correct polarity. REG1 and Q1 are next on the list. These two devices look the same, so be careful not to get them mixed up. Once they’re in, install an 18-pin socket for IC1, with the notched end towards D5. Follow with the capacitors. The two 10µF electrolytics must be installed with the polarity shown and bent over so that they lie flat against the PCB, so that they later sit below the top edge of the LCD module (see photo). The ceramic and MKT capacitors can be mounted either way around. Crystal X1 and trimpot VR1 can now go in, followed by the two relays. Note that each relay must be installed with its notched end towards the LCD. Now for the LCD module. This is mounted using a 16-way SIL pin header at the bottom lefthand edge. Begin by fitting the header in place with its short pins going into the PCB. Solder these pins, then fit the LCD module over the longer pins and push it all the way down before soldering these pins as well.

The completed timer PCB. Note how the two 10μF electrolytic capacitors are bent over so that they don’t later foul the lid of the case.

For level 0, there is no drive to the LED cathodes (Q1 permanently off) and for level 15, the LEDs are continuously driven (Q1 permanently on). At other levels, the duty cycle of the PWM pulse determines the LED brightness. At half brightness, for example, the LEDs are switched on and off via Q1 using a 50% duty cycle. The PWM frequency is 66.66kHz, so the on and off switching of the LEDs will not be noticeable. The contrast of the LCD module is adjusted using VR1. It’s just a matter of tweaking VR1 to suit. Power supply The Remote Switch Timer is normally powered from a 12V DC plugpack supply connected to CON3. Diode D3 provides reverse polarity protection and the nominal 11.4V supply rail is then filtered using a 10µF capacitor and used to power the backlight LEDs in the LCD module.

The 11.4V rail is also fed to lowdropout regulator REG1. This produces a regulated 5V rail to power microcontroller IC1, the LCD module and the remaining circuitry. The optional 9V back-up battery is connected to CON5. Diode D8 provides reverse polarity protection and both it and D3 isolate the two supplies. IC1’s RA0 input (pin 17) monitors the 12V supply line from CON3. If this goes to 0V, but IC1 is still powered via the back-up battery, the software detects this loss of 12V power and switches off the backlight. When the 12V is subsequently restored, this is detected by RA0 and the last ON or OFF signal is resent to the remote PCB by turning on the appropriate relay. In practice, the ON or OFF relay is activated about 3s after power is restored and remains on for around 900ms. This 3s delay gives enough time for the remote control circuit

Table 2: Capacitor Codes

Value µF Value IEC Code EIA Code 100nF   0.1µF   100n   104 33pF   NA   33p   33

Table 1: Resistor Colour Codes

  o o o o o o

No.   1   1   1   1   2

Value 100kΩ 10kΩ 2.2kΩ 330Ω 100Ω

Everyday Practical Electronics, November 2015

MainsSwitchTimer1114 (MP 1st & SK).indd 35

4-Band Code (1%) brown black yellow brown brown black orange brown red red red brown orange orange brown brown brown black brown brown

5-Band Code (1%) brown black black orange brown brown black black red brown red red black brown brown orange orange black black brown brown black black black brown

35

16/09/2015 12:11

Constructional Project

0V TO CON4

+12V TO CON4

OFF TO CON2

ON TO CON1

Fig.3: here’s how to make the connections to the Altronics UHF remote PCB. The red and black leads shown are all part of the original wiring.

The timer PCB is mounted on spacers on the rear of the front panel and is secured using eight M3 × 6mm machine screws.

+12V TO CON4

the OFF relay on and cause ‘OFF’ to be displayed on the bottom line of the LCD. If the unit passes these tests, then it is almost certainly fully functional and it can be installed in a case, along with the remote’s PCB module. If it doesn’t work, go back over the PCB and check carefully for incorrect component values, incorrectly oriented parts and missed solder joints.

ON CONTACTS: TO CON1

OFF CONTACTS: TO CON2 0V TO CON4

Fig.4: the wiring connections to the Jaycar UHF remote. You will need to scrape away the solder masking from some of the tracks before soldering the leads.

The 10 pushbutton switches can now be installed. These go in with their flat sides oriented as shown and must be pushed all the way down before soldering their pins. The PCB assembly can now be completed by installing CON1-CON5. These polarised 2-way headers are installed on the rear of the PCB with their plastic tabs oriented as shown in the bottom diagram of Fig.2. Wiring the header sockets The header sockets are wired by crimping the wires into the crimp lugs and then pushing them into the socket shell. These wires can all initially be about 100mm long and you will need to use red and black leads for CON3CON5 as shown. The leads for CON1 and CON2 run to the ON and OFF switches on the remote PCB, so their polarity is unimportant.

36

MainsSwitchTimer1114 (MP 1st & SK).indd 36

Test and adjustment Before applying power, make sure that IC1 is out of its socket and that all polarised parts are correctly oriented. That done, apply 12V DC to CON3 and use a DMM to check the supply between pins 14 and 5 of IC1’s socket. This should be somewhere between 4.75V and 5.25V. If this is correct, switch off, install IC1 (notch towards D5) and reapply power. The LCD should now show characters. Adjust VR1 for best contrast, then switch the backlight on by pressing the backlight button (S10). Check that brightness can be adjusted by holding S10 down (the adjustment direction changes each time you press S10). Now press the On button (S8). A click from the ON relay should immediately be heard and the top line of the LCD should display ‘ON’. Similarly, pressing the Off button should briefly turn

Case installation The PCB can be installed either in a UB1 plastic utility case (158 × 95 × 53mm) or in a sealed polycarbonate case with a clear lid (115 × 90 × 55mm). A front panel PCB coded 19112142 and measuring 157 × 94mm can be used with the UB1 box. This PCB replaces the plastic lid and comes with all holes drilled and screen-printed lettering. It’s available from EPE, as is the main PCB. Alternatively, a label measuring 144 × 84mm can be used with the existing lid on the UB1 box. A front panel label measuring 103 × 78mm is also available for the polycarbonate box. These labels can be downloaded in PDF format from the EPE website and printed out. You will need to print out two copies – one onto plain paper for use as a drilling template and another onto photo paper to use as the front-panel label. The labels show the screwmounting locations for the PCB on the lid, along with the switch locations. A

Everyday Practical Electronics, November 2015

16/09/2015 12:11

Constructional Project

 Dataflex & Datapol Labels (1) For Dataflex labels, go to: www.blanklabels.com.au/index. php?main_page=product_ info&cPath=49_60&products_ id=335 (2) For Datapol labels go to: www.blanklabels.com.au/index. php?main_page=product_ info&cPath=49_55&products_ id=326

rectangular cut-out for the LCD surround will also be required for the UB1 box, but this isn’t necessary for the polycarbonate case with the clear lid. The PCB mounting holes should be drilled to 3mm, while the switch holes should be started using a pilot drill and then carefully enlarged to 10mm using a tapered reamer. The rectangular display cut-out can be made in the UB1 box lid by first drilling a series of holes around the inside perimeter, then knocking out the centre piece and filing to a smooth finish. Once the holes have been drilled, the front-panel label can be affixed to the lid using a suitable glue or neutralcure silicone. Alternatively, you can print onto an A4-size synthetic ‘Dataflex’ sticky label if you have an inkjet printer or onto a ‘Datapol’ sticky label if you have a laser printer. This can then be trimmed to size and affixed to

Above: these two views show the inside of the unit with all wiring completed (Jaycar remote PCB used, no back-up battery fitted). Use neutral-cure silicone or hot melt glue to hold the wiring to the remote PCB in place.

Features and Specifications •  Power: 12V DC at 30mA •  Current: 30mA with full backlighting; 3mA with backlighting off •  Battery backup current: typically 3mA •  On and Off IN: adjustable from 0h 0m to 99h 59m in one-minute steps •  On and Off AT: adjustable from 0h 0m to 23h 59m (0h 0m shown as ---:– and timer is off) •  Real Time Clock: 24-hour format with hh:mm:ss •  Crystal tolerance compensation: ±99ppm •  Dimming: off to full brightness in 16 steps; 66.66kHz PWM (pulsewidth modulation).

Everyday Practical Electronics, November 2015

MainsSwitchTimer1114 (MP 1st & SK).indd 37

37

16/09/2015 12:11

Constructional Project

Instructions for using the Remote Switch Timer The very first time the Remote Switch Timer is powered up, the backlighting will be off and the timer will be in the ON IN and OFF IN Once Only mode (Fig.5). Two lines will be displayed on the LCD, with the top line showing ON IN“---:--” and the lower line OFF IN ---:--   The inverted commas in the first line show that the ON IN time can be changed using the Hours and Minutes Up/Down buttons. The dashes mean that the timer is off. Note that three dashes are allocated for the hours position and two for the minutes. This represents three digits for the hours and two for the minutes. The settings can be up to 255h 59m. Note that if you want an hour value above 127, it’s quicker to reach this by pressing the down button to count back from zero hours. Pressing the Next button (S6) moves the inverted commas to the second line. The LCD then shows OFF IN “---:--” and the hours and minutes for this setting can again be adjusted using the up and down buttons. Depending on the above setting, you also need to select whether the mains switch is initially on or off. That’s done by pressing the ON or OFF button (Fig.7). Pressing the Set/Start pushbutton (S5) then starts the timing, with the colon between the hours and minutes digits flashing and the inverted commas off. Pressing the Set/Start button again stops the timing, or you can do this to change the ON IN or OFF IN values. Note that timing will not begin unless the colon is flashing.

Changing the cycle To check which cycle you are running or to change the cycle, press the Cycle button (S7). The current cycle will be displayed and this will initially be ON/OFF IN Once Only. Other selections are ON/OFF IN Repeat, ON/OFF AT Repeat and ON/OFF AT Once Only (Figs.8-10). You can just view the setting, by pressing the Cycle button for up to 10s. Pressing it for longer than 10s lets you move to the alternative settings. After 10s, the cycle indicator will be shown and the unit will count down from 10 to 0. When zero is reached, the cycle changes to the next selection. It’s just a matter of holding the Cycle button down until the required cycle is reached. The hours and minutes settings for the ON/OFF AT cycle are achieved in exactly the same manner as for the ON/OFF IN cycle, with the Next pushbutton again used to select the OFF AT timer.

Adjust ppm correction Pressing the Next button after OFF AT has been selected brings up the ‘Adjust ppm’ correction value on the top line and the real-time clock on the bottom line (Fig.11). A right arrow shows which line can be changed using the Hours and Minutes buttons. As before, pressing the Next button cycles through the selections. The ppm setting is initially zero, but can be changed using either the Hours or Minute buttons to ±99 maximum. A positive value speeds up the clock, while a negative value slows it down. A 1ppm change represents about 2.6s in 30 days or about 1s every 11.5 days. The 99ppm maximum adjustment corresponds to 256s in 30 days or about 8.53s per day. The real-time clock runs continuously and its time can only be changed in Set mode. The seconds are reset to zero each time the hours or minutes are changed, allowing the clock to be easily synchronised with another clock. Note that only the clock is shown in run mode, not the ppm crystal correction value. In practice, it’s all very straightforward and is far less complicated than it sounds. A few minutes spent playing with the buttons will familiarise you with the way it works.

What’s remembered? If you don’t use the battery back-up, then the Remote Switch Timer will power off in a blackout or when you disconnect power. When power is restored, the timers will be at zero (showing dashes) and the clock will initially begin from zero (midnight). However, the cycle setting, backlight dimming level and crystal ppm correction value will all be restored to their values before power went off. By contrast, with battery back-up, the clock and timers will continue to run and their settings will not change. In addition, the last ON or OFF setting required for the remote mains socket will be remembered and re-sent after a 3s delay when power is restored.

the base of the case using the label’s self-adhesive backing. Dataflex and Datapol labels are available from www.blanklabels.com.au and sample sheets are available on request to test in your printer – see panel. Once the label is in position, the Remote Switch Timer PCB can be

38

MainsSwitchTimer1114 (MP 1st & SK).indd 38

attached to the rear of the lid using tapped spacers and M3 × 5mm machine screws. M3 × 9mm spacers are used for the UB1 box, while M3 × 12mm spacers are used for the polycarbonate case so the LCD module sits inside the clear lid (this eliminates the need for a display cutout).

Alternatively, if you are using a PCB front-panel with the UB1 box, it’s simply a matter of mounting the PCB on M3 × 9mm spacers. DC socket and battery holder An 8mm-diameter hole has to be drilled in the lefthand end of the

Everyday Practical Electronics, November 2015

16/09/2015 12:12

Constructional Project

Fig.5: when first powered up, the unit is in ON IN and OFF IN Once Only mode. The inverted commas indicate that the ON IN time can be set using the Hours and Minutes buttons.

Fig.6: the unit has been programmed here to turn on in 7.5 hours and off after 15 hours. Pressing the Set/Start button starts the timers.

Fig.7: pressing the On or Off button sets the initial on/off state of the remote mains socket.

Fig.8: different settings (or modes) are selected by pressing and holding down the Cycle button. ON/OFF-IN Repeat mode has been selected here.

Fig.9: the ON/OFF-AT mode. Both Once Only and Repeat settings are available.

Fig.10: the unit has been programmed here to turn on and off at set times.

Fig.11: pressing the next button after OFF AT has been selected lets you adjust the clock and set the time.

case for the panel-mount DC socket. This can then be fitted in position and the wiring leads connected (the other ends of these wires terminate in 2-way header socket CON3). Be sure to connect these leads to the correct terminals on the DC socket (check with a DMM if necessary).

As stated, the back-up battery is optional. If you wish to use it, it’s just a matter of connecting a 9V battery snap to CON5 and installing a 9V battery holder. Before soldering the battery snap leads, loop them through the adjacent strain relief holes. The holder can be secured to the base or to one side of the case using an M3 × 6mm machine screw and nut. Remote control PCB Before removing the remote’s PCB module, the remote control mains socket (either from Jaycar or Altronics; see parts list) should be set to operate as described in the instructions. This will familiarise you with the way the units works and allow you to set the channel number and test its operation. Once you’ve done that, the handheld remote can be disassembled. The Jaycar remote has one screw located beneath the battery cover and when removed, the two halves of the remote case can be cracked open along the sides with a screwdriver. By contrast, the Altronics remote has two screws under the battery compartment lid and removing these allows you to split the case. It’s then just a matter of removing the remote PCB and connecting the leads from CON1, CON2 and CON4. CON1 is wired across the ON contacts for the selected channel, CON2 across the OFF contacts and CON4 to the UHF remote’s supply rails. Figs.3 and 4 show the details. On the Jaycar remote, it will be necessary to scrape away the solder masking from the rear of the PCB before soldering the connections. Once all the wires are in place, fit a cable tie around the four switch wires to prevent them from pulling away from the PCB. It’s also a good idea to use neutral-cure silicone or hot melt glue to hold the wires in place. The remote PCB can now be mount­ed on the base of the case. Both the Jaycar and Altronics remotes have two holes that can be used as mounting points, although the Jaycar unit’s holes will need to be enlarged to 3mm. In each case, the unit can be mounted (copper side up) on 9mm tapped spacers and secured using M3 × 5mm machine screws. Once it’s in place, plug the various leads into the sockets on the back of the timer PCB and fasten the lid down. That’s it – the unit is ready for use. The full instructions on driving it are in the accompanying panel.

Everyday Practical Electronics, November 2015

MainsSwitchTimer1114 (MP 1st & SK).indd 39

39

16/09/2015 12:12

Part 10: Summing up

Percentage regulation =

Vol − V fl Vol

×100

20 − 18 Fig.10.1. Basic arrangement of a full-wave rectifier Percentage bridge regulation = ×100 = 10% 20 is inevitably imperfect, its secondary high-quality amplifier. Assume that output voltage will fall on-load and we would not be prepared to tolerate this will contribute to the sagging DC a voltage fall of more than 1V on each output voltage when a power supply is supply rail. We should thus plan for on-load. The voltage regulation of the a worst-case I × tdmax situation in which Vpk = C = max power transformer needs to be kept as 17V and V = 16V (in other words, a Vpk − Vtrtr low as possible and, for an amplifier maximum ripple voltage of 1Vpk). rated at more than 5W, should be less With a 50Hz supply, the value of tdmax than about 12%. The mains transformer would be 10ms and the maximum load also needs to be appropriately rated in current will be around 1A. Hence: terms of secondary voltage and secondary current. The authors recommend using 1×10 ×10−3 C= F = 10mF or 10,000µF a component that is rated in VA (volt17 − 16 amperes) at least double that of the output power of an amplifier. Thus, we would The reservoir capacitors should have a recommend a component rated at around maximum working voltage rating of at least 50VA for a 10W stereo (dual-channel) 50% more than the expected DC voltage audio system. It would be even better if and with a ripple current that is at least both amplifiers in a dual system had their 50% more than the maximum DC load own individual power supplies, but this current. Commonly available components is, of course, a more costly option since rated at 25V or 35V with a ripple current it will require the use of two separate rating of 2.5A would be suitable. power transformers. Dual-output power supply Reservoir capacitors Now let’s put this into context by looking The reservoir capacitors have the at the complete circuit of the dual-output important role of ‘holding up’ the output power supply that we designed for use voltage from the bridge rectifier. The with the high-quality 10W amplifier capacitors will charge on each peak of the described in last month’s Get Real. This secondary input voltage (during which circuit was designed with symmetrical the respective rectifier diodes will be outputs to supply a nominal ±15V at a conducting) and then retain this charge current of around 850mA, but in order when the secondary voltage falls (see to allow for some additional margin for Fig.10.1). The general rule of thumb is other Get Real modules, we uprated this Part Summing up rated in terms to 1.5A to provide a margin of about to use10: a capacitor, suitably of working voltage and ripple current, 500mA for a separate regulated supply. with a value that is as large as possible The complete circuit of the dual-output within the physical constraints of the power supply is shown in Fig.10.2. Vol − V fl board on which it is= mounted. A 50VA transformer (T1) provides two Percentage regulation ×100 It is possible to obtain Vol a rough ‘ball individual secondary windings, each park’ value of the capacitance required rated at 12V 2A. Full-wave rectification 1 by assuming that the capacitor has a is provided by a bridge rectifier rated at maximum discharge time equivalent to a continuous 50V, 2A. The DC output the time for one half-cycle of the mains from this arrangement is developed supply (recall that the bridge rectifier across C1 and C2, which act as the 20 − 18 is providing full-wave and Percentage regulation = rectification ×100 = 10% main reservoir capacitors for the two 20will be 100Hz, so the ‘ripple’ frequency symmetrical output voltage rails. not 50Hz). The recommended value of capacitor can then be estimated from the relationship:

C=

The unloaded DC output voltage from the power supply is approximately ±17V, but as explained earlier, on load this will fall by a volt or so to approximately ±16V. In addition, a separate regulated 9V supply is provided for other Get Real modules via a threeterminal voltage regulator, IC1. This regulated output is rated for a total load current of up to 500mA. Separate indicators are provided for each of the two voltage rails. Red LED (D1) indicates the presence of the positive nominal 15V supply, while a green LED (D2) indicates the presence of the nominal –15V supply. Fuses provide protection on the primary of the mains transformer (via F1 rated at 1A) and on the DC outputs (via F2 and F3, each rated at 2A). It should be noted that F1 should be a slow-blow (delay) fuse, while F2 and F3 are quick-blow types. The regulated output at 9V is short-circuit protected within IC1. Take care with the construction of the power supply because high AC voltages are present on the primary side of T1. It is also necessary to ensure that an earth connection is provided to the frame of T1 and also to the common 0V rail. Construction should be fairly straightforward and we used point-to-point wiring inside a lowcost ABS enclosure with the output voltages accessible via screw-terminal connectors. Components Resistors 2 1kΩ 0.5W (R1, R2) Capacitors 2 10,000µF 35V (C1, C2) 2 100nF (C3, C4) 1 220µF 35V (C5) Semiconductors 1 50V 2A bridge rectifier 1 Red LED (D1) 1 Green LED (D2) 1 7809 regulator (IC1) Miscellaneous 1 50VA transformer with two 12V 2A secondary windings 3 miniature fuse holders 2 2A quick blow fuses 1 1A slow-blow fuse

I max × tdmax Vpk − Vtr

Where Imax is the maximum load current, tdmax is the maximum discharge time, Vpk and Vtr are the peak and trough voltages 1×10 ×10−3(see Fig.10.1) and respectively C= F = 10mF or 10,000µF 17output − 16 the DC voltage (VDC) is simply the average of these two. Let’s take an example based on the reservoir capacitors that we might need for our 10W

Everyday Practical Electronics, November 2015

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 41

Fig.10.2. Complete circuit of our dual-output power supply

41

16/09/2015 10:53

Discover: Measurement, adjustment and fault finding In order to carry out simple tests and adjustments on linear circuits you will need to have access to a selection of basic test equipment, including a low-cost digital multi-meter and a means of generating and displaying signal waveforms. For checking power amplifiers it is also useful to have access to a power meter, but this is not essential as long as you can provide a suitably rated load (see EPE, July 2015). Real versus virtual test instruments In the March 2015 issue of EPE we discussed the use of software-based virtual test instruments where computer sound cards provide the analogueto-digital and digital-to-analogue conversion. As previously discussed, this approach has some limitations, but it is nonetheless cost-effective and offers an excellent starting point for people with a limited budget. Measuring voltage gain, frequency response, and examining distortion can all be easily done. However, meaningful distortion and noise measurements require more specialised (and consequently more expensive) test equipment. This can either be computer based with a dedicated external high-speed ADC and DAC or can make use of stand-alone instruments. Alternatively, good quality second-hand instruments are available from a number of suppliers, including several of our regular EPE advertisers. Distortion measurements (THD with or without noise) can be made using low-cost software (see Fig.10.4) but care is needed to ensure that indications are accurate. More accurate results

Fig.10.3. Virtual sound-card based test instruments provide a cost-effective method of carrying out basic tests and measurements on a wide range of linear circuits. Note how frequency, pk-pk and RMS values are calculated and automatically displayed on the virtual oscilloscope screen

interaction between adjustments it may be necessary to repeat the procedure several times for optimum results. At this point it’s worth mentioning that the circuit shown in Fig.10.6 uses a form of feedback that we’ve not previously discussed. This is known as ‘bootstrap feedback’ and its name arises from the fact that, when the voltage at the emitter of TR4 increases the feedback sends this back to produce a corresponding increase in the voltage at the base of TR2. Thus it can be said that the output stage ‘pulls itself up by the bootstraps’. Testing and adjustment Bootstrap feedback has the effect of Fig.10.6 shows various test, measurement raising the effective load resistance seen and adjustment points on a typical audio by the driver stage, TR1. As a result, the amplifier. A typical test procedure would voltage gain of the stage is increased involve first checking the positive and (recall that the voltage gain of a commonnegative supply rails and then performing emitter amplifier is directly proportional the symmetry and bias adjustment along to the value of collector load resistance, the lines discussed in Part 8 of Teach-In see page 41 of EPE, March 2015). It is also 2015. Note that, since there will be some worth noting that this type of feedback (which results in an increase in gain of the driver stage) is positive rather than negative, but there is no risk of oscillation as the overall voltage gain provided by the two cascaded emitter followers in the output stage will be less than 1. Fig.10.7 shows another common circuit arrangement which uses a more sophisticated method of deriving the output stage bias. In this arrangement it can often be useful to pre-set the bias voltage (to just less Fig.10.4. Virtins Multi Instrument software includes THD and noise measurement

42

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 42

are usually obtained with external PC-controlled signal sources and ADC converters rather than internal mass produced PC sound cards. If an internal sound card is to be used then this should be set for the highest (24-bit) resolution and a conversion rate of 96kHz, or more. Where reliable distortion measurements are required, measurements can be made using high-end analysis software such as Yoshimasa Electronics DSSF3 (see Fig.10.5).

Everyday Practical Electronics, November 2015

18/09/2015 11:01

exceed 0.6V, or so, the respective device conducts heavily and clamps the bias voltage. The symmetry (0V balance) and bias adjustment of this circuit is otherwise identical to that of the circuit shown in Fig.10.6. Waveform measurements Having checked the supply rails, bias and symmetry of a power amplifier, the next stage involves applying signals and checking gain, output power and distortion. All of these measurements will Fig.10.5. DSSF3’s THD analyser measuring the distortion require the use of a present on a 1kHz sinewave signal produced by a low-cost signal source and a PC sound card. Note the indicated THD of a little more than means of displaying 7% and the relatively high values of some of the high-order waveforms. A harmonic components sinewave signal can be derived from an audio frequency than 2.4V in this case) before making signal generator (either real or virtual) the bias and symmetry adjustments. or from a waveform generator. Note that The performance of this arrangement is the synthesised sinewave produced by a very similar to that of the output stage virtual signal source or from a waveform shown in Fig.10.6 but note that we have generator will not usually be as pure as a slightly reduced device count by using that available from a dedicated audio integrated Darlington pairs rather than frequency signal generator. Typical individual transistors. distortion figures (THD+noise) from a Fig.10.8 shows the typical arrangement waveform generator might be as high as of a 50W amplifier incorporating over2%, while that of a good quality lowcurrent protection. As explained in Part distortion audio signal generator will 9 of Teach-In 2015, TR3 and TR4 (NPN generally only be a tiny fraction of 1%. and PNP devices respectively) sense the Fig.10.9 shows typical waveforms voltage appearing across the output stage obtained at the output of a power emitter resistors. When these voltages

Fig.10.6. Adjustment and test points on a typical amplifier

Everyday Practical Electronics, November 2015

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 43

amplifier when on load and with a sinewave input. Fig.10.9a shows the undistorted output waveform, while Fig.10.9b shows the symmetrical clipping, which will occur when the amplifier is being over-driven. This waveform can also occur if both of the power rail voltages are abnormally low, indicating a fault in the power supply. Fig.10.9c and Fig.10.9d show waveforms that are clipped at their positive and negative extremes respectively. These waveforms usually result from incorrect symmetry adjustment, but this condition can usually be resolved fairly easily. The fault may also occur if one or other (but not both) of the power rail voltages is abnormally low. In such cases it will be necessary to check the negative supply voltage. Fig.10.9e arises when there is highfrequency oscillation superimposed on the output waveform. This may arise under certain load conditions and so it is worth checking the output when on and off load to see if the problem is sensitive to the load. A properly designed amplifier should not exhibit this fault condition. If the condition prevails it is also worth checking that screened cables are used at the input, that the screening is properly earthed, and that the input wiring is kept well away from the output wiring and cabling to the loudspeaker. In Fig.10.9f, the output signal shows bursts of oscillation that may occur at certain points on the output waveform. As with Fig.10.9e, this indicates a problem with the stability of the amplifier at high frequencies and may also be affected by load conditions. Once again, this is a condition that should not arise in a properly designed amplifier (see Teach-In 2015 Part 9). Fig.10.9g shows, on a slightly different time scale, the effect of inadequate reservoir/smoothing in the power supply. The unwanted ripple on the supply rails will appear as a 100Hz buzz in a loudspeaker. Note that this is not the same as 50Hz hum that might be introduced due to inadequate screening or earthing at the input. If the problem is persistent it might be worth investigating and/or upgrading the reservoir capacitors in the DC power supply. Finally, the semiconductor devices used in the output stage of a power amplifier are prone to failure due to the relatively high voltages and currents at which they operate. When one or more of the supply fuses blow it is important to check both output transistors for short circuits between collector and emitter. A useful clue as to what has been happening in the output stage can be obtained by examining the emitter resistors. If these are running very hot (or if they show signs of burning) this usually indicates a failed device. If you do need to replace one or both of the output transistors it can also be worth replacing the emitter resistors at the same time. Following replacement it will also be necessary to carry out

43

16/09/2015 10:54

Fig.10.7. Bias adjustment based on a VBE multiplier the bias and symmetry adjustments, as described earlier. If the correct bias cannot be obtained and the emitter resistors continue to run hot then this may indicate a fault in the driver stage.

Get Real: Testing the highperformance 10W audio power amplifier Our final Get Real project was designed to satisfy the need for a simple, low-cost power amplifier that can be used with the other modules in this series to realise a complete modular audio system. Our aim was that of providing a simple design that could outperform comparable designs based on integrated circuits with a total build-cost of well under £10 (excluding the printed circuit board). We carried out some detailed tests and measurements both at the simulation, pre-prototype and final prototype stages. Table 10.1 summarises the more important results and shows how closely we came to meeting the original design specification.

and Stop frequencies at 1Hz and 100kHz respectively and that the High and Low display settings have been set to 30dB and 0dB respectively. Fig.10.11 shows the frequency response graph obtained from the settings shown in Fig.10.10. The response is substantially flat and extends from below 10Hz to around 20kHz. We measured the frequency response of the final prototype in a test lab and the resulting response curve is shown in Fig.10.12. Note how this agrees very closely with the predicted and simulated frequency response. Distortion At the outset we were very keen to ensure that the amplifier produced negligible distortion at maximum rated power. On

Fig.10.9. Typical waveforms with various fault conditions present test, the total harmonic distortion (THD) was found to be 0.4% at rated output and better than 0.5% for power levels ranging from 1W to 12W (measured with a 4Ω load at 1kHz). This was not quite as good a result as that obtained with our pre-prototype version which, with careful adjustment, was capable of producing a mere 0.05% THD at rated output. However, in comparison with modern integrated circuit class-AB amplifiers, the performance was felt to be reasonably good and very much less than STA450, TDA2004 and the ever-popular

Voltage gain The voltage gain was measured at 1kHz and was slightly more than 20dB (equivalent to a voltage gain of 10). This was exactly as required and agreed with the value obtained by simulation. Frequency response Fig.10.10 shows the Tina Design Suite settings used to measure the frequency response of the simulated version of the 10W amplifier. Note that we set the Start

44

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 44

Fig.10.8. A 50W amplifier with over-current protection

Everyday Practical Electronics, November 2015

18/09/2015 11:01

Table 10.1. Summary of design and actual measured parameters for the high-quality 10W audio amplifier

Parameter

Design specification

Simulated performance

Measured performance (test lab)

Voltage gain

10 (approx.)

10.5

10

Frequency response

Better than 10Hz to 20kHz at –1dB

3Hz to 30kHz at –3dB

5Hz to 35kHz at -3dB

Input impedance

50kΩ (approx.)

88kΩ

75kΩ

Output power

10W into 4Ω at 1kHz at less than 1% THD

10W into 4Ω at 1kHz

10W into 4Ω at 1kHz at less than 1% THD

Phase shift

0° at 1kHz

0° at 1kHz

0° at 1kHz

Distortion

Better than 0.5% THD at 5W output into 4Ω

Not measured

0.4% THD at 10W output into 4Ω

Supply

50mA (no signal), 1A (max.) with nominal ±15V DC supply

65mA (no signal) rising to 849mA with 10W output at 1kHz into 4Ω

53mA (no signal) rising to 850mA with 10W output at 1kHz into 4Ω

Fig.10.10. Tina Design Suite settings for measuring the frequency response of the 10W amplifier TDA2003 chip. When operating from a 14.4V supply, this latter device will produce 6W in a 4Ω load and10W into 2Ω, but at a rather worrying THD of 10%.

Fig.10.11. Frequency response graph obtained from the free air circulation. settings shown in Fig.10.10 The results of these tests are shown in Fig.10.13.

Thermal considerations We carried out a number of thermal checks on our design with the 8.3°C/W heatsinks specified. At a sustained 10W output into a 4Ω load and at an ambient temperature of 20°C the heatsink surface temperature in the immediate proximity of TR6 and TR8 reached 65°C after 20 minutes of operation. At a sustained 5W output and at an ambient temperature of 20°C the heatsink temperature measured at the same point reached 46°C after 20 minutes operation. With only 1W continuous output the heatsink temperature failed to reach 30°C with just

Conclusion The tests on our high-quality 10W amplifier bring Teach-In 2015 to a conclusion. We very much hope that you’ve enjoyed the series and that you managed to find time to build and test some of our Get Real projects. If you did, you should have gained a basic

Fig.10.13. Results of the thermal measurements (the tests were carried out with the amplifier placed in the open air with free-air circulation and at an ambient temperature of 20°C)

Fig.10.12. Measured frequency response of the 10W amplifier

Everyday Practical Electronics, November 2015

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 45

understanding of analogue circuits and how to use modelling and simulation to optimise your own circuit designs. Analogue electronics is fascinating and there’s a whole world of ‘linear’ out there waiting for you to explore!

45

16/09/2015 10:54

Teach-In 2015 index A Accuracy Active filter Amplifier Attenuation

2.37 5.40 1.39, 1.40 3.39

B Bandwidth 2.37 Bias adjustment 8.41 Bias 1.41, 8.40, 8.41 Bipolar junction transistor 1.37, 1.38, 2.39 Bridge configuration 8.42 Buffer memory 2.37 C Class A Class of operation Clipping Common base Common collector Common emitter Common rail Complementary amplifier Complementary pair Compound feedback pair Constant current source Constant voltage source Coupling CR filter Cross-over distortion Cross-over network Current gain 1.40, Current mirror Current source D Damped oscillation Darlington transistor Datasheets DC analysis Decibels Differential amplifier Digital storage scope Direct coupled amplifier Dissipation Distortion Distortion measurement

1.41, 3.37 3.36, 3.37 4.37, 4.39 1.40 1.40 1.40, 1.41 1.40 3.38 8.39 8.40 6.38 6.38 1.44 5.39 3.42 9.38 3.37, 3.39 7.43 6.38

1.37, 1.44, 7.43, 2.36, 4.36,

4.41 8.39 1.38 2.41 3.39 7.44 6.41 1.39 7.40 5.43 4.39

E Efficiency Emitter follower

3.37 8.39, 9.39

F Feedback Filters

8.36, 8.37 5.39

First-order filter Frequency response

G Gain Gain control H Harmonics Headphone amplifier Headphones Heat sink Heat High-pass filter Hybrid parameters

5.39, 1.41, 3.41, 5.41,

5.40 2.43 4.41, 6.40

1.39, 3.39 8.38

3.40, 7.40, 5.39, 1.40,

4.36 4.41 3.41 7.42 7.40 5.40 2.39

I Impedance Impulse noise Input characteristic Input resistance

1.40 5.42 2.39 1.38, 2.41

L Linearity Load Loudspeaker equivalent Loudspeakers Low-pass filter

1.39 6.37 9.37 9.36 5.39, 5.40

N Negative feedback 3.39, 8.36, 8.37 Netlist 1.42 Noise 4.36, 5.41, 5.42 Noise source 5.43 Non-linear distortion 4.37 Non-linearity 4.37 NPN transistor 1.37 O Output characteristic Output configuration Output network Output power Output resistance Output stages Over-current protection

2.39 8.42 9.39 6.36 1.39 3.37 9.39

P Parasitic oscillation 4.39 Passband 5.40 Passive filter 5.39, 5.40 Phase shift 1.41 Phase splitter 7.43, 7.44 PNP transistor 1.37 Positive feedback 8.36, 8.37 Power amplifier 9.40, 9.41, 9.42, 9.43 Power meter 6.36, 6.37

Pre-amplifier

1.44, 2.41, 2.42

Q Quasi complementary

8.41

R Resolution

2.37

S Sallen-Key filter Sampling rate Second-order filter Sensitivity Series current feedback Short-circuit protection Shot noise Shunt voltage feedback Signal-to-noise ratio Siklai pair Sinewave testing Sound card scope Sound pressure level Source impedance Spectrum analysis SPICE Square wave testing Square waves Stability Symbols Symmetry Symmetry adjustment

5.40, 5.41 2.36 5.41 3.40 2.43, 8.38 9.39 5.42 8.38 5.42 8.40 4.38 2.38, 2.44 3.40 2.42 4.39 1.42 4.40 4.37 9.38 1.37 8.40 8.41

T Temperature 7.40, 9.39 Thermal noise 5.41 Thermal protection 9.39 Thermal resistance 7.41 Tina Design Suite 1.43, 2.41 Tone control 5.44, 6.39 Total harmonic distortion 4.37, 4.38 Transfer characteristic 1.42, 2.39, 4.37 Transistor configuration 1.40 Transistors 1.37 Tweeter 9.37 V Virtual instruments 2.36 Virtual test equipment 4.39 Voice coil 9.36, 9.37 Voltage gain 1.39, 2.41, 3.39 Voltage source 6.38 VU-meter 7.44, 7.45 W Woofer

9.37

Z Zener diode Zobel network

6.39 9.37, 9.38

Looking to advertise? Contact Stewart Kearn on: 01202 880299 or email [emailprotected]

46

Teach-In Part 10 (MP 1st, MT & MK) - NOV 2015.indd 46

Everyday Practical Electronics, November 2015

18/09/2015 11:01

Essential PIC Development Tools ®

• First Compiler for PIC® MCUs since 1995 • Powerful, Professional & Easy to Use • Over 90,000 Compilers Sold Easy-to-Use Libraries & Built-in Functions:  USB, TCP/IP, RS-232/485. MODBus, CANBus, LINBus  SPI, I2C, SD Cards, ADC, DAC, Capacitive Touch  Serial EEPROMs, Flash, Real-time Clocks, XTEA  DCI, PSP, QEI, CRC, PID, Comparators, Watchdog  PWM, CRCP, LCDs, RFID, Timers, Precision Delays  Interrupts, Real Time Operating System (RTOS)  100+ Example Programs

• Optimized for Rapid PIC® Development • Tested Built-in Functions • Easy Code Portability between devices

SALE! Limited Time Only Add on an ICD-U40 Programmer/Debugger & Proto Board for FREE when purchasing any IDE Compiler! Find these items in the Hobbyist corner!

www.ccsinfo.com/hobbyist

Power Wizards for Rapid Development:  Both PIC Hardware and External Peripherals  USB, TCP/IP, MODBUS, CANBUS, RS-232  Bootloaders & Digital Filtering

C-Aware IDE Features - Source formatting - Project notes - Project time accounting - Source code history - File compare - Flow chart drawing tool - Spell check

- Automatic document generation - File encryption support - Easy project packaging & copy function - Data file to C data converter

IDE’s Explorer shows full relationship between functions, locals, globals, files and defines with full cross-referencing. IDE shows a graphical call tree, a full memory allocation map and numerous complexity metrics.

Offer cannot be combined with any other offers or rebates. Valid on PCW, PCWH, PCWHD & PCDIDE Compilers. Offer expires on 11/30/15

Use Discount Code:

ICD818

NEW in 2015 Bluetooth® Library linking to tablets & Smartphones using a free generic app on the device controlled by program on the PIC® PIC24 Graphic Display/Touch Screen Library with PC Design Tool

dsPIC33 Audio Wizard with easy DSP Filter setup C Educational Resources

Download FREE 45 Day Demo! www.ccsinfo.com/EPE1115 PIC® MCU, MPLAB® IDE, MPLAB® ICD2, MPLAB® ICD3 and dsPIC® are registered trademarks of Microchip Technology Inc. in the U.S. and other countries

[emailprotected] (262) 522-6500 X35

CCS 2015.indd FinalInfo withNOV correct specs.indd1 1

www.ccsinfo.com

16/09/2015 10:09 9/14/2015 10:03:32 AM

Fifty shades of grey icons

W

ELCOME to this month’s Net Work, the column that keeps readers posted with current online trends in Internet and associated networking technologies. Last month, I focussed on July’s launch of Windows 10, Microsoft’s latest effort to dominate the desktop, and it was not long before I found myself helping a new Windows 10 Internet user who was now struggling with email problems. The ‘Get Windows 10’ popup having done its job, the computer owner had taken the plunge and updated their Windows 7 PC accordingly. This gave me an early opportunity to get to grips with Microsoft’s latest user interface and web browser in the field – albeit under a certain degree of duress! I duly logged in remotely to my first Windows 10 desktop. To its credit, Microsoft Windows 10’s designers have done a very fair job of shoe-horning it onto the PC, but among other problems it was found that Office Outlook would no longer send email. However, the system could receive POP3 mail as normal and the new Edge web browser surfed the net, which proved that the LAN was running and the PC could reach out onto the Internet. Looking around, I was again struck by how flat and featureless the design of Windows 10 is compared to Windows 7. The UI has evolved from the Windows 8 ‘Metro’ touch-screen style of coloured tiles that casual users seem to crave: presumably all they want to do is flick around Facebook, post a few photos, send the odd email or run an app or two. Power users, who intuitively want to dig deeper, will find some aspects of Windows 10 a hindrance. I disliked the flat, over-simplified gif-style UI spawned by current trends, and I particularly struggled with Windows 10’s navigation: too many isolated, borderless icons in various shade of light grey dotted around, which only

change colour when you ‘mouse’ over them. There were no visual cues like 3D buttons, drop shadows or recognisable slider controls to be seen – just coloured rectangles, all jostling for space with those poorly-contrasting ‘Minimise’ or ‘Close’ grey icons dotted around that do anything but jump out at you. I found myself casting around for buttons that were ghosted against the glaring white screen. Back to the email problem: the failure of outgoing mail suggested that Outlook’s SMTP settings should be checked first. Email authentication was also examined to confirm mail was being submitted to port 587 as it should be. This form of ID check, with a username and login, ensures that legitimate users of a domain name can submit email to their corresponding mail server, and that spammers cannot impersonate the domain as the sender. For some reason, I found the port settings had defaulted to port 25, which is blocked by many hosts. This was corrected to port 587 and with the authentication settings also enabled everything now checked out ‘on paper’ – but email was stubbornly stuck in the Out tray and it refused to budge! Next up was the antivirus package, AVG 2015, which has a plethora of mail scanning options and it too was found to be scanning outbound mail on port 25 by default. This was reverted to 587, but mail still would not go. Rather nervously, disabling AVG altogether for a minute made no difference either and outgoing mail was still stuck in the Out tray. This was turning into a very puzzling problem, and being confronted with a new user interface did not help.

Command prompt An IT tech support agent then suggested that Windows 10 might be the culprit (!), and it was recommended that System File Checker (SFC) was run, so I would be using Windows 10 ‘in anger’ for the first time. A seasoned Windows user would type cmd in Search or go Start/Run/ cmd to open a familiar DOS box (command prompt) and run SFC that way, but there would be no such luck in this Windows 10 setup. With pressure mounting, the only way it seemed was to use the Windows 10 ‘Search’ function to look for cmd and a minute elapsed while the disk was scanned. Then some bland Windows 10 tiles opened up, referencing cmd, but which I found virtually impossible to comprehend. I decided to search for cmd.exe my way, by finding the System 32 folder in Windows and (right-click) Run as Administrator followed by >sfc/scannow from the command prompt. With scanning finally under Windows 10 builds on Windows 8 and has a flat two-dimensional style that some Windows way, I left the PC to clatter away to itself for a while. PC users may find a hindrance

48

Network (MP 1st & AW) - New layout.indd 48

Everyday Practical Electronics, November 2015

16/09/2015 10:38

Mailbird is a well-regarded, standalone email program with a modern 2D interface. The software can be colour-themed and the menu bar (left-hand side) rotated

The minimalist folder view in Mailbird typifies the style of present-generation software After scanning the Windows 10 file system, nothing apparently untoward was found, but then I remembered the advice to close and re-open Outlook, and – lo and behold – outbound mail suddenly went on its way and the problem was resolved! Whatever was wrong with the Windows 10 setup had been cured, so some quick email tests followed and everything was well once again. Many will cite operating system problems like these as good reasons to migrate email to the cloud, and foist email management onto someone else. However, many experienced Internet users still prefer to manage email for themselves, but finding a non-Office Outlook email program for everyday use is becoming a major headache. Windows Live Mail (Windows 7 or higher) is a candidate but the list of other contenders is quite short, and traditionalists will face a culture shock when confronted by the latest generations of email and cloud applications that all use the minimal UI style first seen in Google apps and touch screens. A modern email PC program such as Mailbird is one of a better breed of programs notable for a range of plugins (Dropbox, Whatsapp, Twitter, Facebook, Evernote and more) which considerably increases its versatility. It has the same flat style that many seasoned users will probably find lacking. A free version of Mailbird can be downloaded from www.getmailbird.com and the Pro demo times out after 30 days. As Microsoft and Adobe users know all too well, software subscription models are now all the rage and for those wanting to upgrade from the free edition Mailbird Pro costs $12 a year or $45 for a lifetime once-only charge. How do you manage your email in today’s cloud-driven world? Drop me a line at the usual address and share your experiences and recommendations with other readers. An inside job? In the September issue I described some phone line and broadband problems that might have struck a chord with British Telecom (BT) customers. I had gone through a phase of various line faults and outages lasting several months

Everyday Practical Electronics, November 2015

Network (MP 1st & AW) - New layout.indd 49

when BT Openreach, the telecom contractor, installed some phone lines for a construction site nearby. Local residential users, including the writer, were plagued by crossed lines, no dial tone, no broadband and various permutations of all three. As fast as one fault was fixed it seemed another one was introduced by BT Openreach engineers, who stuck doggedly to the mantra that faults should be reported and it will take up to five days to fix them. Even when they had just disconnected my line in error (which I ‘reported’ by shouting to the likely-looking culprit found working up a telegraph pole nearby), I had to start the fault-reporting process all over again and thus the pantomime continued until normal service was eventually restored after many weeks of disruption. These telephone and VDSL problems resulted in several fraught calls being made to BT’s overseas call centres, where phone faults like these are handled. Soon afterwards, I started to receive a multitude of international phone calls in quick succession. An associate in the same town who had likewise reported broadband faults to BT was having the same experience – overseas calls were now being received on a private telephone line from people reading off a script who claimed to be ‘Microsoft Windows’ or who wanted to talk about my ‘BT Internet’ connection. Of course, I knew this was a scam, but others have been stung by these fraudsters, who try to tap remotely into your PC and create a string of bogus faults or error messages. They then extort hard cash out of their hapless victims to fix these non-existent faults. The crooks mercilessly target vulnerable or elderly computer users and I can well imagine innocent people falling for these con tricks. By now I was receiving several such calls every day. At the same time, the Daily Mail columnist Dominic Lawson wrote that, soon after reporting a problem with his BT broadband via the BT overseas call centre, he was contacted multiple times by overseas fraudsters claiming he had a broadband problem and offering to log in and fix them. The implication was that BT phone numbers were maybe leaking out from BT overseas call centres and into the hands of crooks. This seemed too much of a coincidence and so I took the matter up with BT Security. I handed over my account details with a list of some suspicious international phone numbers that had called me repeatedly. BT Security analysed my account activity and spreadsheets of incoming calls were then produced. The possibility of having, as BT put it, ‘one bad apple’ at their call centre could not be ruled out and the potential risk of legitimate UK phone numbers finding their ways into the hands of criminals this way has not yet been eliminated. At the time of writing, BT stated that certain overseas call centre agents were currently being interviewed as part of their enquiries and the investigation was ongoing. Meantime, innocent people are still receiving these bogus calls even today, so ensure you spread the word and warn friends and family to be on their guard against these scammers. Dangerous deliveries Next, a timely reminder about the real risks faced by those buying or selling items via the Internet. The ubiquitous eBay is the first port of call for those wanting to trade via the web, and the usually positive experience is fuelled by eBay’s relentless drive to ensure vendors work hard to earn their 5-star detailed seller ratings. Buying at arm’s length can be fine for many items, but the combination of eBay and PayPal fees, the high cost of postage or the need to handle valuable goods or dispose of (say) bulky furniture locally has given rise to rival online outlets, including classified ad site Gumtree, at (www. gumtree.com). This service continues to evolve and offers a more relaxed approach than eBay, with private sellers listing goods for free. It is a basic way of putting local people in touch with each other, and apart from hard goods, Gumtree also offers jobs, property and more for sale. Another method of trading is to find a local Facebook group, as there is a fair chance one exists near your town or village. Again, listing items for sale is free.

49

16/09/2015 10:38

Classified ad sites present their own real-world security risks, including the fact that potential buyers can remain semi-anonymous. One-to-one ‘classified’ cash transactions like these pose plenty of personal risks, and a lot of common sense should be exercised by users, especially if handling attractive goods such as iPhones or MacBooks. To cite some recent criminal cases, an unsuspecting user reportedly downloaded a job application from Gumtree, but it was claimed the document contained a virus that captured her bank login details: a popup window required the user to change her password, which she did, after which the laptop locked up and thieves proceeded to log in remotely and empty her bank account. Something more sinister befell an innocent Gumtree user who sought to buy an iPhone being advertised locally for over £400. He was reportedly tricked into driving to what turned out to be a campsite, where the seller was waiting for him and he was nearly robbed of all the cash. Realising it was a stitch-up, he managed to escape in his car barely in the nick of time. The reverse situation has also happened, with sellers of desirable goods being robbed at knifepoint by ‘buyers’ who turn up on spec, and there has been at least one report of a fatal attack when a seller was robbed of a valuable laptop. Thus, the modern-day web has brought with it some old-world dangers, and traders need to be vigilant and exercise everyday caution and common sense in their dealings even more. Next month, I’ll look at enhancing home security in the form of installing an IP camera, together with a neat idea that turns a flat-screen HDMI TV or PC monitor into a useful, Android-based Wi-Fi computer. You can email the author at: [emailprotected]

PICOSCOPE 3000 SERIES

Up to 200 MHz analog bandwidth Deep buffer memory up to 512 MS MSO models with 16 digital channels 2 or 4 analog channels 1 GS/s real-time sampling

Programmable Electronics Upgrade your Programmable Electronics to the Next Generation with

TinyDuino

As powerful as the Arduino Uno but smaller than a 2 pence coin.

All the power of the Arduino in a fraction of the space, great for building intelligence in to your projects. Complete with a wide and growing range of TinyShields - where will your next project take you? Move up to the Next Generation! Fantastic for schools especially D&T and Computing, meets the new requirements As an authorised reseller with an educational and training focus we can support all aspects of this outstanding piece of kit! Get yours today via our eShop

www.eshop.icsat.co.uk

50

Network (MP 1st & AW) - New layout.indd 50

Includes serial bus decoding and analysis (CAN, LIN, RS232, I2C, I2S, SPI, FlexRay), segmented memory, mask testing, spectrum analysis, and software development kit (SDK) all as standard, with free software updates and five years warranty.

www.picotech.com/PS445 Everyday Practical Electronics, November 2015

18/09/2015 14:11

Circuit diagrams and symbols

E

Robert Penfold looks at the Techniques of Actually Doing it!

Practically Speaking

VERY published electronic project comes complete with a circuit diagram. It is not actually essential to have a circuit diagram if full details for constructing the device are provided, and neither is it necessary to have the ability to follow one. Being realistic about things though, the ability to read a circuit diagram is something that any electronics enthusiast should strive to master sooner rather than later. It is a prerequisite for understanding how circuits work. Also, the circuit diagram is usually the first port of call if some aspect of the electronic side of construction is unclear, or does not seem to be quite right. Some cross checking here will usually clarify matters. Eventually, most constructors tend to ‘do their own thing’, and rely less on the construction information provided in articles. In some cases there will be no construction details to rely on. There are numerous circuits published in magazines, books, and on the Internet, with no construction information at all. Before too long, most constructors try to build some of these. The ability to understand circuit diagrams then becomes essential rather than an optional extra. Symbolism Learning to read a circuit diagram is not particularly difficult, and the obvious starting point is to learn the more common circuit symbols. A selection of circuit symbols and the names of the components

that they represent are shown in Fig.1. With anything that involves symbols, it is as well to bear in mind that there are likely to be stylistic differences from one source to another. While most of the symbols in published circuits will not be exact matches for those shown in Fig.1, for the most part they will closely resemble them. The rectangular resistor symbols are the ‘proper’ ones, but are not universally accepted. Although they are not the current British standard, the old zigzag symbols are still used a great deal in the UK. The zigzag symbols are, of course, used for the circuit diagrams in EPE. Both sets of resistor symbols are included in Fig.1. There was once a move towards using the rectangular symbol for any component having two leads. The letter in the marking beside the symbol indicated the type of component that the symbol represented. As a couple of examples, ‘R2’ would be a resistor, and ‘L3’ would be an inductor. This system made it easy to produce circuit diagrams using the crude computer based drawing systems of the time, but it also made circuit diagrams relatively difficult to read. This method has been largely phased out, but you could still encounter circuit diagrams of this type. In fact, you are almost certain to encounter them if you search the Internet for circuits. Circuits published on the Internet can be a bit difficult to interpret, because there seems to be no international standard for

Fig.1. Circuit symbols for a wide range of components – bear in mind that there will be stylistic differences in real-world circuit diagrams, in addition to some variations from one country to another

52

Practically Speaking - New layout.indd 42

Everyday Practical Electronics, November 2015

16/09/2015 10:31

Table 1: Component identification letters Letter(s) Component

B Battery BY Battery C Capacitor (any fixed value type) CH Chassis Cathode ray tube CRT CSR Thyristor or triac (controlled silicon rectifier) D Diode (any type, including rectifiers, photodiodes, and LEDs) E Earth FL Filter (usually a ceramic, crystal, or mechanical type) Fuse FS JK Jack socket (any type) IC Integrated circuit (also U) Intermediate frequency transformer IFT L Inductor LP Lamp (neon or filament, but not LED) LS Loudspeaker M Motor Meter ME Mic Microphone Photo conductive cell (a photoresistor such as a cadmium sulphide cell) PCC PL Plug (any type) Q Transistor (also Tr) R Resistor (fixed value) RL Relay (coil or contacts) Potentiometer or variable resistor RV S Switch Socket (any type, but JK is often used for jack types) SK SW Switch Transformer (any type including RF) T TC Trimmer capacitor (preset variable capacitor) Th Thermistor TL Earphone or headphones Transistor (also Q) Tr TR Transistor Integrated circuit (also IC) U Valve (any type except CRT) V VC Variable capacitor Variable resistor or potentiometer VR WD Warning device (buzzer, bell) X Crystal circuit symbols. In most cases, the symbols are the same or quite close to the British standards and there are no problems. In American circuits, for example, a capacitor has one straight line and one curved line instead of two straight lines. With electrolytic and other polarised capacitors the curved line can be used to indicate the ‘–’ terminal. Polarised capacitors normally have ‘+’ and/or ‘–’ markings included on circuit diagrams, which should help

to avoid confusion. Anyway, whichever type of symbol is used, a capacitor is still very obviously a capacitor, and where appropriate, the polarity should not be in doubt. In the world of semiconductors, there can be marked differences in the symbols from one country to another. This can be something simple such as a circle added around a diode symbol, or the circle being omitted from a transistor symbol. In other cases, the differences might be more radical. The

Everyday Practical Electronics, November 2015

Practically Speaking - New layout.indd 43

obvious way around the problem is to look at the component number, and rely on the letter or letters in the component number to tell you the type of component. This can also be useful when first learning to read circuit diagrams. The component numbers should come to the rescue if you forget what component one of the symbols represents. Table 1 is a list of component identification letters for all the common components. With some components there is more than one method of identification in common use. In particular, there are three common methods of marking transistor symbols. In the UK, the component number is usually preceded by ‘TR’ or ‘Tr’, but elsewhere the letter ‘Q’ is often used. A component identification number for a semiconductor is followed by a type number rather than a value. If all else fails, looking up the semiconductor type number in a catalogue or on the Internet should make it clear whether the device in question is a transistor, triac, thyristor, or whatever. Similarly, if a component value is given as (say) ‘470pF’, its value is in picofarads and it must be a capacitor. No integrated circuit symbol is included in Fig.1, but the vast majority of these are simply represented by a rectangle, labelled with a pin number at each point where a lead emanates from the rectangle. Some integrated circuits have special circuit symbols, and this mainly applies to the basic logic types. Fig.2 shows the special integrated circuit symbols. With the simpler logic elements there can be more than one element per integrated circuit. If, for example, IC1 has four sections, these would be labelled as IC1a, IC1b, IC1c and IC1d on the circuit diagram. Amplifiers are represented by a triangle, and in the case of operational amplifiers (op amps) the two inputs are identified by ‘+’ (non-inverting) and ‘–’ (inverting) signs. Crossing the line Thin lines are used to represent the connections from one component to the next. Connections often run

53

16/09/2015 10:32

Fig.2. Most integrated circuits are simply represented by a rectangle, but amplifiers and basic logic elements have special symbols. It should be noted that there are often two or more gates/inverters per device, and that several of the relevant symbols might be needed in order to fully represent one integrated circuit from component to component, perhaps connecting more than a dozen components together. The supply lines are the best example of this, and in a typical circuit most of the components will connect to at least one of the supply rails. There is no real problem in representing complex wiring on circuit diagrams, but in most cases there is no way of avoiding some lines crossing other lines. To avoid confusion, a dot is used where two lines meet and join, and no dot is used where lines cross without any connection being made. Many years ago the convention was to have one wire loop over the other at points where there were crossovers with no connections. You might still encounter this method, but it is no longer part of the UK standard. The dummy circuit of Fig.3 helps to explain how things operate. In some countries the power rails are not included on circuits. Instead, relevant lines are terminated in arrowheads, and labels are used to indicate which supply rail each line connects to.

diagram into a working project is less straightforward. First you need to know how each terminal of a component on the circuit diagram equates to its real world counterpart. This should not be too difficult for someone who has some experience of building electronic projects, and is reasonably familiar with the common components. Resistors and non-polarised capacitors have only two terminals, and it does not matter which way around they are connected. Polarised capacitors such as electrolytic types must be connected the right way around. The positive terminal is usually marked with a plus sign on circuits, and the polarity is marked with plus and (or) minus signs on the actual components, so there is no excuse for getting it wrong. Transistors come in a variety of shapes and sizes, and devices that have the same encapsulation do not necessarily have the same leadout configuration. Consequently, it is only possible to identify the terminals of an unfamiliar device with the aid of the relevant leadout diagram. Electronic component catalogues usually have a section that provides leadout details for all the stocked devices. There is a vast amount of semiconductor data available on the Internet, and any of the popular search engines will almost instantly locate details for practically any transistor. Remember that convention is for transistor leadout diagrams to be base views. In other words, they show devices viewed looking at the side from which the leads emanate. Most of the integrated circuits used in electronic projects have DIL (dual inline) encapsulations, and the pin numbering always runs counter clockwise from pin 1 (Fig.4). It does not matter whether a DIL component has 4 pins, 40 pins, or anything in between: the basic numbering system is the same. Pin 1 can be indicated by a notch at

Theory into practice With a little practice it is easy to see how everything is joined together on a circuit diagram, but translating a circuit Fig.4. The three methods of indicating the position of pin 1 on a DIL integrated circuit. In practice, it is common for a chip to have two or even all three of these methods used the appropriate end of the encapsulation, a dot or a bar next to pin 1, or any combination of these. With devices that have something other than a DIL encapsulation it is necessary to resort to component catalogues or the Internet to pair pin numbers on the circuit diagram with pins on the actual component. Bear in mind that the convention for integrated circuit pin diagrams is for the components to be shown from above. In other words, the devices are shown with the pins pointing away from you, which is the opposite of the convention for transistors leadout diagrams. Even where a device has a transistor-style case and leadout wires, unless stated otherwise, the leadout diagram should be regarded as a top view. Fig.3. A dot is used to indicate that two intersecting wires are connected together. The absence of a dot, or one wire looping over another, indicates that the wires cross without any connection being made

54

Practically Speaking - New layout.indd 44

Potentiometers Fig.5 shows how the potentiometer circuit symbol relates to a rotary potentiometer, and identifies

Everyday Practical Electronics, November 2015

16/09/2015 10:32

the clockwise (CW) and counter clockwise terminals. This operates as one would probably expect, which is not always the case with the slider type. With these it is necessary to refer to the manufacturer’s data, or to make some resistance checks using a multimeter. One slightly awkward aspect when using a potentiometer is determining which way around the two track terminals should be connected. Sometimes ‘CW’ and ‘CCW’ markings are included on circuit diagrams, but without these there is no easy way of telling the correct method of connection. In the case of any sort of volume or level control, the CCW tag connects to the earth rail and the input signal is fed to the CW terminal. In other applications it is necessary to have some technical knowledge, or to use the ‘suck it and see’ method. The control will work ‘backwards’ if the track connections are the wrong way around. Switches, sockets, and relays are relatively simple components, but it as well not to jump to conclusions when wiring them into a circuit. The obvious method of connection is not necessarily the right one. Some of these components have pin numbers or other useful connection

Fig.5. Rear view of rotary potentiometers identifying the three tags. If one terminal of a potentiometer connects to the earth rail, it is almost certain to be the counter-clockwise (CCW) terminal information marked on the component itself. It is otherwise a matter of referring to the manufacturer’s or retailer’s literature for guidance, or simply make some continuity checks with a multimeter in order to sort things out.

Check out our website: www.epemag.com CRICKLEWOOD ELECTRONICS Established 1981

Frustrated with your supplier? suppier? Visit our component packed website for a vast range of parts - old and new, many unavailable elsewhere! www.cricklewoodelectronics.com 1000’s OF PRICES REDUCED! 1000

JTAG Connector Plugs Directly into PCB!! No Header!

Alternatively phone us on 020 8452 0161 with your requirements.

No Brainer!

Our patented range of Plug-of-Nails™ spring-pin cables plug directly into a tiny footprint of pads and locating holes in your PCB, eliminating the need for a mating header. Save Cost & Space on Every PCB!! Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More

www.PlugOfNails.com

Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)

Visit our Shop, Call or Buy online at:

www.cricklewoodelectronics.com

020 8452 0161

Visit our shop at: 40-42 Cricklewood Broadway London NW2 3ET

Everyday Practical Electronics, November 2015 55

Practically Speaking - New layout.indd 45

16/09/2015 10:32

Circuit Surgery Regular Clinic

by Ian Bell

Analogue switches – Part 1

U

SER cjay posted the following question on the EPE Chat Zone forum: ‘This may be a long shot… but does anyone know a source for a tiny SOT363 analogue SPDT IC called ‘BL1551’? I have a transceiver that uses them for audio path switching and one has gone faulty. So far, the manufacturer has been unresponsive when asked for spares and I can only find them in China on AliExpress, which steadfastly refuses to let me open an account; a European source would be most useful. I’m sure there will be equivalents out there.’ The usefulness of the forum (and helpfulness of its contributors) was illustrated by a quick reply from user gordon suggesting the TS5A3159DBVR and cjay reported a successful repair about a week later. So we do not have a specific problem to solve from this post, but it is worth taking a look at analogue switches in general – their characteristics and use. This month, we will look at the fundamentals of the circuitry used to implement these switches. This will help with understanding their data-sheet parameters and circuit performance, something that, in general, may be necessary when trying to identify a suitable alternative for any type of device. Next month, we will look at circuit data sheet parameters and design aspects. The term ‘analogue switch’ usually refers to an electronic equivalent to a mechanical switch or relay. Like relays, they are switched using electrical rather than mechanical or manual means, but they are implemented with semiconductor technology and have no moving parts. The term usually refers to devices intended for use in low-level signal applications, such as audio, video and instrumentation, rather than power switching. Thus, they are different from solid-state relays (SSRs), which are also semiconductor-based electronic switches. SSRs are intended for power switching and are often implemented using triacs or similar devices for the switching, typically with optically isolated control inputs. Analogue switches are usually implemented using FETs for switching, with directly controlled inputs. Ideally, a signal passing through an ‘on’ switch will be exactly the

56

Circuit Surgery.indd 56

same on both sides; however, this is not the case for real devices – they have resistance and other nonideal characteristics, which tend to attenuate the signal, add noise and distortion and limit bandwidth. Electronic analogue switches tend to be much less ideal than mechanical ones, but their advantages of small size, low power, ease of control and fast switching, can outweigh their non-ideal characteristics in many situations. The FET as a switch The same basic circuit arrangement can be used to switch both digital and analogue signals. Electronic on/ off switches are readily implemented in the same technology as CMOS logic and within digital circuits provide an alternative to standard logic gates for implementing some functions, particularly applications such as signal routing, bus switching, multiplexing and data selection. Thus, the first readily available analogue switch IC –now, about 45 years old – was probably the 4016 ‘quad bilateral switch’ from the 4000 series of digital CMOS devices. An improved switch, the 4066, became available a little later. Devices of this type are still available – Texas Instruments describes its currently available CD4016B as ‘Rev. C’. Despite the 4000 series being a logic family, analogue use of the switches was promoted on the datasheet and many designs over the years have used these chips for switching analogue signals. The 4016 and 4066 both contain four switches with individual control inputs. The 4066 has lower and less variable ‘onresistance’. Today, there are many more analogue switch chips to choose from, which offer better performance than the 4000 series originals. As already indicated, FET transistors can behave like electronically controlled on/off switches. A single MOSFET transistor can be used this way, as shown in Fig.1. Here the MOSFET is shown with four terminals rather the three (gate, source and drain) that may be more familiar. The fourth terminal is labelled ‘body’ in Fig.1, but it can also be referred to as the ‘bulk’ or ‘substrate’ connection. It represents the silicon into which the

transistor is formed. Voltages on the body silicon affect transistor operation, but in many cases, particularly in discrete transistors, the body and source are shorted within the device structure. However, this does not have to be done, particularly in integrated circuit designs, where there are many situations where the body needs to be connected separately from the source. Symmetry The body voltage has to ensure that the PN junctions between both the source and drain, and the bulk/substrate silicon in which the transistor is formed are always reverse biased. The most common arrangement is for the body connection of an NMOS transistor to be connected to the lowest voltage in the circuit (ground or negative supply) and the body connection of a PMOS transistor to be connected to the highest voltage (positive supply). With a separate body connection, and an appropriate device structure, the MOSFET is symmetrical and source and drain can be swapped. This is a requirement for providing a general-purpose switch function, which should function exactly the same irrespective of which way round the terminals are connected. In cases where the transistor is symmetrical we can designate the source and drain according to convenience, or to the orientation of circuit voltages we are dealing with. The circuit in Fig.1 is very straightforward, but unfortunately the transistor switches off when the voltage being switched gets close to the control voltage. At least one terminal (source or drain) must have a voltage difference with the gate that is greater than the device’s threshold (switchon) voltage (VT). This is because if the gate-channel voltage falls below VT at Body

A

B

A

d

s

B

g

Control

Control

Equivalent circuit

Transistor circuit

Fig.1. The MOS transistor as a switch

Everyday Practical Electronics, November 2015

16/09/2015 09:25

0V

5V OFF

g

Vin = 5V

g

Vin = 5V

s Vout = 0V

d

Control off Transistor off Capacitor isolated

d

0V ON s Vout = 0V

Control on Transistor on Capacitor starts charging 5V

5V

g

Vin = 5V

d

OFF (just) s Vout = 4V

A

Control on Transistor off Capacitor stops charging 5V

Com

B

Fig.2. Capacitor charging via an NMOS switch any point then the device will turn off. (The channel is the conductive path between source and drain when the device is on.) This limits the range of voltages that can be passed through the switch when it is on. Restricted range The problem with restricted voltage range is illustrated for an NMOS transistor using the circuit in Fig.2. Here the switch is used to connect an input voltage to a capacitor. If the switch was ideal then the capacitor would charge/discharge to the input voltage when the switch was closed, whatever input the voltage (within the limits of the components). This scenario is common because analogue switches are used explicitly to sample voltages onto capacitors (sample and hold circuits) and all real circuits will contain some capacitance that will CS4Nov15 have to82mm charge/discharge when closing x 1 COL a switch shifts the circuit voltage. In the circuit in Fig.2 the output of the switch transistor is connected to a capacitance that must be charged or discharged via the transistor when it is on. The first part of Fig.2 shows an off NMOS switch with the input (Vin) connected to +5V (assumed to be the supply voltage) and the output (Vout) connected to a capacitor currently at 0V (ground voltage). The transistor is then switched on by switching the gate voltage from 0V to 5V, and the capacitor starts to charge towards 5V via the transistor (second part of Fig.2). However, as the capacitor voltage increases, the transistor’s gate-source voltage decreases and

Control

A

A

B

Control

B

Control

(a) Switch equivalent

(b) Transmission gate

Control

A A

Vdd

B

Gnd

Control

B

eventually the transistor will start to turn off. This happens when the gatesource voltage reaches the transistor’s threshold voltage, which is assumed to be 1V in Fig.2. This means that for the situation shown in Fig.2, the output will only reach 4V (third part of Fig.2). If the input voltage is 4V or lower then the capacitor will charge to the input voltage. For a PMOS transistor we have a similar situation, except that it is switched on with 0V at the gate and off by 5V (assuming the same supply as in Fig.2). An input voltage of 5V would charge the capacitor to 5V – the switch would work fine in this situation. Unfortunately, for voltages below the threshold voltage the PMOS switch will not function correctly. If the capacitor started at 5V it would only discharge to 1V (assuming a 1V threshold again) if the input voltage was 0V. Two transistors The voltage range problem of the single MOS switch can be overcome by using two parallel MOS transistors, one PMOS and one NMOS, as shown in Fig.3d. This arrangement is called a ‘bilateral switch’ or ‘analogue switch’. At least one of the transistors is on when control is on for all in/ out voltages within the supply range. The basic configuration of the two transistors in parallel (Fig.3b) is equivalent to a simple switch (Fig.3a) and is known as a ‘transmission gate’. The schematic symbol for a transmission gate is shown in Fig.3c. To make an analogue switch with a single control input an inverter is required to provide a complementary control signal to the two transistors, as shown in Fig.3d. The schematic symbol for a full analogue switch (Fig.3d) is usually similar to Fig.3a. The transmission gate symbol is encountered in logic schematics and detailed schematics of switch circuits. Now that we have a viable basic switch (single-pole, single-thrown – SPST) it is straightforward to form electronic equivalents of other mechanical switches, such as singlepole, double-throw (SPDT) and rotary switches. The circuit in Fig.4 shows an SPDT analogue switch. Multiplepole switches are implemented by replicating the switches and using a common control signal.

Control (c) Transmission gate symbol

(d) Full switch schematic

Fig.3. CMOS bilateral switch

Monolithic MOSFET We can use a SPICE simulation to verify that, unlike single-transistor

a) Circuit Control

A

Com

B

b) Switch equivalent

Control

Fig.4. Schematic for a single-pole double-throw (SPDT) analogue switch switches, the bilateral switch is able to function with the full supply range of input voltages. The circuit in Fig.5 can be used for this purpose. Before looking at the results we need to cover some points about how this simulation is set up. The circuit uses a four-terminal MOSFET symbol in line with our previous discussion on this. The four terminal devices are selected using nmos4 and pmos4 when placing components, rather than nmos or pmos. Unlike the three-terminal devices, which allow you to select a real discrete device from the library, right clicking a four terminal MOSFET symbol causes a ‘Monolithic MOSFET’ window to appear. This dialogue requests information on the physical dimensions of the device – we are in the realm of integrated circuits rather than designing with discrete components. The minimum information required is a device model name and the width and length of the transistor. For our purposes, the specific width and length are not particularly critical, but we will use a device that is significantly wider than it is long as this gives relatively low resistance. We need to supply a device model; again we can use a minimal approach for this simulation. Hence, we need to specify the following device parameters: KP, which is a gain value, VT0, which is the threshold voltage and Lambda, which models the effect of drain-source voltage on drain current (channel-length modulation). Values of KP = 100µA/V2, VT0 = 1V (NMOS), VT0 = –1V (PMOS) and Lambda = 0.01 suffice for a generic device in our simulation and can be seen in the .model directives on the schematic (use the .op command button to add them).

Everyday Practical Electronics, November 2015 57

Circuit Surgery.indd 57

16/09/2015 09:25

+ –

V2

Input

5

+

V3

V1

Control

InvControl

Input +

Input

M2

control

VP

A1 Input signal

InvControl

PMOS_out InvControl

R2 10Meg

V4

MyPMOS

Switching Control

M4

MyPMOS

Supplies

VP

CMOS Switch

VP

PMOS Switch

Input VN

CMOS_out

PULSE(-5 5 0 10n 10n 5m 10m) NMOS Switch

Input

.MODEL MyNMOS NMOS (KP=100u VT0=1 LAMBDA=0.01) .MODEL MyPMOS PMOS (KP=100u VT0=-1 LAMBDA=0.01) Analysis Directive

Control

M1

Transistor Models

M3

VN

5

MyNMOS

VN

SINE(0 5 1k)

MyNMOS

+

R3 10Meg

Control NMOS_out

R1 10Meg

.tran 10m

Fig.5. Schematic for LTSpice simulation of MOSFET-based switches Inverter model In order to produce the complementary control signal for the PMOS transistors, an LTSpice special function inverter is used. LTSpice is fundamentally an analogue simulator, but it does provide some proprietary special functions (not part of ‘standard’ SPICE) to model idealised basic digital gates and flip-flops. These can be useful when simulating analogue circuits with digital interfaces and similar mixed-circuit scenarios. The gates have default logic levels of 0V and 1V, but our circuit switches the control voltage between –5V and +5V, so we need to change the logic levels. To do this we right-click the inverter symbol (A1) on the schematic and enter the text Vhigh=5 Vlow=-5 into the value field of the Component Attribute Editor dialog which appears. In the simulation, all three versions of the switch are driven from the same ideal 1kHz, 5V peak sinewave source. The other side of each switch is connected to an individual 10MΩ resistor, representing a high impedance load, which might occur, for example, when switching the input to an amplifier. The switches are toggled on and off every 5ms using a pulse source.

Fig.7. Simulation of circuits shown in Fig.5. Note that the NMOS and PMOS switches do not pass signals over the full supply voltage range

Fig.6. Monolithic MOSFET parameters dialogue in LTSpice

58

Circuit Surgery.indd 58

Results The results of the simulation (one switch cycle) are shown in Fig.7, in which all voltage scales are the same (–5V to +5V). The top trace is the input

sinewave and the second trace is the control signal. The bottom three traces show the outputs from the switches (NMOS, PMOS, bilateral/CMOS respectively). It can be seen that only

Everyday Practical Electronics, November 2015

18/09/2015 12:48

Fig.8. Variation of switch resistance with input voltage using a simulation based on Fig.5. Upper plot shows resistance of single transistor NMOS (yellow) and PMOS (green) switches. Lower plot shows parallel resistance of the two complentary transistors based on the values from the upper plot the two-transistor switch allows the input to pass without being degraded. The NMOS transistor switches off when the voltage being switched is within VT of the positive supply – that is, above +4V. The PMOS transistor switches off when the voltage being switched is within VT of the negative supply, that is, below –4V (recall, the model sets the magnitude of VT to 1V for both transistors). The NMOS and PMOS switches result in clipped waveforms. RON flatness Earlier, it was mentioned that analogue switches are non-ideal in terms of their resistance when on (RON). This resistance means that signals are attenuated as they pass through the switch, but the resistance is also not constant with signal level, that is, the switches are non-linear and will therefore cause distortion. Single transistor switches show the greatest amount of RON variation – their resistance increases rapidly as the input voltage gets close to the point at which the switch turns off. This means they are unlikely to be useful for highquality signal processing unless the signal amplitude is low and biased well away from the signal-induced switch-off voltage. However, singletransistor switches can be used to switch logic signals if the logic level is restored after the switch using a suitable gate. Switches based on CMOS transmission gates show much less variation in resistance because at the input voltage at which one transistor’s resistance is largest the other transistor exhibits its lowest resistance.

Therefore the parallel combination can be arranged to be reasonably constant. Resistance simulation The simulation in Fig.5 can be modified to give an idea of resistance variation. The resistors are replaced with constant current sources to ensure some current is flowing, whatever the input voltage, and the switches are bypassed by resistors which are around a couple of orders of magnitude larger than RON, to give the current somewhere to go when the switch is off (otherwise you may get ridiculously high voltages in the simulation). The input voltage source is set to be the source of DC sweep simulation and the resistance is plotted against the swept input voltage using an expression which divides the voltage across the transistor by the current through it. For example, for the NMOS device: Abs((V(inputN)-V(nmos_out))/ Id(M1)) The parallel resistance of one NMOS and one PMOS transistor can be plotted using an expression for

parallel resistance obtained from the individual resistance expressions. The results for the resistance simulation are show in Fig.8. This does not attempt to simulate any real device, but is sufficient to demonstrate the general behaviour of circuits of this type. The large variation in resistance for single transistor switches (upper plot) and comparatively constant, but still varying, value of parallel resistance for complementary transistors (lower plot) can be seen. Larger transistors can be used to reduce RON, specifically it is the aspect ratio (width/length) which is important – the transistor needs to be much wider than its length to achieve low resistance (as is the case with the values shown in Fig.6). As the minimum length will be fixed for a given technology, lower resistances require relatively large transistors. However, using large transistors will increase the capacitance of the switch, which will reduce bandwidth. MOSFET RON decreases with increased gate voltage so another approach to reducing RON is to use a charge pump on the chip to generate a voltage above the supply level to control the switch transistors. Other issues Analogue switches have other nonideal characteristics in addition to nonzero RON and RON variation. When the switch is open, a signal input on one side will ideally be completely blocked from reaching the other terminal – however, for real switches this is not the case and some signal will get through the switch. When a switch is closed, charge is present in the switch MOSFET channels – this is charge that happens to be flowing inside the device at that instant. The charge does not remain in the device when it is switched off, so it has to go somewhere in the external circuit – a process known as charge injection. Charge injection creates noise in the signal path. In the case of a switch connected to a sampling capacitor (as in Fig.2) the voltage level on the capacitor will shift due to the injected charge. This article has introduced the basic circuit structure, principle of operation and some fundamental characteristics of analogue switches. Next month, we will continue to look at device characteristics, but also focus on circuit design issues when using these switches.

Looking to advertise? Contact Stewart Kearn on: 01202 880299 or email [emailprotected]

Everyday Practical Electronics, November 2015 59

Circuit Surgery.indd 59

18/09/2015 12:48

Fig.2. Visual TFT interface Visual TFT We’ve covered the physical board itself, the compiler and the IDE. What more could we possibly add to make our lives ever easier to create a really slick looking device. This is where ‘Visual TFT’ comes in. Visual TFT is a standalone application used for rapid development of graphical user interfaces (GUI) for TFT displays. Likewise, ‘Visual GLCD’ can be used for GLCD displays. In our last project, the DIY Oscilloscope, we had to write each line to the screen over the SPI interface individually, which was time consuming. Imagine we wanted to draw an image – we would probably only ever be able to draw the simplest of pictures. This is where Visual TFT shines. With a simple drag and drop interface, we can place JPEG/BMP images to be displayed on the screen. We can have several screens, which we can manoeuvre through a simple touch screen press. There is a range of buttons, radio buttons, check boxes and even progress bars that we can add to our screen. In Fig.2, you can see how to alter the properties of each of these components to change the font size, colour and alignment. We can also add events to each button, so that when we press the button, it will perform a task. This is where the real beauty of it all comes together. We’ve built our beautiful looking screen, so now lets get it up and working on our board. Just press the big green Play button (actually Start Compiler), and Visual TFT will not only create the necessary code, convert the image to a pixel map, but it will also open up mikroC for you to add in all the extra background functions. We’re only a ‘Build and Program’ away from viewing it all on our TFT screen. It really is that simple. There’s no need to write interfacing code. Visual TFT works seamlessly with mikroC and makes it a thoroughly enjoyable experience developing contentrich media on a small platform. mikroProg Programmer MikroElektronika also provides its own programmer/ in-circuit debugger (ICD), which works seamlessly with mikroC and Visual TFT. The mikromedia for PIC32 comes with two programming headers. One is the standard six-pin header that works with our PICKIT3 or ICD3, which you will have to solder on yourself. The other is the mikroProg fivepin programming header, which is populated by default. If we want to use our PICKIT3 or ICD3, we will only be able to download it to the PIC using the hex file output. mikroC can output a coff file to enable us to debug our code in MPLAB. If we want to debug using software and hardware breakpoints in real time, we’ll need to use the mikroProg programmer. The programmer is a slick white box powered by USB that supports upwards of 570 PIC chipsets. Possible inspirational projects There are so many things we can do, using just the screen. I have seen this board used for rapid prototyping, which led to the development of a system very similar to the mikromedia for PIC32. The project used mikroC, Visual

Everyday Practical Electronics, November 2015

Pic n Mix (MP 1st & MOK).indd 61

TFT and the mikroProg programmer to develop a very accurate power meter, with a GSM module. The screen would allow the customer to view power usage over the day, as well as room temperature. Another feature was the ability to setup timers for an immersion heating system. Here’s an interesting idea, if you wanted, you could develop your own mobile phone, most of the features are already there. Attach a GSM module, a lithium battery, a microphone and write up the code and we’re good to go. We could call it the PICPhone, but I wouldn’t like to try texting on it. I forgot to mention the touch screen is resistive not capacitive –most smartphones these days use capacitive touch screens, which allows much faster response and multi-touch interfaces. With a resistive touch interface, you have to physically press on the screen. This also means it’s a little slower to react to your finger press and the accuracy would make it impossible for an onscreen alphabetical keyboard. We could still set up a number of screens that would allow us to dial a number and add a hang-up button that appears during the call. We could even add the ability to receive text messages. Other interesting project possibilities include a handheld GPS locator, DPS signal generator, digital multimeter, home monitoring system, small digital photo frame, MP3 player and a remote control (with IR transceiver module). Going back to our DIY Oscilloscope Lets take a look back at out last article as an example, where we designed our own hardware, wired up an SPI screen interface, a few external buttons and an input pin for our LPLC Oscilloscope. We developed our own code, and wrote to the screen line by line as quickly as we could. With the mikromedia for PIC32, we could have done it all in less than an hour or two. With the touch screen interface, we don’t need buttons any more or debounce code and we’re not using up useful GPIO pins. We can add all sorts of functionality very easily and very quickly. We’re no longer using an SPI interface, as it uses the Parallel Master Port (PMP) interface on the PIC instead. The parallel bus communicates with the screen much faster as well. See Fig.3 for a quick demonstration of an Oscilloscope, where we can see the voltage division of two channels, the date, an onscreen STOP button (which can change to RUN when clicked) as well as a Menu button, which opens up even more functionality for onscreen data capture. If we want to add extra functionality, more menu options, capture more data, it’s simply a matter of opening up Visual TFT, adding a new screen, drag and drop a few buttons, add some text and that’s our screen laid out. Press ‘Start Compile’ (big green Play button) and we can add all the background code using readily available libraries from Libstock. It all comes together very quickly and really looks the part.

Fig.3. mikromedia for PIC32 Oscilloscope

61

16/09/2015 14:09

Wrapping it all up MikroElektronika offer a very interesting suite of products including mikroC, Visual TFT and the mikromedia for PIC32 development board. If you want to develop graphicFigurescreen 2: Layout diagram rich features on a small touch board with a few interesting options, such as an MP3 audio codec, microSD for the project card slot and accelerometer in a short timeframe, then this is the product for you. The only downside is that it’s a pity you have to learn a new IDE with all of its associated quirks, especially if you’ve just converted over to Microchip’s MPLAB X IDE. However, in my experience, it is worth it. I enjoy building my own electronics, but there’s no sense in re-inventing the wheel. With MikroElektronika’s offering, we can stay focused on creating innovative and fun applications quickly and with ease. Finally, it’s worth mentioning that MikroElektronika has a great customer support team, willing to help anyone and everyone. It can be reached through their online contact form or via their online forums. Next month Next month, we’re going to look at How to pick a PIC. I’m going to take a look at Microchips Advanced Part Selector (MAPS) and how to choose the right PIC for your project. I’m also going to delve a little into the hotly debated 8-bit versus 16-bit versus 32-bit microcontroller question. Some if (brightness ==the 0 || use brightness 255) { people question of 8-bit== processors, when 32-bit fadeAmount = -fadeAmount ; processors offer so much more in terms of application and processing. However, each architecture has its purpose, and } each has its place in the future of electronic design. // wait for 30 milliseconds to see the dimming effect delay(30); Not all of Mike’s technology tinkering and } discussion makes it to print. You can follow Upload this sketch board, and everything has uploaded the rest of it to ontheTwitter at if @MikePOKeeffe, up on EPE Chat Zone as mikepokeeffe and successfully, the LED fades from off to full brightness and then from his blog at mikepokeeffe.blogspot.com back off again. If you don’t see any fading, double-check the wiring:

REGULAR COLUMN: ARDUINO PROJECTS l 37 WIN THE ‘ARDUINO FOR DUMMIES’ BOOK BY JOHN NUSSEY John Nussey is a creative technologist based in London. He teaches interaction design and prototyping at the Goldsmiths College and the Bartlett School of Architecture among others. We have a couple of copies of this book to give away. To enter please supply your name, address and email to the Editor at svetlanaj@ sjpbusinessmedia.com. The winner will be drawn at random and announced at the end of the series.

l Make sure the correct pin numbers are being used. l Check the LED is correctly positioned, with its long leg connected by a wire to pin 9 and the short leg connected via the resistor and a wire to GND.

l Check the connections on the breadboard. If the jumper wires or components are not connected using the correct rows in the breadboard, they will not work. l More on this and other Arduino projects can be found in the ‘Arduino For Dummies’ book by John Nussey.

www.stewart-of-reading.co.uk Check out our website, 1,000’s of items in stock IFR 2025 Fluke/Philips PM3092 HP34401A Agilent E4407B HP3325A HP3561A HP3581A HP3585B HP53131A HP5361B HP54600B HP54615B HP6032A HP6622A HP6624A HP6632B HP6644A HP6654A HP8341A HP83731A HP8484A HP8560A HP8560E HP8563A HP8566B HP8662A HP8970B HP33120A Marconi 2022E Marconi 2024 Marconi 2030 Marconi 2305 Marconi 2440 Marconi 2945 Marconi 2955 Marconi 2955A Marconi 2955B Marconi 6200 Marconi 6200A Marconi 6200B IFR 6204B Marconi 6210 Marconi 6960B with Marconi TF2167 Tektronix TDS3012

62

Pic n Mix (MP 1st & MOK).indd 62

Signal Generator 9kHz - 2.51GHZ Opt 04/11 Oscilloscope 2+2 Channel 200MHZ Delay etc Digital Multimeter 6.5 digit Spectrum Analyser 100HZ - 26.5GHZ Synthesised Function Generator Dynamic Signal Analyser Wave Analyser 15HZ - 50KHZ Spectrum Analyser 20HZ - 40MHZ Universal Counter 3GHZ Pulse/Microwave Counter 26.5GHZ Oscilloscope 100MHZ 20MS/S Oscilloscope 2 Channel 500MHZ 1GS/S PSU 0-60V 0-50A 1000W PSU 0-20V 4A Twice or 0-50V 2A Twice PSU 4 Outputs PSU 0-20V 0-5A PSU 0-60V 3.5A PSU 0-60V 0-9A Synthesised Sweep Generator 10MHZ-20GHZ Synthesised Signal Generator 1-20GHZ Power Sensor 0.01-18GHZ 3nW-10uW Spectrum Analyser Synthesised 50HZ - 2.9GHZ Spectrum Analyser Synthesised 30HZ - 2.9GHZ Spectrum Analyser Synthesised 9KHZ-22GHZ Spectrum Analsyer 100HZ-22GHZ RF Generator 10KHZ - 1280MHZ Noise Figure Meter Function Generator 100 microHZ-15MHZ - no moulding handle Synthesised AM/FM Signal Generator 10KHZ-1.01GHZ Synthesised Signal Generator 9KHZ-2.4GHZ Synthesised Signal Generator 10KHZ-1.35GHZ Modulation Meter Counter 20GHZ Communications Test Set Various Options Radio Communications Test Set Radio Communications Test Set Radio Communications Test Set Microwave Test Set Microwave Test Set 10MHZ-20GHZ Microwave Test Set Microwave Test Set 40GHZ Reflection Analyser for 6200 Test Sets 6910 Power Meter RF Amplifier 50KHZ - 80MHZ 10W Oscilloscope 2 Channel 100MHZ 1.25GS/S

£1,250 £295 £325 £5,000 £195 £650 £250 £1,500 £600 £1,250 from £125 £650 £750 £350 £350 £195 £400 £500 £2,000 £2,500 £125 £1,950 £2,400 £2,750 £1,600 £1,000 £750 £295 £325 £800 £750 £250 £295 £2,500 £595 £725 £850 £1,950 £2,500 £3,000 £10,000 £1,250 £295 £75 £800

Tektronix 2430A Tektronix 2465B R&S APN62 R&S DPSP R&S SMR40 Cirrus CL254 Farnell AP60/50 Farnell H60/50 Farnell B30/10 Farnell B30/20 Farnell XA35/2T Farnell LF1 Racal 1991 Racal 2101 Racal 9300 Racal 9300B Black Star Orion Black Star 1325 Ferrograph RTS2 Fluke 97 Fluke 99B Fluke PM5420 Gould J3B Gould OS250B Gigatronics 7100 Panasonic VP7705A Panasonic VP8401B Pendulum CNT90 Seaward Nova Solartron 7150 Solartron 7150 Plus Solatron 7075 Solatron 1253 Tasakago TM035-2 Thurlby PL320 Thurlby TG210 Wavetek 296

Oscilloscope Dual Trace 150MHZ 100MS/S Oscilloscope 4 Channel 400MHZ Syn Function Generator 1HZ-260KHZ RF Step Attenuator 139dB Signal Generator 10MHZ - 40GHZ with Options Sound Level Meter with Calibrator PSU 0-60V 0-50A 1KW Switch Mode PSU 0-60V 0-50A PSU 30V 10A Variable No Meters PSU 30V 20A Variable No Meters PSU 0-35V 0-2A Twice Digital Sine/sq Oscillator 10HZ-1MHZ Counter/Timer 160MHZ 9 Digit Counter 20GHZ LED True RMS Millivoltmeter 5HZ-20MHZ etc As 9300 Colour Bar Generator RGB & Video Counter Timer 1.3GHZ Test Set Scopemeter 2 Channel 50MHZ 25MS/S Scopemeter 2 Channel 100MHZ 5GS/S TV Gen Multi Outputs Sine/sq Oscillator 10HZ-100KHZ Low Distortion Oscillator Dual Trace 15MHZ Synthesised Signal Generator 10MHZ-20GHZ Wow & Flutter Meter TV Signal Generator Multi Outputs Timer Counter Analyser 20GHZ PAT Tester 6 1/2 Digit DMM True RMS IEEE as 7150 plus Temp Measurement DMM 7 1/2 Digit Gain Phase Analyser 1mHZ-20KHZ PSU 0-35V 0-2A 2 Meters PSU 0-30V 0-2A Digital Function Generator 0.002-2MHZ TTL etc Kenwood Badged Synthesised Function Generator 2 Channel 50MHZ

£350 £600 £225 £300 £13,000 £40 £195 £500 £45 £75 £75 £45 £150 £295 £45 £75 £30 £85 £50 £75 £125 £600 £60 £50 £1,950 £60 £75 £995 £125 £65 £75 £60 £750 £30 £50 £65 £450

Everyday Practical www.electronicsworld.co.uk Electronics, November 2015

16/09/2015 14:09

BACK ISSUES We can supply back issues of EPE by post, most issues from the past five years are available. An EPE index for the last five years is also available at www.epemag.com. 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 Jan. 99 are available on CD-ROM or DVD-ROM – and back issues from recent years 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?

50th birthday edition

PORTaPal-d

“tiny tim” stereo Amplifier

– PaRT 1

• transform your tv’s audio • easy to build with common, low-cost parts • Suits 4-8Ω speakers, 8-600Ω headphones • Very low distortion and noise

• Powerful, portable Pa loudspeaker system • Class d low-distortion amplifier • 12V Li-Po battery power • Guitar and two microphone inputs

Stroll down memory lane with ePe – a faScinating look at our early yearS

50th birthday edition – Part 2

Building and teSting

makE YOUR OwN PCB –

PaRT 4

UsinG EaGLECaD softwarE

gPS tracker

workS with google earth reSolution of a few metreS PreciSely record your journeyS Store a lifetime of travel on an Sd card

WIN A MICROCHIP AudIO bluetOOtH kIt evAluAtION

Part 3

uSing eaglecad Software

plus: practically speaking, net work, pic n’ MiX, auDio out, circuit surgery anD techno talk

noV 2014 £4.40

Teach-In 2015 – part 2 • understand discrete linear circuit design • learn with ‘tina’ – modern Cad software • Design simple, but elegant circuits

portapal-d – part 3 003

adjustable eCho or reverberation for reCording or pa systems

A

09 91

502 ETABER( )RETEMAID

GNOL mm54 21 x 21 FO SPIRTS DEHCATTA ENIP RAD EDIS HCAE OT

391

E

“Tiny Tim” STereo Amplifier – pArT 3

102

751

using your softwAre-defined rAdio for dAb+ dmr

RETEMAID ELOH 281

mm003 TAELC GNOL )21 x 21(

C

006

D SETABER PEED mm6

563

expert product reviews

W MIC IN A RO PICD CH IP EM DE VE LO LAb PM KIT ENT

E )FD DIS M DN RO mm6 AH F N 1 , THG W 006 IR YT OHS x 0 IRA T 03 LC ON (

391

RETEMAID ELOH 281

raspberry pi interfacing

LC

ELOH mm53 TAH POT ROF )DERIUQER FI( 003

FDM KCIHT mm61 LAIRETAM LLA DEIFICEPS SSELNU

B 003

ENIP RAD 81 x 81 FO SPIRTS GNOL mm692 ERA B & A SERTEMILLIM NI SNOISNEMID LLA

Completing and testing your super CompaCt amp

review of a digital input Board

ENIP RAD 81 x 81 FO SPIRTS GNOL mm006 ERA D & C ENIP RAD 81 x 81 FO PIRTS GNOL mm003 SI E

audio delay for pa systems deC 2014 £4.40

Practically SPeaking, net work, readout

PluS: Pic n’ MiX, circuit Surgery, techno talk

PluS: CIRCuIT SuRgERy AND TEChNo TAlk

JaN 2015 £4.40

16/10/2014 17:46:27 JAN 2015 Cover V2.indd 1

15/09/2014 09:41:39

WIN M 3D ICRO A C TO uC HIP HPA D

stereo echo & reverb unit –

003

52

sidrAdio and sdrs

10a/230v speed Controller • designed for universal motors • super smooth over full speed range • Over-current limiting and soft start • Fuse protection neW SerieS

“TINy TIm” STEREo AmplIfIER – pART 2

mImIC ThE BEll-lIkE SOUNd Of a REal BEllBIRd

INTERFACE, NET woRk, PIC N’ MIX,

W MIC IN A RO Mul CH ex IP tIM PA ed Ns IA ION bO & stAR PIC32 ARd te R kI t

final assemBly, ready to make lots of Beautiful music!

W MIC IN A RE RO M CH DE OTE CO IP MO NT BO ZE RO AR NA DW L W AD IRELES ITH AP S TO R

ElECTRONIC BEllBIRd

DEC 14 Cover.indd 1 NOV 14 Cover V2.indd 1

• understand discrete linear circuit design • learn with ‘tina’ – modern cad software • Design simple, but elegant circuits

Build the circuit and power supply

Assembling our ‘blow-your-socks-off’ portAble pA loudspeAker system

‘fritzing’ cAd softwAre And rAspberry pi b+

make your own PcB –

teach-in 2015

NEW SERIES

PortaPaL-D – Part 2

CONTINUE YOUR STROll dOwN mEmORY laNE wITh EPE

hi-fi Stereo headPhone amPlifier – Part 2

– pArt 1

17/11/2014 09:36:44

BACK ISSUES ONLY £5.00

add a delay and Banish audio aural confusion!

interface, net work, audio out, Pic n’ MiX,

fEB 2015 £4.40

PluS: circuit Surgery, techno talk FEB 2015 Cover V2.indd 1

08/12/2014 09:04:51

pluS: CirCuit Surgery, Net work, praCtiCally SpeakiNg, piC N’ MiX, teChNo talk & audio out

mArCH 2015 £4.40

MARCH 2015 Cover.indd 1

20/01/2015 10:34:56

(each inc. UK p&p.)

Overseas prices £5.80 each surface mail, £6.80 each airmail. We can also supply issues from years: 2006 (except Jan., Feb., Mar., Apr., May, July). 2007 (except June, July, Aug), 2008 (except Aug, Nov, Dec) 2009 (except Jan, Mar, Apr.). 2010 (except May, June, July, August, Oct, Nov, Dec) 2011 (except Jan) Jan 2014.

SEPT ’14 PROJECTS • Build An AM Radio • LED Ladybird • Lifesaver For Lithium or SLA Batteries • ‘Do Not Disturb!’ Phone Timer • FEATURES • Make Your Own PCBs – Part 1 • Techno Talk • Practically Speaking • Circuit Surgery • PIC n’ Mix • Net Work • Audio Out • Max’s Cool Beans • OCT ’14 PROJECTS • SiDRADIO: An Integrated SDR Using A DVB-T Dongle – Part 1 • Hi-Fi Stereo Headphone Amplifier – Part 1 • “Tiny Tim” HornLoaded Speaker System • FEATURES • Make Your Own PCBs – Part 2 • Techno Talk • Interface • Circuit Surgery • PIC n’ Mix • Net Work • Audio Out • Max’s Cool Beans • NOV ’14

PROJECTS • GPS Tracker • Hi-Fi Stereo Headphone Amplifier – Part 2 • SiDRADIO: An Integrated SDR Using A DVB-T Dongle – Part 2 • FEATURES • 50 Golden Years of Practical Electronics – Part 1 • Make Your Own PCBs – Part 3 • Techno Talk • Practically Speaking • Circuit Surgery • PIC n’ Mix • Net Work • Audio Out • Max’s Cool Beans •

DEC ’14 PROJECTS • PortaPAL-D – Part 1 • Electronic Bellbird • SiDRADIO: An Integrated SDR Using A DVB-T Dongle – Part 3 • FEATURES • 50 Golden Years of Practical Electronics – Part 2 • Techno Talk • Make Your Own PCBs – Part 4 • Interface • RPIADCISOL • Circuit Surgery • PIC n’ Mix • Net Work •

JAN ’15 PROJECTS • “Tiny Tim” Stereo Amplifier – Part 1 • PortaPAL-D – Part 2 • SiDRADIO – More reception modes • FEATURES • Techno Talk • Teach-In 2014 Update Raspberry Pi B+ • Practically Speaking • Whizzkits Electronics Builder’s Kit • Circuit Surgery • PIC n’ Mix • Net Work • Audio Out • Max’s Cool Beans • Fritzing Design Software

FEB ’15 PROJECTS • “Tiny Tim” Stereo Amplifier – Part 2 • PortaPAL-D – Part 3 • Audio Delay For PA Systems • FEATURES • Techno Talk • Teach-In 2015 – Part 1 • Interface • Circuit Surgery • PIC n’ Mix • Net Work • Audio Out • Max’s Cool Beans • RPI16IN

MAR ’15 • Super Smooth, Full-Range, PROJECTS 10A/230V Speed Controller For Universal Motors • Stereo Echo & Reverb Unit • “Tiny Tim” Stereo Amplifier – Part 3 •

FEATURES • Techno Talk • Teach-In 2015 – Part 2 • Practically Speaking • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans •

APR ’15 PROJECTS • A Rubidium Frequency Standard For A Song • USB/RS-232C Interface • Building Our New Super Smooth, Full-Range, 10A/230V Speed Controller For Universal Motors – Part 2 • FEATURES • Techno Talk • Teach-In 2015 – Part 3 • Interface • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans • RPI16OUT •

MAY ’15 PROJECTS • Low-cost Precision 10V DC Reference For Checking DMMs • Deluxe Fan Speed Controller • RGB LED Strip Driver • FEATURES • Techno Talk • Teach-In 2015 – Part 4 • Practically Speaking • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans •

JUNE ’15 PROJECTS • Touch-Screen Digital Audio Recorder – Part 1 • Burp Charge Your Batteries • FEATURES • Techno Talk • Teach-In 2015 – Part 5 • Interface • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans • Raspberry Pi For Dummies Book Review • Half A Century Of Power! •

JULY ’15

AUG ’15 PROJECTS • Build The Nirvana Valve Sound Simulator • Resistor-Capacitor Decade Substitution Box • Tempmaster Thermostat MK3 FEATURES • Techno Talk • Teach-In 2015 – Part 7 • Interface • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans •

SEPT ’15 PROJECTS • Opto-Theremin – Part 1 • Wideband, Active Differential Oscilloscope Probe • Mini-D Stereo 10W/Channel Class-D Audio Amplifier FEATURES • Techno Talk • Teach-In 2015 – Part 8 • Practically Speaking • Net Work • Audio Out Special – Product Review • Circuit Surgery • Electronic Building Blocks • Audio Out • Max’s Hot Beans •

OCT ’15 PROJECTS • Digital Effects Processor For Guitars And Musical Instruments • Opto-Theremin – Part 2 • Courtesey LED Lights Delay For Cars FEATURES • Techno Talk • Teach-In 2015 – Part 9 • Interface • Net Work • PIC n’ Mix • Circuit Surgery • Electronic Building Blocks • Audio Out • Max’s Cool Beans •

PROJECTS • L-O-O-O-N-G Gating Times For The 12-Digit High-Resolution Counter • Threshold Voltage Switch • Touch-Screen Digital Audio Recorder – Part 2

Where 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.

ORDER FORM – BACK ISSUES – PHOTOCOPIES– INDEXES  Send back issues dated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  Send photocopies of (article title and issue date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 I enclose cheque/P.O./bank draft to the value of £ . . . . . . . . . . . .  Please charge my Visa/Mastercard/Maestro £ . . . . . . . . . . . . . . . Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Valid From . . . . . . . . . . . . . Card Expiry Date . . . . . . . . . . . .

Maestro Issue No . . . . . . . . . . . . . .

Card Security Code . . . . . . . . . .

(The last 3 digits on or just under the signature strip)

SEND TO: Everyday Practical Electronics, Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. Tel: 01202 880299. Fax: 01202 843233. E-mail: [emailprotected] On-line Shop: www.epemag.com Payments must be in £ sterling – cheque or bank draft drawn on a UK bank. Normally posted within seven days of receipt of order. Send a copy of this form, or order by letter if you do not wish to cut your issue. M011/15

Everyday Practical Electronics, November 2015

Back Issues Mags.indd 63

FEATURES • Techno Talk • Teach-In 2015 – Part 6 • Practically Speaking • Net Work • Circuit Surgery • PIC n’ Mix • Audio Out • Max’s Cool Beans •

63

16/09/2015 11:17

AUDIO OUT

AUDIO OUT

L

R

By Jake Rothman

Speaking volumes – Part 1 Introduction Once an audio signal leaves the input amplifier or arrives straight from a digital source, it meets the volume control. This is the most important function in any audio system. I hear more complaints about controlling this parameter than any other, whatever method is used; touchscreen, mouse, push button, slider, or the original rotary knob. There is a somewhat childish attitude in audio that ‘more is more’ – louder is better – but most of the market is not interested in club-level output, and is looking for controllable ambience. A friend of mine has made a business out of combating this problem, see Fig.1. Looking at most volume control circuitry, it appears deceptively simple, but there is a whole host of electrical, mechanical and psychological interactions to be

considered to get the right feel. Logarithmic or linear? All human senses are logarithmic as stated by Fechner’s Law, ‘subjective sensation is proportional to the logarithm of the stimulus intensity’ This is why audio uses octaves Fig.1. Advert showing common problem with volume controls. A simple solution is stick an attenuator on the input to expand the range and decibels, and of the control. However, it is definitely better to design it right in the when you upgrade first place! your 10W amp to 100W, it only seems twice as loud. Input A good volume control – in theory – CW should have a constant decibel (dB) vs Output R rotation curve. In practice, there are deviations to maximise the control0.1R lability, especially at the bottom part of the curve, where the attenuation 0V needs to rapidly increase to fully cut off the signal – see Fig.2.

Attenuation (dB) 0

Simple level controls All electronics people are familiar with the potential divider illustrated in Fig.3a. This can of course be made variable by using a potentiometer or ‘pot’ in audio slang. Fig3b shows the effect of a linear control, subjectively all the effect occurs in the first part of the rotation. The track has to be connected the right way round with the clockwise (CW) end at the top for

–20

–40

–60

–80

–100 20

40 60 % Rotation

80

100

Fig.2. Ideal volume control curve

Fig.4. Loading a linear pot to obtain an approximate log law – not suitable for full range stereo controls

maximum volume. A frequent PCB error is connecting pots the wrong way, so it’s essential to mark on the schematic which end of the track is which. Fig.3c shows a standard logarithmic (invariably abbreviated to ‘log’) control, called a ‘10% CW audio taper pot’ in US parlance. This is because when rotated halfway +

Subjective volume

Vin input

Low Z

Resistance %

100% R2

CW

Output

AO-NOV15-Fig4 29mm x 1 COL

R 10kΩ Log

High Z

R1

Volume CCW

10% 0V a)

Rotation

b)

100% CW

0 c)

50% CW Rotation

100% CW

d)

R1

R2

1kΩ

9kΩ

CW

Audio-Out (MP 1st & JR) – NOV 2015.indd 2

0V

10kΩ

Fig.3 a) Potential divider, b) Subjective effect of linear control, c) Standard log control rate of change of resistance increases as a pot is turned clockwise, d) Measurement of log track with wiper set half-way (view is shaft towards viewer)

64

≥20kΩ

+

Fig.5. To ensure optimum performance, the volume control track should be fed from a low source impedance and the wiper loaded by a high impedance

Everyday Practical Electronics, November 2015

15/09/2015 17:07

High Z

LowZ

CW

+

As usual, audio engineers have to pay c b more and many circuit techniques have 33µF e been developed to try and coax linear 2kΩ 270Ω pots to give a logarithmic action. One CW Z = 5kΩ 20kΩ trick popularised by Lin CW Ben Duncan in the Balance 220nF CCW 20kΩ 1980s was to load a Log Volume linear pot with one CCW 68kΩ tenth of its track val0V ue to simulate a log pot (Fig.4). I never Fig.6. Leak Delta 70 circuit – the volume control is fed from the got it to work as a balance control, a significant source impedance, increasing volume stereo control, with pot errors the sound wandering from one speaker clockwise, the resistance will be one- to another in the first few degrees of rotenth of the track resistance, as shown tation. Stereo mistracking is a common in Fig3d. If it’s the other way round, problem in dual-gang pots, and this it’s an ‘anti-log’ or ‘reverse-taper pot’, technique amplifies the errors at low as used in microphone pre-amp gain levels where the ear is most sensitive. and frequency controls. Occasionally, It’s only acceptable for limited range ‘semi-log’ or ‘20% audio taper’ pots mono gain-trims on power amplifiers, are found, which measure one fifth of such as the Test Bench Amplifier dethe track value. I’ve only seen these scribed in EPE, January 2015. in oscilloscopes. Log pots are AO-NOV15-Fig8 usually marked ‘A’, ‘lin Installation 27mm COL B’ and ‘anti-log C’.x 1Irritatingly, some It’s essential to feed any potentiometer manufacturers do the opposite to the from a low impedance, such as an op rest of the electronics world, using ‘B’ to amp output, and load it with a high denote a ‘log’ pot – often the same tribe impedance of around five times the track resistance to ensure the control that uses a box symbol for resistors! An inspection of any distributor’s is ratiometric – that is, dependent only catalogue will show that nearly all on the ratio of the resistance of the top high-quality pots are linear; after all, half to the bottom half, and not the ab99% of electronic control is linear. solute track resistance. This property makes the standard stereo logarithmic volume control work much better than AO-NOV15-Fig9 out

Log

Fig.8. ‘Backwards-style’ current-divider volume control, used where the driving impedance is high and load impedance is low

Low Z eg, virtual earth point High Z eg, a current source high-value resistor

– CW Log

+ CCW

Fig.9. Current-divider volume control gives minimum noise when used on virtual earth inputs. This is because there is noise gain at minimum volume if the pot is conventionally wired

expected, despite track tolerances of up to 20% – see Fig.5. If significant source and loading impedances are introduced, errors are increased. The Leak Delta 70 discussed recently had this problem, with the balance control feeding the volume pot (Fig.6) resulting in channel imbalance. The solution is to fit a buffer stage, or in the case of my Leak, buy an expensive Alps RK271 ‘Blue Velvet’ pot, which has high accuracy. This pot, illustrated in Fig.7, costs £7.23 from Rapid, order code 66-0225 (Farnell charge £25!).

41mm x 1 COL Reference: Brimar advert Wireless World, October 1966, page 84

8.2kΩ

100µF

–25V negative rail

35Ω high Z output 1.5W

+

2.4mA

0V DC bias adjust 10kΩ

1.5kΩ AC154

12kΩ

AA120

4.7Ω

+

100µF

68kΩ 10kΩ

Input from ceramic cartridge

+13V DC bias 8µF

8µF

10kΩ

+

1MΩ

4.7Ω

+

220kΩ 25kΩ Lin

AC157

CW

AC113

7.5mA AC113

Volume 100nF

100kΩ Log

CW 100Ω

Fig.7 a) (top) Leak Delta 70 with new Alps RK2712 high tracking accuracy pot, b) (bottom) Alps RK271 pot, a six-finger wiper conductive plastic pot

100µF

+

1.2kΩ

100µF

+

100Ω

0V

Fig.10. Old Brimar application circuit shows ‘backwards’ current-divider volume control

Everyday Practical Electronics, November 2015

Audio-Out (MP 1st & JR) – NOV 2015.indd 3

1kΩ

Tone

65

15/09/2015 17:07

box, like the one shown in Fig.12 is still a very useful bit of kit however, just keep the pot to 10kΩ. Musicians have these in pedal form called Swell pedals (Fig.13). These often have special pots that have short tracks, as in the Colorsound design. The log action in this case is achieved by the mechanical coupling, as shown in Fig.14.

VOLUME

CCW

CW

Maximum output impedance at 3 o’clock: 5kΩ in parallel with 5kΩ equals 2.5kΩ Input Output

0V 5kΩ

5kΩ

10kΩ

Coupling Pots generally have to be AC coupled, since any DC will be modulated by the track roughness as the pot is turned, making noise. This is typically 1-2mV per volt applied across the track at a speed of one full rotation per a second. This is why old radio volume controls often crackle, because the DC load for the detector diode is the track resistance. It’s much better to give the diode its own load resistor and AC couple the pot, as shown in Fig.15. The pot has to be over four times the value of the load resistor to avoid an increase in distortion.

Fig.11. The maximum output impedance of a pot occurs when both top and bottom halves have the same resistance. In the case of a log volume pot it is in the 3 o’clock position

If it is intended to put a volume control between a high output impedance and a low input impedance, such as from a constant current output to a virtual earth point, then the control should be wired as shown in Fig.8, forming a current divider rather than a voltage divider. This technique maintains the log law/tracking and gives lower noise at minimum volume on inverting op amp inputs – see Fig.9. The two configurations are circuit ‘duals’, like star and delta connections. The current divider was often used in old low-impedance transistor circuits, such as the Brimar germanium amp in Fig.10. Interestingly, a linear pot was specified for this circuit. An almost identical Mullard circuit used a 2kΩ logarithmic pot. It’s worth pointing out here that a volume control will have a significant output impedance, which can cause treble loss if fed into a capacitive load such as long cables. The impedance is at a maximum when both top and bottom parts of the track relative to the wiper are equal value. For a 10kΩ log pot this will be 2.5kΩ at around 3 o’clock, as shown

Fig.12 a) (top) Passive pre-amp – an oxymoron describing a stereo volume pot in a box, b) (bottom) Internals of passive pre-amp – note the classic Bourns 81 pot

in Fig.11. The Hi-Fi craze for passive pre-amps, which are basically a pot in a box, sometimes with input switching, gives some strange effects. I met a Hi-Fi buff who said his system sounded much more ‘mellow’ with his new passive pre-amp. The output impedance of the 100kΩ pot used had combined with the 2.2nF RF filter capacitor on the input of his power amp to give a –3dB roll-off at 2.9kHz! A volume control in a

Fig.13. Swell pedal – a volume pot in a box actuated by a pedal

66

Audio-Out (MP 1st & JR) – NOV 2015.indd 4

Value To obtain the lowest noise, it’s best to use the lowest pot value one can use without loading the source. Guitar pickups and ceramic cartridges will often need 220kΩ to 1MΩ. For normal op amp circuitry, 10kΩ seems to be standard. With top-notch op amps with high current capability, lower values down to 1kΩ may be used for minimum noise. I once designed a whole mixing desk to use 10kΩ lin pots throughout. (I got a fantastic quantity discount!) With most Hi-Fi systems, a line input impedance of 47kΩ seems to be standard, mainly to allow for weak

Fig.14. Mechanical linkage in Colorsound Swell pedal gives log action with short linear pot track

Everyday Practical Electronics, November 2015

15/09/2015 17:07

Audio output

AM radio signal

2.2µF

+

Ge detector CW

CW

5kΩ Log

10nF

4.7kΩ Log

10nF

20kΩ Log

0V DC from rectification ation on pot causes scratching

Fig.15. One cause of volume control crackling in old radios is DC on the pot track – the pot should be AC coupled

output stages in various sources that may be connected. However, for most modern soundcards, 10kΩ will not dB output 20 Rear track Front track

15

10

5

-5 Maximum error 1.5dB

-10

cause appreciable loading. Generally, with the normal potential divider type volume control, the value is not very critical. It is fine to replace pots one E6 step away from their stated value. So a 47kΩ pot could be replaced with 22kΩ or 100kΩ without risking problems. Note that pots using the old value system were often used – eg, 25kΩ and 50kΩ.

-15 CW -20

CW

20dB output at 1kHz

-25

dB Fluke dB meter

-30 -34dB noise floor -35 0

20

40

60

80

100

Percentage rotation 10kΩ logarithmic dual-gang potentiometer

Fig.16. Typical logarithmic dual-gang pot matching curves – absolutely appalling!

Radio Bygones June/Ju ly 2014 Issue No. 149

ISSN 0956 -974

A Very Lar ge Eddyston e Receiver

X

Dual-gang potentiometers Most stereo systems use dual-gang pots, one end for left, the other for right. The main problem with dual-gang pots is mismatching between the tracks, such as the curve shown in Fig.16. Like crossover

Fig.17. Earth the metal cases of pots using pot tag to avoid noise pick-up

distortion in power-amps, this issue has been exercising the minds of audio engineers for decades. Earthing There is the possibility of capacitive crosstalk in stereo pots and most metal-cased (and some plastic) units have a metal barrier between the two sections. Note that it’s essential to earth all metal-cased pots. If this can’t be done with a metal panel, then the case will have to be earthed by other means. Pot manufacturer Bourns make a tag specifically for this purpose, part no H-127, shown in Fig.17. The electric guitar maker approach of soldering a wire onto the case is sometimes done, but it is not recommended. With plastic-cased pots the noise pick-up can be minimised by using low values and impedances. Next month, we’ll talk about pot construction and ways round the defects of this ancient, but ergonomically superior technology. April/May 2014 Issue No. 148

The magazine for all vintage radio enthusiasts.

·· · ·· ·

Covers: Domestic radio and TV Amateur radio M ilitary, aeronautical or marine communications Radar or radio navigation Broadcasting Radio sytems

ISSN 0956 -974

X

The Lafaye tte HE-80 Communicat ions Receiver

Sound Sal es Ltd., And The ‘DX Plu The Roberts s Three’ Tun P5A Transp er ortable Rad AVO TFM io Por table AM /FM Signal Generator

www.radio bygo

nes.com

RB Front

Cover.ind

d 1

12/03/201

4 16:07:50

Subscribe to Radio Bygones (available by postal subscription): 1 year (6 issues) UK £27.00; Europe £29.00; Rest of the World £34.00

OR

Download your PDF copies, only £12.00 for one year Kolster-Bra ndes 840 The Writing G3OGR – s Of Francis George Par t 1 Rayer, The Valve Era: A Wh istful Backwa rds Glance

Tel: 01202 880299 or visit: www.radiobygones.com

www.radio bygo

nes.com

RB Front

Cover.ind

d 1

30/04/201

4 11:45:13

Everyday Practical Electronics, November 2015

Audio-Out (MP 1st & JR) – NOV 2015.indd 5

67

16/09/2015 09:36

DIRECT BOOK SERVICE

W

NE

RASPBERRY Pi FOR DUMMIES Sean McManus and Mike Cook

Write games, compose and play music, even explore electronics – it’s easy as Pi! The Raspberry Pi offers a plateful of opportunities, and this great resource guides you step-by-step, from downloading, copying, and installing the software to learning about Linux and finding cool new programs for work, photo editing, and music. You’ll discover how to write your own Raspberry Pi programs, create fun games, and much more! Open this book and find: What you can do with Python; Ways to use the Raspberry Pi as a productivity tool; How to surf the web and manage files; Secrets of Sonic Pi music programming; A guide to creating animations and arcade games; Fun electronic games you can build; How to build a 3D maze in Minecraft; How to play music and videos on your Raspberry Pi.

400 Pages

Order code RPiDUM01

£17.99

ELECTRONICS TEACH-IN 6 – A COMPREHENSIVE GUIDE TO RASPBERRY Pi Mike & Richard Tooley Teach-In 6 contains an exciting series of articles that provides a complete introduction to the Raspberry Pi, the low cost computer that has taken the education and computing world by storm. This latest book in our Teach-In series will appeal to electronic enthusiasts and computer buffs wanting to get to grips with the Raspberry Pi. Anyone considering what to do with their Pi, or maybe they have an idea for a project but don’t know how to turn it into reality, will find Teach-In 6 invaluable. It covers: Programming, Hardware, Communications, Pi Projects, Pi Class, Python Quickstart, Pi World, Home Baking etc. The book comes with a FREE cover-mounted DVDROM containing all the necessary software for the series so that readers can get started quickly and easily with the projects and ideas covered.

160 Pages

Order code ETI6

The books listed have been selected by Everyday Practical Electronics editorial staff as being of special interest to everyone involved in electronics and computing. They are supplied by mail order direct to your door. Full ordering details are given on the next page.

FOR A FULL DESCRIPTION OF THESE BOOKS AND CD-ROMS SEE THE SHOP ON OUR WEBSITE

www.epemag.com All prices include UK postage

£8.99

THE BASIC SOLDERING GUIDE HANDBOOK LEARN TO SOLDER SUCCESSFULLY! ALAN WINSTANLEY

MICROPROCESSORS

The No.1 resource to learn all the basic aspects of electronics soldering by hand. With more than 80 high quality colour photographs, this book explains the correct choice of soldering irons, solder, fluxes and tools. The techniques of how to solder and desolder electronic components are then explained in a clear, friendly and non-technical fashion so you’ll be soldering successfully in next to no time! The book also includes sections on Reflow Soldering and Desoldering Techniques, Potential Hazards and Useful Resources. Plus a Troubleshooting Guide. Also ideal for those approaching electronics from other industries, the Basic Soldering Guide Handbook is the best resource of its type, and thanks to its excellent colour photography and crystal clear text, the art of soldering can now be learned by everyone!

86 Pages

IC 555 PROJECTS E. A. Parr 167 pages

PRACTICAL ELECTRONICS HANDBOOK – 6th Edition. Ian Sinclair Order code NE21

£9.99

£33.99

222 pages

Order code BP392

Order code NE100

£18.99

ELECTRONIC CIRCUITS – FUNDAMENTALS APPLICATIONS – Third Edition Mike Tooley

400 pages

Order code TF43

&

£25.99

FUNDAMENTAL ELECTRICAL AND ELECTRONIC PRINCIPLES – Third Edition C.R. Robertson

368 pages

Order code TF47

£21.99

A BEGINNER’S GUIDE TO TTL DIGITAL ICs R.A. Penfold

142 pages

OUT OF PRINT BP332

UNDERSTANDING SYSTEMS Owen Bishop

ELECTRONIC

228 pages

Order code NE35

68

Books1.indd 68

£38.00

Order code NE31

AND

£29.99

Order code NE36

£25.00

PIC IN PRACTICE (2nd Edition) David W. Smith £5.99

308 pages

Order code NE39

£24.99

MICROCONTROLLER COOKBOOK Mike James £5.45

240 pages

Order code NE26

£36.99

BOOK ORDERING DETAILS

STARTING ELECTRONICS – 4th Edition Keith Brindley

296 pages

Order code BP374

Order code NE45

£5.49

PRACTICAL FIBRE-OPTIC PROJECTS R. A. Penfold

132 pages

£34.99

THE PIC MICROCONTROLLER YOUR PERSONAL INTRODUCTORY COURSE – THIRD EDITION. John Morton

270 pages Order code BP44

Order code NE48

INTRODUCTION TO MICROPROCESSORS MICROCONTROLLERS – SECOND EDITION John Crisp

ELECTRONIC PROJECT BUILDING FOR BEGINNERS R. A. Penfold

135 pages

298 pages

PROGRAMMING 16-BIT PIC MICROCONTROLLERS IN C – LEARNING TO FLY THE PIC24 Lucio Di Jasio (Application Segments Manager, Microchip, USA)

496 pages +CD-ROM

PROJECT CONSTRUCTION

THEORY AND REFERENCE 440 pages

Order code AW1

INTERFACING PIC MICROCONTROLLERS – SECOND EDITION Martin Bates

£5.45

CONTROL

All prices include UK postage. For postage to Europe (air) and the rest of the world (surface) please add £3 per book. Surface mail can take up to 10 weeks to some countries. For the rest of the world airmail add £4 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 or Maestro to: DIRECT BOOK SERVICE, WIMBORNE PUBLISHING LIMITED, 113 LYNWOOD DRIVE, MERLEY, WIMBORNE, DORSET BH21 1UU. Books are normally sent within seven days of receipt of order, but please allow 28 days for delivery – more for overseas orders. Please check price and availability (see latest issue of Everyday Practical Electronics) before ordering from old lists.

For a full description of these books please see the shop on our website. Tel 01202 880299 Fax 01202 843233. E-mail: [emailprotected]

Order from our online shop at: www.epemag.com

£36.99

Everyday Practical Electronics, November 2015

15/09/2015 17:27

COMPUTING AND ROBOTICS

FAULT FINDING AND TEST EQUIPMENT

NEWNES INTERFACING COMPANION Tony Fischer-Cripps

295 pages

Order code NE38

COMPUTING FOR THE OLDER GENERATION Jim Gatenby £41.00

HOW TO BUILD A COMPUTER MADE EASY R.A. Penfold

120 pages Order code BP707 GETTING THE MOST FROM YOUR MULTIMETER R. A. Penfold

96 pages

Order code BP239

£5.49

PRACTICAL ELECTRONIC FAULT FINDING AND TROUBLESHOOTING Robin Pain

274 pages

£41.99

224 pages £8.49

EASY PC CASE MODDING R.A. Penfold £8.99

FREE DOWNLOADS TO PEP-UP AND PROTECT YOUR PC R.A. Penfold

£7.99

THE INTERNET – TWEAKS, TIPS AND TRICKS R. A. Penfold £7.99

Order code BP716

£7.50

394 pages

Order code MGH3

OSCILLOSCOPES – FIFTH EDITION Ian Hickman

288 pages

Order code NE37

Order code BP709

ELECTRONICS TEACH-IN 5 £36.99

AUDIO & VIDEO

£8.49

ELECTRONICS TEACH-IN 5

£21.99

FR

EE Jump Start – 15 design and build circuit projects dedicated to newCD-ROM comers or those following courses in school and colleges. The projects are: Moisture Detector, Quiz Machine, Battery Voltage Checker, Solar-Powered Charger, Versatile Theft Alarm, Spooky Circuits, Frost Alarm, Mini Christmas Lights, iPod Speaker, Logic Probe, DC Motor Controller, Egg Timer, Signal Injector Probe, Simple Radio Receiver, Temperature Alarm. PLUS: PIC’ N MIX – starting out with PIC Microcontrollers and PRACTICALLY SPEAKING – the techniques of project construction.

VALVE AMPLIFIERS – Second Edition Morgan Jones

288 pages

Order code NE33

£40.99

BUILDING VALVE AMPLIFIERS Morgan Jones

368 pages

Order code NE40

FREE CD-ROM – The free CD-ROM is the complete Teach-In 2 book providing a practical introduction to PIC Microprocessors plus MikroElektronika, Microchip and L-Tek PoScope software. 160 Pages Order code ETI5 £8.99

Order code PC119

Order code BP901

£14.99

298 pages

Order code BP902

£14.99

HOW TO FIX YOUR PC PROBLEMS R. A. Penfold Order code BP705

£8.49

WINDOWS 7 – TWEAKS, TIPS AND TRICKS Andrew Edney

120 pages

Order code BP708

£8.49

120 pages

Order code BP704

£8.49

WINDOWS 8.1 EXPLAINED Noel Kantaris

180 Pages

Order code BP747

£10.99

RASPBERRY PI RASPBERRY Pi MANUAL: A practical guide to the revolutionary small computer

176 pages

Order code H001

£17.99

RASPBERRY Pi USER-GUIDE – Third Edition 262 pages Order code JW001 £16.99 PROGRAMMING THE RASPBERRY Pi 192 pages Order code MGH4

£10.99

GETTING STARTED WITH RASPBERRY Pi

164 pages

Order code OR01

£11.50

Full name: ....................................................................................................................................... Address: .......................................................................................................................................... ......................................................................................................................................................... .........................................................................................................................................................

Order code PC121 £7.95

ELECTRONIC PROJECTS FOR VIDEO ENTHUSIASTS R.A. Penfold

109 pages

288 pages +

Order code PC120 £10.95

QUICK GUIDE TO DIGITAL AUDIO RECORDING Ian Waugh

208 pages

INTRODUCING ROBOTICS WITH LEGO MINDSTORMS Robert Penfold

BOOK ORDER FORM £7.45

MAKING MUSIC WITH YOUR COMPUTER Stephen Bennett

92 pages

£26.00

£29.00

QUICK GUIDE TO MP3 AND DIGITAL MUSIC Ian Waugh

60 pages

£16.99

GETTING STARTED IN COMPUTING FOR THE OLDER GENERATION Jim Gatenby

AN INTRODUCTION TO eBAY FOR THE OLDER GENERATION Cherry Nixon

HOW ELECTRONIC THINGS WORK – AND WHAT TO DO WHEN THEY DON’T Robert Goodman

Order code NE46

128 pages Order code BP721

eBAY – TWEAKS, TIPS AND TRICKS R. A. Penfold

120 pages

Order code MGH1

MORE ADVANCED ROBOTICS WITH LEGO MINDSTORMS – Robert Penfold

264 pages Order code BP514

128 pages

£8.99

£7.99

WINDOWS XP EXPLAINED N. Kantaris and P.R.M. Oliver

128 pages

Order code BP601

ROBOT BUILDERS COOKBOOK Owen Bishop

366 pages

192 pages + CDROM Order code BP542

128 pages Order code BP722 Order code NE22

308 pages

ANDROIDS, ROBOTS AND ANIMATRONS Second Edition – John Iovine

Order code BP356 £5.45

.............................................. Post code: ........................... Telephone No: .................................... Signature: ........................................................................................................................................

 I enclose cheque/PO payable to DIRECT BOOK SERVICE for £ ..............................................  Please charge my card £ ....................................... Card expiry date......................................... Card Number ....................................................................... Maestro Issue No.............................. Valid From Date ................ Card Security Code ................

(The last three digits on or just below the signature strip)

Please send book order codes: ....................................................................................................... .......................................................................................................................................................... Please continue on separate sheet of paper if necessary

Everyday Practical Electronics, November 2015

Books1.indd 69

69

15/09/2015 17:27

EPE IS PLEASED TO BE ABLE TO OFFER YOU THESE

ELECTRONICS CD-ROMS From £49.00

TINA Design Suite V10 Analogue, Digital, Symbolic, RF, MCU and Mixed-Mode Circuit Simulation and PCB Design with TINA

FE ATU RE OU D IN RT E A 201 CH 5S -IN ER IES

TINA Design Suite V10 is a powerful yet affordable software package for analysing, designing and real time testing analogue, digital, MCU, and mixed electronic circuits and their PCB layouts. You can also analyse RF, communication, optoelectronic circuits, test and debug microcontroller applications. Enter and analyse any circuit up to 100 nodes (student), or 200 with the Basic (Hobbyist) version within minutes with TINA’s easy-to-use schematic editor. Enhance your schematics by adding text and graphics. Choose components from the large library containing more than 10,000 manufacturer models. Analyse your circuit through more than 20 different analysis modes or with 10 high tech virtual instruments. Present your results in TINA’s sophisticated diagram windows, on virtual instruments, or in the live interactive mode where you can even edit your circuit during operation. Customise presentations using TINA’s advanced drawing tools to control text, fonts, axes, line width, colour and layout. You can create and print documents directly inside TINA or cut and paste your results into your favourite word procesing or DTP package. TINA includes the following Virtual Instruments: Oscilloscope, Function Generator, Multimeter, Signal Analyser/Bode Plotter, Network Analyser, Spectrum Analyser, Logic Analyser, Digital Signal Generator, XY Recorder. This offer gives you a CD-ROM – the software will need registering (FREE) with Designsoft (TINA), details are given within the package.

Get TINA Basic V10 (Hobbyist) for £129 or Student V10 version for £49 Prices include VAT and UK postage

+

get a 1 year free subscription for TINACloud the breakthrough cloud version of TINA which you can run on most operating systems and computers, including PCs, Macs, thin clients iPads and other tablets – even on many smart phones, smart TVs and e-book readers.

To order please either fill out and return the order form, or call us on 01202 880299 Alternatively you can order via our secure online shop at: www.epemag.com

ELECTRONICS TEACHIN 2 ELECTRONICS TEACH-IN 2 CD-ROM USING PIC MICROCONTROLLERS A PRACTICAL INTRODUCTION This Teach-In series of articles was originally published in EPE in 2008 and, following demand from readers, has now been collected together in the Electronics Teach-In 2 CD-ROM. The series is aimed at those using PIC microcontrollers for the first time. Each part of the series includes breadboard layouts to aid understanding and a simple programmer project is provided. Also included are 29 PIC N’ Mix articles, also republished from EPE. These provide a host of practical programming and interfacing information, mainly for those that have already got to grips with using PIC microcontrollers. An extra four part beginners guide to using the C programing language for PIC microcontrollers is also included. The CD-ROM also contains all of the software for the Teach-In 2 series and PIC N’ Mix articles, plus a range of items from Microchip – the manufacturers of the PIC microcontrollers. The material has been compiled by Wimborne Publishing Ltd. with the assistance of Microchip Technology Inc.

CD-ROM

Order code ETI2 CD-ROM

£9.50

ELECTRONICS TEACHIN 3

ELECTRONICS TEACHIN 4

ELECTRONICS TEACH-IN 3 CD-ROM

ELECTRONICS TEACH-IN 4 CD-ROM

The three sections of this CD-ROM cover a very wide range of subjects that will interest everyone involved in electronics, from hobbyists and students to professionals. The first 80-odd pages of Teach-In 3 are dedicated to Circuit Surgery, the regular EPE clinic dealing with readers’ queries on circuit design problems – from voltage regulation to using SPICE circuit simulation software. The second section – Practically Speaking – covers the practical aspects of electronics construction. Again, a whole range of subjects, from soldering to avoiding problems with static electricity and indentifying components, are covered. Finally, our collection of Ingenuity Unlimited circuits provides over 40 circuit designs submitted by the readers of EPE. The CD-ROM also contains the complete Electronics Teach-In 1 book, which provides a broad-based introduction to electronics in PDF form, plus interactive quizzes to test your knowledge, TINA circuit simulation software (a limited version – plus a specially written TINA Tutorial). The Teach-In 1 series covers everything from Electric Current through to Microprocessors and Microcontrollers and each part includes demonstration circuits to build on breadboards or to simulate on your PC. CD-ROM Order code ETI3 CD-ROM £8.50

A Broad-Based Introduction to Electronics. The Teach-In 4 CD-ROM covers three of the most important electronics units that are currently studied in many schools and colleges. These include, Edexcel BTEC level 2 awards and the electronics units of the new Diploma in Engineering, Level 2. The CD-ROM also contains the full Modern Electronics Manual, worth £29.95. The Manual contains over 800 pages of electronics theory, projects, data, assembly instructions and web links. A package of exceptional value that will appeal to all those interested in learning about electronics or brushing up on their theory, be they hobbyists, students or professionals.

CD-ROM

Order code ETI4 CD-ROM £8.99

ELECTRONICS TEACH-IN BUNDLE – SPECIAL BUNDLE PRICE £14 FOR PARTS 1, 2 & 3 CD-ROMs

70

CD-ROMs Pages.indd 70

Order codeOrder code ETIBUNDLE ETI BUN

Bundle Price £14.00

Everyday Practical Electronics, November 2015

15/09/2015 17:29

PICmicro TUTORIALS

AND PROGRAMMING

HARDWARE

PICmicro Multiprogrammer Board and Development Board Suitable for use with the three software packages listed below

This flexible PICmicro microcontroller programmer board and combination board allows students and professional engineers to learn 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 MLoader utility that is free to download when you buy the multiprogrammer board. For those who want to learn, choose one or all of the packages below to use with the hardware.

• Makes it easier to develop PICmicro projects • Supports low cost Flash-programmable PICmicro devices • Fully featured integrated displays – 16 individual LEDs, quad 7-segment display and alphanumeric LCD display

• Supports PICmicro microcontrollers with A/D converters • Fully protected expansion bus for project work • USB programmable • Compatible with the E-blocks range of accessories

£167 including VAT and postage, supplied with USB cable and free to download programming software SOFTWARE

ASSEMBLY FOR PICmicro V5

‘C’ FOR 16 Series PICmicro Version 5

(Formerly PICtutor)

Assembly for PICmicro microcontrollers V3.0 (previously known as PICtutor) by John Becker contains a complete course in programming the PIC16F84 PICmicro microcontroller from Arizona Microchip. It starts with fundamental concepts and extends up to complex programs including watchdog timers, interrupts and sleep modes. The CD makes use of the latest simulation techniques which provide a superb tool for learning: the Virtual PICmicro microcontroller, this is a simulation tool that allows users to write and execute MPASM assembler code for the PIC16F84 microcontroller on-screen. Using this you can actually see what happens inside the PICmicro MCU as each instruction is executed, which enhances understanding. Comprehensive instruction through 45 tutorial sections Includes Vlab, a Virtual PICmicro microcontroller: a fully functioning simulator Tests, exercises and projects covering a wide range of PICmicro MCU applications Includes MPLAB assembler Visual representation of a PICmicro showing architecture and functions Expert system for code entry helps first time users Shows data flow and fetch execute cycle and has challenges (washing machine, lift, crossroads etc.) Imports MPASM files.

FLOWCODE FOR PICmicro V6

The C for PICmicro microcontrollers CD-ROM is designed for students and professionals who need to learn how to program embedded microcontrollers in C. The CD-ROM contains a course as well as all the software tools needed to create Hex code for a wide range of PICmicro devices – including a full C compiler for a wide range of PICmicro devices. Although the course focuses on the use of the PICmicro microcontrollers, this CD-ROM will provide a good grounding in C programming for any microcontroller. Complete course in C as well as C programming for PICmicro microcontrollers Highly interactive course Virtual C PICmicro Includes a C compiler improves understanding Includes for a wide range of PICmicro devices full Integrated Development Environment Includes MPLAB software Compatible with most Includes a compiler for PICmicro programmers all the PICmicro devices.

Flowcode is a very high level language programming system based on flowcharts. Flowcode allows you to design and simulate complex systems in a matter of minutes. A powerful language that uses macros to facilitate the control of devices like 7-segment displays, motor controllers and LCDs. The use of macros allows you to control these devices without getting bogged down in understanding the programming. When used in conjunction with the development board this provides a seamless solution that allows you to program chips in minutes.

• Requires no programming experience • A llows complex PICmicro applications to be designed quickly • Uses international standard flow chart symbols • F ull on-screen simulation allows debugging and speeds up the development process. • F acilitates learning via a full suite of demonstration tutorials • P roduces ASM code for a range of 18, 28 and 40-pin devices • 16-bit arithmetic strings and string manipulation • Pulse width modulation • I2C.

Please note: Due to popular demand, Flowcode PICmicro, AVR, DSPIC, PIC24 & ARM V6 are now available as a download. Please include your email address and a username (of your choice) on your order. A unique download code will then be emailed to you. If you require the CDROM as a back-up then please add an extra £14 to the price.

• •

Minimum system requirements for these items: Pentium PC running, 2000, ME, XP; CD-ROM drive; 64MB RAM; 10MB hard disk space. Flowcode will run on XP or later operating systems

PRICES Prices for each of the CD-ROMs above are: (Order form on next page) (UK and EU customers add VAT to ‘plus VAT’ prices)

Everyday Practical Electronics, November 2015

CD-ROMs Pages.indd 71

Hobbyist/Student . . . . . . . . . . . . . . . . . . . . . . . . . . . . . £58.80 inc VAT Professional (Schools/HE/FE/Industry) . . . . . . . . . . . £150 plus VAT Professional 10 user (Network Licence) . . . . . . . . . . . £499 plus VAT Site Licence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . £999 plus VAT Flowcode (choose PIC, AVR, ARM, dsPIC, PIC24) . . . £94.80 plus VAT

71

15/09/2015 17:29

GCSE ELECTRONICS

CIRCUIT WIZARD

Circuit Wizard is a revolutionary software system that combines circuit design, PCB design, simulation and CAD/CAM manufacture in one complete package. Two versions are available, Standard or Professional. By integrating the entire design process, Circuit Wizard provides you with all the tools necessary to produce an electronics project from start to finish – even including on-screen testing of the PCB prior to construction! Circuit diagram design with component library (500 components Standard,1500 components Professional) Virtual instruments (4 Standard, 7 professional) On-screen animation Interactive circuit diagram simulation True analogue/digital simulation Simulation of component destruction PCB Layout Interactive PCB layout simulation Automatic PCB routing Gerber export Multi-level zoom (25% to 1000%) Multiple undo and redo Copy and paste to other software Multiple document support

*

*

* *

* * *

*

*

* *

*

* *

Suitable for any student who is serious about studying and who wants to achieve the best grade possible. Each program’s clear, patient and structured delivery will aid understanding of electronics and assist in developing a confident approach to answering GCSE questions. The CD-ROM will be invaluable to anyone studying electronics, not just GCSE students.

*the Contains National

comprehensive teaching material to cover Curriculum syllabus Regular exercises reinforce the teaching points Retains student interest with high quality animation and graphics Stimulates learning through interactive exercises Provides sample examination ques-tions with model solutions Authored by practising teachers Covers all UK examination board syllabuses Caters for all levels of ability Useful for selftuition and revision

*

*

* *

*

*

*

*

SUBJECTS COVERED

Electric Circuits – Logic Gates – Capacitors & Inductors – Relays – Transistors – Electric Transducers – Operational Amplifiers – Radio Circuits – Test Instruments Over 100 different sections under the above headings

This software can be used with the Jump Start and Teach-In 2011 series (and the Teach-In 4 book). Standard £61.25 inc. VAT. Professional £75 plus VAT.

Please send me:

£12.50 inc. VAT and P&P Minimum system requirements for these CDROMs: Pentium PC, CD-ROM drive, 32MB RAM, 10MB hard disk space. Windows 2000/ ME/XP, mouse, sound card, web browser.

CD-ROM ORDER FORM

Version required:  Assembly for PICmicro V5  Hobbyist/Student  ‘C’ for 16 Series PICmicro V5  Professional  Professional 10 user  Site licence

ORDERING

ALL PRICES INCLUDE UK POSTAGE

Note: The software on each version is the same, only the licence for use varies.

 Flowcode for PICmicro V6 (DOWNLOAD ONLY)  Flowcode for AVR V6 (DOWNLOAD ONLY)  Flowcode for ARM V6 (DOWNLOAD ONLY)  Flowcode for dsPIC V6 (DOWNLOAD ONLY)  Flowcode for PIC24 V6 (DOWNLOAD ONLY)

Standard/Student/Basic (Hobbyist) Version price includes postage to most countries in the world EU residents outside the UK add £5 for airmail postage per order

Email: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Username: . . . . . . . . . . . . . . . . . . . . . . . . . .  PICmicro Multiprogrammer Board and Development Board V4 (hardware)  Circuit Wizard – Standard  Circuit Wizard – Professional  GCSE Electronics NEW

 TINA Design Suite V10 Basic (Hobbyist)  TINA Design Suite V10 (Student)

Professional, Multiple User and Site License Versions – overseas readers add £5 to the basic price of each order for airmail postage (do not add VAT unless you live in an EU (European Union) country, then add VAT at 20% or provide your official VAT registration number).

 Teach-In 2  Teach-In 3  Teach-In 4  Teach-In Bundle

Full name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. Address: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post code: . . . . . . . . . . . . . . . . . Tel. No: . . . . . . . . . . . . . . . . . . .

Send your order to: Direct Book Service Wimborne Publishing Ltd 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU To order by phone ring

Signature: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  I enclose cheque/PO in £ sterling payable to WIMBORNE PUBLISHING LTD for £ . . . . . . . . .  Please charge my Visa/Mastercard/Maestro: £ . . . . . . . . . . Valid From: . . . . . . . . . . Card expiry date: . . . . . . . . . . . . . Card No: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Maestro Issue No. . . . . . . . . . Card Security Code . . . . . . . . . . (The last 3 digits on or just under the signature strip)

72

CD-ROMs Pages.indd 72

01202 880299. Fax: 01202 843233 Goods are normally sent within seven days

E-mail: [emailprotected] Online shop:

www.epemag.com

Everyday Practical Electronics, November 2015

15/09/2015 17:30

STORE YOUR BACK ISSUES ON CD-ROMS low-cost Precision 10V Dc reference

• CD sound quality • SD card memo • Powe ry red by a single • Colou AA-size r touch lithium-ion -screen with no cell external controls

Burp Cha rge

WIN MICR A dsPIC OC HIP CA 33EV STARN-LIN 5V TE KIT R

Deluxe fan speed controller rGB leD striP DriVer

TeACh-In 2015 – PArT 4

TeaCh-

in 201 5–

PluS

MAY 2015 £4.40

CirCuit Surgery, Net work, audio out, readout, PiC N’ MiX, teChNo talk & PraCtiCally SPeakiNg

es!

half a The first CenTuR Y of Pow 2N3055 50 years of eR the powe

Decoration and illumination with a rainbow of colours

• understand discrete linear circuit design • Learn about noise and distortion

iconic r trans istor

• unde rstand PaRT 5 discrete • learn linear about circuit filters desig and tone controls n

PluS

CirCuit Surgery, teChNo Net work talk & iNterFaCe , audio out, PiC N’ MiX,

JUNE 2015 20/03/2015 10:39:48 Cover

V2.indd

www.epemag.com (go to the UK store) or by phone, fax, email or post

Your Bat teri

Rapid alternate process charge/disc – harge temperatureduces press ure and and increa re build-up in cells, ses effici ency

Precise control without noise or interference

MAY 2015 Cover.indd 1

Order on-line from

TouChauDio SCReen Dig ReCoRD iTal eR – PaR T1

• Perfect for checking DMMs • 10.000V without adjustment • Compact and battery powered • Accurate and affordable

MIC WIN RO A BL PI CH UE C3 ST TO 2 IP AR OT KI TER H T

JUNE 2015

£4.40

1

01/04/2015

VOL 1:

13:08:17

BACK ISSUES – January 1999 to June 1999 Plus some bonus material from Nov and Dec 1998

VOL 2:

BACK ISSUES – July 1999 to December 1999

VOL 3:

BACK ISSUES – January 2000 to June 2000

VOL 4:

BACK ISSUES – July 2000 to December 2000

VOL 5:

BACK ISSUES – January 2001 to June 2001

VOL 6:

BACK ISSUES – July 2001 to December 2001

VOL 7:

BACK ISSUES – January 2002 to June 2002

VOL 8:

BACK ISSUES – July 2002 to December 2002

VOL 9:

BACK ISSUES – January 2003 to June 2003

VOL 10: BACK ISSUES – July 2003 to December 2003 VOL 11: BACK ISSUES – January 2004 to June 2004 VOL 12: BACK ISSUES – July 2004 to December 2004 VOL 13: BACK ISSUES – January 2005 to June 2005 VOL 14: BACK ISSUES – July 2005 to December 2005 VOL 15: BACK ISSUES – January 2006 to June 2006 VOL 16: BACK ISSUES – July 2006 to December 2006 VOL 17: BACK ISSUES – January 2007 to June 2007

ONLY

£219.965.F4OR55 YEAR) (£

d ing VAT an each includ

p&p

VOL 23: BACK ISSUES – January 2010 to June 2010 VOL 24: BACK ISSUES – July 2010 to December 2010 VOL 25: BACK ISSUES – January 2011 to June 2011 VOL 26: BACK ISSUES – July 2011 to December 2011 VOL 27: BACK ISSUES – January 2012 to June 2012 VOL 28: BACK ISSUES – July 2012 to December 2012 VOL 29: BACK ISSUES – January 2013 to June 2013 VOL 30: BACK ISSUES – July 2013 to December 2013

NEW Vol.31 & 32

VOL 18: BACK ISSUES – July 2007 to December 2007

VOL 31: BACK ISSUES – January 2014 to June 2014 VOL 32: BACK ISSUES – July 2014 to December 2014

VOL 19: BACK ISSUES – January 2008 to June 2008 VOL 20: BACK ISSUES – July 2008 to December 2008 VOL 21: BACK ISSUES – January 2009 to June 2009 VOL 22: BACK ISSUES – July 2009 to December 2009

BACK ISSUES DVD/CD-ROM ORDER FORM Please send me the following Back Issue DVD/CD-ROMs. Volume Numbers:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

FIVE YEARMs O DVD/CD-R ILABLE NOW AVA

.................................................... ............... Price £16.45 each, £29.95 for Five Year DVD/CD-ROMs – includes postage to anywhere in the world. Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

FIVE YEAR CD/DVD-ROMs No.1 – Jan ’03 to Dec ’07 No.2 – Jan ’04 to Dec ’08 No.3 – Jan ’05 to Dec ’09 No.4 – Jan ’06 to Dec ’10 No.5 – Jan ’07 to Dec ’11 No.6 – Jan ’08 to Dec ’12 No.7 – Jan ’09 to Dec ’13 NEW No.8 No.8 – Jan ’10 to Dec ’14

....... Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 I enclose cheque/P.O./bank draft to the value of £ . . . . . . . . .  please charge my Visa/Mastercard/Maestro £ . . . . . . . . . . . . Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Card Security Code . . . . . . . . . . (The last 3 digits on or just under the signature strip) Valid From . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . . Maestro Issue No. . . . . . . . . . .

NOTE: These DVD/CD-ROMs are suitable for use on any PC with a DVD/CD-ROM drive. They require Adobe Acrobat Reader (available free from the Internet – www.adobe.com/acrobat)

SEND TO: Everyday Practical Electronics, Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU.

WHAT IS INCLUDED

Tel: 01202 880299. Fax: 01202 843233. E-mail: [emailprotected]

All volumes include the EPE Online content of every listed issue. Please note that we are unable to answer technical queries or provide data on articles that are more than five years old. Please also ensure that all components are still available before commencing construction of a project from a back issue.

Back Issues CDs - New copy.indd 67

Payments must be by card or in £ Sterling – cheque or bank draft drawn on a UK bank. Normally posted within seven days of receipt of order.

15/09/2015 17:35

Max’s Beans

By Max The Magnificent

mCookie Monster In my previous Hot Beans column (EPE, September 2015), I presented some magnetically coupled electronic modules called ‘littleBits’ (http://bit.ly/18jMIpp). They are perfect for introducing young kids to electronics; but what about more experienced users? Well, a new range of Arduino-compatible modules called ‘mCookie’ might be just the answer. First, are you familiar with the Microduino (http://bit. ly/1JvPO6x)? This little beauty, which is compatible with the Arduino Uno, is around 25mm × 25mm and costs about a fiver. Like the Arduino, the Microduino core (base) module is accompanied by a vast collection of stackable shield modules that can be used to implement almost any project you can imagine. The Microduino ecosystem evolved out of two very successful crowd-funded Kickstarter campaigns. So successful, the folks at Microduino have shipped their modules to tens of thousands of users on six continents. Following a third successful Kickstarter campaign, they have just released a new set of modules – mCookies (http://bit.ly/1JJQVmN). Like Microduino modules, these are small, powerful, Arduino-compatible modules for makers, designers, engineers, students, and curious tinkerers of all ages. Anyone who has used an Arduino has learned to his or her cost that it’s really easy to bend the pins when you are stacking shields together. Also, it’s a lot easier to connect the shields than it is to take them apart again. In order to address these problems, mCookie modules are equipped with spring (pogo) pins that provide rugged surface-to-surface connections between the modules. Furthermore, each mCookie module has four extremely powerful magnets inside the corners, which allow them to be connected together with a satisfying snap. The modules will reject each other if they are not oriented/ aligned correctly, so you simply can’t get it wrong. One feature I really like is the raised circular fixings located on each side of the module. Do these remind you of anything? Yes! You’ve got it! These allow mCookie modules to be stacked with LEGO-series products, thereby making it easier than ever for beginners and children to get started with DIY Fig.1. Although tiny, mCookie electronics. modules pack a punch Simblee delightful, my dear Another clever product that’s been around for a while now is the RFduino (http://bit.ly/1y3e9Ro). This is a finger-tip-sized, Arduino-compatible, wireless-enabled microcontroller, that’s affordable enough to leave in all of your projects!

One reason the RFduino is of interest to us here is its associated ecosystem of stackable shields (I’ll explain why in just a moment). Another reason is that the creators of the RFduino have launched a revolutionary new product called the Fig.2. RFduino module (approx. Simblee (http:// 22mm × 28mm) bit.ly/1igMfKH), which is tiny, measuring just 7mm × 10mm × 2.2mm. It boasts a 32-bit ARM Cortex-M0 processor coupled with Bluetooth Low Energy (BLE) capability. Although tiny, it provides 29 general-purpose input-outputs (GPIOs), including six analogue inputs, four PWM outputs, two SPI master/slaves, two I2C connections and a UART. The really clever part of all this is that you use the Arduino IDE to create both your application and your graphical user interface (GUI), both of which you upload into your Simblee module. ‘But why would you load the GUI into the Simblee module?’, I hear you cry. Well, this is the truly clever part. There’s also a free Simblee app that you can download onto any iOS or Android BLEenabled phone or tablet computer. When you launch this app – which I tend to think of as being a ‘Simblee Browser’ – it automatically detects any Simblee modules in the vicinity. The app then provides you with a list of these modules and a description of each one’s function. When you select a particular Simblee module, that module uploads its GUI to your phone or tablet. Pretty cool eh? As you can see from Fig.3, these Simblee modules are small enough that you could embed them just about anywhere. I’m planning on embedding them in all of my hobby projects. But what if you aren’t comfortable soldering this surface-mount module? Well, they’ve also provided a breakout board with an RFduino footprint, which means your Simblee module can take full advantage of the existing RFduino ecosystem. As I pen these words, I have a Simblee development kit winging its way to me. Once I’ve had a chance to play with it, I will report further in a future Fig.3. The tiny Simblee module column. Until then, have a good one! (7mm × 10mm × 2.2mm) Any comments or questions? – please feel free to send me an email at: [emailprotected]

74 74 Everyday Everyday Practical Practical Electronics, Electronics, November January 2015

Hot Beans (MP 1st, Max & SK) - NOV 2015.indd 74

15/09/2015 17:23

PEAK – NOV 2015.indd 1

16/09/2015 10:16

Electronic Building Blocks By Julian Edgar

Quick and easy Construction

Great results on a low budget

Electronic stethoscope for machinery Large complex projects are fun, but they take time and can be expensive. Sometimes you just want a quick result at low cost. That’s where this series of Electronic Building Blocks fits in. We use ‘cheap as chips’ components bought online to get you where you want to be... FAST! These projects range from around £15 to under a fiver... bargains!

The first step is to buy ‘Listen Up’, some cable (I used shielded two-core microphone cable) and a 10A battery clip (you could cut a clip off any old battery charger – that’s what I did). Open the unit’s box by first taking off the end caps (one covers the battery – a single AAA cell) to reveal four small screws. Undo the screws and you can open the box – see Fig.2.

Electronic Stethoscope for machinery Here is a really neat device that will allow you to listen to all sorts of strange noises in machines and other devices – helping you to diagnose mechanical ills. It will cost you less than £4 for the main part of the device – just add some headphones and shielded cable. The Electronic Stethoscope is based around the ‘Listen Up’ portable sound amplifier available from many eBay suppliers. The device is designed for people who are hard of hearing but don’t want to wear a hearing aid. It comprises a small amplifier with a built-in microphone, and pair of earphones.

Microphone Note the microphone (arrowed). It is both a large and relatively good quality unit, and it’s attached to the printed circuit board with flying leads. Unsolder the microphone leads from the board and then solder to the board the conductors of the new, shielded microphone cable, as shown in Fig.3. I also soldered the braid of the cable to the negative connection of the battery (arrowed), to provide better shielding of the signal. Make a suitable hole for the cable to ‘escape’ and then close the box. Now solder the conductors at the other end of the microphone cable to the microphone, as shown in Fig.4, keeping the cable polarity the same as the original. I chose a 4m length of

Fig.1. The ‘Listen Up’ unit

The basic unit As supplied (Fig.1), the device is not particularly high quality and doesn’t even work very well in its intended function. However, if you remote-mount the microphone and plug some decent headphones into the jack then it works rather well!

Fig.2. Locating the microphone

76

Edgar article (MP 1st & JE) - NOV 2015.indd 76

Fig.3. Changing the microphone wiring at the circuit board

Everyday Practical Electronics, November 2015

15/09/2015 17:01

Completed stethoscope I mentioned that the earphones supplied with the ‘Listen Up’ device are pretty poor, so I recommend you supply your own. High quality, fully enclosed headphones will work best – but any decent quality earphones should also be fine. With fully enclosed headphones, the sound quality is excellent.

Fig.4. Extending the microphone wiring

cable because I wanted to be able to monitor car engine noises from inside the cabin. Next, use hot melt glue to mount the microphone on the inside arm of a metal battery clip, then cover it in heatshrink (see Fig.5). If you prefer, you could glue the microphone to the end of a steel rod. Placing the other end of the rod against the machinery will work well if you want to accurately pinpoint where a particular noise is coming from.

Fig.5. Mount the mic in a strong battery clip

In use… Using the Electronic Stethoscope is very simple. You simply clip the microphone to whatever you are interested in listening to. Noises are transmitted through the metalwork directly to the clip and microphone, making the device extremely sensitive. Other fun uses There are other uses for the modified ‘Listen Up’ device described here. My son, age 10, was entranced by the fact that he could use a long cable for the microphone and eavesdrop on his parents. (He also talked about taking it to school and bugging the staff room. I sometimes wonder where he gets these ideas from?!) Given that the project involves some simple disassembly and soldering, it is electronically quite educational, so I bought him one for his birthday. Sourcing At the time of writing, a typical online unit is eBay item 331423381933 at a very reasonable £3.29 incl delivery.

Everyday Practical Electronics, November 2015

Edgar article (MP 1st & JE) - NOV 2015.indd 77

Fig.6. The finished stethoscope

Next month Here is an incredibly cheap voltage booster (just £5 including delivery to your UK letterbox) that has an adjustable voltage output from 12V to 35V and a decent power rating. All this is in our next Electronic Building Blocks article.

Next month – a voltage booster

77

15/09/2015 17:01

PCB SERVICE

CHECK US OUT ON THE WEB

NOTE: While 95% of our boards are held in stock and are dispatched within seven days of receipt of order, please allow a maximum of 28 days for delivery – overseas readers allow extra if ordered by surface mail. Back numbers or photocopies of articles are available if required – see the Back Issues page for details. WE DO NOT SUPPLY KITS OR COMPONENTS FOR OUR PROJECTS.

PROJECT TITLE

AUG ’14

ORDER CODE

COST

04107131 15107131 15107132 15106133 08104131 24107131 14108131

£8.02 £5.86 £9.64 £16.66 £9.64 £5.86 £5.86

06101121 08103131 11108131 12104131

£9.10 £6.94 £5.32 £9.10 £24.75

Hi-Fi Stereo Headphone Amplifier – Part 1

06109131 06109132 06109133 01309111

GPS Tracker

05112131

Active RF Detector Probe For DMMs Infrared To UHF Converter UHF To Infrared Converter Revised 10-Channel Remote Control Receiver PCBirdies USB Port Voltage Checker iPod Charger Adaptor

SEPT ’14

Build An AM Radio LED Ladybird Lifesaver For Lithium or SLA Batteries Do Not Disturb Phone Timer

OCT ’14

SiDRADIO

– Main PCB – Front & Rear Panel Set

NOV ’14 DEC ’14

PortaPAL-D Electronic Bellbird

– Main PCB – Microphone Input – Guitar Input

JAN ’15

“Tiny Tim” Stereo Amplifier – Power supply

APRIL ’15

A Rubidium Frequency Standard For A Song USB/RS-232C Interface Teach-In 2015 – Part 3

MAY ’15

Deluxe Fan Speed Controller RGB LED Strip Driver Low-cost Precision 10V DC Reference For Checking DMMs

JUNE ’15

Burp Charge Your Batteries Teach-In 2015 – Part 5

£13.15

78

PCB Service.indd 78

£15.05 £8.30 £12.00 £8.75

Opto-Theremin – Part 1

23108141 23108142

£14.25 £6.95

01110141

£7.45

04107141 04107142

£11.80

01110131 05109141 909

£16.40 £8.55 £10.70

01111141 01111142 01111143 18112141

£47.20

19112141 19112142

£11.80 £16.40

– Main Theremin – Volume Control Board

Mini-D Stereo 10W/Channel Class-D Audio Amplifier Wideband, Active Differential Oscilloscope Probe – Main PCB – Screening PCB

OCT ’15

Digital Effects Processor For Guitars And Musical Instruments Courtesy LED Lights Delay For Cars Teach-In 2015 – Part 9

NOV ’15

The Currawong – Part 1 – Main Board – Front Panel – Rear Panel 48V Dual Phantom Power Supply Programmable Mains Timer With Remote Switching – Main Board – Front Panel

£24.75 £9.37

* See NOTE left regarding PCBs with eight digit codes * Please check price and availability in the latest issue. A large number of older boards are listed on, and can be ordered from, our website.

Boards can only be supplied on a payment with order basis.

EPE SOFTWARE Where available, software programs for EPE Projects can be downloaded free from the Library on our website, accessible via our home page at: www.epemag.com

PCB MASTERS

PCB masters for boards published from the March ’06 issue onwards are available in PDF format free to subscribers – email fay.kearn@wimborne. co.uk stating which masters you would like.

01111131 01111132 01111133 08112131

£33.94

EPE PRINTED CIRCUIT BOARD SERVICE

£11.53

01309111 18110131

£16.65 £11.80

01110131 905

£13.42 £9.33

Order Code Project Quantity Price .............................................. Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .............................................. Tel. No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

01110131

£13.42

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

10102141

£11.80

to:

04105141 07103141 906

£8.02 £7.48 £8.75

10104141 16105141

£10.72 £8.56

04104141

£7.48

14103141 907

£13.40 £8.55

04106141 99106141 01105141

£11.55 £10.15 £13.70

JULY ’15

L-o-o-o-n-g Gating Times For The 12-Digit High-Resolution Counter Threshold Voltage Switch Touch-Screen Digital Audio Recorder – Part 2

01106141 01106142 21108141 908

SEPT ’15

£16.65

MARCH ’15 Stereo Echo & Reverb Unit Super Smooth, Full-range, 10A/230V Speed Controller for Universal Motors

COST

Nirvana Valve Simulator – Main PCB – Front Panel TempMasterMK3 Teach-In 2015 – Part 7

£19.35

FEB ’15 Audio Delay For PA Systems Teach-In 2015 – Part 1 Pre-Amp

ORDER CODE

AUG ’15

Basic 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 drilled and roller tinned, but all holes are a standard size. They are not silkscreened, nor do they have solder resist. Double-sided boards are NOT plated through hole and will require ‘vias’ and some components soldering to both sides. NOTE: PCBs from the July 2013 issue with eight digit codes have silk screen overlays and, where applicable, are double-sided, plated through-hole, with solder masks, they are similar to the photos in the relevent project articles. All prices include VAT and postage and packing. Add £2 per board for airmail outside of Europe. Remittances should be sent to The PCB Service, Everyday Practical Electronics, Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. Tel: 01202 880299; Fax 01202 843233; Email: [emailprotected]. On-line Shop: www.epemag.com. Cheques should be crossed and made payable to Everyday Practical Electronics (Payment in £ sterling only).

PROJECT TITLE

Everyday Practical Electronics Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Valid From . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . Card Security No. . . . . . . . . Maestro Issue No. . . . . . . . Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Note: You can also order PCBs by phone, Fax or Email or via the Shop on our website on a secure server:

http://www.epemag.com Everyday Practical Electronics, November 2015

18/09/2015 11:15

If you want your advertisem*nts to be seen by the largest readership at the most economical price our classified page offers excellent value. The rate for semi-display space is £10 (+VAT) per centimetre high, with a minimum height of 2·5cm. All semi-display adverts have a width of 5.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. Advertisem*nts, together with remittance, should be sent to Everyday Practical Electronics Advertisem*nts, 113 Lynwood Drive, Merley, Wimborne, Dorset, BH21 1UU. Phone: 01202 880299. Fax: 01202 843233. Email: [emailprotected]. For rates and information on display and classified advertising please contact our Advertisem*nt Manager, Stewart Kearn as above.

HARDWARE KNOBS Etc. For full range Visit Section 10

www.partridgeelectronics.co.uk

BOWOOD ELECTRONICS LTD Suppliers of Electronic Components Place a secure order on our website or call our sales line All major credit cards accepted Web: www.bowood-electronics.co.uk Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield, Derbyshire S40 2QR. Sales: 01246 200222 Send 60p stamp for catalogue

CANTERBURY WINDINGS UK manufacturer of toroidal transformers (10VA to 3kVA) All transformers made to order. No design fees. No minimum order.

Everyday Practical Electronics reaches more UK readers than 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-six years.

www.canterburywindings.co.uk

01227 450810 If you would like to advertise on the Classified page then please call Stewart Kearn on:

01202 880299 or email [emailprotected]

BETA LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 CCS Inc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 CPM ENGINEERING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . 55 DIGI-KEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . 6 HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . 22 iCSAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 KCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv) LASER BUSINESS SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 L-TEK POSCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iii) & 10 Bowood - Jan 09.indd 1 MIKROELEKTRONIKA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Everyday Practical Electronics, November 2015

EPE Classifieds_100144WP.indd 79

MISCELLANEOUS PIC DEVELOPMENT KITS, DTMF kits and modules, CTCSS Encoder and Decoder/ Display kits. Visit www.cstech.co.uk VALVES AND ALLIED COMPONENTS IN STOCK. Phone for free list. Valves, books and magazines wanted. Geoff Davies (Radio), tel. 01788 574774.

NIGELS COMPUTER REPAIRS . . . . . . . . . . . . . . . . . . . . . . . . 77 PEAK ELECTRONIC DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . 75 PICO TECHNOLOGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/3 STEWART OF READING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 ADVERTIsem*nT OFFICES: 113 LYNWOOD DRIVE, MERLEY, WIMBORNE, DORSET BH21 1UU PHONE: 01202 880299 FAX: 01202 843233 EMAIL: [emailprotected] WEB: www.epemag.com

For editorial address and phone numbers see page 7

17/11/2008 16:12:31

79

18/09/2015 11:28

Next Month

Content may be subject to change

High-Energy Multi-Spark CDI for Performance Cars –Part 1

This capacitor discharge ignition system is designed to provide a very-high-energy multi-spark discharge each time the spark plug is fired. It enables complete mixture combustion in virtually all internal combustion engines used in cars and motorcycles, and is especially effective with engines that run at high RPM.

The Currawong – 2 × 10W Stereo Valve Amplifier – Part 2

In Part 1, we described the circuit and presentation of our new Currawong Stereo Valve Amplifier. We now describe the PCB assembly and detail the timber plinth and chassis wiring along with detailed instructions on putting it all together.

TDR Dongle For Oscilloscopes

How would you like to be able to track down faults in coaxial and other cables using timedomain reflectometry or ‘TDR’? If you have a reasonably fast oscilloscope (20MHz or more), this low-cost TDR Dongle will let you do a lot of basic cable fault finding very easily.

Dremel 3D Idea Builder Printer review

3D printing is revolutionising all aspects of engineering, including the hobby construction world, and in December’s issue our Net Work columnist Alan Winstanley gets to grips with this fascinating and important technology.

DECEMBER ’15 ISSUE ON SALE 5 NOVEMBER 2015

Welcome to JPG Electronics Selling Electronics in Chesterfield for 29 Years

• Aerials, Satellite Dishes & LCD Brackets • Audio Adaptors, Connectors & Leads • BT, Broadband, Network & USB Leads • Computer Memory, Hard Drives & Parts • DJ Equipment, Lighting & Supplies • Extensive Electronic Components - ICs, Project Boxes, Relays & Resistors • Raspberry Pi & Arduino Products • Replacement Laptop Power Supplies • Batteries, Fuses, Glue, Tools & Lots more...

Custom Front Panels

Digital printing

Shaw’s Row

T: 01246 211 202 E: [emailprotected] JPG Electronics, Shaw’s Row, Old Road, Chesterfield, S40 2RB W: www.jpgelectronics.com Britannia Inn

JPG Electronics Maison Mes Amis

Free Design Software

Old H

all Ro

ad

Old Road

Rose & Crown

Ch

orth atsw

Johnsons

PANEL-POOL® is a registered trademark of Beta LAYOUT GmbH

Open Monday to Friday 9am to 5:30pm And Saturday 9:30am to 5pm

d

Roa

Morrisons

Sparks

www.panel-pool.com

Retail & Trade Welcome • Free Parking • Google St View Tour: S40 2RB Published on approximately the first Thursday of each month by Wimborne Publishing Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. Printed in England by Acorn Web Offset Ltd., Normanton, WF6 1TW. Distributed by Seymour, 86 Newman St., London W1T 3EX. Subscriptions INLAND: £23.50 (6 months); £43.00 (12 months); £79.50 (2 years). EUROPE: airmail service, £27.00 (6 months); £50.00 (12 months); £95.00 (2 years). REST OF THE WORLD: airmail service, £37.00 (6 months); £70.00 (12 months); £135.00 (2 years). Payments payable to “Everyday Practical Electronics’’, Subs Dept, Wimborne Publishing Ltd. Email: [emailprotected]. 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.

CarryOver – NOV 2015.indd 72

15/09/2015 15:45

microchipDIRECT offers access to the world’s largest inventory of Microchip products and the most comprehensive online resource for pricing and support directly from Microchip Technology. We invite you as a valued Microchip customer to experience our service 24 hours a day, 7 days per week. Visit www.microchipDIRECT.com and enjoy the confidence and convenience of buying from microchipDIRECT and take advantage of the following features: Direct stock from factory

Long-term orders and scheduling

Direct customer service

Programming and value add services

Secure ordering

Ability to adjust open orders

Volume pricing

Ship to your sites globally

Credit lines

Online order status and notifications

www.microchipDIRECT.com The Microchip name and logo, the Microchip logo are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners. © 2015 Microchip Technology Inc. All rights reserved. DS40001752B. MEC2010Eng04/15

NOV 2015 Page 1.indd 1

16/09/2015 10:12

JULY 2015 Page 1.indd 1

19/05/2015 13:16:52

Everyday Practical Electronics 2015-11 - PDF Free Download (2024)
Top Articles
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 5817

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.