Sie sind auf Seite 1von 76

W

MIC IN A

Teach-In 2015
RO
mu CH
ex l I
pan time P
NEW
sion dia
S •U nderstand discrete linear circuit design
SERIE
& boar
star pic32 d
• Learn with ‘TINA’ – modern CAD software te
rk
it
• Design simple, but elegant circuits

“Tiny Tim”
Stereo Amplifier – Part 2
Build the circuit and power supply

PortaPAL-D – Part 3
Final assembly, ready to make lots 003 003

of beautiful music!
52

09
A

91
GNOL mm54 502
21 x 21 FO SPIRTS ETABER(
)RETEMAID
DEHCATTA ENIP RAD
EDIS HCAE OT 391

102

751
RETEMAID ELOH
281
mm003
TAELC GNOL
)21 x 21( C

006
D

SETABER
PEED mm6

563

E
)FD DIS
M DN
RO mm6 AH
391
RETEMAID ELOH
F N 1 , THG 281
W 006 IR
YT OHS x 0

Raspberry Pi interfacing
IRA T 03
LC ON (
LC

ELOH mm53
TAH POT ROF
)DERIUQER FI(

003

FDM KCIHT mm61 LAIRETAM LLA


DEIFICEPS SSELNU

SERTEMILLIM NI SNOISNEMID LLA


B
003

ENIP RAD 81 x 81 FO SPIRTS GNOL mm692 ERA B & A


ENIP RAD 81 x 81 FO SPIRTS GNOL mm006 ERA D & C
Review of a digital input board
ENIP RAD 81 x 81 FO PIRTS GNOL mm003 SI E

Audio delay for PA systems


Add a delay and banish audio aural confusion!
FEB 2015 £4.40
interface, Net work, audio out, PIC N’ MIX,
plus: Circuit Surgery, techno talk
FEB 2015 Cover V2.indd 1 08/12/2014 09:04:51
Does your design need high 32-bit MCU performance,
code density and large internal memory?
PIC32MZ offers 330 DMIPS and 654 CoreMarks™ performance

Microchip’s new PIC32MZ 32-bit MCUs achieve high performance,


combined with 30% better code density and up to 2 MB dual-panel
DEVELOPMENT TOOL
Flash with live update and 512 KB RAM. SUPPORT:
■ Turn-key PIC32MZ EC Starter Kits
The PIC32MZ Embedded Connectivity (EC) family of 32-bit MCUs
introduces a breakthrough in high-end embedded control with its high ■ Multimedia Expansion Board II
performance and code density in addition to new levels of on-chip ■ PIC32MZ2048EC Plug-in Module
memory and peripheral integration. for Explorer 16
With up to 2 MB of dual-panel Flash and 512 KB of RAM, the PIC32MZ offers
4x more on-chip memory than any other PIC® MCU, with fail-safe operation
during live Flash updates. It is also the first PIC MCU to use the enhanced
MIPS microAptiv™ core which adds 159 new DSP instructions that enable
the execution of DSP algorithms at up to 75% fewer cycles than the
PIC32MX families.
Advanced connectivity is supported over Hi-Speed USB, 10/100
Ethernet and two CAN 2.0b modules as well as multiple UART, SPI/I²S,
and I²C channels. The optional on-chip crypto engine ensures secure PIC32MZ Embedded Connectivity Starter Kit
communication with a random number generator and high-throughput (DM320006 or DM320006-C with crypto engine)
data encryption/decryption and authentication.

For more information, go to: www.microchip.com/get/eupic32mz

The Microchip name and logo, and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks mentioned herein are the property of their respective companies.
©2013 Microchip Technology Inc. All rights reserved. DS60001247A. ME1092BEng11.13

FEB 2015.indd 1 02/12/2014 09:13:08


ISSN 0262 3617
 PROJECTS  THEORY 
 NEWS  COMMENT 
 POPULAR FEATURES  INCORPORATING ELECTRONICS TODAY INTERNATIONAL

VOL. 44. No 2 February 2015


www.epemag.com

Projects and Circuits


Audio delay for PA systems 10
by Nicholas Vinen
Overcome propagation delays with our 32-bit DSP-based design
“Tiny Tim” Stereo Amplifier – Part 2 22
by Leo Simpson and Nicholas Vinen
Assemble the amplifier and power supply – plus, prepare the case!
PortaPAL-D – Part 3 30
by John Clarke
It’s time to create the cabinet and make LOTS of beautiful music

Series and Features


Techno Talk by Mark Nelson 20
Something eerie in the ear
TEACH-IN 2015 by Mike and Richard Tooley 36
Part 1: Introducing discrete linear circuit design
NET WORK by Alan Winstanley 46
Avast, LAN-lovers!... AVG from hell... What’s the risk?
You’ve got ten guesses... Network Icons for Windows 7
interface by Robert Penfold 48
Pi serial A/D converter
audio out by Jake Rothman 51
Test-bench amplifier – Part 3
max’s cool beans by Max The Magnificent 54
Mastering meters – Part 2… Choosing your meter... Any meter you want,
providing it’s a current meter... Shunt and series resistance
CIRCUIT SURGERY by Ian Bell 56
Stopper resistors and capacitive loads
300 300
PIC n’ MIX by Mike Hibbett 60
Adding PWM to the development board
25
RPI16IN by Mike Tooley 65
A

205
90

45mm LONG
19
Review of Zeal Electronic’s 16-input optically isolated board for the Pi
(REBATE STRIPS OF 12 x 12
DIAMETER)
DAR PINE ATTACHED
193 TO EACH SIDE

Regulars and Services


E

201

157

HOLE DIAMETER
182
300mm
LONG CLEAT
C (12 x 12)

Microchip reader offer 4


600
D
EPE Exclusive – Win a Microchip Multimedia Expansion Board &
REBATES
6mm DEEP
PIC32 Starter Kit
365

EDITORIAL 7
E
193
HOLE DIAMETER
SID DF)
ND M
HA mm R
Happy New Year!... Time traveller’s tetrode?
182
HT , 16 FO
RIG 600 WN
O
0 x SH ITY
(30 OT LAR
NEWS – Barry Fox highlights technology’s leading edge 8
CL
N C
Plus everyday news from the world of electronics
35mm HOLE
FOR TOP HAT
(IF REQUIRED)
Teach-in 5 62
300
CD-ROMS FOR ELECTRONICS 63
B
ALL MATERIAL 16mm THICK MDF
UNLESS SPECIFIED
A wide range of CD-ROMs for hobbyists, students and engineers
300

A & B ARE 296mm LONG STRIPS OF 18 x 18 DAR PINE


C & D ARE 600mm LONG STRIPS OF 18 x 18 DAR PINE
ALL DIMENSIONS IN MILLIMETRES DIRECT BOOK SERVICE 68
A wide range of technical books available by mail order, plus more CD-ROMs
E IS 300mm LONG STRIP OF 18 x 18 DAR PINE

EPE PCB SERVICE 70


© Wimborne Publishing Ltd 2015. Copyright in all PCBs for EPE projects
drawings, photographs and articles published in ADVERTISERS INDEX 71
EVERYDAY PRACTICAL ELECTRONICS is fully Next month! – Highlights of next month’s EPE 72
protected, and reproduction or imitations in whole or
in part are expressly forbidden.

Our March 2015 issue will be published on Readers’ Services • Editorial and Advertisement Departments 7
Thursday 5 February 2015, see page 72 for details.

Everyday Practical Electronics, February 2015 1

Contents Feb 2015.indd 1 12/12/2014 14:17:03


All prices INCLUDE 20.0% VAT.
Quasar Electronics Limited Postage & Packing Options (Up to 0.5Kg gross weight): UK Standard 3-7 Day
PO Box 6935, Bishops Stortford Delivery - £3.95; UK Mainland Next Day Delivery - £8.95; Europe (EU) -
CM23 4WP, United Kingdom £12.95; Rest of World - £14.95 (up to 0.5Kg).
Tel: 01279 467799 Order online for reduced price Postage (from just £1!)
Fax: 01279 267799 Payment: We accept all major credit/debit cards. Make PO’s payable to
Quasar Electronics Limited.
E-mail: sales@quasarelectronics.co.uk Please visit our online shop now for full details of over 1000 electronic kits,
Web: www.quasarelectronics.co.uk projects, modules and publications. Discounts for bulk quantities.

Card
Sales Line

Solutions for Home, Education & Industry Since 1993

PIC Programmer & Experimenter Board 4-Ch DTMF Telephone Relay Switcher
PIC & ATMEL Programmers PIC Programmer & Experi- Call your phone num-
menter Board with test ber using a DTMF
We have a wide range of low cost PIC and buttons and LED indicators phone from anywhere
ATMEL Programmers. Complete range and to carry out educational in the world and re-
documentation available from our web site. experiments such as the motely turn on/off any
Programmer Accessories: supplied programming examples. Includes a of the 4 relays as de-
40-pin Wide ZIF socket (ZIF40W) £9.95 16F627 Flash Microcontroller that can be sired. User settable Security Password, Anti-
18Vdc Power supply (661.121) £25.95 reprogrammed up to 1000 times. Software to Tamper, Rings to Answer, Auto Hang-up and
Leads: Parallel (LDC136) £3.95 / Serial compile and program your source code is Lockout. Includes plastic case. 130 x 110 x
(LDC441) £3.95 / USB (LDC644) £2.95 included. Supply: 12-15Vdc. 30mm. Power: 12Vdc.
Kit Order Code: K8048 - £23.94 Kit Order Code: 3140KT - £79.95
USB & Serial Port PIC Programmer Assembled Order Code: VM111 - £39.12 Assembled Order Code: AS3140 - £94.95
USB or Serial connection.
Header cable for ICSP. 8-Ch Serial Port Isolated I/O Relay Module
Computer controlled 8
Free Windows software. Controllers & Loggers channel relay board. 5A
See website for PICs sup-
ported. ZIF Socket & USB Here are just a few of the controller and mains rated relay outputs
lead extra. 16-18Vdc. data acquisition and control units we have. and 4 opto-isolated digital
Kit Order Code: 3149EKT - £49.95 See website for full details. 12Vdc PSU for inputs (for monitoring
Assembled Order Code: AS3149E - £64.95 all units: Order Code 660.446UK £11.52 switch states, etc). Useful
Assembled with ZIF socket Order Code: in a variety of control and
AS3149EZIF - £74.95 sensing applications. Programmed via serial
USB Experiment port (use our new Windows interface, termi-
USB PIC Programmer and Tutor Board Interface Board nal emulator or batch files). Serial cable can
This tutorial project 5 digital input chan- be up to 35m long. Includes plastic case
board is all you need nels and 8 digital out- 130x100x30mm. Power: 12Vdc/500mA.
to take your first steps put channels plus two Kit Order Code: 3108KT - £74.95
into Microchip PIC analogue inputs and Assembled Order Code: AS3108 - £89.95
programming using a two analogue outputs with 8 bit resolution.
PIC16F882 (included). Later you can use it Kit Order Code: K8055N - £25.19 Infrared RC 12–Channel Relay Board
for more advanced programming. It programs Assembled Order Code: VM110N - £40.20 Control 12 onboard relays with
all the devices a Microchip PICKIT2® can! included infrared remote con-
You can use the free Microchip tools for the 2-Channel High Current UHF RC Set trol unit. Toggle or momentary.
PICKit2™ and the MPLAB® IDE environment. State-of-the-art high securi- 15m+ range. 112 x 122mm.
Order Code: EDU10 - £55.96 ty. 2 channel. Momentary or Supply: 12Vdc/0.5A
latching relay output rated to Kit Order Code: 3142KT - £64.95
ATMEL 89xxxx Programmer switch up to 240Vac @ 10 Assembled Order Code: AS3142 - £74.95
Uses serial port and any Amps. Range up to 40m. Up
standard terminal comms to 15 Tx’s can be learnt by Audio DTMF Decoder and Display
program. 4 LED’s display one Rx (kit includes one Tx Detect DTMF tones from
the status. ZIF sockets but more available separately). 3 indicator tape recorders, receivers,
not included. 16Vdc. LEDs. Rx: PCB 88x60mm, supply 9-15Vdc. two-way radios, etc using
Kit Order Code: 3123KT - £28.95 Kit Order Code: 8157KT - £49.95 the built-in mic or direct
Assembled Order Code: AS3123 - £39.95 Assembled Order Code: AS8157 - £54.95 from the phone line. Char-
acters are displayed on a
Introduction to PIC Programming Computer Temperature Data Logger 16 character display as they are received and
Go from complete beginner Serial port 4-channel tem- up to 32 numbers can be displayed by scroll-
to burning a PIC and writing perature logger. °C or °F. ing the display. All data written to the LCD is
code in no time! Includes 49 Continuously logs up to 4 also sent to a serial output for connection to a
page step-by-step PDF separate sensors located computer. Supply: 9-12V DC (Order Code
Tutorial Manual + Program- 200m+ from board. Wide PSU375). Main PCB: 55x95mm.
ming Hardware (with LED range of free software applications for stor- Kit Order Code: 3153KT - £37.95
test section) + Windows Software (Program, ing/using data. PCB just 45x45mm. Powered Assembled Order Code: AS3153 - £49.95
Read, Verify & Erase) + a rewritable by PC. Includes one DS1820 sensor.
PIC16F84A. 4 detailed examples provided for Kit Order Code: 3145KT - £19.95 3x5Amp RGB LED Controller with RS232
you to learn from. PC parallel port. 12Vdc. Assembled Order Code: AS3145 - £26.95 3 independent high power
Kit Order Code: 3081KT - £16.95 Additional DS1820 Sensors - £4.95 each channels. Preprogrammed
Assembled Order Code: AS3081 - £24.95 or user-editable light se-
Remote Control Via GSM Mo- quences. Standalone op-
PIC Programmer bile Phone tion and 2-wire serial inter-
Board Place next to a mobile phone (not face for microcontroller or
Low cost PIC program- included). Allows toggle or auto- PC communication with simple command set.
mer board supporting timer control of 3A mains rated Suitable for common anode RGB LED strips,
a wide range of Micro- output relay from any location LEDs and incandescent bulbs. 56 x 39 x
chip® PIC™ microcon- 20mm. 12A total max. Supply: 12Vdc.
trollers. Serial port. Free Windows software. Most items are available in kit form (KT suffix) Kit Order Code: 8191KT - £29.95
Kit Order Code: K8076 - £29.94 or pre-assembled and ready for use (AS prefix). Assembled Order Code: AS8191 - £39.95

QUASAR JULY 2014.indd 1 17/05/2014 08:40:23


Hot New Products! Motor Speed Controllers
Here are a few of the most recent products
Here are just a few of our controller and
added to our range. See website or join our
driver modules for AC, DC, Unipolar/Bipolar
email Newsletter for all the latest news.
stepper motors and servo motors. See
website for full details.
4-Channel Serial Port Temperature
Monitor & Controller Relay Board DC Motor Speed Controller (100V/7.5A)
4 channel computer Control the speed of
serial port tempera- almost any common DC
ture monitor and motor rated up to
relay controller. 100V/7.5A. Pulse width
The Electronic Kit Specialists Since 1993
Four inputs for modulation output for
Dallas DS18S20 or maximum motor torque
DS18B20 digital at all speeds. Supply: 5-15Vdc. Box supplied. Electronic Project Labs
thermometer sensors (£3.95 each). Four Dimensions (mm): 60Wx100Lx60H.
5A rated relay outputs are independent of Great introduction to the world of electron-
Kit Order Code: 3067KT - £19.95
sensor channels allowing flexibility to setup ics. Ideal gift for budding electronics expert!
Assembled Order Code: AS3067 - £27.95
the linkage in any way you choose. Simple
text string commands for reading tempera- Bidirectional DC Motor Speed Controller 130-in-1 Electronic Project Lab
ture and relay control via RS232 using a Control the speed of Get started on the
comms program like Windows HyperTermi- most common DC road to a great
nal or our free Windows application. motors (rated up to hobby or career in
Kit Order Code: 3190KT - £84.95 32Vdc/10A) in both the electronics. Con-
Assembled Order Code: AS3190 - £99.95 forward and reverse tains all the parts
direction. The range of and instructions to
40 Second Message Recorder control is from fully OFF to fully ON in both assemble 130 educational and fun experi-
Feature packed non- directions. The direction and speed are con- ments and circuits. Build a radio, AM broad-
volatile 40 second mul- trolled using a single potentiometer. Screw cast station, electronic organ, kitchen timer,
ti-message sound re- terminal block for connections. logic circuits and more. Built-in speaker, 7-
corder module using a Kit Order Code: 3166v2KT - £23.95 segment LED display, two integrated circuits
high quality Winbond Assembled Order Code: AS3166v2 - £33.95 and rotary controls. Manual has individual
sound recorder IC. circuit explanations, schematic and connec-
Standalone operation using just six Computer Controlled / Standalone Unipo- tion diagrams. Requires 6 x AA batteries (not
onboard buttons or use onboard SPI inter- lar Stepper Motor Driver included). Suitable for age 14+.
face. Record using built-in microphone or Drives any 5-35Vdc 5, 6 Order Code EPL500 - £49.95
external line in. 8-24Vdc powered. Change or 8-lead unipolar stepper Also available: 30-in-1 £22.95, 50-in-1
a resistor for different recording dura- motor rated up to 6 Amps. £29.95, 75-in-1 £39.95
tion/sound quality. Sampling frequency 4- Provides speed and direc- See website for full details.
12 kHz. (120 second version also available) tion control. Operates in stand-alone or PC-
Kit Order Code: 3188KT - £29.95 controlled mode for CNC use. Connect up to
Assembled Order Code: AS3188 - £37.95 six 3179 driver boards to a single parallel Tools & Test Equipment
port. Board supply: 9Vdc. PCB: 80x50mm. We stock an extensive range of soldering
Bipolar Stepper Motor Chopper Driver Kit Order Code: 3179KT - £17.95 tools, test equipment, power supplies,
Get better performance from your stepper Assembled Order Code: AS3179 - £24.95 inverters & much more - please visit web-
motors with this dual full site to see our full range of products.
bridge motor driver based Computer Controlled Bi-Polar Stepper
on SGS Thompson chips Motor Driver
L297 & L298. Motor cur- Drive any 5-50Vdc, 5 Amp Advanced Personal Scope 2 x 240MS/s
rent for each phase set bi-polar stepper motor using Features 2 input chan-
using on-board potentiom- externally supplied 5V lev- nels - high contrast LCD
eter. Rated to handle els for STEP and DIREC- with white backlight - full
motor winding currents up to 2 Amps per TION control. Opto-isolated auto set-up for volt/div
phase. Operates on 9-36Vdc supply volt- inputs make it ideal for CNC applications and time/div - recorder
age. Provides all basic motor controls in- using a PC running suitable software. Board roll mode, up to 170h per
cluding full or half stepping of bipolar step- supply: 8-30Vdc. PCB: 75x85mm. screen - trigger mode:
pers and direction control. Allows multiple Kit Order Code: 3158KT - £24.95 run - normal - once - roll ... - adjustable trig-
driver synchronisation. Perfect for desktop Assembled Order Code: AS3158 - £34.95 ger level and slope and much more.
CNC applications. Order Code: APS230 - £374.95 £274.96
Kit Order Code: 3187KT - £39.95 AC Motor Speed Controller (600W)
Assembled Order Code: AS3187 - £49.95 Reliable and simple to Handheld Personal Scope with USB
install project that allows Designed by electronics enthusiasts for elec-
Video Signal Cleaner you to adjust the speed of tronics enthusiasts! Powerful,
Digitally cleans the video an electric drill or 230V AC compact and USB connectivity,
signal and removes un- single phase induction this sums up the features of this
wanted distortion in video motor rated up to 600 oscilloscope.
signal. In addition it stabi- Watts. Simply turn the potentiometer to adjust 40 MHz sampling rate, 12 MHz
lises picture quality and the motors RPM. PCB: 48x65mm. Not suita- analog bandwith, 0.1 mV sensitivity, 5mV to
luminance fluctuations. ble for use with brushless AC motors. 20V/div in 12 steps, 50ns to 1 hour/div time
You will also benefit from Kit Order Code: 1074KT - £15.95 base in 34 steps, ultra fast full auto set up
improved picture quality on LCD monitors Assembled Order Code: AS1074 - £23.95 option, adjustable trigger level, X and Y posi-
or projectors. tion signal shift, DVM readout and more...
Kit Order Code: K8036 - £24.70 See website for lots more DC, AC Order Code: HPS50 - £289.96 £204.00
Assembled Order Code: VM106 - £36.53
and stepper motor drivers! See website for more super deals!

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

QUASAR JULY 2014.indd 2 17/05/2014 08:40:40


M
Buy a WHIZZKIT before the end of
Contains EVERYTHING required to build and understand 6 January for only £17.99 and receive:
electronic circuits on reusable prototyping board, and to then
undertake further experimentation. Requires NO previous
knowledge or experience.

Contains: Follow step-by-step

+
• LEDs instructions to build:
• Integrated Circuits • Audio Amplifier
• Switches • Timer Switch
• Resistors & Capacitors • Heads & Tails Game
• Microphone • Light Sensitive Switch
• Speaker • Trigger & Reset Switch
• Relay • Two Way Switch
• Full colour manual
+ much more

The perfect way to begin an exciting journey into the world


of hobbyist electronics
Simply enter the voucher code WKF14 at the
checkout and both gifts will be added automatically

April/May

Radio
2014
Issue No.
148

The magazine for all vintage


radio enthusiasts.
ISSN 0956
-974 X

The Lafaye

Bygones
tte HE-80
Communicat
Receiver ions

Covers:
··Domestic radio and TV
Amateur radio
·
Military, aeronautical or
marine communications
Sound Sal
es Ltd., And
The Roberts
P5A Transp
The ‘DX Plu
s Three’ Tun

··
ortable Rad er
AVO TFM io
Por table AM
/FM Signal
Generator

Radar or radio navigation


Broadcasting
www.radio
bygones.com

·
RB Front
Cover.ind
d 1

Radio sytems
12/03/201
4 16:07:50

Subscribe to Radio Bygones


(available by postal subscription):
1 year (6 issues)
UK £27.00
June/Ju
ly 2014
Issue No.
149

Europe £29.00
A Very Lar
ISSN 0956
-974 X
Rest of the World £34.00
OR
ge Eddyston
e Receiver

Download your PDF copies,


only £12.00 for one year

Tel: 01202 880299 or visit:


Kolster-Bra
ndes 840
The Writing
G3OGR – s Of Francis George
Par t 1 Rayer,
The Valve
Era: A Wh
istful Backwa
rds Glance

RB Front
Cover.ind
d 1
www.radio
bygones.com
www.radiobygones.com
30/04/201
4 11:45:13

4 Everyday Practical Electronics, February 2015

Page 5.indd 35 12/12/2014 10:02:28


USB PIC Programmer FREE
A PICKit™2 Development Programmer. FREE DVM with every order

Features on board sockets for many types worth £19.96


of PIC® µcontrollers. Also provided is an 3½ Digital Class III 600V DVM
ICSP connector, to program your AC / DC Voltage upto 600V
onboard device. USB Powered. DC Current upto 10A

£49.55
Resistance upto 20M FREE
Audible Continuity
Inc Delivery* & VAT One per customer, while stocks last offer valid
Quote: EPEUSBP until: end of Jan 2015. Quote item code below.

2.4GHz Frequency Counter


Boards 0.01Hz to 2.4GHz
8 Digit LED Display
Shields
Gate Time: 100ms to 10s
Accessories
2 Channel Operating mode
Power Supply: 110-220Vac 5W
Offical Arduino Dealer. Quote: EPE24G
Call for best prices
£81.00
Inc Delivery* & VAT

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

£117.00 £178.99
Inc Delivery* & VAT Inc Delivery* & VAT

Quote: EPEBLAB1 Quote: EPEBLAB2

s rs
de
s r to
o si sto sis
Di Re a n
Tr
£77.62 Over 1100 Components
Inc Delivery* & VAT

Breadboard & Components Starter Pack s rs


it or o
A High Quality Large Breadboard with binding posts, a
ac a cit D s
140 piece Jump Wire Kit and 6 Component Packs with p p LE
over 1100 components. Quote: EPEBCS
Ca Ca

30V 5A Programmable PSU Build your own Oscilloscope


Dual LED (Voltage & Current) Displays A new self assembly kit, ideal for education and way to visualise
Course & Fine V /A Adjustment signals. Features: Markers, Frequency, dB, True RMS readouts
5 Programmable Memories Timebase range:
PC Link via USB 10µs-500ms/division (15 steps)
or RS232 Input sensitvity:
Output: 0-30Vdc 100mV-5V/division (6 steps)
0-5A Max Input voltage: 30Vpp
Max Sample Rate:
Quote: EPEPSU 1ms/s repetitive signal,
100ks/s real time signal
£114.00 Dim: 80 x 115 x 40mm
£65.00
07/
11
Inc Delivery* & VAT

Quote: EPESCOPE Inc Delivery* & VAT

Station Road Prices INCLUDE Delivery* & VAT.


12
/14 Tel: 0191 2514363 *Delivery to any UK Mainland address,
Cullercoats please call for delivery options for
Fax: 0191 2522296 Tyne & Wear Highland & Island, Northern Ireland,
www.esr.co.uk sales@esr.co.uk NE30 4PQ Ireland, Isle of Man, Isle of Wight &
Channel Islands

ESR - JAN 2015.indd 1 13/11/2014 15:43:47


EDI T OR I AL
VOL. 44 No. 02 FEBRUARY 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: fay.kearn@wimborne.co.uk
Website: www.epemag.com
See notes on Readers’ Technical Enquiries below
– we regret technical enquiries cannot be answered
over the telephone.
Advertisement Offices: Happy New Year!
Everyday Practical Electronics Advertisements A warm welcome to the first EPE issue of the year. 2014 was not just a
113 Lynwood Drive, Merley, Wimborne, Dorset,
BH21 1UU great year for your favourite electronics magazine, but it was also our 50th
Phone: 01202 880299 Fax: 01202 843233 birthday. That and Teach-In 2014 on the Raspberry Pi make it a tough act
Email: stewart.kearn@wimborne.co.uk to follow, but this month we hit the ground running with the first part
Editor: MATT PULZER
of Teach-In 2015! It’s a great start to a fascinating new series on discrete
Subscriptions: MARILYN GOLDBERG linear design that I have been looking forward to for many months – I
General Manager: FAY KEARN hope you enjoy and learn from it as much as me.
Graphic Design: RYAN HAWKINS
Editorial/Admin: 01202 880299
Advertising and Time traveller’s tetrode?
Business Manager: STEWART KEARN I thought I’d share with you a little piece of electronic ‘what on earth is
01202 880299 that?’ fun, which I spied in my local flea market. It’s one of those things
On-line Editor: ALAN WINSTANLEY
that you just know given half a chance would be used in a De Lorean as a
Publisher: MIKE KENWARD ‘flux capacitor’ substitute, or possibly in a TARDIS as a sonic screwdriver
READERS’ TECHNICAL ENQUIRIES booster… or perhaps built into something even more imaginative by our
Email: fay.kearn@wimborne.co.uk very own ‘Cool Beans’ Max!
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 Thomson, the French manufacturer, thoughtfully labeled the device –
in the magazine. We regret that we cannot provide TH 5186 – and slightly to my surprise Google identified it immediately.
data or answer queries on articles or projects that are However, I was a little disappointed to discover that it won’t aid time
more than five years’ old. Letters requiring a personal
reply must be accompanied by a stamped self-
travel, but it is handy if you need to switch half a megawatt at a very high
addressed envelope or a self-addressed envelope and voltage. Apparently it is a tetrode used in MRI scanners, and will switch
international reply coupons. We are not able to answer pulses of up to 5A at plate voltages up to 100kV. As you can imagine,
technical queries on the phone.
this requires some pretty serious thermal management; so, as well as
PROJECTS AND CIRCUITS dissipating heat with the impressive copper heatsink at the bottom,
All reasonable precautions are taken to ensure that this part normally operates submerged in a tank of oil for cooling and
the advice and data given to readers is reliable. We
cannot, however, guarantee it and we cannot accept electrical insulation.
legal responsibility for it.
A number of projects and circuits published in Despite it’s lack of sci-fi credentials, it
EPE employ voltages that can be lethal. You should
not build, test, modify or renovate any item of mains- is a rather beautiful object that would
powered equipment unless you fully understand the make a great paperweight!
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 back-
dated issue.

ADVERTISEMENTS
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 advertisements are
bona fide, the magazine and its publishers cannot give
any undertakings in respect of statements or claims
made by advertisers, whether these advertisements
are printed as part of the magazine, or in inserts.
The Publishers regret that under no circumstances
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 01/12/2014 21:34:45


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

Object-based sound from Dolby – report by Barry Fox


Domestic Atmos camera device such as an Xbox Ki- channels. Dolby’s filing suggests

W hile most homes are turning nect or Playstation Eye. The audio mounting height speakers above the
their backs on multi-channel, is then rendered to suit ‘the posi- front pair of a 7.1 system, and feed-
multi-speaker sound, Dolby Labs is tion and/or size of each listener’. ing them with out-of-phase informa-
promoting a home version of Atmos, Dolby says the system should tion extracted from the feeds to the
the cinema sound system that uses compensate for even small move- rear side speakers.
more speakers to add height to ments away from the sweet spot. A simple, but unavoidable prob-
conventional 5.1 or 7.1 horizontal If ‘the listener moves from the cen- lem is that all living rooms are dif-
surround. ter of a couch to the left side of the ferent, so positioning the speakers
Atmos is different from conven- couch, nearer to the left speaker, so that they bounce sound to the
tional stereo or surround because the system would detect this move- correct listening area, and don’t
it is ‘object-based’. Instead of the ment and compensate the level and intrude on everyday living, is no
traditional method of spreading a delay of the output of the left and mean challenge. For several months
total sound field over a few loud- right speaker’. Dolby has been steadfastly ducking
speakers, object-based coding treats The camera also compensates my requests for a demo.
individual sounds, such as musical when it detects a ‘small person…
instruments, voices or a jet plane, assumed… to be a child’ or ‘a larger Epson’s new approach to
as ‘objects’, which are sent to tar- person… identified… as an elderly printer ink pricing
get speakers or groups of speakers. person with hearing loss’ and ‘dy- Tired of feeding your ink jet printer
Metadata buried in the audio signal namically renders the audio’. with over-priced ink or risking trou-
controls a ‘rendering’ system which The visual tracking system could ble from cheap counterfeit cartridges?
moves the sounds between speakers also identify ‘that the child is danc- For the last four years, Epson has
to create a sound trajectory – for in- ing to the music’ or identify ‘that a been quietly test marketing a printer
stance, so that movement of a jet’s person sitting in a chair or couch in Russia that reverses the razor/ra-
sound matches movement of the has fallen asleep, and… gradually zor blade business model. Instead
plane on screen. turn down the audio playback level of charging next to nothing for the
or turn off the audio.’ printer and trying to make money
Tuned speakers from over-priced ink, Epson’s new
Dolby’s Scott Harris says (in compa- Practical installation issues EcoTank printers are sold for a real-
ny patents) that he believes the ‘ide- One of the biggest problems with istic price (£250 for the L355 All-in-
al’ way to reproduce music in high home Atmos, which Dolby’s own One and £330 for the L555 with fax),
fidelity is to send sounds to ‘tuned’ promotional video admits, is per- and come with a large ink tank on
speakers – eg, violins from speakers suading home owners to cut holes the side. This tank gives users ‘virtu-
which are ‘closely tuned to violins’. in their ceilings to house extra ally limitless printing for up to two
However, a common problem with speakers. The proposed solution years’; 4000 mono pages and 6500
conventional home audio is ‘sweet is to use floor speakers which fire colour. When the ink tank finally
spots’, which also affects object- upwards and bounce sound off the
based audio, says Dolby’s Brett ceiling. KEF and Onkyo already sell
Crockett. He writes: ‘when a listener reflective speakers.
moves away from the ideal listener One of Dolby’s earliest patent fil-
location assumed by an object-based ings on adding height to conven-
audio rendering system, the audio… tional horizontal surround, from
perceived by the listener is spatially Christophe Chabanne in September
distorted.’ 2008, harks back to the early days
of surround sound, when audio pio- In Russia, Epson are testing a new way to
Audio problem, optical solution neer David Hafler derived signals price printing – realistic hardware prices and
The proposed solution is to visually for rear channels by extracting out- ‘cheap’ ink. Pictured above with its large ink
track listeners in the room, using a of-phase information from the front tanks on the side, Epson’s L355 printer

8 Everyday Practical Electronics, February 2015

News Feb 2015.indd 8 08/12/2014 09:08:02


runs dry, the user pays £8 each for printers are used mainly by small EDSAC display opens
four 70 ml bottles of black, cyan, ma- businesses.’
genta and yellow ink, and squirts it I have been trying an Eco-Tank and
into the tank. apart from minor problems such as
Why test market in Russia? Says software conflicts with a previously
Neil Wilson, Business Manager, Ep- installed Epson scanner, it looks as
son UK: ‘The market there is spe- if the claims are justified. (Of course
cial. Most homes are spending their I can’t confirm the two-year part of
money on essentials like food, and the claim yet.)

The reconstructed EDSAC ‘uniselector’ de-


Peak launches innovative SOT23 test adapter sign to hold initial orders, the equivalent of
boot ROM in a modern PC

P eak Electronics has released


an elegant solution to testing
A key part of the reconstruction
of one the most influential
computers ever built – the
SOT23 parts. The test adapter is ESDAC (Electronic Delay Storage
designed to complement Peak’s Automatic Calculator) display – has
DCA55 or DCA75 semiconductor been officially opened by Hermann
tester. It’s extremely easy to use Hauser, entrepreneur and EDSAC
thanks to the special spring- Project Chairman, at The National
loaded SOT23 socket assembly. Museum of Computing.
The SOT23 part under test is EDSAC was originally built in the
gently and securely held against University of Cambridge immedi-
gold plated sprung contacts with ately after World War II by a team
a controlled contact force. led by Sir Maurice Wilkes. It was
The adapter is designed to the first practical, general-purpose
look like a giant SOT23 part, so computer and marked the begin-
it’s easy to visualise the pinout ning of computer programming as a
of the part inside when using distinct profession. EDSAC was so
the DCA55 or DCA75. successful that it was used in Nobel
The unit is supported on four prize-winning scientific research
non-slip feet which also serve to or croc clips. The large gold-plated and its design was later developed
keep the unit slightly raised from pads are also great for multimeter to create LEO, the world’s first busi-
your work surface, allowing for eas- probing. Further details are avail- ness computer.
ier connections using micro-hooks able at: www.peakelec.co.uk At the official opening of the ex-
hibit, several key elements of ED-
SAC were demonstrated. Bill Pur-
vis showed how a program would
Fun with Parallax be input before the advent of key-

P arallax have added several boards and how the result would
keenly-priced project-enhancing be output before screens became
products to their web-based store. commonplace. Peter Linnington re-
vealed how, at the start of the com-
RGB LED puter age, delay lines were used as
The WS2812B RGB LED module has stores. As the climax, Chris Burton
a special LED on board that contains switched on the EDSAC clock, the
three separate LEDs – red, green, beating heart of the machine.
and blue – as well as a smart control The three-year project is on sched-
IC that can individually drive each ule for completion in late 2015.
LED. Each colour has 256 intensity
levels which allows the module to VPN1513 GPS smart module from Parallax
produce 24-bit colour, or more than
16 million colours. Each module is complete GPS solution for electron-
instructed by using a special serial ics projects. This highly sensitive
protocol that allows many modules GPS receiver includes an exter-
to be daisy-chained together so that nal antenna, status LED, and a re-
one microcontroller can control the chargeable battery back-up. An on-
whole lot – with a single data sig- board voltage regulator makes the
nal. Any number of these modules device ready to use with 3.3V and Margaret Marrs, a programmer of the origi-
nal EDSAC, and Joyce Wheeler, a research
can be chained together by connect- 5V microcontrollers. student who used the original EDSAC
ing one module’s data-out (DO) pin The module features a simple com-
to another’s data-in (DI) pin. More mand set for accessing NMEA 0183
details available at: www.parallax. GPS data. Example programs in
com/product/28085 PBASIC, Arduino, Propeller Spin,
If you have some breaking news
and Propeller C will help design-
you would like to share with
GPS with antenna ers add the GPS module to micro-
our readers, then please email:
The VPN1513 GPS smart module controller projects. More details at:
editorial@wimborne.co.uk
with external antenna provides a www.parallax.com/product/28510
Everyday Practical Electronics, February 2015 9

News Feb 2015.indd 9 08/12/2014 09:08:27


Constructional Project

C IRCULAR STORAGE B UFFER


(1MBYTE)

IC3: 1MB SRAM (OPTIONAL)


8-BIT DATA BUS, 20-BIT ADDRESS BUS

PARALLEL MASTER PORT (PMP)

PIN 20 PIN 12
LEFT
IN ADC OUT IN DAC OUT
LEFT

2
I S C IRCULAR STORAGE 2
I S
DMA1 B UFFER (127KB)
DELAY 65024 x
DMA2
16-BIT SAMPLES PIN 13
PIN 19
RIGHT
IN ADC OUT IN DAC OUT
RIGHT

IC2 (CODEC ) IC1 (PIC 32 MICRO) IC2 (CODEC )

Fig.1: the basic concept. The incoming audio signal is fed into the analogue-to-digital converter (ADC) of CODEC IC2
and the resulting digital data is then fed into a circular recording buffer, which is 127KB of the static RAM on a PIC32
microcontroller (IC1). The delayed signal is then picked off from within this buffer and converted back to audio by IC2’s
digital-to-analogue converter (DAC) section. SRAM chip IC3 is added if you want a delay of more than 640ms.

speakers is more than about 10m or 15m, In fact, with its 128KB of internal into the analogue-to-digital converter
an audio delay can be very worthwhile. RAM, the PIC32 we have chosen can (ADC) of the CODEC. The digital data
Of course, this means that you need provide a delay of up to 640 millisec- is then fed into a circular recording
two separate PA systems: one for the onds. It also has a Parallel Master Port buffer, which is 127KB of static RAM
rear speakers with the audio delay and (PMP) which can interface directly with on the PIC32 microcontroller. We can
one for the speakers at the front of the a standard static RAM (SRAM) chip. then pick off the output signal from
hall, church or whatever. This allows us to have provision for up anywhere within this buffer.
But what if you have a much larger to 1MB of additional RAM to be used Depending on the sampling rate
hall? In that case, you might need to in case even longer delays are needed (in this case, 48kHz), the difference
break the PA installation into three, – up to six seconds, in fact. That could between when the data is written and
with two sets of audio delays. Guess be useful in a very large venue such as read out determines the time delay. Of
what? This project can also cater for a country show, with speakers spread course, the delayed data signal must
that. In the simple mode, with just one along several hundred metres of a field. then be converted back to audio by the
delay required, it can operate in stereo. We’re using a sampling rate of 48kHz digital-to-analogue converter (DAC)
If two audio delays are required, it can and a 16-bit voltage resolution, as this section of the CODEC.
operate with two separate channels, gives near-optimal performance with So in essence, only two chips are
each with their own delay. the CODEC chip we are using, while required: microcontroller IC1 (the PIC-
Now, some PA systems can have keeping memory storage requirements 32MX470F512H) and the stereo audio
pretty good fidelity, so we wanted to modest. The ADC performance is the CODEC, IC2 (WM8731). An optional
produce the audio delay(s) while add- limiting factor. static RAM (SRAM) chip (IC3) is only
ing very little distortion and noise to By the way, the author has published fitted if you want a delay of more than
the signal. We also wanted the delay two previous audio delay units but this 640 milliseconds (see Fig.3).
unit to be cheap and easy to build. one has features lacking in those. Note
The solution was to combine an all-in- that this is the first microcontroller- Circuit description
one audio CODEC chip (digital COder/ based audio delay we have published Fig.2 shows the circuit with IC1 and
DECoder) with a PIC32 micro­controller that does not require an external IC2. If you look at the project’s PCB,
that has a digital audio interface. These SRAM chip thanks to the large 128KB you will notice that there is provision
two chips, plus a few support com- internal RAM in the PIC32. for many more components than are
ponents, give a 24-bit, 96kHz stereo used in this circuit. One of those is IC3,
analogue-to-digital converter (ADC), a Delay concept which is shown in Fig.3. All the other
similar digital-to-analogue converter The method of providing an audio ‘missing’ components will be featured
(DAC) and enough processing power delay is shown in Fig.1. The signal in future projects which will employ
and memory for quite a long delay. from the audio mixer is fed at line level the same core circuit.

Everyday Practical Electronics, February 2015 11

Audio Delay Unit (MP 1st).indd 11 01/12/2014 21:43:30


Constructional Project

channel this value is for (low = right,


Features and specifications high = left). Since this changes twice
for each sample, the frequency of this
•  Adjustable stereo delay of 0-640ms (6s if optional SRAM chip fitted) signal equals that of the sampling rate,
•  THD+N <0.03% (typically <0.02%), 20Hz-20kHz (20Hz-22kHz bandwidth; ie, 48kHz.
After receiving this data and delay-
see Fig.6)
ing it for the appropriate amount of
•  Signal-to-noise ratio typically >76dB time, IC1 sends it back verbatim to
•  Optimal input signal range 0.5-2V RMS IC2’s pin 4, the DAC input data pin.
The same clocks (ie, BCLK and LRCK)
•  Output signal 1V RMS are used to time this data and thus
•  Input impedance 6kΩ (DC), 4kΩ (20kHz) the DAC and ADC sampling rates are
•  7.5-12V DC plugpack supply, current drain 60-80mA locked together.
IC2’s internal DAC then converts
•  Delay adjustment via internal trimpot or external control knob the received data to voltages on pins
•  Uses the latest PIC32 microcontroller 12 and 13 (LOUT and ROUT respec-
•  Future expansion: add extra modes such as echo, reverb or compression tively). These signals are AC-coupled
using 1µF capacitors and DC-biased
to ground using 47kΩ resistors. The
So, referring to the top left-hand dividers are configurable and are con- 100Ω series resistors isolate any cable
corner of the circuit, the unbalanced trolled by microcontroller IC1. or load capacitance from IC2’s internal
stereo audio signal is applied to Normally, a 12.288MHz crystal or op amp buffers.
6.35mm jack socket CON1. If a mono similar would be required to get a From there, the signals pass to the
plug is used, the signal will be applied sampling rate of 48kHz (by dividing output at 6.35mm jack socket CON2.
to the right channel input, while the by 256) but IC2 has a special ‘USB As explained, IC2 runs off 3.3V, so
left channel input will be shorted to mode’ designed to operate with a the maximum output signal level is
ground. 12MHz clock, as used for USB commu- limited to around 1V RMS (2.828V
The left and right channel signals nications. So we use a 12MHz crystal, peak-to-peak). This is sufficient to
first pass through RC filters compris- which is easier to obtain. drive virtually any amplifier or mixer.
ing 1kΩ resistors and 1nF capacitors, IC2 continuously samples the two Note that the WM8731 codec has a
to remove ultrasonic and RF compo- analogue input signals at pins 20 and ‘pass-through’ mode whereby a direct
nents which would interfere with the 19 and converts the voltage levels at analogue connection is made from pin
ADC’s operation. The signals then go these pins to one of 65,536 possible 20 (LLINEIN) to the analogue buffer
into adjustable attenuators, which values (216) at 20.8μs intervals. These feeding pin 12 (LOUT) and similarly,
consist of two 5kΩ trimpots, VR5 and values are serially streamed out in from pin 19 (RLINEIN) to pin 13
VR6. While these can be individually digital format from pin 6. Pins 2, 3 and (ROUT). We take advantage of this if
adjusted, normally they would be set 5 provide the clock signals required to the delay pot is set at minimum; in
to give the same signal level for both interpret this data. Respectively, these this case, there is essentially no delay
channels. are the master clock (MCLK, 12MHz), and the distortion and noise from the
These attenuators are required bit clock (BCLK, 3.072MHz = 48kHz × unit drop too.
because IC2 runs off 3.3V and thus 2 × 32 bits) and left/right sample clock
it can only handle a signal of up to (LRCK, 48kHz). Microcontroller
about 1V RMS (2.828V peak-to-peak) The master clock is normally used As noted above, we chose the PIC-
before clipping. For input signals to synchronise multiple digital audio 32MX470F512H for a number of
below 1V RMS, VR5 and VR6 are set devices in a system. In this case, we’re reasons. It is one of the latest PIC32
at maximum. The attenuated signals simply using it as a reference clock for chips and as such it has two enhanced
are AC-coupled to IC2’s inputs by 1µF IC1, as it has a more precise frequency SPI peripherals which directly sup-
non-polarised capacitors. In order for than IC1’s internal oscillator. port all the common digital audio
the signal handling to be maximised The bit clock (BCLK) is at 64 times formats, including I2S, left-justified,
and for symmetrical clipping in the the sampling rate because the audio right-justified and DSP modes. The
event of overload, the input signals data is padded to 32 bits per channel. WM8731 CODEC supports all these
are biased to half the supply voltage We’re only using 16 bits per channel, modes and we are using left-justified
of 3.3V, ie 1.65V. so half the time this output will be zero mode because this allows us to set up
This half-supply DC bias comes (low) but the CODEC can be configured the SPI peripheral to ignore the 16
from IC2 and is fed to the line inputs for 24-bit operation too, hence the trailing zeros for each sample.
at pins 19 and 20. This voltage also higher clock rate. This clock is used This PIC32 chip also has four very
appears at pin 16 (VMID) where it is by the micro to determine when a flexible DMA (direct memory access)
filtered by a pair of external capacitors new data bit appears at the ADCDAT units. These are used to copy data be-
for noise and ripple rejection. output. tween other peripherals and/or RAM
IC2 uses crystal X1 (12MHz) to gen- The left/right sample clock indi- simultaneously while the processor is
erate an internal clock, which is then cates the start of a new value being busy doing something else.
divided down to produce the sampling transmitted on ADCDAT, as well as In fact, they are so flexible that for
rate for both its ADC and DAC. These allowing the micro to determine which a simple stereo delay, we just need

12 Everyday Practical Electronics, February 2015

Audio Delay Unit (MP 1st).indd 12 01/12/2014 21:43:37


Constructional Project

4.7Ω +3.3V
+3.3V
2x 2x
2x FB1 2x
1000 µF 1k 100nF 100nF
100 µF MMC MMC 100 µF
10k
8 14 1 27
INPUT 1nF 1 µF MMC HPVdd AVdd DBVdd DCVdd
VR5 20 21
LLINEIN MODE
5k 1 µF MMC 19 9
RLINEIN LHPOUT
1 µF MMC 100Ω OUTPUT
1k 18 12
CON1 MICIN LOUT
17 10 100Ω
MICBIAS IC2 RHPOUT
25 WM8731 13 1 µF MMC
1nF VR6 XTI/MCLK ROUT
CON2
5k 26 5
XTO DACLRC
CODEC 47k 47k
7 4
ADCLRC DACDAT
6 24
ADCDAT SCLK
3 23
BCLK SDIN

2 22
X1 CLKOUT CSB
12MHz VMID HPGND AGND DGND
16 11 15 28
FB2
33pF 33pF 22 µF 100nF
MMC
ANALOG DIGITAL
GND GND
L1 100 µH
+3.3V +3.3V
4x
100nF
100nF
10k ICSP
19 10 26 38 57
SKT
AVdd Vdd Vdd Vdd Vdd 7 1
39
CLKI/RC12 MCLR
40 59 2
CLKO/RC15 RF1
(VR3) DELAY 1 50
SCK1/RD2 18 3
VR1 POT1 51 PGED2
RPD3/RD3 17 PGED
42 PGEC2 4
10k RD8 46
55 RD0 PGEC 5
AUX4 RD7 47
54 RC13
MCS RD6 58
48 RF0/RPF0 CON7
AUX1 RC14 43
53 RD9/RPD9
RD PMRD/RD5 12
(OPTIONAL) 52 RB4 A19
WR PMWR/RD4 13
(VR4) DELAY 2 21 RB3 A18 PGED
AN8/RB8 14
VR2 POT2 49 RB2 A17
PGEC
AN24/RD1 15
10k IC1 RB1 A16
22
VBUSON
11
VBUSON PIC3 2 MX470- RB9/PMA7
PIC32MX470- 23
A15
33 F512H RB10/PMA13 A14
USBID USBID 24
34 RB11/PMA12 A13
VBUS VBUS 27
36 RB12/PMA11 A12
D– D– 28
D+ 37
D+
RB13/PMA10
29
A11 Fig.2: the basic Stereo Audio
A10
35
VUSB3V3
RB14/PMA1
RB15/PMA0
30
A9
Delay circuit. The incoming
D7
60
PMD0/RE0 RD11/PMA14
45
A8 stereo analogue signal at
61 44
100nF D6
62
PMD1/RE1 RD10/PMA15
32
A7 CON1 is digitised by CODEC
PMD2/RE2 RF5/PMA8 A6
D5
63 RF4/PMA9
31
A5
IC2 and then passed over
D4 PMD3/RE3 16
D3
64
PMD4/RE4 RB0/PMA6
8
A4 a digital bus to IC1 which
1 RG9/PMA2 A3
D2
2
PMD5/RE5
RG8/PMA3
6
A2
stores it in its 128KB internal
D1 PMD6/RE6
D0
3
PMD7/RE7 RG7/PMA4
5
A1 SRAM. This data is later sent
4
56
Vcap
RG6/PMA5 A0 back across the same digital
AVss Vss Vss Vss
10 µF 20 9 25 41
audio bus to IC2, where the
DAC converts it back into
a pair of analogue signals
D2 1N4004 which are fed to the output
POWER K A (CON2)
V+
7.5 – 12V
DC INPUT D1 1N4004
3.3Ω REG1 LM317
A K
IN OUT +3.3V
S1 K
CON3 D3
10k ADJ 120Ω LED1
1N4004
1000 µF A
POWER A 100 µF
K
LED1 λ 200Ω A
100 µF
K LM317T

1N4004 OUT
ADJ
SC AUDIO
AUDIO
 2013 DELAY
DELAY FORFOR
PAPA SYSTEMS
SYSTEMS A K OUT IN

Everyday Practical Electronics, February 2015 13

Audio Delay Unit (MP 1st).indd 13 01/12/2014 21:43:51


Constructional Project

programming header (ICSP), with a


+3.3V
10kΩ pull-up resistor for MCLR (pin
100nF 100nF 100 µF 7) to prevent spurious resets.
IC1 has a separate analogue supply
11 33
pin (pin 19, AVdd) for its ADC and a
18 Vdd Vdd 40
A19 A19 CS2 100µH axial inductor is used to filter
19 6
A18
20
A18 CS1
41
MCS this supply. This ADC is used to sense
A17 A17 OE RD
21 17 the positions of VR1-VR4 by measur-
A16 A16 WE WR
A15
22
A15 NC
38 ing the voltage at their wiper(s).
A14
23
A14 NC
37 At the time of writing, the PIC-
24 30
A13
25
A13 NC 32MX470 is so new that it is only
29
A12
26
A12
IC3
NC
16 available as engineering samples, but
A11 A11 NC
A10
27 R1LV0 8 0 8 ASB
R1LV0808ASB 15 production chips should be available
A10 NC
A9
28
A9 NC
8 by the time you read this. As usual,
39 7
A8 A8 NC pre-programmed chips will be avail-
42 36
A7
43
A7 DQ 7
35
D7 able from the EPE Online Shop.
A6 A6 DQ 6 D6
44 32
A5 A5 DQ 5 D5
A4
1
A4 DQ4
31
D4
Optional memory expansion
A3
2
A3 DQ 3
14
D3 Virtually all of IC1’s 128KB internal
3 13
A2
4
A2 DQ 2
10
D2 RAM is dedicated for use as a delay
A1
5
A1 DQ 1
9
D1 buffer and should be sufficient for
A0 A0 DQ 0 D0
GND GND most applications. But if a longer
12 34 delay is required, IC3 can be fitted as
mentioned above (see Fig.3). This is
a Renesas R1LV0808ASB 1MB SRAM
OPTIONAL MEMORY EXPANSION chip. It runs from the same 3.3V supply
as IC1 and its memory is arranged as 8
Fig.3: adding a Renesas R1LV0808ASB 1MByte SRAM chip allows the delay bits × 1048576 (220). This is driven by
to be increased from a maximum of 640ms up to a maximum of six seconds. the Parallel Master Port (PMP) memory
It runs from the same 3.3V supply as IC1 and is driven by the Parallel Master
Port (PMP) memory interface in the PIC32.
interface in the PIC32.
The PMP on this PIC32 has 16 ad-
dress lines (PMA0-15), eight data lines
to set up two DMA channels, one to every I/O pin which can be individu- (PMD0-7) and read/write strobe pins
read data from the CODEC and place it ally enabled or disabled (+250/–50µA). PMRD/PMWR. These are connected
into a RAM buffer and another to read IC1 turns on the pull-up and pull-down to IC3’s A0-15 address lines (in no
from a different location in that RAM currents alternately and measures the particular order), DQ0-7 bidirectional
buffer and send it back to the CODEC. change in voltage on that pin. data lines, OE (output enable) and WE
The CPU can then go into idle mode Without VR2/VR4, the voltage dif- (write enable) respectively. The PMP
while the DMA and SPI units do all ference will be nearly the supply volt- can be driven by one or more DMA
the actual work! The processor core age, ie, 3.3V. If either pot is installed, channels to allow copying between
only needs to wake up periodically to the change will be much less and so internal and external RAM while the
check if the delay has been changed via the unit knows to operate in dual mono processor is otherwise occupied.
the adjustment pot (using an interrupt delay mode. Since a 1MB 8-bit SRAM requires 20
request [IRQ]) and if necessary, adjust The MCLK signal from IC2 goes address lines and IC1 only has 16, the
the DMA memory pointers to suit. to pin 39 of IC1, which is the clock other four are driven by GPIO (general-
The main delay adjustment pot is input (OSCI), while the digital audio purpose input/output) pins 12-15
wired to analogue input pin 21 of IC1 data (BCLK, DACDAT, DACLRC and (RB1-RB4). Thus, the Parallel Master
(AN8). Normally, this is a multi-turn ADCDAT) connects to pins which are Port can read or write blocks of 64KB
trimpot so that the delay can be preset, routed to IC1’s internal SPI/digital au- of memory (216), with the four GPIO
but in some cases, it may be desirable to dio peripheral #1. This requires the bit pins selecting one of 16 different 64KB
have an externally accessible knob and clock to be connected to pin 50, but the blocks to access at any given time.
so 9mm pot VR3 can be fitted instead. other signals can go to one of several Besides the power supply pins
Provision has also been made for pins and are routed via its ‘Peripheral (which are bypassed with one elec-
a second delay adjustment pot (VR2 Pin Select’ digital multiplexer. trolytic and two ceramic capacitors),
or VR4). This allows the unit to pro- The rest of the components sur- the only remaining pins on IC3 are
vide two separate delays of the same rounding the microcontroller are vari- two chip select lines, CS1 and CS2.
mono signal; the delays can be set ous power supply bypass capacitors, With CS2 permanently tied to +3.3V,
independently. This could be useful including a 10µF capacitor at pin 56 CS1 controls whether IC3’s interface is
for a PA system where the speakers (VCAP) which is required to filter the active and this is driven by GPIO pin
are placed far apart. 2.5V core supply. This is derived from 54 (RD6) of IC1 (active-low).
IC1 can detect whether VR2 or VR4 is the 3.3V rail by a low-dropout regula- IC1 can detect whether IC3 is present
installed since it has weak pull-up and tor within IC1. There is also provision simply by attempting to use it. With
pull-down current sources/sinks on for CON7, which is a 5-pin in-circuit weak internal pull-downs enabled on

14 Everyday Practical Electronics, February 2015

Audio Delay Unit (MP 1st).indd 14 01/12/2014 21:44:06


Constructional Project

Parts List
1 double-sided PCB, coded 1 7.5-12V 100mA DC plugpack 1 10µF 6.3V 0805 SMD ceramic
01110131, 148 × 80mm supply 4 1µF 50V monolithic ceramic
available from the EPE PCB 2 4mm ferrite suppression beads 11 100nF 6.3V 0805 SMD ceramic
Service 1 M3 × 6mm machine screw and 2 1nF MKT
1 ABS plastic instrument case, 155 nut 2 33pF ceramic disc
× 86 × 30mm
1 set front and rear panel labels Semiconductors Resistors (0.25W, 1%)
4 No.4 × 6mm self-tapping screws 1 PIC32MX470F512H-I/PT 32-bit 2 47kΩ 1 120Ω
1 12MHz HC-49 crystal (X1) microcontroller programmed 3 10kΩ 2 100Ω
1 100µH axial RF inductor (L1) with 0111013A.hex (IC1) 2 1kΩ 1 4.7Ω 0.5W 5%
1 10kΩ multi-turn vertical trimpot (available from www.siliconchip. 1 200Ω 1 3.3Ω 0.5W 5%
(VR1) OR 1 × 10kΩ 9mm com.au)
horizontal potentiometer (VR3) 1 WM8731SEDS 24-bit 96kHz Extra parts for longer delay
2 5kΩ horizontal mini trimpots stereo CODEC (IC2) (element14 1 R1LV0808ASB-5SI 8MBit
(VR5,VR6) 1776264) 3.3V SRAM (IC3) (element14
2 6.35mm PCB-mount stereo 1 LM317T adjustable regulator 2068153)
switched jack sockets (REG1) 1 100µF 16V electrolytic capacitor
(CON1,CON2) 1 3mm blue LED (LED1) 2 100nF 6.3V 0805 SMD ceramic
1 5-way pin header, 2.54mm pitch 3 1N4004 diodes (D1-D3) capacitors
(CON7)
1 PCB-mount SPDT right-angle Capacitors Extra parts for dual mono delay
toggle switch 2 1000µF 25V electrolytic 1 10kΩ multi-turn vertical trimpot
1 PCB-mount switched DC socket 6 100µF 16V electrolytic (VR2) OR 1 × 10kΩ 9mm
to suit plugpack 1 22µF 16V electrolytic horizontal potentiometer (VR4)

the data bus, it will simply read zeros (nominally 3.35V), programmed with Software
if IC3 is absent, so we just need to do a the 120Ω and 200Ω resistors. Diodes While the software to implement the
test write to verify that it is connected D2 and D3 protect REG1 against its in- delay function is not overly complex,
and operating normally. If so, the delay put being suddenly shorted (however there is still quite a bit going on. As
adjustment range is set as 0-6s rather unlikely that is), while the capacitor at usual, the source code will be available
than 0-645ms. D3’s anode improves high-frequency for download from the EPE website.
Note that when using a RAM chip supply ripple rejection. Most of the complexity resides in
such as this, the order in which the Blue LED1 is the power indicator the ‘drivers’ which must stream digital
data and address lines are connected and its current-limiting resistor is used data between the microcontroller and
doesn’t matter. All that really matters to run it at 0.4-0.8mA, depending on CODEC and between the microcon-
is that when you write data to a par- the incoming supply voltage. troller’s internal RAM and the external
ticular address and then read that same As well as the aforementioned SRAM chip. Circular buffering is used
address later (ie, all the address lines supply bypass capacitors for micro- to allow for continuous recording and
are in the same state), you get the same controller IC1 and optional SRAM playback.
data back. Any jumbling of the address IC3, there are also a number of bypass
or data lines in a write operation is capacitors for IC2. Each of its vari- Construction
automatically reversed during a read. ous supply pins has a 100nF ceramic All the parts mount on a double-sided
This is in contrast to DRAM (dynam- and 100µF electrolytic capacitor to PCB available from the EPE PCB Ser-
ic RAM), where the memory is broken ground. There is also a low-pass fil- vice, coded 01110131 and measuring
up into rows and columns, and it’s ter for its analogue supply pins, to 148 × 80mm. This fits into a snap-
much faster to access data sequentially reduce the amount of supply noise together ABS plastic instrument case
than at random. SRAM is more akin that might be coupled from the measuring 155 × 86 × 30mm.
to a large register file and in general, digital circuitry. This is necessary Fig.4 shows the parts layout on the
performance is identical regardless of to get good analogue performance, PCB. Don’t worry about the unpopu-
the address pattern used during read especially for the ADC. lated pads; as stated above, they are
or write operations. This filter consists of a 4.7Ω resis- there to accept extra circuitry to be
tor with a ferrite bead over one of its described in the future.
Power supply leads, in series between the digital Start the assembly by fitting the
Toggle switch S1 switches power, and analogue +3.3V supplies, with a SMD ICs. IC1 and IC2 are required, but
while diode D1 provides reverse polar- 1000µF filter capacitor for the analogue remember that IC3 (the SRAM chip) is
ity protection. A 3.3Ω resistor limits supply. There is also a ferrite bead on optional. They are each fitted in more
the inrush current and REG1 provides the wire connecting the analogue and or less the same manner, as described
a regulated output of 3.15-3.55V digital grounds together. below. Note that IC1 and IC2 have

Everyday Practical Electronics, February 2015 15

Audio Delay Unit (MP 1st).indd 15 04/12/2014 10:10:04


Constructional Project

LED1
PO WE R
K A
S1
VR3 VR4
PO WE R
DELAY 1 DELAY 2

R1 LV0808A SB
VR1 VR2 01110131 + 100n F 100n F REG1

IC 3
Stereo Audio Delay/ LM317
DSP Board 24bit/96kHz

3. 3 Ω
100 µF

10k
D1

4004
FB1 100 µF+ 100 µF CO N7
+ 33p F 100 µH IC SP
4. 7 Ω X1 D3
4004
L1

+
D2
FB2 100n F
4004

100n F
+

10k
33p F 100n F 100n F 1000 µF
100 µF 120 Ω
100n F

+
WM 8731L

100n F
200 Ω
47k
47k

100n F
1
IC 2

+ IC 1 + +

10k
+ 100 µF 100 µF

100n F
PIC32MX 470F
1000 µF
100n F

1
22 µF
1 µF
2x 1 µF
1 µF 100 µF
1nF 1nF 10 µF
100n F
1k
CO N2 CO N1 CO N3 DC
100 Ω
100 Ω

1k 7. 5–12V
OU TPUT IN PUT
5k 5k
VR6
VR5

NO TE: PARTS LABELLED IN RED ARE OP TION AL – SEE TE XT

Fig.4: follow this parts layout diagram to build the PCB, starting with the SMD ICs and the SMD capacitors. The parts
labelled in red are optional. Install SRAM chip IC3 only if you need a delay that’s longer than 640ms and install VR2
(or VR4) if you want a dual-channel delay unit with independently adjustable delays.

very closely spaced pins (about 0.5mm If they aren’t, don’t panic; it’s just a this will leave you with neatly sol-
apart) but if you are careful, it’s possible matter of re-melting the solder on that dered pins and no solder bridges. Go
to hand solder these parts reliably. one joint and carefully nudging the IC over all the pins once with the solder
Begin by placing the IC to be in- in the right direction. You might get it wick, then check under a magnifier
stalled alongside its pads and identify right first time or it may take several at- for any remaining bridges. If there are
pin 1. In each case, there should be a tempts to get it in place, the goal being any, add a dab of flux paste, then go
small dot or depression in one corner to eventually get it properly aligned back over them with the solder wick.
(you may need to view the part under without spreading solder onto any Once that IC is in place, you can
a magnifying lens and a strong light other pins or pads and without heating repeat the above procedure until all
to spot it). This must line up with the the PCB or IC enough to damage them. the SMD ICs have been fitted.
dot and pin 1 marking on the overlay If you do get some solder on the By the way, rather than hand-solder
diagram and this should also be shown adjacent pin, it’s still possible to adjust these parts, you could use a home re-
on the PCB silkscreen printing. the position but you will now need to flow oven (as described in EPE in April
Check that the part is the right heat both pins to get it to move. Take 2014 – Beta-Layout’s Re-flow Oven Kit
way around, then apply a very small care though, because if three or more and Controller). However, we realise
amount of solder to one of the corner pins end up with solder on them, you that most constructors won’t have such
pads. If you are right-handed, it’s will likely need to remove the part, a set-up and hand soldering is quite
easiest to start with the top pad on the clean up the pads using solder wick straightforward provided you follow
righthand side. If you are left-handed, and then start again. the above procedure and have a good
start with the top pad on the left side. Once the part is in place, solder the magnifying lamp and a fine-tipped
Avoid getting any solder on the adja- diagonally opposite pin, then re-check soldering iron.
cent pad. the alignment under magnification as Once all the ICs are in place, follow
That done, pick up the IC with a it may have moved slightly. If it has, with the SMD ceramic capacitors, us-
fine-tipped pair of angled tweezers you can reheat this second pad and ing a similar procedure; ie, add solder
and while heating the solder pad, gently twist the IC back into alignment. to one pad, then heat this solder and
gently slide it into place. Don’t take Once you’re happy, solder the rest of slide the part into place before solder-
too long doing this; if you heat the pad the pins – and don’t worry too much ing the other pad and refreshing the
too much it could lift, so after a few about bridging them with solder, it’s initial joint. Be careful not to get the
seconds, if it isn’t in place, lift off and almost impossible to avoid. Remember SMD capacitors mixed up.
wait for the PCB to cool down before to refresh that first pin you soldered. In each case, wait about 10 seconds
trying again. Once you have placed Once all the pins have been sol- after soldering the first side of the ca-
it, check the part’s alignment under a dered, spread a thin layer of flux paste pacitor before applying solder to the
magnification lamp or similar. All the along all the pins and gently press other side. This is necessary because
pins must be accurately centred over down on them with solder wick to suck the solder joint can remain molten for
their respective pads. up the excess solder. If done correctly, quite some time. If you try to solder the

16 Everyday Practical Electronics, February 2015

Audio Delay Unit (MP 1st).indd 16 01/12/2014 21:44:26


Constructional Project

+3.3V

VR3 VR4
(ALT TO POT1 (ALT TO POT2
VR1) VR2)

REPLACING VR1 & VR2 WITH VR3, VR4


Fig.5: potentiometers VR3 and VR4 can
be installed instead of VR1 and VR2 if
you want the delays to be externally
adjustable (refer to the text for the
various options). Don’t install both
VR1 and VR3 or both VR2 and VR4.

lithic multilayer) and then pin header


CON7 (not required if you have a
pre-programmed microcontroller).
That done, solder DC socket CON3
in place, followed by either VR1 or
VR3 (to externally adjust the delay)
but not both.
In addition, you can optionally fit
VR2 or VR4 (but not both). As men-
This photo shows the completed PCB without the tioned earlier, if either VR2 or VR4
optional SRAM chip (IC3) and with just VR1 fitted so is fitted, the unit will operate as two
that the unit functions as a basic stereo audio delay.
separate mono delay channels.
Now fit crystal X1 and the electro-
(FB1) over one of the 4.7Ω resistor’s lytic capacitors, taking care to ensure
  Capacitor Codes leads before soldering it in place. It’s that the latter are correctly oriented.
best to check each resistor value with Follow with power switch S1 and the
Value µF Value IEC Code EIA Code
a DMM before fitting it as the colour blue power LED (LED1). This LED
1μF   1.0µF   1u  105 bands can be difficult to read. The di- should have its leads bent at right an-
1nF 0.001µF   1n  102 odes are all the same type and all have gles 4mm from the base of the lens and
33pF   NA  33p   33 their cathode bands facing to the top then soldered so that the centre of the
or righthand edge of the board. lens (and thus this short lead section) is
opposite pad too early, the capacitor In the case of FB2, slip the bead over 6.5mm above the top surface of the PCB.
will move out of alignment and it’s a resistor lead off-cut and then solder This aligns the centre of the LED with
frustrating trying to re-align capacitors it to the board as shown in Fig.4. You the centre of the switch. When bending
when this happens. can also mount axial inductor L1 at the LED’s leads, pay attention to the
Take care also not to short any this time. Follow with REG1; bend its ‘A’ and ‘K’ markings on the PCB as the
IC pins when soldering the SMD leads down about 6mm from its body, longer (anode) lead must be soldered
capacitors. They are located close to feed them through the PCB holes, fas- to the anode pad. You can accurately
the ICs for performance reasons. ten its tab to the PCB using an M3 × set the height of the LED by cutting
6mm machine screw and nut and then a 6.5mm wide cardboard spacer and
Through-hole parts solder and trim the leads. pushing the leads down onto this.
Proceed now with the low-profile The horizontal trimpots can go The assembly can now be completed
components such as the resistors and in next, followed by the MKT and by soldering jack sockets CON1 and
diodes. Be sure to slip a ferrite bead ceramic capacitors (disc and mono- CON2 in place. Note that if you are


Resistor Colour Codes
o No. Value 4-Band Code (1%) 5-Band Code (1%)
o   2 47kΩ yellow violet orange brown yellow violet black red brown
o   3 10kΩ brown black orange brown brown black black red brown
o   2 1kΩ brown black red brown brown black black brown brown
o   1 200Ω red black brown brown red black black black brown
o   1 120Ω brown red brown brown brown red black black brown
o   2 100Ω brown black brown brown brown black black black brown
o   1 4.7Ω yellow violet gold brown yellow violet black silver brown
o   1 3.3Ω orange orange gold brown orange orange black silver brown

Everyday Practical Electronics, February 2015 17

Audio Delay Unit (MP 1st).indd 17 01/12/2014 21:44:39


Constructional Project

clockwise setting will give a delay of


Audio Delay THD vs Frequency 13/09/13 15:33:36 Fig.6: this graph either 640ms (no SRAM fitted) or 6s
1 shows that the delay (SRAM fitted).
0.5 unit should have
little impact on
If you know what signal level will
sound quality, even be applied to the input when the unit
0.2 is in use, you can adjust trimpots VR5
when used with
0.1 a high-quality PA and VR6 to suit now. To do this, feed
system (input signal in a sinewave of the expected ampli-
THD+N %

0.05 level is 1V RMS). tude, then adjust these pots so that the
The ‘oscillation’ outputs measure just under 1VAC. Any
0.02 between 0.01% and higher will lead to clipping and dis-
0.02% is due to the tortion. Ideally, you should calibrate
0.01 beat products of the them separately.
48kHz sampling rate
0.005
and the input signal
If you aren’t sure of the input signal
frequency (this is a amplitude, you can wait until you get
0.002 form of aliasing). the unit ‘in the field’ to set the level
pots. One method is to turn them clock-
0.001
20 50 100 200 500 1k 2k 5k 10k 20k wise until clipping and distortion start,
Frequency (Hz) then back them off slightly. However,
this does risk setting the level high
enough for slight clipping to occur
using the type with six pins, you will should the voltage across this resistor which may not always be obvious. If the
also have to file or cut down the tall, rise too high. input signal is under 1V RMS (0dBu =
rounded pieces of plastic just behind Expect a reading in the range of 0.2- 0.775V RMS), then you can simply set
the screw threads (see photos), to pre- 0.3V, depending on the exact resistor them both fully clockwise.
vent them from later fouling the case. value and how you have configured If all else fails, simply set VR5 and
the unit. Much less than 0.2V indicates VR6 half-way. The unit can then han-
Checking it out that there is an open circuit somewhere, dle input signals up to about 2V RMS,
If you purchased a blank PIC32 chip, while much more than 0.3V indicates but if the signal level is significantly
program it now (or purchase a pro- a likely short circuit. If the reading is lower than this, the noise and distor-
grammed chip from the EPE Online outside the expected range, switch off tion will be less than optimal.
Shop). immediately and check for faults.
The circuit can be powered from a The most likely faults would be one Case preparation
PICkit3 programmer at 3.3V. In fact, or more pins on an SMD chip bridged The front panel of the case needs
the whole unit will operate normally to an adjacent pin or not properly holes for the power switch and LED,
from this supply, so you can test the soldered to the PCB pad. Other pos- while the rear panel requires holes
audio signal path immediately after sible faults include incorrect device for the two jack sockets and the DC
programming the chip. orientation (primarily ICs, diodes power plug. The front and rear panel
If you don’t have a PICkit3, you will and electrolytic capacitors) or poor/ artworks (Fig.7) can be used as drill-
need to power the unit from a 7.5-12V bridged through-hole solder joints. ing templates. These can also be
DC plugpack. In this case, connect a Assuming all is OK, feed a line level downloaded from the EPE website in
voltmeter across the 3.3Ω resistor next audio signal into the input and con- a single PDF file.
to D1. Small alligator clip leads (or nect the output to an amplifier. You It’s simply a matter of printing (or
other test probe clips) are very useful should hear clear, undistorted audio copying) the labels, then accurately
for this purpose, as you can switch with no delay. You can then adjust taping them to the panels, drilling a
the unit on while watching the meter the delay pot setting(s) and check pilot hole in the centre of each location
reading and switch it off immediately that this operates as expected. A fully indicated and then enlarging each to

Fig.7: these two


artworks can be
copied and used as
drilling templates
for the front
and rear panels.
They can also be
downloaded as a
PDF file from the
EPE website.

18 Everyday Practical Electronics, February 2015

Audio Delay Unit (MP 1st).indd 18 01/12/2014 21:44:53


Constructional Project

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

The PCB is fastened


into the case using four
self-tapping screws
which go into integral
pillars. Note that the
front and rear panels
are normally fitted after
the lid has been fitted.

size using a tapered reamer. That done, Using it or 6s, depending on whether IC3 is
remove the templates and de-burr the All that’s left is to install the unit in fitted).
holes using a counter-sinking tool or its intended application and set the If the unit is set up for dual mono
oversize drill bit. Any adhesive resi- required delay. For PA systems, this delays, measure pin 4 to determine the
due can normally be cleaned up with can be a simple trial-and-error process left channel delay and pin 5 the right
methylated spirits. whereby you incrementally increase the channel delay. Note that the accuracy
Check that the holes are large delay to get the best overall intelligibility of these readings depends on the exact
enough by test fitting the panels to the at various points in the hall (or venue). frequency of crystal X1.
bare PCB. A new set of panel labels A similar procedure will be required
can then be printed onto photographic where the unit is used to provide two What’s coming
paper, attached to the panels using separate delays. That’s all there is for the delay func-
silicone adhesive and the holes cut Once adjusted, you can determine tion. In the next instalment, we’ll show
out using a sharp hobby knife. what the delay is actually set to by you how to use the same hardware
The assembly can now be completed measuring either the frequency or the for echo or reverb. These functions
by screwing the PCB to the bottom of duty cycle at pins 4 and 5 of CON7. are especially useful when used in
the case using four No.4 × 6mm self- Even if the pin header is not fitted, conjunction with a microphone (for
tapping screws, then placing the lid you can simply ‘poke’ probes into the vocalists) or an electric guitar.
on top and snapping the front and rear plated PCB holes. As such, we’ll show you how to wire
panels on. If you have trouble fitting A PWM signal is provided at each the unit up to a pedal, so that the effect
the panels over the connectors, enlarge of these pins and its frequency in can be switched on and off easily. We’ll
the offending holes slightly. Note that Hz is equal to the set delay in mil- also show you how to reconfigure the
the DC power socket is recessed; most liseconds (DC = no delay). The duty unit to run from a 5V supply, in case
DC power plugs are long enough to fit cycle varies from 0-99%, with 99% you want to power it from a computer
through the rear panel. indicating maximum delay (ie, 0.64s USB port or similar.

Everyday Practical Electronics, February 2015 19

Audio Delay Unit (MP 1st).indd 19 01/12/2014 21:45:03


Something eerie
in the ear Mark Nelson

This month’s column is about some people’s amazing ability to hear sounds inaudible to
others. Total nonsense? Not at all, so let Mark Nelson convince you that fact can sometimes
be stranger than fiction. Or is it indeed utter tosh?

A couple of months back


the cover of New Scientist mag-
azine carried the intriguing headline
Someone with personal knowledge
of this phenomenon is radio ham
David Bartholomew (callsign
Golden ears experience
Next, acoustic feats that are even more
amazing. A new range of ‘audiophile
‘The Man Who Hears Wi-Fi: Audio WB6WKB). As reported in the Usenet grade’ mains plug fuses is now
Hack Reveals A Hidden World’. I group rec.radio.amateur.misc, he available, from not one but three firms.
took the bait and bought the magazine states: ‘It’s real. I attended a Field You can even buy them conveniently
to discover a fascinating tale. Frank Day setup a few years ago, staged by on eBay at just £15 for a presentation
Swain, the subject of the article, the Westside Amateur Radio Club in box of three. Why should you invest
suffers from deafness and is a hearing Los Angeles. They had one of their in them? Well, ‘to an audio or visual
aid user. But now he has hacked his stations inside a trailer, and the radio system, the AMR Gold Fuse will
hearing so he can listen in to the data had an automatic antenna tuner. Well, bring you fuller body, better definition
that surrounds us. His iPhone has been somebody didn’t ground the thing and detail, not to mention reduced
modified to register, as an artificial right. I was inside the shack about distortion’. What’s more, the Gold
audio signal, the level of Wi-Fi activity five feet from the radio when the Fuse has been ‘independently tested
in his immediate environment. This operator said, ‘15 meters is dead; let’s in the audio and visual fields against
‘sound picture’ is then fed to his tune it up on 20.’ He changed bands the leading brands and proved to be
hearing aid. and hit the deadly little Automatic one of, if not the best, fuse currently
Tune button. The radio began buzzing available to the performance-minded
Clever stuff? as the tuner went to work. Also, I let consumer.’ It’s well worth reading the
With a grant from UK innovation out a scream as one of my teeth with impressively technical ‘Specifications’
charity NESTA, sound artist Daniel a nice filling in it suddenly felt like printed (in gold text) on the inside of
Jones and writer Frank Swain built a dentist was drilling in it with no the presentation box lid: Silver Alloy
an experimental tool for making Wi- anaesthetic! I ran from that trailer Fuse Wire (it doesn’t actually say the
Fi signals audible. Explains Swain: uttering obscenities and the pain percentage of silver in the alloy); Low
‘Running on a hacked iPhone, the vanished as soon as I got clear of the Inductance Design (because an inch of
software exploits the inbuilt Wi- thing. Needless to say, I didn’t hang wire is usually dozens of henries, and a
Fi sensor to pick up details about around that particular shack much real issue at 50Hz – right?); Gold-Plated
nearby hotspots: router name, signal during the rest of the contest.’ End Caps – see above; Non Magnetic
strength, encryption and distance.’ (NEVER use magnetic fuses!)...
Daniel Jones adds: ‘The strength of the Japanese spies betrayed But those Gold Fuses sound
signal, direction, name and security The admirable scourge of suspect abnormally – how can I put this? –
level on these are translated into an urban legends, snopes.com, considers ‘cheap’. Far better to buy a SuperFuse
audio stream made up of a foreground ‘undetermined’ the claim that the from Russ Andrews at the value-for-
and background layer: distant signals American comedienne Lucille Ball money price of £25 each. The end caps
click and pop like hits on a Geiger picked up radio transmissions on are hand-polished and treated with
counter, while the strongest bleat her fillings that led to the capture of DeoxIT ‘contact enhancer’ and finally,
their network ID in a looped melody. Japanese spies. In 1942, the ‘I Love the SuperFuses are supplied with a
This audio is streamed constantly Lucy’ star had several temporary DeoxIT ‘Gold wipe’ for treatment just
from the iPhone to a pair of hearing lead fillings installed in her teeth and before fitting. Actually, you can save
aids. The extra sound layer is blended driving home one evening from the money by splashing out five pence
with the normal output of the hearing MGM studios, she reported hearing less on an IsoClean Power audio-
aids; it simply becomes part of the music, even though the car radio was grade fuse for audiophile performance,
soundscape.’ not turned on. which ‘will give your system an instant
On another evening, in her words, performance upgrade for a minimal
In-brain radio reception ‘It wasn’t music this time, it was cost’. What’s more, ‘each and every
Frank Swain requires additional tech Morse code. It started softly, and then fuse is also thoroughly and accurately
to hear Wi-Fi, but some folk can hear de-de-de-de-de-de. I stopped the car measured and checked in order to
radio signals in their head, without any and then started backing up until it ensure the benefits to the end user are
electronics. In fact, many people claim was coming in full strength. DE-DE- maximised.’
to have heard radio signals, picked up DE-DE-DE-DE! The next day I told For some reason the old saying ‘An
on their tooth fillings or teeth braces the MGM Security Office about it, audiophool and his money are soon
when located close to a transmitter. and they called the FBI or something, parted’ comes to mind, so I do hope
The metalwork in their mouths acts and sure enough, they found an each of these fuse suppliers provides a
as a rectifier-detector (check out ‘rusty underground Japanese radio station. complimentary bottle of snake oil that
bolt effect’ on Google) in the same way It was somebody’s gardener, but sure customers can sniff delicately in order
as a lump of galena works in an old enough, they were spies.’ to better appreciate the improvement
crystal set radio. How the detected It’s a great story and one that’s to their Hi-Fi systems.
signals are converted to audible sound unlikely to have been made up, so Last, but not least, remember that
is less clear, however. this too has the ring of confidence. your letters go to the editor, not me!

20 Everyday Practical Electronics, February 2015

TechnoTalk-Feb-2015.indd 22 03/12/2014 08:54:40


wirelessthings.net/openhardware

Page 21.indd 21 12/12/2014 09:59:32


Constructional Project

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

The main PCB for the


Tiny Tim Stereo Amplifier, containing
both preamplifier and power amplifier.
The board is the same as that used in the Hi-Fi
Stereo Headphone Amplifier project from October/
November 2014 but requires slight modification and
of course an upgrade of components. With the mods
described here it will achieve 10W music power into
4Ω or 8Ω speakers and 8W RMS into 4Ω.

care to ensure they are all correctly


oriented. In each case, the stripe faces their leads to fit the triangular pad
to the left or the bottom of the board. pattern originally intended for a TO-
The four BAT42/BAT85 small-signal 92 transistor, as shown on the overlay secure the winding. Slip it over the
Schottky diodes (D15-D18) near IC1 diagram and photos. The metal mount- outside and gently heat it to shrink
(upper-left) can then go in. Their ori- ing faces of each pair face towards it down (ie, be careful to not melt the
entations vary, so take care. each other. bobbin).
If you are using sockets for IC1-IC3, Note that some BD139/140 transis- The second coil is wound in exactly
solder them in now with the notches to tors may lack a metal face; in which the same manner. Once it’s finished,
the right as shown. Alternatively, you case you will need to look at which scrape the enamel off the leads on both
can solder the ICs direct to the board side has the transistor type number inductors and tin them before fitting
with the same orientation. printed on it (which is opposite the them to the PCB.
The MKT and ceramic capacitors mounting face) and ensure that these
are next on the list, followed by the 16 sides face away from either other. Further modifications
small-signal transistors. There are three The tracks cut earlier allow us to re-
different types, so be sure to install the Winding the inductors configure the power supply so that the
correct type at each location. Use a The two air-cored inductors (L3 and output stages run off the unregulated
small pair of needle-nose pliers to crank L4) are wound on small plastic bob- ±20V rails – but to do that, we also
the transistors leads so that they mate bins. It is much easier to wind them need to run four insulated wires on
with the board holes and check that if you make a winding jig, as shown the underside. It is simply a matter
each transistor is correctly oriented. in the panel. of connecting the pads labelled A-A,
The two 500Ω trimpots can now To wind the first coil, initially se- B-B, C-C and D-D.
go in. That done, fit PCB pins at test cure the bobbin to the jig with one of To join A-A and B-B you can use
points TP1-TP4 plus another two to its slots aligned with the hole in the light-duty wire because these only
support the tinplate shield between end cheek. That done, feed through need to be able to carry enough current
inductors L3 and L4. Then, mount the the hole about 20mm of a 1m-length to power the preamplifier; even Kynar
electrolytic capacitors, but leave the of 0.8mm-diameter enamelled copper (wire wrapping wire) or bell wire is
two 4700µF filter capacitors out for wire, then carefully wind on 20.5 turns suitable. The two shorter runs, C-C
the time being. Note that four of the before bending the end down so that and D-D, can carry in excess of 1A, so
capacitors are labelled as 50V types it passes through the opposite slot in medium- or heavy-duty hook-up wire
(a higher rating such as 63V is fine). the bobbin. Trim the ‘finish’ end of the is more suitable.
As with the resistors, the capacitor wire to 20mm (to match the start end),
leads labelled C and D are best left then secure the winding with a layer of Completing the PCB assembly
unsoldered until later. insulation tape and remove the bobbin The tinplate shield between the two
The four BD139/140 transistors from the winding jig. inductors can now be installed. This
which are not mounted on heatsinks A 10mm-length of 25mm-diameter shield measures 35 × 15mm and can
can go in next. You will need to bend heatshrink tubing is used to finally be cut from the lid of a large tin (or

Everyday Practical Electronics, February 2015 23

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 23 01/12/2014 21:55:43
Constructional Project

TO OUTPUTS OF 0V TO DAC POWER


PRE-BUILT DAC +12V SUPPLY PCB
R reifilpmA enohpdaeH ifiGND
H
R L D9 220F

+
ANALOG LINE INPUTS

+
220F

4004
220F

1k
D15 22F 22F
BAT42

+
+12V

+
L 100k BAT42
D16 100nF 100nF

D18
4.7nF 470nF

680
22k
100nF

22k
IC1 IC2 IC3

BAT42

680
4004
100k LM833 LM833 LM833
VR1
D10
D17 BAT42
100k A K 4.7k 4.7k

10
680 100pF 100pF
2 x 10k LIN

10

+
+
D14 D12
RIGHT

47F
ANALOG

47F
VOLUME
IN

470nF

+
4004

4004
B

+
+
L2

4004

4004
4.7nF A
100F 50V BC559
220F 100F 50V 220F
x x D13 Q18 D11 Q6 BC559
100k
FERRITE THE WIRE LINKS SHOWN HERE
2.2k 2.2k
BEADS
DIGITAL

22

22
(IE, SOLID BLACK LINES)

10k
10k
680

10k 2.2k 2.2k

10k
WILL NOT BE NECESSARY
LEFT

10
IN

10
Q17
ON PCBs OBTAINED FROM THE

Q5
47

47

220
220
Q19
BC559 Q7 BC559 SILICON CHIP ONLINE SHOP
SCREENING BRAIDS CONNECTED L1 BD140 BD140
TOGETHER & INSULATED 68 68 (www.siliconchip.com.au/shop)
WITH HEATSHRINK SLEEVING BC549 BC549 AS THESE BOARDS WILL BE
BC549

BC549

68
68
Q16
Q15

CUT THESE DOUBLE-SIDED AND THE

Q3

Q4
TWO TRACKS LINKS WILL BE TRACKS ON
Hifi Headphone

THE PCB TOP SIDE.


BC559

BC559
BC559 BC559
100

100
Amplifier

SOME KITS MAY ALSO INCLUDE


Q13

Q14
1.8k

1.8k

Q1

Q2
01309111

© 2011

DOUBLE-SIDED PCBs – CHECK


SC

100 100 WITH KIT SUPPLIERS.

1.8k
1.8k

3.3k
3.3k

2.2k 2.2k
680pF

Q8 680pF
220pF 220pF
1.2k

1.2k
BC549

BC549
BD139 BD139
Q20

Q21 Q9
100nF

100nF

10k TP4 TP2


RIGHT CHANNEL 10k

2.2k
2.2k

SPEAKER TERMINALS VR3 500 VR2 500


+

+
22
2.2k

2.2k
22
+

4700F 47F 47F


25V Q22 Q10
BD139 TP3 BD139 TP1
Q23 Q11
Fig.6: complete
TIP31 TIP31 overlay and wiring
220F 220F
1.2 1.2 diagram for the main
+

+
+

4700F 1.2 1.2 PCB. Note the two


25V 1.2 1.2
1.2 1.2
tracks to be cut and
1102

22

22

50V 4004 50V 4004 the insulated wire


4004

D5 D8 BC328 D7 BC328
LEFT CHANNEL D1 4004
Q24 Q26 Q12 Q25 links to be installed
SPEAKER TERMINALS D2 4004 TIP32 TIP32 to make it suitable
10nF
A C CON4 for higher power
10nF OUTPUT
30k B
D
operation.
7912 L3
100nF

–20V D 4.7H
10
4004
220F

0V
+

D6
+20V D4 TINPLATE
220F

SHIELD
C
4004

CS
100nF

FROM CON3 150nF


ON POWER 7812 C 150nF
L4 POWER LED
SUPPLY PCB CON4
D3 4.7H
A K

4004
10
INSULATED WIRE LINKS
REQUIRED (UNDER PCB)
FROM POSITIONS
MARKED A TO A, B TO B,
C TO C AND D TO D
22k
01309111
HEADPHONE JACK

similar) using tin snips. File the edges locations. It may take 10 seconds or Mounting the heatsinks
smooth after cutting, then temporarily more to heat it enough for the solder The two regulators and six power
position it between the two PC pins to adhere. transistors are mounted on six large
and mark their locations. Finally, flow some solder onto the flag heatsinks. These have two posts
That done, hold the shield in an tops of the two PC pins before fitting which pass down through the PCB
alligator clip stand and melt some the shield in position and remelting for support. Two of the heatsinks
solder onto either side at the marked the solder to secure it. have two transistors mounted on

24 Everyday Practical Electronics, February 2015

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 24 01/12/2014 21:56:11
Constructional Project

MAINS
TO MAINS
CORD
POWER
SWITCH

Blue

N
© 2013 LA SW

T1 Blk

15V+15V 1A Slow Blow F1


20 OR 30VA Here’s the underside of the power supply
DANGER board, completely covered with a sheet
Live
230VAC of fibre insulation.

this procedure for the 7912 regulator.


+
The two TIP32 power transistors
10k
10k
4700F
25V
(Q12 and Q24) are mounted in identi-
Orange
cal fashion to the regulators. By con-
BR1
trast, the heatsinks for the two TIP31
~ +
-
– ~
power transistors (Q11 and Q23) have
4700F
~ the BD139 VBE multiplier transistors
+

Yellow 25V
~
mounted on the other side. Be sure to
+

"Tiny Tim" W04M -20V


Power Black TO insulate all the transistors from the
Supply +20V
18110131 Red CON3
AMPLIFIER heatsinks using silicone washers and
PCB
insulating bushes as necessary.
–20V
Fig.7: same-size PCB component overlay with The power connector, power switch
0V
matching photo below. This PCB can also be used as a +20V
and LED, input and output sockets
general-purpose supply with appropriate transformer. and volume control potentiometer
are not fitted to the board; instead,
most of them are chassis-mounted and
connected with flying leads We’ll get
to that later. First, let’s assemble the
power supply.

Power supply
Before fitting any components, use the
power supply PCB as a template to cut
a sheet of fibre insulation (often sold
as Presspahn or Elephantide) to 100
× 75mm and drill through the four
mounting holes to make correspond-
ing holes in the Presspahn sheet. Also
make a hole corresponding with the
transformer mounting hole and en-
large this to 5.5mm diameter.
Now begin assembly, following
the overlay diagram of Fig.7. Fit the
two resistors, then the bridge recti-
fier: make sure its ‘+’ symbol lines up
with that shown on the PCB overlay.
them, one each side (see overlay and flush with the board before soldering Follow with the terminal block (wire
photos). the other. Since you have to heat up entry holes towards board edge) and
Start by loosely fitting the 7812 and quite a bit of metal, it could take 15 then the fuse holder.
7912 regulators to their heatsinks. Note seconds or more before the solder We need to install the two pin head-
that, in each case, the regulator’s metal adheres to the post. ers next, but there’s a bit of a trick here.
tab must be isolated from its heatsink Alternatively, if the heatsink doesn’t In the January issue, we showed the
using an insulating bush and silicone have ‘solderable’ pins, use pliers to power switch connected between the
washer. bend the tabs outwards far enough so neutral pin of the mains power plug
That done, fit the 7812 regulator that it is secured to the board. and the transformer primary/fuse.
assembly through the lower set of Having secured the heatsink, check While this will work, it means that
holes just above CON3 and D3. If the that the insulating washer is properly the transformer and fuse are live even
heatsink has ‘solderable’ pins, flip aligned with the regulator and tighten when the power switch is off.
the board over and solder one, then the mounting screw. The regulator’s Of course, when opening up the
double-check that it is sitting perfectly leads can then be soldered. Repeat unit for any reason (eg, to replace the

Everyday Practical Electronics, February 2015 25

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 25 01/12/2014 21:56:12
Constructional Project

SWITCH

OUTPUT +
OUTPUT –
INPUT +
INPUT –
LED
Fig.8: finally, the only
other PCB which requires A K
assembly, the MiniReg
universal power supply
(used here to power the DAC)
which we published in the
CON1 CON2 CON3 CON4
September 2013 issue.

10F
4004
D1
R2
REG1

110
4004
2.2k

D3
LM317
VR1

1000F

100F
4004
1111ERCJ D2

fuse) it is always vital to ensure that Once you’ve determined that, you then place the sheet of Presspahn you
it is unplugged, but in case somebody can install the two pins headers with prepared earlier under the board and
fails to do this, it is safer to have the an orientation such that the live wire feed the transformer mounting bolt up
switch between the mains plug live will go to the terminal marked ‘L’ on the through this and the hole on the PCB.
pin and the rest of the circuit. Note board (ie, the one directly adjacent to the Check that the corner screw-holes
that it’s possible for mains live and switch header). This is easier than trying more or less line up and then slide
neutral to be swapped in house wiring, to swap the pins to the polarised plug. the transformer’s rubber pad over the
so this doesn’t guarantee safety (hence With the two headers in place, bolt, place the transformer on top (with
the advice to always unplug a device connect the mains cord to the left- wires exiting on the top side) and use
before servicing it) but this is a safer hand header (leave the other end the rest of the mounting hardware sup-
arrangement most of the time, ie, when unplugged!) then double-check that plied with the transformer to loosely
the house wiring is correct. the live pin on the plug is electrically hold it in place. Typically, this consists
Now, since we’re recycling the mains connected to the left-hand pin of the of another rubber pad, a metal dish, a
cord from a set-top box (or whatever switch header. If not, you will have spring washer, a flat washer and a nut.
other device you decide to rat), we don’t to remove the left-most header and Rotate the transformer so that the
know how it’s wired. We checked two re-install it the other way around. wires line up with the wire pads on
set-top boxes – both from the same Once you have verified that, fit the the right-hand side and then tighten
manufacturer – and found that the mains two electrolytic capacitors. the nut (but not too tight!). How you
cords were wired opposite to each other. Now, before mounting the trans- proceed depends on which transformer
So you will need to set your DMM on former, feed a cable tie through one you are using.
continuity mode and work out which of the two large holes at upper-right
pin of the header plug is wired to live and then back up through the other, Transformer type ‘A’
(normally indicated with an ‘L’ for ‘live’ so that it passes under the board in the In some transformers the primary and
(or possibly ‘A’ for ‘active) moulded into space between them. Make sure it’s the secondary leads will need to cross
the plastic mains plug housing). right way around to do the tie up later, over to reach the appropriate pads.

Winding jig for inductors Next, drill a 5mm hole through the centre of the scrap
The winding jig consists of an M5 × 70mm bolt, two M5 PC board material, followed by a 1.5mm exit hole about
nuts, an M5 flat washer, a piece of scrap PC board material 8mm away that will align with one of the slots in the
(40 × 50mm approx.) and a scrap piece of timber (140 × bobbin.
45 × 20mm approx.) for the handle. The bobbin is then slipped over the collar, after which
The flat washer goes against the head of the bolt, after the PC board ‘end cheek’ is slipped over the bolt. Align the
which a collar is fitted over the bolt to take the bobbin. bobbin so that one of its slots lines up with the exit hole in
This collar should have a width that’s slightly less than the end cheek, then install the first nut.
the width of the bobbin and can be wound on using insu- The handle is then fitted by drilling a 5mm hole through
lation tape. Wind on sufficient tape so that the bobbin fits one end, then slipping it over the bolt and installing the
snugly over this collar. second nut.

26 Everyday Practical Electronics, February 2015

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 26 01/12/2014 21:56:31
Constructional Project

The power supply PCB


is in the left rear
corner, with a
protective shield
alongside. The DAC is
in the opposite
rear corner with its
MiniReg power supply
in front. Pretty much
the whole of the rest of
the case is taken up by
the main PCB.

Luckily, the primary leads should be primary (blue and brown) leads to be
double-sheathed and so provide suf- tied to the board before being soldered
ficient insulation to remain safe in this to the pads labelled ‘Blue’ and ‘Bl.’ (it
configuration. doesn’t matter which goes to which). DAC power supply
Trim both the primary and secondary We’re using the MiniReg, described
leads to length so that they reach their Finishing the power supply in the September 2013 issue of EPE
respective pads, leaving a little bit of With the transformer leads trimmed to power the DAC, which runs off 6V
slack and allowing for the fact that we and stripped, run the two primary DC at about 50mA. The MiniReg is fed
are going to tie the primary leads down leads through the cable tie you inserted from the 12V rail from the amplifier via
to the PCB before soldering them to earlier and do it up tight, then trim off the 2-pin plug soldered earlier. Follow
the two pads. (check this by pushing the excess length. Solder all six leads the instructions in the September 2013
them down onto the PCB with a finger, to the appropriate pads, as explained issue to assemble it. Don’t worry about
between the two tie holes, then arching above. Use two or three more cable ties adjusting the output voltage, we can
them over to reach the solder pads.) to lace the secondary leads together so do that later.
The secondary wires are colour-cod- that should one break loose, it won’t You will need to make up a short
ed and go to the appropriate labelled go floating around (and also to contain (~50mm) 2-wire cable with a polarised
pads at the lower-right of the PCB. You the magnetic field as much as possible). header plug on one end and a 2.5mm
will probably need to trim these to You can now fit the four tapped inner diameter DC jack plug at the
slightly different lengths so that they spacers with the PCB and fibre insu- other end, to suit the DAC. This should
will all reach their respective pads. lation panel sandwiched in between. be wired so that the inner conductor
Use a nylon M3 screw in the upper- of the DC plug is positive. Refer to the
Transformer type ‘B’ right corner, near the mains tracks, to MiniReg instructions to see which pin
This type of transformer has the op- ensure that a metal screw in the other is the positive output and which is the
posite wiring arrangement, so the end of the nylon spacer can’t possibly negative. You will also need to short
primary and secondary leads do not make a connection through to the top out the switch terminal (eg, with a
need to cross over. Note that the colour of the board, where a stray wire could jumper shunt).
coding is often different though; the make the chassis live. The amplifier power indicator LED
white lead goes to the pad labelled ‘yel- Insert a 1A slow-blow fuse into the can also be run from the MiniReg and
low’ while the others match up with holder and clip the top cover on. We’ll again this will require a 2-core cable
their respective colours. You will need test the power supply board later once with a polarised header plug at one
to allow a bit of extra length for the it’s in the case. end. Make this one a bit longer – say

Everyday Practical Electronics, February 2015 27

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 27 01/12/2014 21:56:33
Constructional Project

100mm. Cut the LED leads short and


solder the other end of the wires to
these, with the cathode (flat side of
Parts List (in addition to those listed in Part 1)
LED lens) going to the terminal marked 17 PCB pins
‘K’ on the MiniReg PCB. Put these cable 2 chassis-mount RCA sockets, one red and one white (or black)
assemblies aside, for now. 1 panel-mount DPDT miniature slide switch
1 sheet fibre insulation (Presspahn or Elephantide), min 100 × 115mm
Wiring 1 100mm length 8mm diameter black heatshrink tubing
Cables for power, signal input and 1 200mm length 5mm diameter black heatshrink tubing
output leads must be soldered to the 4 M3 nylon tapped spacers, various M3 nylon nuts (for DAC installation)
amplifier board, along with shielded 6 M3 × 10mm nylon machine screws
cable to connect to the volume pot. 2 M3 × 6mm nylon machine screws
While you could solder these wires 4 M3 × 5mm machine screws
directly to the board, doing so with 3 M3 nylon nuts
everything already in the case is awk- 2 M2 × 10mm machine screws and nuts
ward. Hence, we fitted PC pins to most 1 jumper shunt
of these pads and soldered the wires 3 2-pin polarised header plugs with crimp pins
to these later. 20 small cable ties
There are a total of 17 required – two 3 small adhesive wire saddles/clamps
for each input, three for the outputs, 1 100mm-long, 8mm-diameter red heatshrink tubing
six for the potentiometer connections, 1 panel, 2mm plastic or 1mm aluminium – to cover rear panel of case
three for the power supply wires and 1 5mm LED bezel clip (optional)
one for the speaker ground returns.
However, upon reflection, we recom-
mend soldering the power supply pin 1 indicator is normally moulded the panel in place. If one of the holes
wires directly to the underside of the into the plastic plug housing. is near where the mains power sup-
board, leaving 13 PC pins to fit. ply will go, use a nylon screw and
Solder the pins in now, to the pads Chassis preparation nut there.
shown on the overlay diagram. Note A number of holes must now be drilled You can now mark out the posi-
that most of these holes are much larg- in the front, rear and base of the case, tions for the four binding posts, which
er than required for PC pins and some to attach the various connectors and should go near the middle of the rear
will let the whole pin pass through. mount all the modules. Start with the panel, but not too close to the power
You will need some sort of a clamp rear panel which needs holes or cut- supply mounting location – leave at
(eg, self-closing tweezers) to hold the outs for the four speaker terminals, least 10mm separation. We spaced
pins in while you solder them. analogue RCA input sockets, analogue/ them apart by about 20mm, with 5mm
For the power supply, solder 100mm digital selector switch and DAC inputs. extra between the two pairs; if you put
lengths of heavy-duty wire to the If you are using a case which origi- them much closer together than this,
4700µF capacitor terminals. We have nally housed a commercial piece of it makes connecting wires awkward.
left fitting these capacitors until now equipment (in our case, a set-top box), Now mark positions for the TOS-
so that you can wind the wire around there will be many holes in the rear LINK and RCA socket inputs of the
the leads before soldering. Colour code panel, most of which are not in the DAC board in the right-hand rear cor-
the wires as shown. right location to re-use. The simplest ner, as well as a rectangular cut-out for
Two more black heavy-duty wires way to solve this is to attach a new its selector switch to fit through. Since
then need to be soldered to the large rear panel on top of the existing one, this switch body sticks out further
ground plane area above these capaci- covering these up, which you can then than the TOSLINK connector, a slot
tors, for the speaker outputs. If you have drill and cut new holes in. will need to be cut to fit the whole
a commercially-made board, you will This panel can be metal or plastic, thing through.
need to scrape away some of the solder providing it is strong enough. We used We elected to place the stereo RCA
mask to allow this. If you like, you can a 2mm-thick plastic front panel from analogue input sockets and analogue/
drill a hole through the board and feed an instrument case that we had spare. digital selector slide switch under-
the wires in from the top and you can Don’t use thinner plastic as it isn’t neath the DAC inputs as there wasn’t
even fit a PC pin or two so the wires strong enough. A sheet of aluminium enough room in our case to place them
can be later soldered to the top of the or tinplate is also suitable. side-by-side. You may want to do the
board, if you want to. Cut the panel to the same size as same. In this case, make sure the holes
You will also need to connect wires the rear panel of your case, or at least for the DAC inputs and switch are
to run the DAC from the regulated large enough to cover up all the holes towards the top of the case.
+12V rail on the amplifier board. Take except that for the mains cable. Place With the positions for all these con-
light-duty figure-8 cable about 50mm this over the rear of the case and drill nectors marked out, you can start by
long (or two strands from a ribbon at least two 3mm holes through both. drilling pilot holes right through both
cable) and crimp/solder them into We put one at the end near the mains the original rear panel and the new
a 2-way polarised header plug. The cable and another in the middle. panel on top. Enlarge the holes for the
other ends go to the pads shown in Feed through short machine screws binding posts and RCA sockets until
Fig.7, with 12V to pin 1 of the plug. A and tighten these on to nuts to hold the connectors fit through. Ideally, the

28 Everyday Practical Electronics, February 2015

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 28 01/12/2014 21:56:41
Constructional Project

binding posts and RCA connectors four corner hole positions in the base. short lengths of wire (that can’t short
should be a snug fit. Then drop the power supply PCB in together) and clip leads so that you
The TOSLINK input, DAC selector at left rear, close to but not right up can check the output without having
switch and analogue/digital selector against the rear panel, and mark out to hold probes in place. Note that you
switch require rectangular cut-outs, its four mounting hole positions. can use regular probes as long as you
and these are too small to easily nib- Mark out two more holes, just to the are careful not to go anywhere near the
ble so you will probably have to drill right of the power supply board; one mains side of things while the unit is
a row of holes in each case and then roughly in line with the rear mounting plugged in.
slowly file it into a rectangle using holes and the other about 50mm closer Check that there is no continuity
needle files. You may find it easier to to the front of the case. These will be between either mains plug pin and
temporarily remove the new rear panel used to hold a small Presspahn shield the case and that there are no loose
and file holes in the two panels sepa- in place – for extra safety. conductors near the power supply
rately before re-fitting it. Note that it’s With the DAC in position, mark board and switch the unit’s mains
more important that the holes are neat the locations directly below its four switch to on. Then stand back, plug
in the outer panel than the inner one. mounting holes (eg, using a sharp drill in the mains cord and switch on the
Test-fit the DAC board and make bit) although note that you may not be power point. Check the voltages at the
sure that it can be butted right up able to fit pillars to suit all four if you output screw terminal of the power
against the rear panel. For the ana- are putting the RCA sockets and switch supply. You should get pretty close to
logue/digital selector slide switch you underneath it; also consider where the 20V between the middle terminal and
will need to file a slot for its actuator as wiring for these will go. Two or three those on either side, with the positive
well as two small mounting holes for mounting holes are sufficient. output being to the left. Ours measured
screws. Once you have it in place do Finally, choose a location for the around +21.5V and –21.5V.
the screws up and check that the slot is MiniReg near the amplifier and DAC If that tests OK, switch off and
large enough for it to smoothly slide to boards and mark out positions for its unplug the unit. If you didn’t get any-
the end stops in both directions. Make mounting holes too. thing, there could be an open circuit
sure to de-burr all the holes on both You can then remove all the mod- connection somewhere on the board,
sides before fitting the connectors. ules from the case, drill all the holes to but if the fuse blows, that suggests
3mm and de-burr them. There should there is a short circuit somewhere. In
Front panel be 17 mounting holes in total. either case, you will have to remove
You will also need to drill some holes the power supply board and inspect
in the front panel, or if possible, en- Testing the power supply it carefully.
large existing holes. Make sure you You can now temporarily install the
don’t compromise the insulation for power supply PCB in the case, with Wiring it up
the existing mains switch when doing the mains connectors towards the rear With the modules built and all the
so as you will want to re-use it. and plug in the mains cord and switch. holes in the case drilled or cut and
As you can see from the photos, Make sure that the mains cord goes de-burred, all that’s left is to fit the
we drilled a hole at the left end for into the right socket, ie, that closest to modules and wire them up. We’ll go
a 6.35mm headphone socket and en- the transformer. Ensure the fuse is in through these remaining steps in Part
larged existing holes at right, near the place and the cover clipped on. 3 next month and also present some
power switch, for the 16mm volume It’s a good idea to connect a DMM (or performance data for the complete
control pot and 5mm power LED. You two) to the low-voltage outputs with amplifier.
may also have to cut away some of the
internal structure of the front panel
in order to get these to fit. We used a
plastic bezel to make the power LED
a snug fit in the hole, then glued it in
place using hot melt glue; you could
also use silicone sealant.
If any holes are remaining in the
front panel near the mains switch, file
a piece of plastic to the shape of each
hole and glue it in place. We used black
plastic, to match the existing front
panel, and glued them with cyanoacr-
ylate (‘super glue’). As you can see, the
resulting seams are quite subtle.

Module mounting holes


The next step is to drill a series of
3mm holes in the bottom of the case
for mounting the various modules.
First, place the amplifier board near Here’s a view from the back to the front, showing how we made the bits fit into
the front-left corner and mark out its what was originally a set-top-box case. Once the lid goes on you’d never know!

Everyday Practical Electronics, February 2015 29

Tiny Tim Amp Pt2 Dec13 CS6 (MP 1st).indd 29 01/12/2014 21:56:52
Constructional Project

300 300

25

A 90

19
205 45mm LONG
(REBATE STRIPS OF 12 x 12
DIAMETER)
DAR PINE ATTACHED
193 TO EACH SIDE

201

157

HOLE DIAMETER
182
300mm
LONG CLEAT
C (12 x 12)

600
D

REBATES
6mm DEEP

365

E
SID DF)
D M
AN mm R
193
HOLE DIAMETER
H
182
HT , 16 FO
RIG 600 WN
O
0 0 x SH RITY
( 3 T A
NO CL
CL

35mm HOLE
FOR TOP HAT
(IF REQUIRED)

300

B
ALL MATERIAL 16mm THICK MDF
300 UNLESS SPECIFIED

A & B ARE 296mm LONG STRIPS OF 18 x 18 DAR PINE


ALL DIMENSIONS IN MILLIMETRES
C & D ARE 600mm LONG STRIPS OF 18 x 18 DAR PINE
E IS 300mm LONG STRIP OF 18 x 18 DAR PINE

Fig. 15: the complete PortaPAL-D speaker cabinet, albeit without one side (that’s so you can see how the electronics module
housing is made). We’ve deliberately selected material dimensions so that it can be made from standard sheets of MDF
(medium-density fibreboard). If you have the option, we’d suggest you get the MDF supplier to cut the panels to size for you
– that way, you get nice, straight, clean cuts which make for a nice, straight, airtight box.

Everyday Practical Electronics, February 2015 31

PortPAL-D Pt3 Feb14 (box) v6 (MP 1st).indd 31 01/12/2014 22:13:35


Constructional Project

Fig.16: typical bass-end response with an unfilled 33 litre box. This shows a 2.7dB peak at about 120Hz. By packing the space
with fibreglass insulation or bonded acetate (BAF) wadding, the effective volume can be increased by as much as 40%. This
apparent increase is due to a reduction in the speed of sound in the box due to the packing. With this filling, the 2.7dB peak
can be reduced to below 2dB so that the bass response becomes more damped. A further benefit of the wadding is a reduction
of internal reflections from the cabinet walls.

the edges free of cleats where the box is shown in the photographs. Position to seal the speaker from air gaps. This
made to house the PortaPAL-D chassis. the grilles over the speaker holes and should be considered when checking
Once the glue has dried, mark out mark out the hole positions for each the clearance gap.
the 205mm and 182mm rebate diam- clamp. Drill and attach each T-nut for Two 12 × 12 × 45mm DAR pine
eters for the two loudspeakers to sit the grilles and handle(s) by tightening pieces are set 19mm in from the rear
into on the front panel. Use a router up the screw to pull the nut into the and 25mm down as shown. These
to cut this rebate to a depth of 6mm. MDF. Once these nuts are secured, are for supporting the top of the Por-
Now fully cut out the 182mm diameter remove the screws. taPAL-D chassis. The lower 18 × 19 ×
holes with the router. The front surround is 18 × 18mm 300mm DAR pine piece supports the
If you intend to install the speaker DAR pine and can be cut and glued lower PortaPAL-D chassis. When all
stand top hat, the hole for this (located to the front of the box. The purpose is complete, ensure that all the joints
centrally in the base of the box) can of this is to recess the speakers (even are airtight by running a bead of PVA
be cut now using a 35mm diameter though protected by grilles) from the glue around all internal joints.
hole saw. inevitable bumps and scrapes of a At this stage, test the PortaPAL-D
Similarly, the holes for the handle portable system. chassis for fit into the sealed cavity.
that mounts on the top can be drilled. When the glue is dry, round off the Hopefully, you will not need to make
While we only used (and specified eight corners of the box using a rasp any changes to the box so that the
in the parts list) a single handle on top or file to form the same curvature as chassis will fit. The advantage of hav-
of the box, the finished PortaPAL-D is the corner protectors. ing the two handles on the front panel
quite heavy (17.5kg) so can be quite will be realised when trying to remove
tiring if carried any distance. Electronics chassis housing the chassis.
You might prefer to place a handle, The internal MDF boxed-in section Drill pilot holes for the 4g × 16mm
say, one-third down each side of the for the PortaPAL-D chassis can now be panhead screws that secure the panel
box, for easier carrying by two people. made. Cut the sheets and DAR pine to to the cabinet.
Another refinement worth considering size and glue these in place. Note that You may wish to paint the inside of
is mounting four small furniture cas- there is not much clearance between the PortaPAL-D chassis section of the
tors or wheels, one in each corner, to the back of the top speaker magnet and box black so that any exposed MDF
make the PortaPAL-D easier to move. the internal box. or pine that is not covered by carpet
That’s up to you. There needs to be a gap between is not obvious.
For the handle, we used two of the the speaker magnet and box otherwise
screws and captured nuts that are pro- resonances are likely, so check that Carpet
vided with the speaker grille clamps there is at least a 1mm gap between The speaker carpet is attached to the
to mount the handle. the speaker and the MDF sheet before box using contact adhesive. The car-
This leaves just three screws and finally gluing in place. pet can be cut into just three separate
nuts for each speaker grille mounting Note that when installing the speak- pieces. First comes the surround piece
using the clamps. That is sufficient for ers, there will be a nominal 1mm that wraps around the entire sides of
these grilles when spaced out 120°, as thickness of sealant around the rebate the box; second, the front baffle (296

32 Everyday Practical Electronics, February 2015

PortPAL-D Pt3 Feb14 (box) v6 (MP 1st).indd 32 01/12/2014 22:13:46


Constructional Project

t
angemen
p ro d u c ed by arr HIP
Re ICON C
with SIL .
m a g a z ine 2015 .au
o n c h ip .com
ic
www.sil

These shots,
front and rear, show the
completed PortaPAL-D box, with carpet, handle and
corner protectors fitted, immediately before installation
of the electronics chassis (left) and the two speakers (right).
The speaker wire is already in place, emerging from the hole drilled in the left
photo for connection to the PortaPAL-D chassis.

× 564mm); and third the rear panel at amount of overhang at the front while to allow the carpet to wrap around the
300 × 401mm. wrapping the length around the box front and back of the box. Test how
You will need a long straight edge sides will need to be 36mm and the each piece will wrap around the box
to cut the carpet accurately and a steel amount at the rear, 35mm. before cutting off too much carpet and
ruler to make the measurements. A Again, loosely wrap the carpet before gluing in place. Any removal of
‘Stanley’ knife (or a larger hobby knife) around the box to make sure it is going too much carpet can be covered over
can be used to cut the carpet against to fit properly and if all is well, remove with a suitable shaped extra carpet
a cutting mat. and apply contact adhesive to the bot- piece carefully glued in to fill the
Cut the front baffle carpet first. Lay tom of the box. Glue the beginning end hole. The fold-over at the rear needs
it against the baffle as a sanity check of the carpet to this with the end of to go down the sides into the recessed
and if it appears correct, remove and the carpet placed along the box edge. PortaPAL-D cavity by 19mm.
apply a smear of contact adhesive to Then apply the adhesive to the next The rear piece for the lower portion
the front baffle. Fix the carpet in place, side and wrap the carpet around that of the box can be cut to 300mm wide
smoothing out the carpet against the side taking care to maintain the correct × 401mm, and this needs to start by
baffle (a small roller is ideal). overhang front and back. Continue wrapping into the bottom edge of the
Now for the side carpet piece – this gluing the top and then the other side, PortaPAL-D cavity by 19mm and then
needs to be wide enough to also wrap affixing the carpet as you go. Rub your glued down the 18mm DAR pine and
around the front 18mm DAR pine, roller (or hand) over the carpet to then the back of the 300 × 365mm
folding at two 90° bends to reach the smooth it out and to maintain contact panel. The side wrap carpet can be cut
front baffle. It also has to fold around with the box till the adhesive is dry. to just 16mm for the lower part of the
at the back edge and reach 19mm It’s probably best to leave the box box, allowing the 300mm width to fit.
inside the box where the PortaPAL-D until the adhesive is dry to prevent
chassis fits. pulling away. Once you’re satisfied Fittings
That means the carpet needs to be that the carpet won’t move, trim each When the adhesive is dry, cut out the
389mm wide and 1864mm long. The corner with a sharp knife or scissors carpet about 3mm smaller than the

Everyday Practical Electronics, February 2015 33

PortPAL-D Pt3 Feb14 (box) v6 (MP 1st).indd 33 01/12/2014 22:14:04


Constructional Project

Here’s what your finished


PortaPAL-D should look like,
from the front (speaker side)
shown at left and the rear
(control side) shown at right.
With maximum power of
100W and continuous rating
of 50W, you’re not going to
lack for volume – and the
comprehensive range of
mixer controls means it
will handle just about any
application. Add the
Li-Po battery and inbuilt
charger, it’s a real winner!
With 20/20 hindsight, we
would have replaced the
single carry handle with a
pair of more robust handles
on the side – it does get a little
heavy even after carrying it
a short distance! (That does
mean a two-person carry,
though). And we’d also think
about putting some small
castors or wheels on the
bottom to make it easier to
cart around.

205mm perimeter of the rebate hole twist together one end of each (make carefully (!) drill pilot holes into the
for each speaker hole. Also find the sure the stripes or polarity markers are rebate at the four mounting holes on
T-nuts for the speaker grill clamps twisted together). the speaker and secure the speaker in
and handle and poke a hole through Drill a small hole suitable for one place with 8g × 12mm panhead screws.
the carpet at each nut. A size 2 Philips of the figure-8 wires to pass through Now we’ll fit the upper speaker. It
screwdriver can do this. the rear of the PortaPAL-D box cavity, has the twisted-together pairs of fig-
If using the top hat, carefully cut out about 25mm down from the inside top. ure-8 connecting it but there is plenty
a hole in the carpet, same diameter as Hang the twisted-together pair of of room in the push terminals. Once
the top hat stem, and insert that into cables out of the top speaker hole and again, ensure the striped wires go to
the hole. By pressing the top hat down the other end of one cable out of the the red or ‘+’ terminal.
in place, and using the top hat flange bottom speaker hole. Insert the remaining wadding
as a cutting template, carefully cut the From inside the case, push the other around the outside of the speaker hole
carpet around the perimeter of the top single figure-8 through the hole in the (but not directly behind where the
hat flange. Remove the circle of carpet box cavity. speaker goes) and install the speaker
and reinsert the top hat. Pilot-drill the We’ll mount the lower speaker first. as before using Blu-Tack and screws.
mounting holes for this and screw in Connect the figure-8 cable to the push Now the grilles can be positioned over
the screws. Attach the handle to the terminals, with the stripe or marker the speakers and held in place with
top of the box. on the figure-8 going to the red (+) the clamps.
The corner protectors can now be terminal. Where the speaker wire comes
attached using 6g × 16mm bronze- To give an air-tight seal between through from the speakers to the Por-
coloured countersunk wood screws. speaker and box, we’re using Blu-Tack taPAL-D chassis, ensure that you have
putty. Roll a long length so that you plenty of cable to work with and then
Installing speakers end up with a cylinder about 2mm in seal the hole with Blu-Tack. This wire
The speakers are next and will require diameter and mould this all the way connects to the ‘to speakers’ terminals
wiring up as they are installed. around the rebated section in the box on the speaker protector.
The specified speakers (Altronics for the lower speaker. A 2-way 15A terminal strip is an op-
C-2005) are 200mm, 8Ω coaxial models Repeat until you have a solid run tion to allow the ‘to speakers’ output to
and connected in parallel, to present of Blu-Tack all the way around (ie, be extended for an easier connection
a 4Ω load to the amplifier. no gaps). to the speaker wire.
These speakers feature push-button Pack about 90% of the wadding in Insert the PortaPAL-D chassis into
terminals so no soldering is needed. the volume behind the lower speaker the box cavity and secure using 4g ×
However, they must be connected in hole and slide the speaker into the 16mm panhead screws.
phase; ie, plus to plus and minus to lower hole under the carpet lip that Construction of the PortaPAL-D is
minus. The easiest way to do this is to surrounds the rebated outer hole now finished. Turn on and check that
cut the 1m length of 7.5A figure-8 cable diameter. Press the speaker into the it works with the inbuilt battery, then
in half, bare all ends to 1cm and tightly hole to compress the Blu-Tack. Now connect power and check that it charges.

34 Everyday Practical Electronics, February 2015

PortPAL-D Pt3 Feb14 (box) v6 (MP 1st).indd 34 01/12/2014 22:14:08


MIKROELEKTRONIKA FEB 2015.indd 1 08/12/2014 09:19:50
In Part 1, Discover
introduces discrete semi-
conductors and focusses on
the transistor in particular.
Knowledge Base describes
the theory relating to
the amplifiers in which
transistors are used. Our
practical feature, Get Real,
Fig.1.3 Current flow in NPN and PNP transistors
takes the form of a simple
pre-amplifier and our Special Feature The direction of conventional current
will introduce you to SPICE and how flow in a BJT is from emitter to collector in
to get started with TINA Design Suite. the case of a PNP transistor, and collector
to emitter in the case of an NPN device
(see Fig.1.3). In both cases, the amount of
Discover: current flowing from collector to emitter
is determined by the amount of current
Transistors flowing into the base. Note that we have
indicated the polarity of the applied
The workhorse of discrete circuits, the voltages in Fig.1.3. In the case of an NPN
transistor, is essentially the same device device, the collector and base are both at
that’s found in very large quantities a positive potential with respect to the
inside an integrated circuit. The term emitter, whereas in the case of a PNP
transistor stands for ‘transfer resistor’ device, the applied potentials are reversed
which provides a clue as to how the and the collector and base are both at a
device operates. A wide variety of discrete negative potential with respect to the
transistors is currently available to the emitter. Note that we’ve used the battery
circuit designer, and the circuit symbols symbols shown in Fig.1.3 to indicate the
for the most common types are shown in polarity of the applied voltage – they are
Fig.1.1. For newcomers, knowing which not real batteries!
device to choose for use in a particular From Fig.1.3 we arrive at an important
application can often be baffling so, to equation that relates the current flowing
keep things simple we have based the in the collector, base, and emitter circuits:
Fig.1.1 Symbols for a variety of different Teach-In 2015 series on a sub-set of some
transistor types of the most popular bipolar junction IE = IB + IC
transistors (BJT). All of these devices are
readily available at low cost and regular IE is the emitter current, IB is the base
can run the software applications that we readers will doubtless already be familiar current, and IC is the collector current (all
will be using in conjunction with circuit with some of them. However, for the expressed in the same unit – the amp).
design and testing. You need to be able to benefit of newcomers to electronics we
apply Ohm’s Law and have a basic grasp will just spend a little time explaining Datasheets
of DC and AC circuit theory (for example, what a BJT is and how it operates. The manufacturers of semiconductor
understanding how resistors behave when devicespublishinformationontheirdevices
they are connected into series and parallel Bipolar junction transistors (BJT) in the form of one or more datasheets. These
networks). That said, we are going to keep BJTs comprise N-P-N or P-N-P provide useful information on a particular
the theory to a minimum and make use semiconductor junctions of silicon semiconductor type and they usually
of computer modelling and simulation (Si) material made by carefully adding include a brief description, a summary of
whenever possible. That way, we hope to impurities creating the ‘N’ and ‘P’ the important features, typical applications
dispel the generally held belief that linear regions (see Fig.1.2). The junctions are and maximum ratings. Datasheets can also
discrete design is a black art! extremely small and they are produced include characteristics provided in both
in a single slice of silicon by diffusing the tabulated and graphical form. At first sight
impurities through a photographically this information might be a little baffling,
reduced mask. The connections to the so it’s worth looking at an example of how
semiconductor material are called a typical datasheet is organised and the
‘collector’, ‘base’ and ‘emitter’. information that can be derived from it.
An important point to note is that Fig.1.4 shows the first page of a datasheet
each junction within the transistor for a range of popular general-purpose
– collector-base or base-emitter – is NPN transistors: the BC546, BC547, BC548
a P-N junction and each of these and BC549.
junctions when taken on their own is The datasheet tells us that this is
equivalent to a diode. However, since a ‘family’ of NPN general-purpose
the central base region is made narrow, transistors with similar characteristics
when the base-emitter junction is and that they are supplied in a TO-92
forward biased and the collector- plastic package (the outline, symbol and
base junction is reverse biased there pin connections are shown inset in the
is interaction between the base and datasheet). The first table in the sheet
collector circuits as current carriers (headed ‘Maximum ratings’) provides a
are swept across the junction. Current summary of various parameter values that
carriers leaving the emitter are swept must not be exceeded. For example, the
across the narrow base region into the BC546 is rated for a maximum collector-
collector and only a relatively small emitter voltage of 65V. The BC548 and
number appear at the base. To put this BC549 devices are, by contrast, rated
into context, the current flowing in only for a maximum collector-emitter
the emitter circuit is typically 100 or voltage of 30V.
Fig.1.2 Symbols, junction and diode models more times greater than that flowing Of particular note here is the maximum
for NPN and PNP BJTs in the base. value of emitter-base voltage. For all four

Everyday Practical Electronics, February 2015 37

TI-Feb-2015 MP new.indd 37 02/12/2014 08:47:31


The next table – Characteristics –
summarises the main operational
parameters for the family. The transistors
are available from the manufacturer
sorted into three individual ‘gain groups’.
Group A provides current gains (hfe) of
between 110 and 220, Group B between
200 and 450, and Group C from 420
to 800. Note that there is a very wide
variation in the gain offered by similar
devices (hence the need to organise
them into different gain groups) and
also there is a small overlap between the
three ranges. If, for example, you need a
transistor with a current gain of no more
than 200 you would only need a Group
A device. On the other hand, if you need
a gain of more than 400 then it would be
best to opt for a Group C device.
The characteristics listed in the table are
given in the form of ‘hybrid parameters’.
These will be explained in next month’s
Teach-In 2015. Notice that there is a fair
amount of variation across the three gain
groups. For example, the data shows that
the input resistance (hie) for a device in
Group C could easily be more than four
times greater than that of a device taken
from Group A.
The last table provides typical operating
data for the family of transistors with
minimum, typical and maximum figures.
It tells us, for example, that the base-
emitter voltage should typically be 660mV
for a device operating with VCE = 5V and
IC = 2mA. We have used this, and other
information from the datasheet in the
design of this month’s practical project.
For comparison purposes, Table 1.1 shows
selected date for a variety of popular BJTs.

Knowledge Base:
Amplifiers
Fig.1.4 Datasheet extract for the popular BC546, BC547, BC548 and BC549 BJTs Making signals larger, or ‘amplification’,
is a very common requirement in
devices this is quoted as 5V and it is current do not individually exceed the electronic circuits. The signals from a
effectively the maximum reverse voltage manufacturer’s specification. Note that microphone, for example, might only
that can be applied to the base-emitter maximum collector power is sometimes be a few millivolts. When connected to
junction. As we explain later, this junction stated rather than total power dissipation.the input stage of an amplifier that same
is normally forward biased (and therefore The former is the product of the collector microphone might only be able to deliver
conducting) but in a reverse-biased current and collector-emitter voltage, a current of a few microamps. At the other
condition the junction becomes extremely while the latter also includes the power extreme, in order to drive a loudspeaker
vulnerable to an over-voltage condition. present in the base-emitter junction. Thereto sufficient volume to fill a large room
The maximum total power dissipation is no great difference in these two ratingswe might need several volts and a current
is important in a number of applications, so, in practice, either one will give you of several amps. So, in a public address
particularly for devices where appreciable a clue as to the maximum permissible system we might need to amplify both
power is being delivered. In the case of power that can be dissipated within a the signal voltage and the signal current
this family of devices, the total power particular device. several thousand times. Thus gain, in
dissipation (the sum
of the power dissipated Table 1.1 Selected data for some popular bipolar junction transistors
in the two junctions) Device Type IC max. VCE max. Ptot max. hFE at IC Package Typical application
should be no more
than 500mW. So, in 2N3906 PNP 200mA 40V 625mW 150 at 2mA TO92 General purpose
an application where 2N4919 PNP 1A 80V 30W 10 at 1A TO225 General purpose driver
the collector-emitter
2N4923 NPN 3A 80V 30W 50 at 500mA TO126 General purpose power
voltage is 15V and the
collector current is BC337 NPN 800mA 50V 625mW 300 at 100mA TO02 Driver and low power output
400mA the device will BC548 NPN 100mA 30V 500mW 250 at 2mA TO92 General purpose amplifier
be operating outside its
maximum permissible BC558 PNP 100mA 30V 500mW 250 at 2mA TO92 General purpose amplifier
ratings even though BC560 PNP 100mA 45V 500mW 250 at 2mA TO92 Low noise amplifier
the collector-emitter
voltage and collector TIP32 PNP 3A 80V 40W 50 at 1A TO220 Power amplifier

38 Everyday Practical Electronics, February 2015

TI-Feb-2015 MP new.indd 38 02/12/2014 12:10:53


V
Av = out
V in
Av = Vout
IVin
Ai = out
I in
Ai = Iout
IPin
Ap = out
Pin
Ap = Pout
IPin ×V
Ap = out out
I ×V
Ap = Ioutin inout
Iin ×Vin
Fig.1.5 Input and output resistance Vout 10V Fig.1.6 Output and load resistance
Av = = = 2000
terms of voltage (‘voltage gain’) and/or VV
Together 10V
5mV
inwith
Av = out = the voltage
= 2000gain we would amplifier. This statement needs a little
current (‘current gain’), is a fundamental need a V
current
in gain of:
5mV more explanation. Fig.1.5 shows an
requirement of an amplifier. amplifier as a ‘black box’ with two input
I 1A terminals and two output terminals. Since
Ai = out = = 100,000
Types of amplifier IIout 1A
10µA this is an ‘equivalent’ representation of
Many different types of amplifier are Ai = in = = 100,000 an amplifier, we have lumped together
Iin 10µA
found in electronic circuits. They include The required power gain would then be: the voltage that the amplifier produces
small-signal AC-coupled amplifiers; DC I out ×Vout 1A ×10V (as a result of a signal voltage present at
or direct-coupled amplifiers (where direct Ap = = its input) into a voltage generator (the
I ×V 1A ×10V
voltage is amplified as well as AC); large- Ap = Ioutin inout = 10µA × 5mV circle with the squiggle inside it). The
signal and power amplifiers that cater for 10WIin ×Vin 10µA × 5mV voltage generator produces current in
appreciable voltage and/or current levels; = = 200,000,000 whatever the two output terminals are
10W
50nW
low-noise amplifiers that produce very = = 200,000,000 connected to. This results in an output
little noise that might otherwise degrade 50nW I voltage drop which appears across the
hFE = C
a signal; audio frequency (AF) amplifiers ICB two output terminals.
that operate over the band of frequencies hFE =
Linearity At this stage it is important not to confuse
IB small change in IC
normally associated with audio signals Apart
h fe = from the obvious requirement the output resistance of an amplifier with
(20Hz to 20kHz); wideband amplifiers that of making a signal voltage
small change
corresponding inor
small change IC current
in I B the resistance of the load (circuit) to which
operate over a wide range of frequencies h fe = an
larger, important requirement of most
corresponding small change in I B it is connected. The output resistance is
(typically from a few hertz to several amplifiers is that the output signal should ‘inside’ the amplifier, while the load is
megahertz); and radio frequency (RF) be a faithful copy of the input signal, albeit external and is something that we have
amplifiers that operate in the band of larger in amplitude. We describe these as introduced.
frequencies associated with radio signals ‘linear amplifiers’ and the need to retain In series with the voltage generator
(100kHz to several gigahertz). The required
linearity power gain
is an important would thenwebe:have shown the output resistance
consideration
inThe
theirrequired
design. power gain would thenofbe: the amplifier. When the amplifier is
Gain Some other types of amplifier are ‘non- connected to a load this has the effect of
As briefly mentioned earlier, gain can be × Vout case their
Ioutwhich 1A ×10V and 10W
expressed in terms of both voltage and
A p = in
linear’,
IIout × V = 1A ×input 10V = 10W = 200,
not only reducing
000,the000output voltage but
output waveforms × will not necessarily
× be 50nW also reducing the output current, as we
current and, since both are important, A p = In practice,
similar. in V in =
out 10µA 5mV
the degree of linearity = shall =see200, next. 000, 000
we can also express gain in terms of provided Iby in ×anVamplifier
in 10µA can × be5mV
affected 50nW Fig.1.6 shows the equivalent circuit that
power. Voltage gain is simply the ratio by a number of factors, including the
Linearity we’ve just met, but with the input and
of the voltage produced at the output amount of bias applied (see later) and output connected. At the input or we’ve
of an amplifier to the voltage present
Apart
Linearity from the obvious
the amplitude of the input signal. It is
requirement of making a signal voltage
shown the signal source represented by a
current larger, an
at its input. Likewise, current gain is Apart
important
also worth from notingthethat
requirementobvious
a linearofrequirement
most amplifiers
amplifier of making
voltage is thatathe
generator, signal
VSoutput voltage
, connected signalinor currentbe
should
series larger, an
a faithf
the ratio of the current produced at the will
thebecome
input non-linear
important requirement
signal, whenlarger
albeit themost
of applied with its is
inamplifiers
amplitude. internal
We resistance,
thatdescribe
the output RSsignal
these . These two amplifiers
should
as linear be a faithf
a
output of an amplifier to the current Vout at input signal exceeds a threshold value. components represent whatever circuit or
its input. Finally, power gainAis v =the the
needinput to retainsignal, albeit larger
linearity in amplitude.
is an important We describe
consideration thesedesign.
in their as linear amplifiers a
V ratio Beyond this value the amplifier is said to device is used at the input of the amplifier.
of power that an amplifier deliversinto a beneed to retain
overdriven and the linearity
output willis an important
become For consideration
example, a typical indynamic
their design.
(moving
load connected to itsVoutput to theIpower increasingly distorted if the input signal coil) microphone might be represented
supplied to its input. Av = Thus we
out
=
Ai have: out Some other types of amplifier are non-linear, in which case their input and output w
Vin Iin is further increased. by a perfect voltage source of 10mV
Some
will not
Amplifiers other types
necessarily
are ofbe
usually amplifier
similar.are
designed non-linear,
In practice,
to connected theinindegree
whichwith
series ofcase atheir
linearity input and output
provided
resistance by an amw
Vout
V I P bewilloperated
not with
necessarily a particular
be value
similar. of
In of 600Ω.
practice, At
the the output,
degree
can be affected by a number of factors, including the amount of bias applied (see la of we’ve
linearity shown a
provided by an am
Avv =
A =
out
Ai = out
Ap = out
V I P bias
cansupplied
be affected to theby active devicesof(ie,
a number resistance,
factors, includingRL, that
therepresents
amount thebias
loadapplied (see la
Vin in in in the amplitude of the
transistors). For linear operation, the
input signal. It imposed
is also worth noting that aof linear
on the amplifier. In the case of a
amplifier will
where I P I ×V the amplitude
non-linear
deviceswhen of the input signal.
appliedininput It is
the signal also worth
exceeds noting
thisamight that
threshold a linear
value. of amplifier
Beyond will
this va
= IA
Aii =
A
outv, Ai and Ap out
out Ap = represent Ap =voltage,
out out active must be operated loudspeaker be a resistance
current IIin and power gain
P in
respectively. I in ×V in
linear part
non-linear
amplifier of their
iswhen
said transfer
the
to becharacteristic.
applied
overdriven input and8Ω.
signal Note
the that
exceeds
output thisaresistance
willthreshold
become should
value. more Beyond
increasingly this va
distorted
Note that, in
since power is the product of This form of operation is known as ‘Class correctly be referred to as an ‘impedance’,
voltage P I ×V amplifier
input signal is said
is to
further be overdriven
increased. and the output will become increasingly distorted
App =
A = Pand out current
out
Ap = we out canout also express A’, and in it the circuit conditions (or ‘bias as we will explain later.
power gain
Pin
P as: I ×V V 10V input
point’) signal
must be is further
adjusted so increased.
that the device A particular condition arises when the
in in in
Av = out = =operated
2000 at or near the mid-point of the output resistance (R ) is the same as
isAmplifiers
I out ×V×Vout are usually
Vin 5mVlinear part of its transfer characteristic. designed to be operated with aout particular value of bias suppl
A
A p == VI out out the resistance of the load (RL). This is the
Av = IIin ×V
p out Amplifiers
active
Note that are
alsodevices usually
(ie,
current will designed
transistors).
flow in the For to linear
be operated
‘matched’operation,with the
condition aand
particular
active value of
devices
it corresponds biasbesuppl
must oper
Vinin ×Vin
V 10V
in
Av = out = = 2000 transistors
active of
devices a Class
(ie, A amplifier
transistors). for a
For to the
linear case in
operation, which the maximum
active power
devices must be oper
Vin 5mV I out linear part of their transfer
1A complete cycle of the signal waveform. At characteristic. This form of operation is known as Class
Now, to I out put this into context, Ai = assume
let’s = = 100,000
linear part of their transfer is transferred
characteristic. This from of
form theoperation
amplifier to is the
known as Class
Ai =our
that Vout public
V 10V address microphone
10V Iin 10µAno it time
the circuit conditions (or ‘bias point’)
during the cycle will the current
must be adjusted so that the device is opera
load. Note that a matched condition is not
Avv =
A = Iinout a=
produces =
=signal voltage
= 2000
2000 of 5mV and a fall it the
to circuit
zero as it conditions
might do with (or ‘bias
some of point’)
always must be adjusted
desirable. In the case so ofthat the device is opera
a power
V
Vin 5mV
5mV I out 1A
signal current
P in
of
A =
10µA =
(an input = power
100,000 the other classes of operation. This is an amplifier, 7
for example, we normally
p =
out i
ofA50nW). ×V important 1A ×10V
Pin To produceinthe required level
I 10µA I out point that we will return to in require the output
7 resistance to be very
of volume using a loudspeaker Apwe= might out =a later instalment of Teach-In 2015.
Iin ×Vin 10µA × 5mV much less than that of the load in order to
IIIout 1A
1A
A i =
require
= an= ×V
=output =
=signal
100,000 of 10V and a maximise the voltage that appears across
out
A
Ap = IIof
i out out 100,000
current in 1A10µA(an output ×Vout of10W
I outpower 1A ×10V Input and output resistance
I ×V
in 10µA
in A p = = = 10W).=In200,000,000 the load. In the case of a typical audio
this case in we would need a voltage
Iin ×Vin 50nW 10µAof:
gain × 5mVThe input resistance of an amplifier is that power amplifier, the output resistance
which would be ‘seen’ between the two might be a fraction of an ohm, while the
II out ×Vout
out ×V10V
10W 1A ×10Vh = IC
out= = 1A ×10V input terminals. The output resistance loudspeaker that it drives might have an
A =
App == out =
V = = 2000 = 200,000,000
FE
A IIin ×V 50nW
10µA × 5mV I of an amplifier is that which would be impedance of somewhere between 4Ω
Vinin ×V5mV 10µA × 5mV
v in B
in
I seen
small looking
change in back
I into the output of the and 8Ω.
10W
10W hFE = C h fe = C
=
= =
= 200,000,000
200,000,000
50nW
Everyday
50nW Practical I
Electronics,
B corresponding
February 2015 small change in I B 39
I out 1A
Ai = IICC = = 100,000small change in IC
hFE =
hFE =Iin 10µA h fe =
II BB corresponding small change in I B
small change
small change in
in IIC
h fe =
h =I
TI-Feb-2015 MP new.indd 39
×V 1A ×10V C 02/12/2014 08:47:52
Fig.1.7 Common-emitter BJT amplifier configurations

Table 1.2 BJT amplifier characteristics


Characteristic Common emitter – Fig.1.7(a) Common collector – Fig.1.7(b) Common base – Fig.1.7(c)
Voltage gain Medium/high (40) Unity (1) High (250)
Current gain High (200) High (200) Unity (1)
Power gain Very high (8000) High (200) High (200)
Input resistance Medium (5kΩ) High (100kΩ) Low (150Ω)
Output resistance Medium/high (25kΩ) Low (100Ω) High (100kΩ)
Phase shift 180° (inverted) 0° (non-inverted) 0° (non-inverted)
General purpose AF, RF and wideband
Typical applications Impedance matching, input and output stages RF and VHF/UHF amplifiers
amplifiers

In Fig.1.6, if the source resistance, RS, is refers to DC conditions – ie, the ratio of therefore appears as a short circuit as far
small compared with the input resistance, direct voltage to direct current present in as the signal is concerned.
Rin, the input voltage that the amplifier a circuit. Impedance, on the other hand,
receives will be almost the same as the relates to what goes on when a more BJT transistor amplifiers
V
Discover
signal voltage, VS. If, on the other hand, general AC signal is applied to a circuit. Av = out introduced you to the BJT, so let’s
RS is large compared with the input It is the ratio of signal voltage to signal put theVindevice to good use by connecting
resistance, Rin, the input voltage that current and, strictly speaking this is what it as an amplifier. Since the BJT has three
I
terminals
the amplifier sees will be reduced by we should be referring to when we are Ai = out (electrical connections) three
the ratio, Rin to (RS + Rin). To avoid the talking about amplifiers. basic Icircuit
in configurations are possible.
consequent reduction in input voltage, A circuit has ‘impedance’ when it These three circuit configurations depend
Pout
Rin is often made very much larger than exhibits both resistance and reactance. Ap = which
upon one of the three transistor
RS. A typical value for Rin might be 50kΩ, However, since the reactance is often connections
VPout is made common to both
while RS might be less than 5kΩ. negligible within the normal range Av =input and the output. In the case of
the
in
IVin ×Vout
A particular condition arises when of signal frequencies, we can usually Ap = out
bipolar transistors, the configurations are
the input resistance, Rin, is the same as safely ignore it. In this case, at the input known I out ×V‘common
Iinas: emitter’, ‘common
Ai = in
the resistance of the source, RS, and the and output of an amplifier (and as far collector’(or
Iin ‘emitter follower’) and
output resistance, Rout, is the same as the as the signal is concerned) the value of ‘common base’ (see Fig.1.7). The three
basic VPout 10V
load, RL. This is the ‘matched’ condition impedance is virtually the same as the Avp = circuit
out
= configurations
= 2000 exhibit quite
and it corresponds to the case in which value of resistance ‘seen’ by the signal. different
VPinin performance
5mV characteristics, as
maximum power is transferred from the This is why the two terms can often be shown in Table 1.2.
source to the input and from the output used interchangeably. So, to keep things I out ×Vout
A =
p
to the load. This condition might be as simple as possible we will simply refer Current Iingain
I out ×V1A
necessary in certain applications, for to resistance (rather than impedance) and A i =
Conventional = in bipolar
= 100,000
junction transistors
example where one or more amplifiers show it as such in our circuit diagrams. I
(BJT) inoperate10µAon current rather than
and attenuators are connected in cascade. voltage,
V and10V so current gain is used as a
If the load resistance RL in Fig.1.6 is large Amplifiers and common rails Av = out of
measure = its effectiveness
= 2000 as a BJT when
used IVinan×V 5mV ×10V In common-
1Adevice.
compared with output resistance Rout, the Amplifiers have four terminals (two for Ap = asout amplifying
out
=
output voltage that the load receives will the input and two for the output) but emitterIinmode,
×Vin the10µA
input ×
current
5mV is applied
be almost the same as AV × Vin. If, on the since transistors have three terminals to the base and the output current appears
I collector,
10W 1A so the common-emitter
other hand, RL is small compared with one of the transistor’s terminals must be Ai =
=
in theout = 200,000,000
= 100,000
the output resistance Rout, the voltage connected in ‘common’ with one of the current
50nWIin gain is given by:
10µA
that the load receives will be reduced by input terminals and one of the output IC
the ratio, RL to (RL + Rout). Once again, terminals. This connection is variously hFE =
to avoid a reduction in output voltage, referred to as common or signal ground, IIout
B ×Vout 1A ×10V
Rout is often made very much smaller and it is often the same connection as
A =
whereIhFE×V
=
represents the
× DCincurrent gain,
p
small change
10µA 5mV IC
than RL. A typical value for RL might be that used for the 0V supply. In fact, both hICfe is= thein collector
in
current, and IB is the
10kΩ, while RS might be less than 1kΩ. of the supply voltage connections to an base10W corresponding
current.
small change in I B
When small (rather than
= = 200,000,000
amplifier are common, at least as far as large)
50nW signal operation is considered, the
Resistance versus impedance the signal (AC) is concerned. At first values of IC and IB are incremental (small
IC
FE =
We often use the terms ‘resistance’ and sight, this might sound odd, particularly hchanges rather than steady or DC values).
‘impedance’ interchangeably, but there is as there is a DC voltage drop between the The current
IB gain is then given by:
a vital difference between these two terms supply voltage rails, but it is important to The required power
small gain
change in ICwould then be:
and it is important to understand that remember that the supply exhibits a very h fe =
difference. Strictly speaking, resistance low impedance at signal frequencies and corresponding small change in I B
Iout × Vout 1A ×10V 10W
40 p =
APractical
Everyday = February 2015
Electronics, = = 200, 0
Iin × Vin 10µA × 5mV 50nW

The required power gain would then be:


Linearity
TI-Feb-2015 MP new.indd 40
Apart from the obvious requirement of making
02/12/2014 08:48:00
high values of collector current a square wave, for example, requires an
when compared with general amplifier with a very wide bandwidth
purpose devices which have much (note that a square wave comprises an
higher values of current gain, infinite series of harmonics). Clearly it is
but specified at much smaller not possible to perfectly reproduce such
collector currents. In next month’s a wave, but it does explain why it can be
instalment of Teach-In 2015 we desirable for an amplifier’s bandwidth
will show you how equivalent to greatly exceed the highest signal
circuits and hybrid parameters frequency that it is required to handle!
are used to accurately model the In the example frequency response
performance of BJT amplifiers. shown in Fig.1.9, the amplifier has
We’ve already mentioned voltage a virtually flat frequency response
gain, current gain, and power extending from 10Hz to 10kHz and a
gain, but there are several other mid-band (maximum) voltage gain of 5.
parameters that are important The lower cut-off frequency is 37Hz and
when specifying the performance the upper cut-off frequency is 37kHz.
of an amplifier. They include phase The bandwidth (equal to the difference
shift, frequency response, and between these two frequencies) is
bandwidth. therefore approximately 37kHz.
Fig.1.8 Typical transfer characteristic (IC plotted Phase shift Practical amplifier circuits
against IB) for a BJT Phase shift is the phase angle We stated earlier that the optimum value
where hfe represents small signal (AC) between the input and output signal of bias for a Class A (linear) amplifier is
forward current gain. voltages measured in degrees. The that value which ensures that the active
Values of hFE and hfe can be obtained measurement is usually carried out in the devices are operated at the midpoint of
from the transfer characteristic (IC plotted mid band where, for most amplifiers, the their transfer characteristic. In practice,
against IB) shown in Fig.1.8. Note that phase shift remains relatively constant. this means that a static value of collector
hFE is found from corresponding static Note also that conventional single-stage current will flow even when there is no
values while hfe is found by measuring transistor amplifiers provide phase shifts signal present. Furthermore, the collector
the slope of the graph. Also note that, if of either 180° (common emitter) or 0° current will flow throughout the complete
the transfer characteristic is linear, there is (common collector and common base). cycle of an input signal – conduction will
little (if any) difference between hFE and take place over an angle of 360°. At no
hfe. In the typical case shown in Fig.1.8, Frequency response stage will the transistor be saturated nor
the transistor exhibits a current gain of The frequency response of an amplifier is should it be cut-off (the state in which no
about 200. usually specified in terms of the upper and collector current flows).
It is worth noting that small-signal lower cut-off frequencies of the amplifier. In order to ensure that a static value of
current gain (hfe) varies with collector These frequencies are those at which collector current flows in a transistor, a
current. For most small-signal transistors, the output power has dropped to 50% small current must therefore be applied
hfe is a maximum at a collector current in (otherwise known as the −3dB points) to the base of the transistor. This current
the range 1mA and 10mA. Furthermore, or where the voltage gain has dropped to can be derived from a separate base bias
current gain falls to very low values for 70.7% of its mid-band value (see Fig.1.9). supply or it can be supplied from the same
power transistors when operating at Note that frequency response graphs are voltage rail that supplies the collector
very high values of collector current. usually plotted on a logarithmic scale. circuit. Fig.1.10 shows a basic Class A
Another point worth remembering is that common-emitter amplifier circuit in
most transistor parameters (particularly Bandwidth which the base bias resistor, RB, provides
common-emitter current gain, hfe) are The bandwidth of an amplifier is usually base current and collector load resistor,
liable to wide variation from one device taken as the difference between the upper RL, provides collector current.
to the next. In order to guarantee operation and lower cut-off frequencies (ie, f2 − f1 in The signal is applied to the base terminal
to specification with a variety of different Fig.1.9). The bandwidth of an amplifier of the transistor via a coupling capacitor,
devices, it is important to design circuits must be sufficient to accommodate the Cin. This capacitor removes the DC
on the basis of the minimum expected range of frequencies present within the component of any signal applied to the
value for hfe. signals that it is presented with. Many input terminals and ensures that the base
Before moving on, it’s worth taking a signals contain harmonic components bias current delivered by RB is unaffected
quick look back at Table 1.1 to see how (ie, signals at 2f,
corresponding values of DC current gain 3f, 4f, etc. where
and collector current vary for different f is the frequency
devices. Notice how the power devices of the fundamental
exhibit significantly less current gain at signal). To reproduce

Fig.1.9 Typical frequency response for an audio power Fig.1.10 Bias arrangement in a basic Class-A common-emitter
amplifier (note the logarithmic scale) amplifier

Everyday Practical Electronics, February 2015 41

TI-Feb-2015 MP new.indd 41 02/12/2014 08:48:10


by any device connected to the input. Cout of TR1 via coupling capacitor Cin. This known as SPICE (Simulation Program
couples the signal out of the stage and signal would be amplified by the transistor with Integrated Circuit Emphasis).
also prevents DC current flowing at the and produce an output signal of 3mA Results of circuit analysis can be
output terminals. It is important to note pk-pk flowing in RL (see Fig.1.11) The displayed in various ways, including
how the DC bias current and AC signal corresponding output voltage developed displays that simulate those of real
current merge together to form the base across RL coupled via Cout to the output test instruments (these are sometimes
current for TR1. As a consequence of this, terminals would then be 3V pk-pk. referred to as ‘virtual instruments’). A
the collector current (a magnified version further benefit of using electronic circuit
of the base current) will also have AC and simulation software is that, when a circuit
DC components. Special Feature: design has been finalised, it is usually
In order to stabilise the operating possible to export a file from the design/
conditions for the stage and compensate Computer simulation software to a PCB layout
for variations in transistor parameters, package. It may also be possible to export
base bias current for the transistor simulation files for use in screen printing or CNC
can be derived from the voltage at the drilling. This greatly reduces the time
collector or from some later point in the Computer simulation provides you with that it takes to produce a finished and
case of a multi-stage amplifier (see Get a powerful and cost-effective tool for fully working prototype. Various types
Real). When derived from the collector, designing, simulating, and analysing of analysis are available within modern
the bias voltage will be dependent on a wide variety of electronic circuits. SPICE-based circuit simulation packages
the collector current which, in turn, In recent years, the computer software and we will be taking a detailed look at
depends upon the base current. The packages designed for this task have not them in a future instalment of Teach-In
result of this negative feedback is a only become increasingly sophisticated, 2015.
degree of self-regulation; if the collector but also have become increasingly easy
current increases, the collector voltage to use. Furthermore, several of the Netlists and component models
will fall and the base current will most powerful and popular packages The following is an example of a netlist
be reduced. The reduction in base are now available at low cost either in for a simple differential amplifier (see
current will produce a corresponding evaluation, ‘lite’ or student versions. Fig.1.12). Note that we have included line
reduction in collector current to offset In addition, there are several excellent numbers purely for explanatory purposes:
the original change. Conversely, if the freeware and shareware packages. In
collector current falls, the collector Teach-In 2015 we will be using the 1 SIMPLE DIFFERENTIAL PAIR
voltage will rise and the base current Student version of TINA Design Suite, a 2 VCC 7 0 12
will increase. This, in turn, will produce powerful and easy-to-use package from 3 VEE 8 0 –12
a corresponding increase in collector DesignSoft. A demonstration version of 4 VIN 1 0 AC 1
current to offset the original change. the full software (Tina 10.0 Design Suite) 5 RS1 1 2 1K
In the simple arrangement shown in can be downloaded from https://www. 6 RS2 6 0 1K
Fig.1.10, let’s assume that the collector designsoft.biz/orders/order.php and the 7 Q1 3 2 4 MOD1
supply is 8V, the base supply is 5V, and Basic Edition and Student versions are 8 Q2 5 6 4 MOD1
the value of RL is 1kΩ. In order to produce both reasonably priced and are highly 9 RC1 7 3 10K
the maximum undistorted output voltage recommended. In fact, the authors have 10 RC2 7 5 10K
swing, the ideal value of collector-emitter been using this software for well over ten 11 RE 4 8 10K
voltage would be 4V (half the supply) and years and have found it to be invaluable 12 MODEL MOD1 NPN BF=50 VAF=50
so the collector current would be 4mA. If when designing and simulating a huge IS=1.E-12 RB=100 CJC=.5PF
the transistor has a current gain of 200 (a range of circuits, both analogue and TF=.6NS
reasonable assumption for most of today’s digital. 13 .TF V(5) VIN
general purpose devices) we would need TINA is available from the EPE Online 14 .AC DEC 10 1 100MEG
to supply a DC bias current of 4/200 = Shop – see www.epemag.com. 15 .END
20µA to its base. Further, since the base-
emitter voltage will be approximately Adding SPICE to your life Lines 2 and 3 of the netlist define the
0.6V (recall that the base-emitter junction Early electronic simulation software two supply voltages. VCC is +12 V and is
constitutes a conducting diode junction) required circuits to be entered using a connected between node 7 (positive) and
the value of RB would need to be 220kΩ complex ‘netlist’ that described all of the node 0 (signal ground). VEE is −12 V and is
in order to produce 20µA of bias current components and connections present in connected between node 8 (negative) and
from the 5V base bias supply. a circuit; however, most modern packages node 0 (signal ground). Line 4 defines the
Now, suppose that an AC input signal use an on-screen graphical representation input voltage which is connected between
of 15µA peak-peak is applied to the base of the circuit on test. This, in turn, node 1 and node 0 (ground) while lines 5
generates a netlist (or its equivalent) and 6 define 1 kΩ resistors (RS1 and RS2)
for submission to the computational connected between 1 and 2, and 6 and 0.
engine that actually performs
the circuit analysis using
mathematical models and
algorithms. In order to
describe the characteristics
and behaviour of components
such as diodes and transistors,
a manufacturer usually
provides models in the form of
a standard list of parameters.
Most programs that
simulate electronic circuits
use a set of algorithms that
describe the behaviour of
electronic components.
The most commonly used
Fig.1.11 Input and output signals superimposed algorithm was developed
on the transfer characteristic of the BJT in at the Berkeley Institute in Fig.1.12 A simple differential amplifier showing
Fig.1.1 the United States and it is the netlist nodes

42 Everyday Practical Electronics, February 2015

TI-Feb-2015 MP new.indd 42 15/12/2014 10:19:36


Lines 7 and 8 are used to define the
connections of the two transistors (Q1
and Q2). The characteristics of these
transistors (both identical) are defined
by MOD1 (see line 12). Lines 9, 10 and
11 define the connections of three further
resistors (RC1, RC2 and RE respectively).
Line 12 defines the transistor model. The
device is NPN and has a current gain of 50.

SPICE models
Most semiconductor manufacturers
provide detailed SPICE models for the
devices they produce. The following is
a manufacturer’s SPICE model for the
BC549B transistor that we will be using
in this month’s Teach-In 2015.

.model BC549B NPN(Is=7.049f


Xti=3 Eg=1.11 Vaf=59.93 Bf=375.6
Ise=56.03f
+ Ne=1.553 Ikf=87.07m Nk=.4901
Xtb=1.5 Br=2.886 Isc=7.371p
+ Nc=1.508 Ikr=5.426 Rc=1.175
Cjc=5.5p Mjc=.3132 Vjc=.4924
Fc=.5
+ Cje=11.5p Mje=.6558 Vje=.5
Tr=10n Tf=417.3p Itf=1.512
Xtf=39.51
+ Vtf=10)

At this stage, and if this is beginning to


sound a little complicated, it’s important Fig.1.14 Modifying the value of a component using a dialogue box (here, we are
to remember that there’s no need to be able changing the default 5V battery so that it becomes the 9V supply in our circuit)
to understand the model in order to make
good use of the device. Furthermore, the straightforward. You can specify the above the component tabs. The main
models that you need will almost certainly folders used by the program, the Settings schematic editor (from which the screen
already be present in the simulation folder stores your personal settings and data is captured in order to generate the
software that you will be using. This helps the private catalogue folder will store netlist) occupies the rest of the screen area.
keep things simple! your catalogue. By default, these are set
to common Windows folders, however, Selecting and placing components
Getting started with TINA you may change the folders by pressing When you click on a particular component
TINA is distributed in two major the browse button. You will also be able to in the toolbar (and then release the
versions, TINA Standard and TINA configure the software so that is uses either mouse button), the cursor changes to
Design Suite. TINA Standard includes the US (ANSI) or the European (DIN) show the currently selected component.
circuit simulation only, while TINA conventions for component symbols. The component can be moved anywhere
Design Suite also includes the advanced within the circuit drawing area of the
PCB designer. The software is supplied Screen layout screen. The component can then be
on CD or can be downloaded from the The main program window includes a rotated left or right by either right-clicking
web and, whichever version is chosen, conventional Windows menu bar that the mouse and selecting Rotate Left or
the installation procedure is extremely provides access to all of the main program Rotate Right from the context-sensitive
functions, such as File, menu or by pressing the Ctrl-L or Ctrl-R
Edit, Insert, View or keys.
Analysis. Below this is If you need to change the value of a
a toolbar that provides component from the default value you can
access to some of the simply double-click on the component
most commonly used symbol and enter the required values
editing features, such in the dialogue box. When you click on
as cut, paste and zoom. OK the dialogue box will disappear and
The component bar the component values will be updated
is located beneath on the screen. Once you have chosen
t h e t o o l b a r. T h e the final position, orientation and value
component bar for the component you can simply click
provides access to the left mouse button on a blank area of
the extensive library the drawing window in order to lock the
of components that is symbol in place.
supported by TINA. Having placed your components, the
Components are next step it to connect them together with
arranged in groups, wires. You can do this by selecting the
named by the tabs on component and locating the connecting
the Component bar. point with the mouse (the cursor will
Once a particular group change from a pointing finger to a wiring
has been selected, the tool). Next, hold down the left mouse
available components button and draw the wire you need and
appear as a row of link it to the required connecting point on
Fig.1.13 TINA screen layout symbols immediately the component to which it is connected.

Everyday Practical Electronics, February 2015 43

TI-Feb-2015 MP new.indd 43 15/12/2014 10:19:53


Table 1.3 Outline design specification for the pre-amplifier Circuit description
The complete circuit diagram of the
Characteristic Value pre-amplifier is shown in Fig.1.17. The
Voltage gain 25 (configurable from 10 to 50) circuit uses two transistors, TR1 and TR2.
The first stage, with TR1 and associated
Frequency response 10Hz to 100kHz
components, operates in common-
Input impedance 20kΩ emitter mode and provides both current
Output impedance 30Ω and voltage gain. This is followed by
the second stage (TR2 and associated
Maximum output 2V RMS into 10kΩ at 1kHz, 0.01% THD components) which operates as an
Phase shift 180° at 1kHz (output inverted) emitter follower, providing appreciable
current gain along with a voltage gain of
Supply voltage 9V at less than 5mA only slightly less than unity (one). The
Hum and noise Better than –65dB (ref. 1V RMS, 100kHz bandwidth) overall voltage gain of the circuit is thus
largely determined by TR1 but, since the
output impedance is quite low, the circuit
Testing a circuit your circuit and a table of DC voltages will happily drive a wide range of load
You can test your circuit using a variety of and currents will appear like that shown impedances.
powerful analysis tools built into TINA. in Fig.1.15 and 1.16. Base bias for the first stage, TR1, is
Later in Teach-In 2015 we will explore derived via R3 from the current flowing
several of these in relation to our Get Real in the second stage (see Knowledge Base).
projects. For the purposes of this gentle Get Real: A simple Feedback also helps to stabilise the overall
introduction we will focus our attention voltage gain and DC operating conditions
on carrying out a simple DC analysis of pre-amplifier and allows the circuit to work with a wide
the example single-stage common-emitter range of NPN general-purpose small-
amplifier circuit shown in Fig.1.15. Our first Get Real project is a simple pre- signal transistors.
However, before we carry out our analysis amplifier that can be used in a variety
it is well worth running an electric rules of practical applications, including Coupling
check (ERC) which will scrutinise the simple ‘signal boosters’, microphone pre- The input signal is coupled into the pre-
schematic that we’ve entered by looking amplifiers, and measurement systems. amplifier by means of C1 and output
for questionable connections between The circuit was developed to satisfy the signal is coupled to the load by means
components. To do this, you need to select outline design specification shown in of C3. These two capacitors provide DC
ERC from the Analysis menu. A message Table 1.3. It should produce a modest isolation for the pre-amplifier so that
will then appear which will alert you to amount of voltage gain (around 25) over the DC bias current and voltages for TR1
any problems that will need correcting a wide range of frequencies extending and TR2 are unaffected by whatever DC
before you can continue with the analysis. from less than 10Hz to around 100kHz. conditions are present at the input and
If you then select Analysis, followed by Another important requirement is the output. In most cases it is expected that
DC Analysis and Table of DC results, the ability to easily tailor the voltage gain as far as DC levels are concerned, the
schematic editor will show the nodes in and frequency response. input and output are at ground potential.
If this is not the case then it may become
necessary to uprate the working voltage
of the relevant coupling capacitors.
Within the pre-amplifier, the signal is
directly coupled from TR1 to TR2 and
there is no need for isolation between
these internal stages. Note that, in high-
gain multi-stage amplifiers, internal
isolation between stages may sometimes
become essential due to complications
with biasing and the need to avoid drift
in DC potentials which might occur due
to temperature changes.

Fig.1.15 Nodes defined when carrying out a DC analysis of the single stage Fig.1.16 Table of DC results for single
common-emitter amplifier stage common-emitter amplifier

44 Everyday Practical Electronics, February 2015

TI-Feb-2015 MP new.indd 44 02/12/2014 08:48:40


Gain adjustment
Voltage gain is reduced by introducing series current
negative feedback to TR1 by means of the fixed resistor, R2.
The value of this component can be varied over the range
zero (short-circuit) to around 330Ω to produce a voltage
gain of 90 to 10, respectively (more on this in next month’s
Teach-In 2015).

Frequency response adjustment


The lower frequency cut-off is determined mainly by the
value of C1 and the upper frequency cut-off response (using
shunt voltage negative feedback) by the value of C2. In next
month’s Teach-In 2015 we will show how the values of these
components can be changed to define appropriate lower and
upper cut-off frequencies for use in different applications.

Components

1 PCB, code 905 available from the EPE PCB Service, size
Fig.1.17 Circuit of the versatile pre-amplifier 68mm × 40mm,
3 PCB mounting 2-way terminal blocks
1 PP3 battery connector
1 SPST on/off switch

Resistors Capacitors
1 3.9kΩ (R1) 1 4.7µF (see text) (C1)
1 100Ω (see text) (R2) 1 100pF (see text) (C2)
1 470kΩ (R3) 1 10µF (C3)
2 1kΩ (R4, R5) 1 100µF (C4)
All resistors 0.25W 5%

Semiconductors
2 BC549B (see text) (TR1, TR2)

Choice of transistor
We selected BC549B transistors for use in the pre-amplifier
circuit. They are from the B-gain group of BC549 devices
(see Discover) and they offer low-noise performance, which
is important when an amplifier stage is used with signals
of low amplitude (less than 10mV, or so). As discussed, it
is possible to use a wide range of other devices for TR1
and TR2 including BC548B (where low noise performance
is unimportant), BC237, BC182, BC167, NTE123AP, and
BC550 as well as most other NPN small-signal transistors.
In all cases it is important to check on the device pin-out
before making a substitution.

Construction
Our prototype printed circuit board (PCB) was designed to
be built into a small enclosure or incorporated into a larger
enclosure with other circuits – it measures 68mm × 40mm.
The PCB component layout and copper track layout was
Fig.1.18 PCB artwork showing real world and PCB views produced using Circuit Wizard (see next month for details)
and is shown in Fig.1.18. The board can be purchased,
ready drilled, from the EPE PCB Service, code 905 Our
finished prototype, ready for testing, is shown in Fig.1.19.

Next month
In next month’s Teach-In, Get Real we will show you how
we used our favourite software applications, TINA and
Circuit Wizard, to design, analyse and construct the pre-
amplifier module. We will also show how the project can
be configured for use in a variety of different applications.
If you’ve built your own version of our Get Real project
you will be able to put what you’ve learned into practice
by following our examples and carrying out your own
measurements.
To help you with this, Discover will introduce you to
some powerful virtual instruments that will generate and
display test signals. All you will need is an ordinary PC
fitted with a sound card and some test leads. Knowledge
Base will explain hybrid parameters and show you how
they can be used to predict the performance of a transistor
amplifier. For good measure, our Special Feature will show
you how you can use Circuit Wizard to design your own
Fig.1.19 Completed pre-amplifier circuit ready for testing printed circuit boards.

Everyday Practical Electronics, February 2015 45

TI-Feb-2015 MP new.indd 45 02/12/2014 08:48:53


Avast, LAN-lovers!
I
n the January 2014 Net Work, I revisited the perennial of leaving behind some digital detritus from several years’
problem of protecting a PC from its Internet-based worth of updates and I had to become familiar with Windows
adversaries. Previously, I had suggested AVG Anti XP Safe Mode once again. A scan with Malwarebytes also
Virus, but with Christmas looming (and staying true to my failed to complete: it could not update itself and the PC
Yorkshire roots) I baulked at the renewal costs for several kept blue-screening and crashing, and then it got stuck in a
PCs and so it was time to check out some alternatives. This loop of constant reboots.
time, I opted for the free version of Avast Anti-Virus from Blue screens and rebooting sometimes indicate a RAM
www.avast.com to protect my PC for the coming year. problem, so I carefully reseated them. A free memory checker
I first suggested Avast in Net Work ten years ago, at a such as MemTest from www.hcidesign.com also drew a
time when branded AV software usually arrived in yellow blank. Only by using AVG’s last-resort uninstaller tool (www.
shrink-wrapped retail boxes with a CD and slender manual avg.com/gb-en/utilities) did I finally manage to cure the
nestling inside. Back then, I claimed that highly effective problem, and this was a protracted process… and yet, AVG
software could also be downloaded free from the web, uninstalled effortlessly on another XP system without an
and the relatively unknown Avast was short-listed as a issue. A freeware uninstaller tool such as Revo Uninstaller
suitable candidate. A quick search of my email produced an – tread carefully on their website – is also excellent at
unflattering follow-up from a Net Work reader in 2005, who removing programs and cleaning up the registry afterwards.
soundly berated me for suggesting the hitherto unheard-of No sooner was Avast installed than a new 2015 version
Avast program, which he blamed for wrecking his Windows downloaded itself along with an interesting new feature:
system. I reaffirmed that I’d tested it on five PCs long before Avast’s Home Network Security tool will scan your network
it reached Net Work and I suspected that in his case, Avast looking for vulnerabilities, and it will also scan your router.
had not installed itself properly to begin with. It turned Avast 2015 claims to be the only AV program that does this,
out that he was still running both AVG and Zone Alarm, so I tried it out on several systems. In one case, the software
so Avast was probably not the cause of his woes, and it is highlighted that the default router password was weak, and
never good practice to run several AV programs side by side it cleverly offered to visit the router’s login page to help
anyway. you change it. In a separate trial, Avast claimed the router
was using old firmware. ‘Flashing’ an ADSL router is a job
AVG from hell best not done in haste, but updating a router’s firmware
This brings me to up to date, when I recently attempted can often improve performance and cure annoyances such
to uninstall AVG from an XP Professional machine before as dropped connections. Avast is a highly rated anti-virus
installing Avast. What should have been a simple task program that is well worth testing, and the Home Network
became a day-long nightmare as the stubborn software Security scanner is another welcome tool that will help
resolutely refused to depart from my disk. Freezes, lock- keep our surfing safe.
ups and nasty cycles of constant rebooting made the day
a miserable one. AVG would not uninstall properly, nor What’s the risk?
would it re-install again either. It showed all the symptoms Using weak default logins on systems, routers, wireless
access points and NAS drives is potentially very insecure,
as a recent scandal about domestic IP webcams proved. A
Russian programmer did us all a favour by listing many such
vulnerable webcams on a website (now defunct) to show
how easy it was to find a certain character string containing
default webcam configurations, which permitted instant
access to the video feed. I soon found some fairly innocuous
British IP cameras that spied on residential driveways,
parked cars or back yards, and I agree with the Russian
programmer that the public needs to know about such
problems in order to rectify them. The purpose of GeoIP
is to match a device’s IP address with its geographical co-
ordinates for possible plotting on a map, so you can guess
the location from an IP address too. However, as I showed in
May 2012’s Net Work, the results can be highly misleading.
GeoIP is used by some e-commerce sites to combat credit
card fraud though.
By gunning for a router’s default configuration settings,
hackers can access your network via the LAN, or possibly
a wireless access point, or from outside via the WAN
Avast 2015 Home Network Security is currently the only anti- (Internet) itself. Such attacks can initially arrive in a virus
virus program that scans your home router for weaknesses or Trojan brought in via email, an infected USB memory

46 Everyday Practical Electronics, February 2015

Network - New layout.indd 46 03/12/2014 08:57:12


key or a visit to a compromised website, and while such
attacks are quite rare they are worth knowing about. In an
extreme case, innocent network users could be re-directed
to phoney copies of websites, such as online banks where
login details could be captured. (Rapport software by IBM-
owned Trusteer is designed to guard against this, and is
often provided free by banks, and devices such as HSBC’s
security keypad improve security immensely.) Otherwise,
all manner of exploits such as keylogging, botnet spamming
or identity theft could be executed on a compromised
system, or your router could be used to overload other
addresses as part of a distributed denial of service (DDoS)
attack. Sophisticated hackers running botnets can make
your infected PC wake up on demand and start attacking IP
addresses without you ever knowing.
The DataTraveler Locker+ needs two consecutive physical
You’ve got ten guesses drive letters which may conflict with other drives until configured
I often cringe with horror when I work on other IT systems, letters around and so the secured memory key may not
only to find that passwords are scribbled on a nearby launch properly. DVD drives or card reader drive letters can
Post-It note or easily-guessed passwords are used instead. especially cause drive letter conflicts, as can be seen in the
Operators want the best of both worlds, the virtuous feeling screenshot, with my USB key behaving like a DVD drive. (A
of ‘security’ together with the convenience of something handy shortcut to Windows Explorer that I use constantly is
easily remembered (hacked). Even ‘munged’ or disguised to press the Windows key + E.)
passwords like p@$$w0rd can now be guessed by hackers These caveats detract from the USB3 memory key’s
performing a brute-force dictionary attack. Password portability, which is a shame because it has some attractions,
managers, such as my preferred Roboform (www.roboform. but it may still be perfectly fine for home PCs or Macs once
com) can generate and store complex website logins the drive letters have been suitably nailed down. Windows
securely, and a handy tip is to add a punctuation symbol on users can check or change drive letters by going to: Start/
the end to make passwords an order of magnitude harder Control Panel/Administrative Tools/Computer Management/
to guess. Storage/Disk Management. The Kingston DataTraveler
Roboform also offers a cloud-based system of storing logins, Locker+ G3 is available from Amazon in capacities of 8GB
but I have yet to overcome my nagging doubts about online to 64GB.
security and eavesdropping, so instead I looked at ways of
physically transporting my logins securely. I previously Network Icons for Windows 7
used the excellent Sandisk Cruzer Profile biometric One of the Windows XP features I’ve missed the most in
memory key, which had a built-in fingerprint scanner. With Windows 7 is the small monitor icon in the system tray
a quick swipe I could unlock and launch Roboform from that flickered whenever there was network activity. Its sole
the USB key and then log into websites securely when I was purpose was to show that something was happening: maybe
out and about. Sadly, it is not supported in Windows 7 so I checking mail or downloading a file, but if my browser had
recently tried a Kingston DataTraveler Locker+ G3, a USB3 frozen and the monitor icons were blank then I knew a
memory key with some beneficial features. It’s metal-clad wheel had fallen off the system somewhere.
and therefore very robust for life on the road, but it also
features both hardware encryption of data and password
protection of its contents. By plugging it into a Windows 7+
PC or a Mac OSX computer, a login window pops up and
offers users ten chances to enter the correct password. If
they fail to do so, the encrypted data is erased and the drive
reformats itself automatically. Not even its rightful owner
can recover data from a wiped memory key.

Network Activity Indicator restores the monitor symbols in


Windows 7 (right-click for more options). Download from
ITSamples.com

Windows 7 users who feel the same way might like


‘Network Activity Icon’ supplied free by www.itsamples.
com, which restores those enlightening symbols. Simply
point it to your NIC (network card) and watch the monitors
beam into life as traffic passes to and fro. If the icons are
not visible, remember that they can be dragged from the
‘hidden icons’ area (click the ‘Show hidden icons’ triangle
button nearby) and dropped onto the system tray where
The Kingston DataTraveler Locker+ G3 is a metal-clad they can be viewed full time. The program is written by Igor
USB3 memory key with hardware encryption and password Tolmachev, whose website offers a variety of handy little
protection utilities including Caps Unlocker, which reverts a PC Caps
Lock key after a delay and, as I have just discovered, it is
Although I configured the password protection successfully, a real boon for someone striving to meet a copy deadline!
I was disappointed that the Kingston DataTraveler Locker G3 In next month’s Net Work, I will show how to see what
proved temperamental on my own Windows 7 system. This your network is actually doing, using a free software tool,
is because the USB memory key requires two consecutive and I’ll look at some ideas for self-publishing material in
drive letters and Windows can be stubborn in the way it paperback form. Whether you’re a budding novelist or want
allocates them. Kingston explained to me that virtual drives to indulge a passion or hobby, there’s no need to sell out to
or network shares can throw the system out if the memory a book publisher when you can do it yourself. Plus, I will
key cannot obtain two physical drive letters (one for the suggest one or two easy ways of harnessing the web to get
launcher which then becomes redundant, and the other for your work into print. You can email the writer at: alan@
the encrypted area). Windows can sometimes shuffle drive epemag.demon.co.uk.

Everyday Practical Electronics, February 2015 47

Network - New layout.indd 47 03/12/2014 08:57:30


By Robert Penfold

Pi serial A/D converter

T
he previous Interface article covered The main advantage of an asynchronous system is that
a simple 8-bit analogue-to-digital con- in its most basic form it only requires one data line plus an
verter for use with the GPIO port of a earth connection in order to transfer bytes of data. A few
Raspberry Pi computer. This circuit used paral- more connections are needed in order to implement a prac-
lel interfacing to the GPIO port. Here we move on to tical synchronous serial interface, but it is simpler in other
a 12-bit analogue-to-digital converter that uses an MCP3201 respects. In particular, it does not require accurate clock
chip, together with a form of serial interfacing. Most of the signals at both ends of the system. The clock signal can be
early computer interfacing chips used parallel interfacing, generated by the transmitting or sending device, and an ad-
but the serial approach now seems to be the generally pre- ditional connecting wire is used to couple it from one to the
ferred method. Comparing the 8-pin MCP3201 with the 20- other. In the current context, the computer is normally the
pin AD7822BN used in the 8-bit converter (Fig.1) it is easy controlling device, and as such it generates the clock signal.
to see why. The parallel 8-bit converter chip has 2.5 times
as many pins as the 12-bit serial device. Perfect timing
With parallel processing it is necessary to have an eight- It is not necessary for the clock signal to be at a specific
wire connection in order to transfer bytes of data. Typically frequency, and it does not even matter if its frequency var-
there would also be one or two control lines to regulate the ies radically while each chunk of data is being transferred.
flow of data, plus an earth (ground) connection of course. This The two ends of the system use the same clock signal, and
equates to a total of about ten or eleven lines to swap bytes of must therefore remain synchronised regardless of the clock
data. An extra four or eight lines respectively are needed in rate. If the device sending the clock signal slows down or
order to transfer 12-bits and 16-bits of data at a time. speeds up, then the receiver will change to match it. A prac-
tical synchronous serial system requires at least one other
Bit by bit interconnection so that the sending device can indicate to
There are two type of serial interfacing, synchronous and the receiving unit that the transfer of a new chunk of data
asynchronous. The once-popular but now largely defunct has started and that it must be clocked into the shift register
RS232C serial interface is an example of an asynchronous at the receiver.
system. The data is transmitted one bit at a time on a sin- I am talking here in terms of chunks of data rather than
gle data line, with additional bits being used to indicate bytes, because a serial system of either type is not restricted
the beginning and end of each byte. Although the asyn- to 8-bit transfers. A serial system can be designed to handle
chronous name implies that the system is not synchro- transfers having any required number of bits. Consequent-
nised, it can only work in practice if the transmitting and ly, a 12-bit or 16-bit analogue converter still only requires
receiving terminals are accurately synchronised. This is three connecting wires plus an earth. Thus, a 12-bit serial
achieved by having the data sent at standard rates, and us- converter chip only needs eight pins while an 8-bit parallel
ing accurate crystal-controlled clock signals at both ends type has double that number, or even more.
of the system.
MCP3201
The pin function diagram for the MCP3201 is shown in Fig.2.
It requires a single supply in the range 2.7 to 5.5V, and the
maximum current consumption is 400µA. There is no prob-
lem in running it from the 3.3V supply output of the GPIO
port, and this makes it compatible with the 3.3V logic lev-
els of this port. There are differential inputs at pins 2 and 3,
but the IN– pin can be no more than 100mV above or below
the Vss pin. In practice, the IN– pin is usually connected to
ground and the input voltage is applied to the IN+ pin.
There is no built-in voltage reference, and an external ref-
erence potential of between 0.25V and the supply potential
must be applied to pin 1. This can be a precision reference
source, or for non-critical applications it can simply be
connected to the positive supply rail. The full-scale input
voltage is equal to the reference level used. Unusually for
an analogue-to-digital converter chip, the analogue input
does not have an extremely high input impedance. Conse-
quently, where appropriate it, must be driven via a buffer
amplifier.
Pin 5 is the negative chip select input, and this is held
high (logic 1) under standby conditions. Bringing it low
takes the chip into its active mode, and operates the integral
sample-and-hold circuit at the analogue input. After two
clock cycles the data output at pin 6 goes from a high im-
pedance state to logic 0, and it stays there for the next clock
Fig.1. The 12-bit converter chip on the left requires far fewer pins cycle. This is not a proper data bit and it must be ignored
than the 8-bit type on the right due to the use of serial rather than by the software in the computer. The first bit of data, which
parallel interfacing is the most significant bit, is placed onto the data output

48 Everyday Practical Electronics, February 2015

Interface.indd 48 04/12/2014 09:21:50


Fig.2. Connection details for the MCP3201.
It has differential inputs, but in most appli-
cations the IN– pin is just connected to
ground and the single input signal is ap-
plied to IN+

on the falling edge of the next clock


cycle. The other eleven bits of data
are placed onto the data output on the
falling edges of the subsequent eleven Fig.4. The circuit diagram for the 12-bit serial analogue-to-digital converter. IC2 is a
clock cycles. Any further clock cycles shunt regulator that provides a 2.5V reference level for converter chip IC1
are permissible, but irrelevant. Final-
ly, the chip select input is returned Raspberry Pi. The chip select and clock remember the difficulties associated
to the high state. This deactivates the inputs of the converter are fed from with achieving anything approaching
chip so that it is ready to start another GPIO25 and GPIO7 respectively, and true 12-bit accuracy.
conversion and reading cycle. these must be set as outputs. GPIO8 is The manufacturer’s data for the
Fig.3 shows the timing diagram for set as an input and is used to read the MCP3201 makes it clear that supply
the MCP3201. The chip select input bits of data from IC1. decoupling is not optional, and that
is taken low in order to start the con- The reference voltage is provided by good decoupling is needed in order to
version and reading process, and then a TLC431C precision adjustable voltage avoid noise problems. It also recom-
three clock cycles are used to initialise reference (IC2). This is a shunt regulator mends that the decoupling capacitor
the converter and clock out the first bit that is used in conjunction with a dis- should be connected as close to the
of data onto the data output. This bit crete load resistor (R1), in essentially the chip as possible. I found that it was
is then read by the computer, another same way as a Zener diode. However, best to use two decoupling capacitors
clock pulse is produced, and the next it provides much greater accuracy and (C1 and C2), which should both be
bit of data is read. The same procedure stability than a Zener diode. The output good quality components. Due care
is repeated until all twelve bits of data can be adjusted using two resistors as should be taken with the component
have been clocked out and read. To a potential divider to feed a portion of layout of the circuit, including the cir-
complete the process, the chip select the output voltage to the REF input. The cuitry that drives the converter. There
input is returned to the high state, and output voltage range is 2.5 to 36V, but in is no point in striving to produce a
the system is then ready to start the this case the basic 2.5V figure is all that converter that is reasonably free from
next conversion. is needed. This is obtained by simply noise problems and then feeding it
Of course, the computer will have connecting the REF input directly to the with a noise-infested signal.
read what are effectively twelve sin- CATHODE terminal. The converter and voltage reference
gle-bit binary values, but some simple circuits are both powered from the
mathematics is all that is needed in or- Noise abatement 3.3V supply available from the GPIO
der to turn these individual bits of data With a full-scale potential of 2.5V the port. The total current consumption
into the corresponding decimal value. converter has a resolution of approxi- of the circuit should be no more than
With 12-bit resolution this is a number mately 610µV. The downside to such about 2mA, which is well within the
in the range 0 to 4095. An 8-bit con- a high degree of resolution is that the maximum current rating of this sup-
verter gives a range of 0 to 255. system is vulnerable to problems with ply. Connection details for the TL-
noise and the slight instability in read- C431C are shown in Fig.5, which is
Converter circuit ings that this can cause. Those with a top view. The MC3201 used for IC1
Fig.4 shows the circuit diagram for a memories that go back to the BBC is an MOS device and it therefore re-
basic 12-bit analogue-to-digital con- Model B computer and its in-built 12- quires the standard anti-static handling
verter for use with the GPIO port of a bit analogue-to-digital converter will precautions.

Fig.3. The timing diagram for the MCP3201. The first bit of data becomes available on the falling edge of the third clock cycle

Everyday Practical Electronics, February 2015 49

Interface.indd 49 04/12/2014 09:21:58


Listing 1

import RPi.GPIO as GPIO GPIO.output(26, GPIO.HIGH)


import time B3 = GPIO.input(24)
GPIO.setmode(GPIO.BOARD) GPIO.output(26, GPIO.LOW)
GPIO.setwarnings(False) GPIO.output(26, GPIO.HIGH)
GPIO.setup(22, GPIO.OUT) B2 = GPIO.input(24)
GPIO.setup(24, GPIO.IN) GPIO.output(26, GPIO.LOW)
GPIO.setup(26, GPIO.OUT) GPIO.output(26, GPIO.HIGH)
GPIO.output(22, GPIO.HIGH) B1 = GPIO.input(24)
Fig.5. Connection details for the TL431C GPIO.output(26, GPIO.LOW) GPIO.output(26, GPIO.LOW)
regulator. Note that this is a top view and Readings = 0 GPIO.output(26, GPIO.HIGH)
not a transistor-style base view Average = 0 B0 = GPIO.input(24)
GPIO.output(26, GPIO.LOW)
while(Readings < 10): GPIO.output(22, GPIO.HIGH)
Software dataword = 0 if B11:
Although the program I originally GPIO.output(22, GPIO.LOW) dataword = dataword + 2048
used with the converter worked quite GPIO.output(26, GPIO.HIGH) if B10:
well, on close examination it was GPIO.output(26, GPIO.LOW) dataword = dataword + 1024
found to be slightly less than totally GPIO.output(26, GPIO.HIGH) if B9:
successful. On the face of it, the pro- GPIO.output(26, GPIO.LOW) dataword = dataword + 512
gram worked perfectly well, but it did GPIO.output(26, GPIO.HIGH) if B8:
not quite deliver the full-scale value GPIO.output(26, GPIO.LOW) dataword = dataword + 256
of 4095 with the analogue input con- GPIO.output(26, GPIO.HIGH) if B7:
nected to the reference source. Also, B11 = GPIO.input(24) dataword = dataword + 128
higher readings were less stable than GPIO.output(26, GPIO.LOW) if B6:
they might have been. This was due to GPIO.output(26, GPIO.HIGH) dataword = dataword + 64
the program operating too slowly. The B10 = GPIO.input(24) if B5:
manufacturer’s data recommends that GPIO.output(26, GPIO.LOW) dataword = dataword + 32
the clock frequency should be at least GPIO.output(26, GPIO.HIGH) if B4:
10kHz, and this is due to the sample- B9 = GPIO.input(24) dataword = dataword + 16
and-hold circuit at the input of the GPIO.output(26, GPIO.LOW) if B3:
converter chip. Lower frequencies can GPIO.output(26, GPIO.HIGH) dataword = dataword + 8
result in the conversion and reading B8 = GPIO.input(24) if B2:
process taking so long that the charge GPIO.output(26, GPIO.LOW) dataword = dataword + 4
voltage on this capacitor sags slightly GPIO.output(26, GPIO.HIGH) if B1:
while the reading is being taken. B7 = GPIO.input(24) dataword = dataword + 2
The original program worked by con- GPIO.output(26, GPIO.LOW) if B7:
verting the binary data into the equiva- GPIO.output(26, GPIO.HIGH) dataword = dataword + 1
lent decimal value during the reading B6 = GPIO.input(24) Average = Average + dataword
process, with the decimal value being GPIO.output(26, GPIO.LOW) Readings = Readings + 1
updated immediately after reading GPIO.output(26, GPIO.HIGH)
each bit. In the final version, which is B5 = GPIO.input(24) print (Average/10)
shown in Listing 1, a slightly different GPIO.output(26, GPIO.LOW) GPIO.cleanup()
approach is taken. As each bit of data GPIO.output(26, GPIO.HIGH) print ("Finished")
is read, its contents are placed in a B4 = GPIO.input(24)
variable. A different variable is used for GPIO.output(26, GPIO.LOW)
each bit, and these are 'B0' to 'B11'. The
twelve bits of data are then converted
into the equivalent decimal value once
the reading and conversion process has
been completed. This makes the pro-
gram somewhat longer, but it simplifies
and speeds up the reading of each con-
version. Anyway, this had the desired
result and enabled the full-scale value
of 4095 to be achieved, together with
more stable readings.
With proper decoupling there was
not a significant noise problem with
the converter. However, even with the
converter working well there could
be problems with noise on the input
signal. This is a common problem
when using a resolution of 12-bits
and beyond, and it is often due to in-
herent noise in the signal source. The
program 'smoothes' noise by using a
while… loop to take ten readings in
rapid succession, and then displaying
an average of these readings. It will not
be necessary to bother with averaging
in all applications, but it can be very
effective when noise will otherwise
cause jittery readings.
50 Everyday Practical Electronics, February 2015

Interface.indd 50 04/12/2014 09:22:07


AUDIO AUDIO OUT

OUT
L R

By Jake Rothman
Test-bench amplifier – Part 3
Thump prevention the negative rail to the driver stage. I
Annoying noise on powering up and discovered this accidently by putting
turning off plague many audio circuits in a negative-rail decoupling capacitor
and deserves a full article in its own that was too large. To minimise space,
right. The mechanisms are transient, a MOSFET source follower with a
complex and unpredictable. The solu- small tantalum capacitor was used to
tions are often unexpected and experi- generate the delay and provide good
mentally derived. Most designers avoid smoothing. This part of the circuit is
the issue by using relays. These are shown in Fig.9 and 10. The small diode
unreliable, expensive, power consum- discharges the capacitor on turn-off, so
ing and make a click themselves. With the delay is always present. Fig.9. The de-thump circuit using a
this circuit, turn-on thumps were found The thump from the op amp in- P-channel MOSFET to slowly ramp up the
to be prevented by slowly turning on put stage is removed by sizing its driver-stage current.

56Ω
OFF 2W
S1b

RAPID QUICK
750185 TURN OFF

10n 47Ω

4x SB30
315mA T 3A, 50V
(ANTI-SURGE) S1a SCHOTTKY DIODE
L BROWN RED RAPID 47-2548

ON

N 115V 15V

VIOLET BLACK – + 150Ω


0.5W
HT1
E GREY ORANGE +21V
+ DRIVER STAGE
1000µ
115V 15V 25V HT2
+ STAR +23V
OUTPUT STAGE

+ ZENER REGULATOR
12mF
METALWORK – FRONT BLUE YELLOW 25V 0V STAR
AND REAR PANELS DIRTY
PLUS PIN 1 ON XLR
0-15 0-15
2A 0V2 SIGNAL EARTH
TORROID
40-60VA 0V1 ZOBEL CAP PLUS 220n DECOUPLER (ON PCB)
+ SPEAKER 0V RETURN PLUS LED INDICATOR CIRCUIT
12mF
25V HT3
–23V
OUTPUT STAGE

– STAR ZENER REGULATOR


TR12
ZVP2106A
P-CHANNEL MOSFET
d s HT4
–20V
DRIVER STAGE
g

ZVP2106A 1N4148 100k


PIN VIEW 68µ
20V
NEGATIVE RAIL TANT+
TURN-ON DELAY

d g s
6µ8
35V
TANT+
0V2

Fig.10. The amplifier power supply – note the complicated noding around the main smoothing capacitors. All audio systems have three
‘grounds’: safety/mains/chassis, high-current/dirty (0V1) and signal/reference (0V2). Pin 1 on XLR connectors is always connected to chassis
to prevent circulating earth currents impinging on the signal ground according to the AES (Audio Engineering Society) convention

Everyday Practical Electronics, February 2015 51

AO-Feb15 (MP 1st & JR) V2.indd 52 10/12/2014 09:05:57


Fig.11. Surrounding a torroidal transformer with an insulated steel Fig.12. An old toroid core (left) provides a useful source of grain-oriented
band reduces magnetic emissions steel band for screening

decoupling capacitor so that the circuit Quick turn-off quickly discharged by a high-power
remained powered for just the right It is very irritating if an amplifier resistor connected across them when
time after turn-off. A 6µ8 35V cap did ‘carries on’ for a while after it has the switch is flipped to the off posi-
the job. Also, the current sink, driver been turned off, especially if there is a tion. The wiring for this arrangement
stage power-rail and bias transistor horrid noise while testing something. is shown in Fig.13. There is a snub-
bypass capacitors all have to be the In this design, the power rails are ber network wired across the mains
correct value to prevent thumps. Nat-
urally, I use solid tantalum types for all
the small values for long-term stability.

Low-emission power supply


The use of a torroidal transformer
helps to reduce magnetic fields. One
of my ‘secret’ tricks to gain a further
reduction of around 10dB at low
frequencies, is to surround the trans-
former with an insulated steel strip, as
shown in Fig.11. The strip is unwound
from the core of a burnt out torroidal
transformer (see Fig.12). Using copper,
as in the ‘bellyband’ strap applied to
laminated transformers doesn’t work.
Schottky rectifiers reduce switching
noise and voltage drop, giving 2V
more from the 15-0-15V transformer
used – this gave an extra 1.4W output Fig.14. The PCBs used in the amplifier
and less heat.

+21V
FP2 OXIDE
BLEEDER
RESISTOR
PEAK DIS =
LIVE 36W 800mA
56Ω
OFF 2W

DPDT
MAINS
SWITCH
47Ω
S1a S1b

10nF
X
CAP

ON

TRANSFORMER –21V

Fig.13. Wiring a DPDT mains switch to


discharge the power rails when turned off Fig.15. Internal view of the test-bench amplifier – one day I’ll get it all on one PCB!

52 Everyday Practical Electronics, February 2015

AO-Feb15 (MP 1st & JR) V2.indd 53 10/12/2014 09:06:29


Fig.16. Finished test-bench amplifier with speaker output switchable between front and
rear sockets

section to prevent an inductive ‘crack’ to accommodate the amplifier and


on turn-off. the well-stuffed interior is shown in
Fig.15. The front panel is shown in
Construction Fig.16; note the provision of switch-
The main board is a long-discontin- able speaker sockets. The rear panel
ued Maplin 50W amp HQ 68Y PCB (Fig.17) has a special 4-pin din socket
with altered component positions, giving access to the power rails via
a few cut tracks and links, so no 220Ω current-limiting resistors.
layout is given here, just the sche- Note that all the parts described in my
matics. The input stage and overload columns are bought in bulk for man-
indicator are constructed on RS 741 ufacturing and education; I can usu-
op amp PCBs. Both these PCBs are ally supply them relatively cheaply. I
shown in Fig.14. often quote Rapid order codes since
The power supply circuit is shown they are the cheapest mainstream UK
in Fig.10. Note the special noding to distributor. Please contact me if you
avoid the capacitor charging pulses need anything:
coupling to the power rails. Other Email: jacob.rothman@homecall.co.uk
nodes also prevent the half-wave Tel: +44 (0)1597 824080
signal currents from the output stage Who would have thought a little test
entering the reference ground 0V2 and bench amp could be so complicated?
the low-power rails. This layout is dif- However, it did generate some new
ficult to achieve with the requisite low circuits and in turn spawned a thump-
resistance on a single-sided PCB so it free capacitor-coupled Hi-Fi integrated
is hard-wired. Simple Zener regulation pre/power amp needing only a single
suffices for the input op amp, with rail power supply, which I’ll discuss
diode decoupling for the LED driver. next month. After that I’ll give some
The unit is mono and two are need- audio insiders’ design techniques for
ed for stereo. In development work, small Hi-Fi speakers, culminating in
usually only one channel is needed. a top-quality system suitable for test
Two separate amplifiers with ground bench use.
lifting and individual power supplies
prevent earth loops, which often Top audio tip!
occur in stereo test-gear lash-ups. A Before I forget – remember while
compact Hammond 1598 case from sniffing that solder smoke, buying a
Farnell measuring 280mm deep by new fume filter is less hassle than a
200mm wide and 40mm high is used lung transplant!

Fig.17. Rear of the amplifier

Everyday Practical Electronics, February 2015 53

AO-Feb15 (MP 1st & JR) V2.indd 54 10/12/2014 09:07:08


Max’s Cool
Beans
By Max The Magnificent

Mastering meters – Part 2 move smoothly (it doesn’t have to move far, at this stage
In my previous column, I mentioned that I like using we’re just trying to demonstrate that it does move).
analogue meters for my hobby projects because they of- Speaking of this, you may have wondered why you
fer a certain sense of style. Furthermore, I’m really into often see a piece of wire connecting the two terminals
the ‘Steampunk’ look and feel, so I prefer to use the an- at the back of a meter (if there isn’t one on a meter you
tique variety that I pick up at electronic flea markets for purchase at a flea market, you should add one yourself).
just a few dollars each. The purpose of this wire is to dampen down the mo-
Just to give you a sense of what I’m talking about, take tion of the needle when you are transporting the meter,
a look at Fig.1, which shows the meters I’m using to thereby preventing it from bashing up against the end-
implement my Vetinari Clock project. The large ‘Hours’ stop. The way this works is as follows. When you apply
meter has a 4.5-inch external diameter; the medium- a voltage/current to the meter, this causes the needle to
sized ‘Minutes’ and ‘Seconds’ meters are both 3.5-inch move. Similarly, when you are transporting the meter
in diameter; and the small ‘Tick-Tock’ (metronome- and you jerk it, the movement of the needle generates
style) meter is 2.5-inch in diameter. I picked up all of a current. The term counter-electromotive force (coun-
these meters at my local Huntsville Hamfest last August ter-EMF or CEMF) – which we used to call ‘back EMF’
(http://ubm.io/1vHyKah). when I was a lad – refers to the voltage, or electromotive
As we will see, there are all sorts of things to consider force, that ‘pushes’ against the current that induces it.
with regard to using these little beauties from yester- By connecting a wire across the meter’s terminals, you
year, not the least of which is how we set about creat- allow the current generated by the moving needle to
ing the required faceplates (you must admit they look flow, thereby generating a CEMF/back-EMF that damp-
mega-cool), but let’s not get ahead of ourselves. ens the needle’s motion.

Choosing your meter Any meter you want, providing it’s a


OK, so let’s suppose we are ‘out-and-about’ at a Ham- current meter
fest. It may be that we have a project in mind (like In the case of quantum mechanics, the Heisenberg un-
my Vetinari Clock) and already have an idea as to the certainty principle states that the more precisely the
meter(s) we’re looking for. Alternatively, we may just be position of an atomic particle is determined, the less
looking for anything ‘tasty’ on the basis that there will precisely its momentum can be known, and vice versa.
always be future projects that will benefit from one or To put this another way, the act of observing some-
more analogue meters. thing affects (modifies) the thing being observed. The
So we grab a likely candidate. The first thing to look same principle applies with analogue meters – when
for is if this meter is intended to display a direct current we introduce them into a system, they perturb that sys-
(DC) or alternating current (AC) value. In reality, AC tem in some way, so the trick is to arrange things such
meters are just DC meters with some extra ‘fiddly bits’, that the effect of the meter on the system is as small as
but it’s a lot easier to work with DC meters, so that’s possible.
what we’ll focus on here (which is another way to say Now, do remeber that irrespective of what a meter
that you should put the AC meter down and continue shows on its faceplate – which can be anything from
looking). volts, current, or resistance to megawatts, kilojoules, or
The next test is to check that the meter’s needle is gigawallabies – at the end of the day, at their heart, all
somewhere close to the zero position, then move the of these meters are current meters.
meter gently back and forth and observe the needle
Shunt and series resistance
In the case of a meter that is actually intended to reflect
a current value, this will eventually be connected in se-
ries with whatever signal it’s measuring. Since we wish
to minimise the meter’s effect on the circuit, we wish
its resistance to be as low as possible (taking everything
into account, such as the sensitivity of the meter), so
we will introduce a shunt (bypass) resistor across the
meter’s terminals, as illustrated in Fig.2(a).
By comparison, in the case of a meter that is intended
to reflect a voltage value, this will eventually be con-
nected in parallel with whatever signal it’s measuring.
In this case, in order to minimise the meter’s effect on
the circuit, we need it to have as high a resistance as
possible (taking everything into account, such as the
Fig.1 The meters that will provide the main display for sensitivity of the meter), so we will introduce a series
Max’s Vetinari Clock resistor as illustrated in Fig.2(b).

54
54 Everyday Practical Electronics, February 2015

Blog Feb15 V2.indd 54 09/12/2014 11:58:48


Now, Fig.2 shows the shunt and series resistors
as being connected outside of the meter, but this
was just for ease of representation; oftentimes,

WIN
these resistors are mounted inside the meter’s case
(sometimes the shunt resistors look like a piece of
wire). Having said this, with regard to the antique
analogue meters we pick up at flea markets, we

PicoScope
have no idea how they were originally deployed,
and they may well have had external series or
shunt resistors wired up in the cabinet containing
®
the meter.
The bottom line is that the first thing I do when
I start working on these old meters is to remove

5000 Series
FLEXIBLE RESOLUTION
OSCILLOSCOPE
PicoScope 5000 series flexible resolution
oscilloscopes have selectable 8 to 16-bit
+VE –VE +VE –VE

resolution and sampling speeds to 1GS/s.


Rshunt

Rseries

a) CURRENT CONFIGURATION b) VOLTAGE CONFIGURATION

Fig.2 Shunt and series resistors


any and all external and internal series and shunt
resistors, so all that’s left is the meter’s coil. Now,
it’s important to note that these meters are sealed
units. Generally speaking, it was not intended
for anyone to go inside them, so you have to be
very careful here. The really important thing is
to make sure we are working in as clean an envi-
ronment as possible with as little dust and other
contaminants as we can manage.

Next month!
Once we’ve removed any shunt and series resis-
tors and reassembled our meters, the real fun The top waveform in the screenshot, captured with 8 bits
begins. In next month’s column, we’ll talk about resolution and zoomed in by 64x shows up the limitations of
how we connect these little beauties up to our mi- 8–bit resolution. The same signal captured with PicoScope set
crocontroller (we’ll be using a more sophisticated
setup than was discussed in my previous column). to 12–bit resolution shows characteristics of the signal that
Also, we’ll be talking about how we create and in- were invisible in 8–bit mode. All selectable in the same scope.
stall new faceplates that complement the project
in hand. Until then, have a good one!

WIN

ALL MODELS INCLUDE FULL SOFTWARE AND 5 YEAR WARRANTY.


SOFTWARE INCLUDES MEASUREMENTS, SPECTRUM ANALYZER, SDK,
ADVANCED TRIGGERS, COLOR PERSISTENCE, SERIAL DECODING
(CAN, LIN, RS232, I²C, I²S, FLEXRAY, SPI), MASKS, MATH CHANNELS,
ALL AS STANDARD, WITH FREE UPDATES.

ENTER HERE
www.picotech.com/PS404
Everyday Practical Electronics, February 2015 55

Blog Feb15 V2.indd 55 09/12/2014 11:58:58


Circuit Surgery
Regular Clinic by Ian Bell

Triacs correction

W e received an email from Chris


Hinchcliffe pointing out an error
in last month’s Circuit Surgery.
think MT2 is +ve with respect to MT1 in
quadrants I and II; and MT2 is –ve with
respect to MT1 in quadrants III and IV.
MT2 +VE

MT2 MT2
The problem was not so much with
Another great article in Janaury’s EPE, the position of the symbols, but with the MT1 MT1
this time on triacs by Ian Bell. I do have labelling of MT1 and MT2 – these are G G
a query about the graph in Fig.4, which swapped on all the triacs in Fig.4 (and
I think is incorrect (if I understand it Fig.1). The problem occurred in the QUADRANT II QUADRANT I

correctly). I’m under the impression production of the figures; unfortunately GATE –VE QUADRANT III QUADRANT IV GATE +VE

that the top two triac symbols on the the original text was edited to match
graph should be swapped over with the the incorrect figures – the following text MT2 MT2
bottom two. The graph’s axis labels are and figures are now correct.
correct. The text corresponds to what I The fact that triacs can conduct in MT1 MT1

think is the incorrect graph illustrated. I both directions and can be triggered G G

by gate currents of either polarity leads MT2 –VE


to four possible triggering scenarios,
MT2 MT2
or quadrants, as illustrated in Fig.4. Corrected Fig.4. from Circuit Surgery
Positive half-cycles of the AC waveform Jan 2015 – Triac Quadrants
MT1 G MT1 correspond to quadrants I and II in the
DIAC TRIAC upper half of Fig.4. The triac’s MT2 triac’s MT2 terminal is negative with
terminal is positive with respect to respect to MT1.
MT1. Negative half cycles of the AC Thanks to Chris for bringing this to our
Corrected Fig.1. from Circuit Surgery waveform correspond to quadrants III attention and for being complimentary
Jan 2015 – Diac and Triac symbols and IV in the lower half of Fig.4. The about the article, despite the error.

Stopper resistors and capacitive loads

I n EPE Chat Zone, james posted a


question about one of the op amp
circuits in the PortaPAL-D project
Grid stoppers
Fig.1 shows an outline schematic of a
typical valve amplifier stage. For those
on this in the context of the op amps
later) and grid stoppers help to reduce
gain at high frequencies and improve
(EPE, December 2014, page 14). readers unfamiliar with valves, it may stability.
CS2FEB15-AMEND
help to know that the circuit is similar Grid stopper resistors also limit grid
56mm x 1 COL
All three pre-amps in this project to a FET amplifier and, like a FET, the current. Normally, the grid is high
have 150R series resistors at their valve has very high input impedance,
outputs. The text on page 15 describes but with significant capacitance
these resistors as ‘stopper resistors’. between the grid and other terminals. SUPPLY

My question is: ‘What is the purpose The grid stopper resistor is placed
of a “stopper resistor” and how does it between the input and the grid, as OUTPUT
perform its function?’ close to the grid as possible. It forms a
low-pass filter in conjunction with the GRID STOPPER
In response, zeitghost highlighted valve’s internal capacitance. INPUT
REISTOR

the use of the term in the context of Valve audio amplifiers are
valve amplifiers (eg, guitar amplifiers), susceptible to picking up radio
specifically as ‘grid stoppers’. This signals, which are rectified by the
seems to be by far the most common valve (acting like a diode) and so can
use of the term ‘stopper resistor’, but be heard on top of whatever is being
this term is not used exclusively in this amplified. The reduction of gain at
context. We will take a quick look at high frequencies by the grid stopper
that first, before looking at the op amp (plus valve capacitance) attenuates the
circuit from the Portapal-D, followed by radio signal before it can be rectified
a discussion on addressing instability and therefore reduces or eliminates
due to capacitive loading of op amps, the problem.
which is one of reasons why an output Like all amplifiers, valve circuits can Fig.1. Valve amplifier showing grid
resistor might be used. become unstable and oscillate (more stopper resistor

56 Everyday Practical Electronics, February 2015

Circuit Surgery FEB 15 V2.indd 56 08/12/2014 09:13:15


impedance, as previously mentioned, but at high grid drive
levels (relatively more likely in guitar amplifiers) it starts R2

to conduct. This can overload the preceding stage, which R1


causes significant distortion (known as blocking distortion). –
Furthermore, sufficiently high grid current will damage the Vin
R3 Vout
valve and a grid stopper will help prevent this. Fig.3. Basic op amp +
Stopper resistors similar to grid stoppers are used in some differential amplifier
transistor circuits, particularly for FETs, where they are configuration R4

referred to as ‘gate stoppers’ although they are required less


frequently than with valve circuits. Grid stoppers, although
they are an interesting topic for valve enthusiasts, are not
really relevant to james’s enquiry. The resistor in question
is on the output of an amplifier circuit, not the input, so we
are not in the same situation as a grid stopper. Differential amplifiers
Having introduced the microphone preamplifier circuit, it is
Back to op amps worth looking at it in a little more detail, explaining why it
The PortaPAL-D has two microphone preamps, using an is used and highlighting a limitation of the circuit in Fig.3, in
LM833 op amp and a guitar preamp using a TL071. We will case readers want to use it for other purposes.
look at one of the microphone preamps in detail – the same If a signal is carried on two wires, as the difference in
principles will apply to the use of the output resistor in the voltage between those wires, then it is called a differential
other situations. signal. In audio systems this is referred to as a balanced
The LM833 is a dual operational amplifier available signal. Note that the amplitude of a differential signal is
from a number of manufactures (Texas Instruments, ST not measured with respect to ground. A signal carried
Microelectronics and ON Semiconductor). It is a general- as a voltage on a single wire, with reference to ground, is
purpose op amp, designed with emphasis on audio called a single-ended signal or unbalanced signal in audio
applications. The possible requirement for a resistor on terminology. Many microphones provide a balanced output
the output is covered in the Texas Instruments datasheet, because it reduces susceptibility to noise.
which says: The two wires carrying a differential signal between them
The LM833-N is a high-speed op amp with excellent may also have a voltage, which is same on both wires. This
phase margin and stability. Capacitive loads up to 50pF is known as a common-mode signal, and is basically the
will cause little change in the phase characteristics of the average of the voltage on the two wires at any time. If we
amplifiers and are therefore allowable. amplify the voltage difference between two wires carrying
Capacitive loads greater than 50pF must be isolated
CS3FEB15 a differential signal, the common-mode voltage will have
from the output. Thex 1most
42mm COL straightforward way to do this not have an effect on the amplifier’s output (taking the
is to put a resistor in series with the output. This resistor difference between equal values gives zero). In the case of
will also prevent excess power dissipation if the output is a microphone this is useful because the wiring may pick up
accidentally shorted. unwanted signals, such as mains hum. Microphone signals
A simplified version of one microphone preamp circuit are small, so it would not take much induced hum for it to
from the PortaPAL-D is shown in Fig.2 (microphone be noticeable. However, because the two writes carrying the
phantom power and single supply reference are not differential signal are the same length, and more or less in
included). The components forming the input of the next the same place, they will both pick up the same hum signal
stage (level control into the mixer) are shown as a load. – so the hum will be a common-mode signal and will not be
This circuit is a version of the classic op amp differential amplified by a differential amplifier.
amplifier shown in Fig.3. As its name suggests, this circuit That is the ideal case, but real differential amplifiers are
amplifies the voltage difference between the two inputs, not perfect at rejecting common-mode signals. Their ability
which in the case of the PortaPAL-D microphone preamp is to do this is described by their common-mode rejection ratio
the balanced output from the microphone. The gain of the (CMRR). This is the ratio between the gain for differential
circuit is given by: and common-mode signals, usually expressed in decibels
(dB). Op amps are differential amplifiers and often (but not
R2 R4 always) have very good CMRR. For example, the datasheet
Gain = =
R1 R3 gives a typical value of 100dB for the LM833, meaning the
differential gain is 100,000 times larger than the common-
Here, the gain is 22. mode gain.
The differential amplifier in Fig.3 does not have a CMRR
equal to that of the op amp’s. In fact, its CMRR depends
! k +1 $ strongly on how close the ratio of the resistors R2/R1 is to the
CMRR =R320 log # &
150p
" 4t % ratio of resistors R4/R3 (the gain equation above implies these
FERRITE
BEADS
ratios must be equal). If these are very well matched, the
CMRR can be high, but the resistors have to have a very good
R2
22k
tolerance for this, which R2 R1%
C1 R1 Gain =is why= 4 resistors are specified in
INPUT 47µ 1k1
R5 the PortaPAL-D project. R1 R3
– 150Ω
LOAD
+
The CMRR ratio in decibels of the circuit in Fig.3 is given by:
C5
10µ
C2 R3

! k +1 $
47µ 1k1

CMRR = 20 log #
R6
10k &
C4
150p
R4
22k
C6
1µ " 4t %
R7
100k Where k is the gain of the circuit and t is the tolerance.
This equation was published in a paper by Ramón Pallás-
Areny and John Webster in 1991. This equations show that
the circuit in Fig.3 can provide very poor performance as a
differential amplifier, for example a unity-gain circuit using
5% (0.05) resistors will have a CMRR of only 20dB:
Fig.2. Simplified schematic of the Portapal-D microphone
preamplifier with the level control/mixer input shown as a load CMRR = 20 × log (2/4 × 0.05))

Everyday Practical Electronics, February 2015 57

Circuit Surgery FEB 15 V2.indd 57 08/12/2014 09:13:27


20 × log(10) = 20dB (even with an ideal to emphasise the fact that there is increases. These breakpoints are called
op amp) significant capacitance in the load, poles and, in simple terms, can each
although it is connected via resistance. be thought of as relating to a single RC
For the circuit in Fig.2, the above The frequency response of the circuit low-pass filter somewhere in the signal
equation indicates a CMRR of about is directly related to the need for the path (such as that formed by R2 and C3,
55dB, which given that any hum is inclusion of the output resistor R5. which was discussed above).
likely to be at a low level if shielded To understand why this is needed we At frequencies above the pole
microphone cables are used, is fine. need to discuss the issue of feedback frequency, gain decreases at a rate of
However, in other applications stability. We discussed this recently 20dB per decade of frequency more
requiring very high CMRR, the circuit (Circuit Surgery, EPE November 2014) than below the pole, and the phase
in Fig.3 may be less useful unless in the context of linear regulator shift is increased by 90°. There is
the resistors are very well matched circuits – we will summarise the another type of breakpoint which can
(integrated differential amplifiers concepts again briefly now. occur in frequency responses. This is
with laser-trimmed resistors are called a zero. Gain will decrease at a
available). An alternative is to use an Circuit stability rate of 20dB per decade of frequency
instrumentation amplifier. The output of a circuit does not less above a pole compared to below it.
respond infinitely quickly to changes Adding poles and zeros to a circuit’s
Frequency response at its input, so a feedback signal will feedback loop changes the stability
The circuit in Fig.2 has a number of be delayed with respect to the input. of the circuit. For example, adding a
components added with respect to For example, assume for simplicity pole may make a circuit more unstable
Fig.3, which modify its frequency a fixed delay from input to output of because it causes the phase shift to
response. The circuit in Fig.3 amplifies the feedback network of 0.1μs. If the increase. However, it also may make
from DC to frequencies limited by input frequency was 100Hz this time the circuit more stable because the gain
the op amp’s bandwidth, whereas the would only be 0.001% of the signal’s is reduced at high frequencies. The
circuit is Fig.2 covers a range suitable cycle time (a phase shift of 0.0036°) actual situation will depend on the
for audio signals. The coupling and would probably be insignificant. relationship of all the poles and zeros
capacitors C1 and C2 block DC at the If delay is fixed, then phase shift in the frequency response.
input. Capacitors C3 and C4 in parallel increases proportional to frequency.
with R2 and R4 reduce the gain of the So, at 5MHz, 0.1μs is half the cycle time Capacitive loads
circuit at high frequencies. of signal (180°). This is a significant When we add a capacitive load to
The impedance (ZC) of a capacitor, C, point because a phase shift of 180° is an op amp amplifier, as shown in
at frequency f is given by: ZC = 1/2πfC. equivalent to multiplying the signal by Fig.5, we form an RC low-pass filter
When the impedance of C3 and C4 –1. What was negative feedback has with the op amp’s output resistance.
equal the value of the resistors R2 and now become positive feedback. This will add a pole to the circuit’s
R4 respectively the circuit’s gain will Positive feedback is what you frequency response, which increases
be halved. This occurs at f = 1/2πRC = need to make an oscillator, so our delay around the feedback loop,
1/(2×π×22×103×150×10-12) = 48kHz. circuit may become unstable. For this increasing the phase shift and hence
The circuit in Fig.2 has ferrite instability to occur, the gain around the reducing phase margin. The circuit
beads on its inputs. These increase feedback loop must be one or more at often becomes more unstable, although
the inductance of the inputs, which the frequency at which the phase shift it is possible for op amps to be stable
blocks very high frequencies, helping reaches 180°. The question is – will the for low capacitive loads, unstable for
to prevent problems with RF pickup – above conditions for instability occur a wide range of larger loads, but stable
the same function as one of the uses of as frequency increases? again for higher capacitor values. This
the grid stopper resistor we discussed We can represent how close a circuit is because adding the load capacitor
earlier. is to being unstable using the concepts reduces gain at high frequencies as
The load on the microphone preamp of gain margin and phase margin. well as increasing phase shift. With a
comprises the coupling capacitors As gain around the feedback loop very large capacitive load the circuit
and level potentiometer, and is drawn approaches 1, the phase shift must be may be stable, but will be slow.
in Fig.2 as a group of components less than 180°. The difference between There is another way to think about op
connected to ground rather than the the phase shift at this point and 180° amp instability with capacitive loads.
layout in the conventional manner of is the phase margin. Second, as the The effective output resistance of an op
the original schematic. This is simply phase shift around the loop approaches amp is reduced by feedback – however,
±180° the magnitude of the gain must as frequency increases the gain of the
be less than 1. This difference can be op amp decreases and therefore so does
expressed as the gain margin (usually
GAIN (dB)
POLE 1 the amount of feedback. This increases
in dB). Any change in a circuit’s the effective output impedance from a
structure or component values may low value towards the open-loop output
POLE 2
change its stability for better or worse. impedance. Increasing impedance with
0
If a circuit has poor gain and phase
GAIN MARGIN margin then it may not oscillate all the
time, but changes in parameters such as R2

temperature or component aging may


LOG FREQUENCY, f make things worse, leading to sustained
oscillation. Furthermore a circuit with Vin R1
PHASE
SHIFT
0
o LOG FREQUENCY, f poor gain and phase margin is likely –
to ring (produce decaying oscillations) RO
Vout

o
if large input signal changes occur. If VO
–90
the frequency response is completely
PHASE MARGIN unstable (zero or negative gain and + CL

phase margin) then it will oscillate


o
–180

permanently.
Fig.4 shows a typical frequency
Fig.4. Variation of gain and phase shift response plot for an amplifier such
around a feedback loop with signal as an op amp. There are a couple of
frequency, illustrating gain margin and breakpoints where the gain starts to Fig.5. Op amp amplifier with capacitive
phase margin decrease more rapidly as frequency load showing op amp output resistance

58 Everyday Practical Electronics, February 2015

Circuit Surgery FEB 15 V2.indd 58 08/12/2014 09:13:33


R2

R1
Vin

RO R3
Vout

VO

+ CL

Fig.6. Op amp amplifier with capacitive load and isolation resistor


increasing frequency is like the behaviour of an inductor, so RO Fig.8. Simulated frequency response of three op amp circuits.
really looks like it has an inductance in parallel with it. This Upper trace: no capacitive load, middle trace: capacitor con-
inductance forms a resonant circuit with the load capacitance, nected to op amp output (Fig.5), lower trace: capacitor con-
which may result in ringing or oscillation. In the frequency nected via a resistor (Fig.6)
response we may see a resonant peak.
There are a number of ways to improve the stability of a however, be very helpful for exploring the basic principles
circuit in which an op amp drives a capacitive load. The of circuit stability and getting a general feel for the stability
simplest is to add a resistor between the op amp’s output of a real design.
and the capacitor, as shown in Fig.6. This isolates the Op amps could be designed internally to be able to cope
capacitor from the op amp’s feedback circuit and modifies with large capacitive loads without instability; however,
the frequency response to a more stable situation. We can this tends to reduce their performance with light capacitive
also think of it damping the resonant circuit that we just loads, so many op amps have a maximum capacitive load
discussed. Other approaches include the output resistor and value, which is quite small (consult a device’s datasheet for
capacitor in the feedback loop. details). However, some op amps are designed specifically
Fig.7 shows LTSpice simulation results for three op amp for capacitive loads, for example the C-Load family of op
circuits like the one in Fig.5 (R1 = 1kΩ, R2 = 3kΩ, LT1817 amps from Linear Technology.
op amp) with a step input of 0.5V in 100ns. The first circuit
(upper trace) has no load capacitance (no CL), the second Reference
(middle trace) has a load capacitance of CL = 5nF and the Ramón Pallás-Areny and John G.Webster. Common Mode
third (lower trace) also has a load capacitance compensation Rejection Ratio in Differential Amplifiers, IEEE Transactions
resistor of 150Ω (R3 in Fig.6). It can be seen that the circuit on Instrumentation and Measurement, Vol. 40, No. 4, August
with just the load capacitance has stability problems – ringing 1991, pp. 669-76.
occurs after the step input. With a slightly larger capacitor,
the circuit oscillates permanently. The resistor allows the
capacitor to be driven without ringing.
Fig.8 shows the input to output frequency response of the CRICKLEWOOD
same three circuits as in Fig.7. Note the resonant peak in
the middle trace’s response. This is typical for circuits that
ELECTRONICS Established 1981
exhibit ringing
Having presented some simulation results it is worth Frustrated with your supplier?
suppier?
noting that it is difficult to obtain exact simulations of the Visit our component packed
website for a vast range of
specific stability of particular op amps and circuits built parts - old and new,
with them. This is because the simulation models provided many unavailable elsewhere!
for the op amps may not include all the details of frequency www.cricklewoodelectronics.com
response and because it is easy to miss, or simply not have 1000
1000’s OF PRICES REDUCED!
the right values for parameters such as temperature, wiring
capacitance and inductance, capacitor series resistance or Alternatively phone us on
supply impedance, all of which might influence the stability 020 8452 0161 with your
requirements.
of a real circuit. Experimenting with simulations can,

Visit our Shop, Call or Buy online at:


www.cricklewoodelectronics.com
020 8452 0161
Fig.7. Simulated response of three op amp circuits to a step input.
Visit our shop at:
Upper trace: no capacitive load, middle trace: capacitor connected 40-42 Cricklewood Broadway
to op amp output, lower trace: capacitor connected via a resistor London NW2 3ET

Everyday Practical Electronics, February 2015 59

Circuit Surgery FEB 15 V2.indd 59 08/12/2014 09:13:44


+3V BLUE

U$1 GREEN
TRIMPOT PICKIT INTERFACE GROUND
15Ω
2 28
47k RA0 RB7 RED
3 27
RA1 RB6 39Ω
4 26
RA2 RB5
5
RA3 RB4
25
130Ω
Fig.4 Typical RGB LED pin-out
24

7
RB3
23 the same period. This should not be
RA5 RB2
22
an issue as the typical scenario of
9
RB1
21
driving many RC servomotors works
10
RA7/OSC1 RB0
20
with a single PWM period (typically
R G B
RA6/OSC1 3V3
19
around 2ms).
GND The PWM controller comes in two
flavours, standard and enhanced. We
13 18
RC2 RC7
14
RC3 RC6
17
RGB LED are using the standard mode. The
RC5
16
PWM module can do much more than
PIC18F27J13 MODULE RC4
15
generate a simple PWM waveform;
it can be combined with other PWM
channels to control motors through
GND half and full-bridge interfaces, with a
programmable dead zone. This is stan-
dard fair for motor control but it’s not
Fig.3 Using PWM – driving an RGB LED a common hobbyist requirement, so
we will leave that for another article.
switched-mode power supply for ex- are very easy to use; you simply write a
ample) then the number of bits avail- value to a register to set the duty cycle Driving an RGB LED
able for the duty setting falls to as low
PNM2FEB15 as a percentage of ‘fully on’ – 100 be- By way of an example, this month’s
as four bitsx at
25mm 400kHz. For typical uses
1 COL ing fully on, and 0 being fully off. To template code (available for download
of a PWM signal (RC servomotor or initialise the output you call the PWM- from the ‘Projects’ page on the maga-
PC fan speed control) the frequency Period() function to choose a timer zine’s website at www.epemag.com)
required is under 30kHz, and in these and set the PWM period in hertz, then uses PWM to control an RGB LED.
cases the resolution is the full ten bits. PWMInit() to specify a pin to be acti- RGB LEDs were made for PWM
This gives about one thousand steps, vated. The PWMDuty() function allows control; they are simple to connect,
or about 3mV per step if you are gener- you to specify the duty percentage for and it is necessary to drive each one
ating an analogue voltage. a particular pin. These functions ex- with a different PWM duty cycle. RGB
Unlike analogue-to-digital conver- ecute very quickly, so it is reasonable to LEDs contain three LEDs – red, green
sion, where you really have to use an call them in an interrupt routine if you and blue – in a clear plastic shell. By
ADC peripheral to achieve the function- wish, or very frequently in your main varying the duty cycle of the voltage
ality required, it is possible (and indeed loop. driving each LED you can change the
easy) to ‘bit-bash’ a PWM controller. The On the device we are using (the intensity of each LED, and so generate
processor’s PWM peripheral will always PIC18F27J13 if you have forgotten) any colour through the additive mix-
be more efficient – it manages the ‘turn the peripheral can support up to six ture process. The mixing of the light
on/turn off’ of the output pin with no PWM outputs. Our library code will inside the package is not uniform and
software intervention – but it is pos- make all of them available for use, so you will want to ‘tweak’ the drive
sible to control a dozen or more PWM if desired. A single timer is required level to each LED, which is simple
outputs through a bit-bashing approach when one or more PWM channels are with PWM. The effect is not perfect
with minimal software overhead. This enabled, and by using a single timer by any means but it’s fun and the chil-
may be an ideal solution to projects with we force all PWM channels to share dren love them as night lights!
many RC servos, such as animatronics,
because RC servomotors have a relative-
ly slow period (about 2ms, but frequent-
ly quoted as a frequency, 500Hz) and so
controlling dozens of them would not be
difficult.
The standard PWM peripheral within
the microcontroller can independently
control six output pins on our board,
so adding bit-bashed PWM control is
not really necessary. Bit-bashed PWM
control would be more appropriate on
a processor package with more pins,
where the number of I/O pins exceeds
the number of PWM-controlled pins.
The animated dragon’s head shown in
Fig.5, created by my friend Michal Misz-
ta, is typical of these more demanding
applications. It uses six servomotors for
control of the head, but for simple life-
like motion it was possible to meet the
timing and update speed requirements
with just our PIC development board.
You can see more of Michal’s work at:
themodelmaker.net

Using the PWM library


PWM control adds just three functions
to the template code. PWM peripherals Fig.5 Animated dragon’s head, controlled by six servo motors

Everyday Practical Electronics, February 2015 61

Pic n Mix.indd 61 05/12/2014 09:32:53


We’ve assembled a very simple cir- and I simply could not see them! By the
cuit, shown in Fig.3, to test the process time your read this they should have
out. The variable resistor in this case is been delivered to the project backers.
used to set the intensity of the overall I’m hooked on the Kickstarter pro-
1kV* from
tion unde light output. The example code cycles cess now – it’s exhilarating, education-
isola £30.0 r
teste
d 0 round a variety of colours. al and great fun. I’m already thinking
It’s interesting to note the differences in about the next project. If you have any
resistor values for the different coloured suggestions for something you would
OPTO & ISOLATED SPI LEDs; the values shown are to provide like to see created, why not pass by
a current of 10mA through each LED. the EPE chat forum at www.chatzones.
INTERFACE BOARDS Even with the current being the same, the co.uk/discus and leave a comment.
green led was significantly brighter than
the other LEDs and this was compensated Next month
for in the code – halving the duty cycle of We take a vacation from the devel-
the green LED. This is another benefit of opment board next month, when we
RPI16IN

using a microcontroller PWM signal to report on a weekend-long hardware


control the brightness of an LED; you can ‘hackathon’ hosted by University Col-
dynamically ‘calibrate’ the intensity of lege Dublin back in November. It was
the LED, a procedure normally handled a weekend without PICs – a chance
RPI16OUT

by resistors. to play with Arduinos and Raspberry


Pis for a change, with a great bunch of
Kickstarter update enthusiasts and scientists. My team’s
As I write this article, the LPLC TOO goal was to create a drum synthesiser
boards are in my workshop having ar- in a pair of tracksuit bottoms. The re-
rived from the manufacturer in China. sults were hilarious!
The finish and soldering of the tiny Not all of Mike’s technology tinker-
components is excellent. I panicked a ing and discussion makes it to print.
little at first, as I thought half the com- You can follow the rest of it on Twitter
RPIADCISOL

ponents had been left off. Then I re- at @MikeHibbett, and from his blog at
alised that I didn’t have my glasses on, mjhdesigns.com

connect the Raspberry Pi and any


SPI microcontroller safely to the
ONLY

ELECTRONICS
real world!
!
• *1kV isolation certified by UK ISO9001
Accredited Company, but only 24V max £8.99
isolation is specified for safety.

TEACH-IN 5
• 3.5mm standardised industrial plug-in
terminal connectors.
• SPI high speed interface connects to the
Raspberry Pi and any SPI microcontroller,
eg PICs, Atmel, Arduino, etc.
• 26W IDC to directly connect to the GPIO
port on the Raspberry Pi (all versions: V1

ELECTR
or V2, type A, B, B+ and new single card EE M
FR -RO

TEACH-IONNICS
CD

version). Auxiliary SPI 0.1" header to £8.99

connect to other microcontrollers.


• Daisy-chain to connect multiple boards. JUMP ST
ART
5 FROM
THE PUB
LISH ERS OF

• Powered by the Raspberry Pi bus, subject 15 design


dedicated
following
and build
cir
to newcom cuit projects
ers or tho
courses
to connected devices, or by an external colleges in school se
s and

PRACTICA
regulated 5V supply. The techni
ques of pro
LLY SPEA
KI
ject con NG
struction
• Driver & example software written in C. PIC ‘N M
Starting Ix
out with
PIC microc
ontroller

• RPI16IN: 16 channel 5V AC/DC opto


s

isolated inputs with LED channel


FREE
CD-ROM
TE AC H-
TW O TE AC IN 2
indicators, 8 boards allow 128 inputs. Provides a practical
introduction to PIC
microcontrollers
Plus:
MikroElektronika,
Microchip
TH E PR IC H- IN s FO R
E OF ON E
• RPI16OUT: 16 channel 100V at 60mA
CD ROM for Windows
This CD should start
L-Tek PoScope
The fre !
software
e CD
practical -ROM provides
automatically, if not
double-click index.html
int a
microcont roduction to PIC
Electronics Teach-In 2 rollers
opto isolated outputs with LED channel Ltd
© 2013 Wimborne Publishing
The Microchip name and logo, MPLAB, PIC and dsPIC
are
registered trademarks of Microchip Technology Incorporated
in the USA and other countries. © 2013 Microchip Technology
Inc. All rights reserved. Issue 1. MCCD1016-02.09
Plus Mik
roE
Microchip lektronika,
and L-Te
software k PoScop
indicators, 8 boards allow 128 outputs. Teach In
5 Cover.inTeach In 2 - JUL13.indd 1
dd 1
29/07/2013 09:59:25
e

• RPIADCISOL: 4 x isolated and 2 x direct 29/07/2


013 10:00:2

24-bit differential i/p ADC channels, uses


9

MCP3913 ADC with PGA to give a FSD


input range from ±0.01875 to ±0.600V. Available from our Direct Book Service
Additional 8 x opto inputs and outputs
connected to GPIO for other applications.
priced £8.99 including P&P
see our website for prices
www.zeal-electronics.co.uk/rpi

DISTRIBUTORS
Tel: 01202 880299
Zeal Electronics Ltd MADE IN THE UK

www.zeal-electronics.co.uk/rpi
Or order your copy from our online shop at:
ORDERS (10% 3 month discount
offer for readers - quote 'EPE0215')
e: rpi@zeal-electronics.co.uk
www.epemag.com
t: +44 (0) 1246 252 445
© 2014 Dr Stephen Alsop - S&S Systems, England

62 Everyday Practical Electronics, February 2015

Pic n Mix.indd 62 05/12/2014 18:26:22


EPE IS PLEASED TO BE ABLE TO OFFER YOU THESE

ELECTRONICS CD-ROMS
ELECTRONICS ELECTRONICS ELECTRONICS
TEACH-IN 2 TEACH-IN 3 TEACH-IN 4

Electronics Teach-In 3 CD-ROM Electronics Teach-In 4 CD-ROM


Electronics Teach-In 2 CD-ROM
Using PIC Microcontrollers A Practical The three sections of this CD-ROM cover a very wide range of A Broad-Based Introduction to Electronics.
Introduction subjects that will interest everyone involved in electronics, from The Teach-In 4 CD-ROM covers three of the most important
This Teach-In series of articles was originally published hobbyists and students to professionals. The first 80-odd pages electronics units that are currently studied in many schools and
in EPE in 2008 and, following demand from readers, has of Teach-In 3 are dedicated to Circuit Surgery, the regular EPE colleges. These include, Edexcel BTEC level 2 awards and the
now been collected together in the Electronics Teach-In 2 electronics units of the new Diploma in Engineering, Level 2.
clinic dealing with readers’ queries on circuit design problems
CD-ROM. The CD-ROM also contains the full Modern Electronics
The series is aimed at those using PIC microcontrollers – from voltage regulation to using SPICE circuit simulation
software. Manual, worth £29.95. The Manual contains over 800 pages
for the first time. Each part of the series includes breadboard of electronics theory, projects, data, assembly instructions
layouts to aid understanding and a simple programmer The second section – Practically Speaking – covers the
practical aspects of electronics construction. Again, a whole and web links.
project is provided.
range of subjects, from soldering to avoiding problems with A package of exceptional value that will appeal to all those
Also included are 29 PIC N’ Mix articles, also
republished from EPE. These provide a host of practical static electricity and indentifying components, are covered. interested in learning about electronics or brushing up on
programming and interfacing information, mainly for Finally, our collection of Ingenuity Unlimited circuits provides their theory, be they hobbyists, students or professionals.
those that have already got to grips with using PIC over 40 circuit designs submitted by the readers of EPE.
microcontrollers. An extra four part beginners guide to using The CD-ROM also contains the complete Electronics
the C programing language for PIC microcontrollers is also CD-ROM Order code ETI4 CD-ROM £8.99
Teach-In 1 book, which provides a broad-based introduction
included. to electronics in PDF form, plus interactive quizzes to test your
The CD-ROM also contains all of the software for the knowledge, TINA circuit simulation software (a limited version –
ELEC
EE
Teach-In 2 series and PIC N’ Mix articles, plus a range FR OM

TEACHTRONICS
-R
CD
plus a specially written TINA Tutorial).
S
RONIC
of items from Microchip – the manufacturers of the PIC
The Teach-In 1 series covers everything from Electric Current

ELECTH-IN 3
£7.99

-IN 4
microcontrollers. The material has been compiled by £8.99
through to Microprocessors and Microcontrollers and each part

OM
-R E
S OF

CDFRE
LISHER

Wimborne Publishing Ltd. with the assistance of Microchip FRO


M THE
PUB

A BRO
FRO

TEACURGERY
M THE

Technology Inc. includes demonstration circuits to build on breadboards or to INTRO AD-BASED


PUB
LISHER
S OF

simulate on your PC. i An DuCTIO FR


el ev en N TO EL CD EE
i us espa ECrt
in ex pe tu to ria l TRON
-R
WO OM
ICS £29 RTH sig n
CD-ROM Order code ETI2 CD-ROM £9.50 CD-ROM Order code ETI3 CD-ROM £8.50 si m ul ns iv e
IT S it de
CIRCeUho w an d wh y of
.95 cir cu
at io n ci rc ui
so ftw t
ING
SPEAK
ar e
CALLY
i Th c

PRACe TI
ct ro ni
FREE
CD-ROM of ele
qu es
ch ni tru ct ion
TH E M te
ED
O D ER i Th oj ec t co ns
M IT
Y UNLIcir cu it id ea s
pr
N EL EC IT
TR O N EN U
IC S M ING 40 di ffe re nt E -R OM
ANuA FRETE AC H- IN 1 CDIN s FO R
er
Th e es i Ov
wo rk se nt ia l re
L
fo fe s Teach-In 1 TE AC
H- E!
nic
st ud yi r ev er yo re nc e g Ltd 2010
TW O IC E OF ONpr ov ide s
ng el ne ishin

TH E PRfre e CD -RO ro
P ubl
ec tr on or
ne M
du cti
on

o
ic s

ELECTRONICS TEACH-IN BUNDLE –


e int

b
Electr
i

im
Ov er i Th d-b as ed

©W
80 0 PD
a br oa ctr on ics e
-al on e
This CD-ROM requires

i In F pa ge
Adobe® Reader™

-d ep th sta nd
Downloadable Free This software should

s to ele let e rts plu s fre


from autorun,
www.adobe.com if not, open in Windows

th eo ry
Explorer and double-click

co mp
index.pdf

i Ex
BASE MANUAL te ns ive i A ial in 11 pa
an d we da ta ram tut or ar e
www.epemag.co.uk
ta ble Prog
b lin ks s tion so ftw

SPECIAL BUNDLE PRICE £14 FOR PARTS 1, 2 & 3


© Wimborne Publishing
ng
Ltd. 2011
ula
Sim sion) ammi
cuit ited ver Progr n)
A Cir (Lim PIC versio st
Teach

TIN V3 Te
In 4 Cover.

ODE e (Limited es to
indd
1
8
WC izz
FLO ftwar e Qu ge 9
8 So activ owled 010
16:22:2

Inter Your Kn
06/05/2

14/11/2
011
20:33:2
1

1
indd
In 3 Cover.
Teach

1:42
13:2
10
4/20
29/0

CD-ROMs Order codeOrder code ETIBUNDLE


ETI BUN Bundle Price £14.00

1
dd
er.in
Cov
CD

Now you can develop complex electronic and electromechanical systems with ease

Flowcode is one of the world’s most advanced environments for


electronic and electromechanical system development. Engineers
use Flowcode to develop systems for control and measurement
based on microcontrollers, on rugged industrial interfaces or on
Windows compable personal computers

NEW
OUT
NOW

PRICES Prices for each of the items above are: Flowcode 6


(Order form on third page) PICMICRO/AVR/DSPIC/PIC24 & ARM Download only
(UK and EU customers Chip Pack (Hobbyist/Student) . . . . . . . . . . . . . . . . . . . £94.80 inc. VAT
add VAT to ‘plus VAT’ Pro-pack (Schools/HE/FE/Industry) . . . . . . . . . . . . . . . £299.00 plus VAT
prices) Flowkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . £64.90 plus VAT
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 above price.

Everyday Practical Electronics, February 2015 63

CD-ROMs Pages.indd 63 12/12/2014 14:19:12


CIRCUIT WIZARD GCSE
Circuit Wizard is a revolutionary software system that
combines circuit design, PCB design, simulation and ELECTRONICS
CAD/CAM manufacture in one complete package. Suitable for any student who is serious about studying and
Two versions are available, Standard or Professional. who wants to achieve the best grade possible. Each program’s
clear, patient and structured delivery will aid understanding of
By integrating the entire design process, Circuit Wizard provides electronics and assist in developing a confident approach to
you with all the tools necessary to produce an electronics project answering GCSE questions. The CD-ROM will be invaluable to
from start to finish – even including on-screen testing of the PCB anyone studying electronics, not just GCSE students.
prior to construction!
*the Contains comprehensive teaching material to cover
* Circuit diagram design with component library (500 components National Curriculum syllabus
*
Regular exercises
Standard,1500 components Professional) Virtual instruments
* reinforce the teaching points
*
Retains student interest
*
(4 Standard, 7 professional) On-screen animation Interactive
* with high quality animation and graphics
*
Stimulates
circuit diagram simulation
*
True analogue/digital simulation learning through interactive exercises
*
Provides sample
* Simulation of component destruction PCB Layout Interactive
* * examination ques-tions with model solutions Authored
*
*
PCB layout simulation Automatic PCB routing Gerber export
* by practising teachers
*
Covers all UK examination board
* Multi-level zoom (25% to 1000%)
*
Multiple undo and redo
* *
syllabuses Caters for all levels of ability Useful for self-
* *
Copy and paste to other software Multiple document support
tuition 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 £91.90 inc. VAT £12.50 inc. VAT and P&P
Minimum system requirements for these CD-
ROMs: Pentium PC, CD-ROM drive, 32MB
Please send me: CD-ROM ORDER FORM RAM, 10MB hard disk space. Windows 2000/
ME/XP, mouse, sound card, web browser.
Version required:
 Assembly for PICmicro V5  Hobbyist/Student
 ‘C’ for 16 Series PICmicro V5  Professional
 Professional 10 user ORDERING
 Site licence ALL PRICES INCLUDE UK
POSTAGE
 Flowcode for PICmicro V6 (DOWNLOAD ONLY)
 Flowcode for AVR V6 (DOWNLOAD ONLY) Student/Single User/Standard/Hobbyist
 Flowcode for ARM V6 (DOWNLOAD ONLY) Version required: Version price includes postage to most
 Flowcode for dsPIC V6 (DOWNLOAD ONLY)  Chip pack (Hobbyist/Student) countries in the world
 Flowcode for PIC24 V6 (DOWNLOAD ONLY)  Pro pack (Schools/HE/FE/Ind.) EU residents outside the UK add £5 for
 Flowkit
airmail postage per order

Email: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Username: . . . . . . . . . . . . . . . . . . . . . . . . . . Professional, Multiple User and Site
License Versions – overseas readers add
Note: The software on each version is the same, only the licence for use varies.
£5 to the basic price of each order for airmail
postage (do not add VAT unless you live in an
 PICmicro Multiprogrammer Board and Development Board V4 (hardware)
EU (European Union) country, then add VAT
 Teach-In 2 at 20% or provide your official VAT registration
 Circuit Wizard – Standard number).
 Circuit Wizard – Professional  Teach-In 3
 GCSE Electronics  Teach-In 4
 Teach-In Bundle Send your order to:
Full name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Direct Book Service
Wimborne Publishing Ltd
Address: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Lynwood Drive, Merley,
. . . . . . . . . . . . . . . . . . . . . . Post code: . . . . . . . . . . . . . . . . . Tel. No: . . . . . . . . . . . . . . . . . . . Wimborne, Dorset BH21 1UU
To order by phone ring
Signature: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
01202 880299. Fax: 01202 843233
 I enclose cheque/PO in £ sterling payable to WIMBORNE PUBLISHING LTD for £ . . . . . . . . . Goods are normally sent within seven days
 Please charge my Visa/Mastercard/Maestro: £ . . . . . . . . . . E-mail: orders@wimborne.co.uk
Valid From: . . . . . . . . . . Card expiry date: . . . . . . . . . . . . . Online shop:
Card No: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Maestro Issue No. . . . . . . . . .
Card Security Code . . . . . . . . . . (The last 3 digits on or just under the signature strip) www.epemag.com

64 Everyday Practical Electronics, February 2015

CD-ROMs Pages Double page.indd 64 12/12/2014 14:21:07


devices) their SPI interfaces can be connected to
Board specification the RPI16IN’s auxiliary SPI connector (see Fig.2).
To avoid possible damage to the Raspberry Pi’s
Number of inputs 16 optically isolated digital inputs (expandable up to GPIO port, this header should not be used if the
128 inputs by adding up to seven further boards) RPI16IN is already connected to a Raspberry Pi.

Input voltage 5V nominal, but will operate from 3V to 8V AC or DC Documentation and example code
(the input voltage can be easily extended by using The RPI16IN is supplied with an extensive and
additional series resistors – see text) well-illustrated 95-page manual that provides
full information on installing, connecting,
Input current 5mA typical
using and programming the range of boards
Input connectors All inputs use standard 3.5mm industrial plug-in screw available from Zeal Electronics. The manual
terminal connectors arranged in signal/ground pairs assumes that the reader has some familiarity
with the C-programming language and, while C
Voltage isolation 1kV max. (see text) is a somewhat more demanding and prescriptive
Interface Standard Raspberry Pi GPIO for digital I/O and high- programming language than either BASIC
speed SPI interface with Mode 0,0 and 1,1 or Python, a simple web search will provide
newcomers with access to a vast repository of
Dimensions 60 × 135 mm information, tutorials and example code.
Mounting Four 3mm mounting holes at 52 × 127mm The board is most conveniently programmed
using the Raspberry Pi’s own built in C compiler,
Bus connector The Raspberry Pi is connected via a standard 26-way GCC. Leafpad (or an equivalent text editor) will be
GPIO ribbon connector (compatible with all current required to write and edit your C source code, but
versions of the Raspberry Pi, including the Model A, all of the other files needed in order to compile an
B and B+) executable program are supplied with the RPI16IN.
They include all relevant header files, together
Power supply +5V at 50mA (may be powered directly from the
with a sample C program and an associated make
Raspberry Pi +5V bus or from an external +5V
file. The code supplied can be freely used in any
supply – see text)
non-commercial applications, within education,
and for home use as per the standard GNU v2
Listing 1 open-source license. The source code files are
while (1) { // Loop continuously efficient and commented in such a way as to make
for (c=3;c<10;c++) { // Read between 3 to 9 them easy to use and understand, and newcomers
if (RPI16IN_OptoOn(c)) { to C-programming should have little difficulty in
printf("RPI16IN board input %d is ON\n",c); getting to grips with them.
}
} On test
} The RPI16IN was tested with a number of different
sensors with logic outputs (both TTL and MOS-
compatible) and also with switched AC and DC
sources of up to 50V. In addition, I applied test
voltages of 220V AC and 375V DC connected
between the ground of a TTL-compatible square
wave signal and the RPI16IN’s 0V rail (ground on
the Raspberry Pi). At all times the test program
operated flawlessly and I noticed absolutely no
change in the displayed reading while the test
voltage was applied and subsequently removed.
During these tests I found the on-board input
status LEDs useful – they confirmed that the TTL-
compatible input signal was still present.
Developing applications for the RPI16IN is
relatively straightforward, and while a working
knowledge of C would be a distinct advantage,
it is easy to adapt the code supplied with the
RPI16IN and develop simple routines for use in
your own applications. As an example, the brief
code fragment shown in Listing 1 to the left reads
and displays the status of inputs 3 to 9.
The code loops and examines each input in turn,
starting at input 3 and ending at input 9. The if
function returns true if the respective input is found
to be ON and a message is displayed indicating
which input has become active (note that, if the
board is not plugged in, it also returns true). A
much more detailed and fully commented example
can be found in the software folder provided with
the RPI16IN.

Other products from Zeal Electronics


In addition to the RPI16IN, Zeal Electronics also
supplies two other high-specification optically
isolated interface cards designed specifically
for the Raspberry Pi. These boards can all be
‘daisy chained’ onto the Pi’s GPIO bus and can
Fig.2. The RPI16IN board layout be connected to the 26-way GPIO expansion

66 Everyday Practical Electronics, February 2015

PiBrdRev2 (MP 1st, MT & Zeal).indd 66 02/12/2014 09:10:53


Fig.3. Quad optical isolator with status LEDs Fig.5. Configuration links used for address selection

connector in order to provide an extended


digital I/O capability. We will be taking a
detailed look at the companion RPI16OUT
interface board in a future issue of EPE.

Pricing
The RPI16IN costs £30 + VAT (10%
discount for EPE readers). Bearing
in mind the advantages of having a
high degree of input isolation and the
extensive supporting documentation,
this represents excellent value for money.
Fig.4. Daisy-chained RPI16IN boards connected to a Raspberry Pi Model B
Conclusion
Like the RPIADCISOL that we reviewed that your Raspberry Pi has been given the readers with limited C-programming
last December, this board would be a benefit of a very high degree of protection experience should be able to get the board
godsend if you found yourself working in from the ravages of the real world. up and running quickly and easily. The
an environment where a very high degree The RPI16IN has an excellent interface is good value and can be highly
of electrical isolation is needed. But, if specification and is well supported with recommended for use in applications
that’s not the case, the board will still liberally commented source code. Under where input sensors and transducers are
give you the added security of knowing test, the board performed very well and not at true ground potential.

Raspberry Pi User Guide this is likely be an entry-level purchase


and its inclusion in the book is, therefore,
(Third Edition) very timely. The Third Edition also
includes a completely new chapter on
the Raspberry Pi Software Configuration
Mike Tooley reviews a key Raspberry Pi Tool. This chapter should be essential
design book and user guide reading for anyone needing to get the
best of the functionality provided by this
This popular book has been revised, extremely powerful software tool. The
updated and expanded with an extra 50 chapter describes each of the options
or so pages. The book aims to tell you provided by the tool and explains, in
everything you need to know to get your very understandable terms, what happens
Raspberry Pi fully operational. The Third when the choices are implemented.
Edition has 17 chapters (compared with Crucially, the chapter warns about the
13 in the First Edition) and three useful dangers of overclocking and the problems
appendices. The book’s four main parts that might occur if the advice is ignored.
deal with: connecting the board; the At a published price of £14.99 (£16.99
Pi as a media centre and web server; including P&P) from EPE Book Service –
programming with Scratch and Python; see below) this book represents excellent
and expanding the Pi’s I/O capability. value. So, if you are about to take the plunge
With a mixture of hardware- and into the world of Raspberry Pi, then this
software-related content there is invaluable to anyone with no previous book could be a really useful investment.
something in the book for everyone. experience of electronics.
The book has some extremely useful The book’s authors have a considerable
chapters on the mysteries of Linux system pedigree, and both have extensive Book details
administration, software configuration, experience of developing open hardware Raspberry Pi User Guide (Third Edition)
troubleshooting, network configuration projects. Eben Upton is a founder of the by Ben Upton (co-creator of the
and connecting to a wireless network. For Raspberry Pi Foundation and currently Raspberry Pi) and Gareth Halfacre
most of us ‘died-in-the-wool’ electronics serves as the CEO of Raspberry Pi
enthusiasts, these topics must surely (Trading), its commercial arm. Formerly Wiley Publishing | ISBN 978-1-118-
represent the ‘collected black arts’ of a system administrator working in the 92166-1
getting a microcomputer system up and education sector, Gareth Halfacre is a
running! Less useful, at least for regular freelance technology journalist. So, if you The Raspberry Pi User Guide is available
EPE Readers, is the chapter entitled wanted to hear it from the horse’s mouth from EPE Book Services (Reference
‘Learning to Hack Hardware’ which you couldn’t get much closer than this. JW001). Further details can be found
provides a very basic introduction to The Third Edition has been expanded to at: www.epemag.wimborne.co.uk/
electronic components and soldering. include the recently introduced Raspberry acatalog/Raspberry_Pi.html
That said, this particular chapter will be Pi Model B+. For most readers nowadays

Everyday Practical Electronics, February 2015 67

PiBrdRev2 (MP 1st, MT & Zeal).indd 67 02/12/2014 09:11:08


DIRECT BOOK SERVICE
NEW BOOK The books listed have been selected by
Everyday Practical Electronics editorial
The basic soldering guide handbook staff as being of special interest to
LEARN TO SOLDER SUCCESSFULLY!
ALAN WINSTANLEY everyone involved in electronics and
The No.1 resource to learn all the basic aspects of electronics solder- computing. They are supplied by mail
ing by hand.
order direct to your door. Full ordering
With more than 80 high quality colour photographs, this book explains
the correct choice of soldering irons, solder, fluxes and tools. The details are given on the next page.
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 FOR A FULL DESCRIPTION
Hazards and Useful Resources. Plus a Troubleshooting Guide.
Also ideal for those approaching electronics from other industries, the
OF THESE BOOKS AND
Basic Soldering Guide Handbook is the best resource of its type, and
thanks to its excellent colour photography and crystal clear text, the CD-ROMS SEE THE SHOP
art of soldering can now be learned by everyone!
ON OUR WEBSITE
www.epemag.com
86 Pages Order code AW1 £9.99

All prices include


UK postage

MICROPROCESSORS

INTERFACING PIC MICROCONTROLLERS –


SECOND EDITION Martin Bates
298 pages Order code NE48 £34.99
Programming 16-Bit PIC
Microcontrollers in C
– Learning to Fly the PIC24 Lucio Di Jasio
(Application Segments Manager, Microchip, USA)
496 pages +CD-ROM Order code NE45 £38.00

INTRODUCTION TO MICROPROCESSORS AND


MICROCONTROLLERS – SECOND EDITION
John Crisp

THEORY AND PROJECT 222 pages Order code NE31 £29.99


CONSTRUCTION
REFERENCE THE PIC MICROCONTROLLER
YOUR PERSONAL INTRODUCTORY COURSE –
THIRD EDITION. John Morton
IC 555 PROJECTS
E. A. Parr 270 pages Order code NE36 £25.00
PRACTICAL ELECTRONICS HANDBOOK – 167 pages Order code BP44 £5.49
Fifth Edition. Ian Sinclair PIC IN PRACTICE (2nd Edition)
ELECTRONIC PROJECT BUILDING David W. Smith
440 pages Order code NE21 £32.50 FOR BEGINNERS R. A. Penfold
308 pages Order code NE39 £24.99
135 pages Order code BP392 £5.99
PRACTICAL FIBRE-OPTIC PROJECTS MICROCONTROLLER COOKBOOK
R. A. Penfold Mike James
132 pages Order code BP374 £5.45 240 pages Order code NE26 £36.99

S
BOOK ORDERING DETAILS
STARTING ELECTRONICS – 4th Edition TRONIC
G ELEC
Keith Brindley
STARTIN
ley All prices include UK postage. For postage to Europe (air) and the rest of the world (surface) please
h Brind
296 pages Order code NE100 £18.99
By Keit troductmail ion
add £3 per ac tical in
book. Surface can take up to 10 weeks to some countries. For the rest of the world
ELECTRONIC CIRCUITS – FUNDAMENTALS &
d as a highly pr e en gi neers,
APPLICATIONS – Third Edition Mike Tooley is u n ri valle airmail
rs , so add
ft war£4 per book.
s toCD-ROM
th e prices include VAT and/or postage to anywhere in the world. Send
ctronics ginee reader
rting Ele non-ele ctronic en dl intr oduces international sic
d the ba money
StaOrder
ic ia n s, ei th B ri n a ey
PO, cheque,
u se s, an d
order (£ sterling only) made payable to Direct Book Service or
400 pages n
code TF43 £25.99
ts. K their ar
for tech d hobbyis en pes, details,
t tycard Visa,
u Breadbo or Maestro to: DIRECT BOOK SERVICE, WIMBORNE PUBLISHING
its.Mastercard
ts , an m po n ic ci rc
studen
FUNDAMENTAL ELECTRICAL main co
AND ELECTRONIC electron for the
s of the signingLIMITED, 113okLYNWOOD
to-run bo expensive
functionC.R. Robertson
PRINCIPLES – Third Edition g and de
DRIVE, MERLEY, WIMBORNE, DORSET BH21 1UU.
of buildin ch a ready- e, in
pr in ci pl es
th is ve ry m u
ad ily av ai la bl
tr on ic s easily
368 pages Order code e
makTF47 £21.99 of re Books areionormally ec
of el sent within seven days of receipt of order, but please allow 28 days for delivery – more for overseas orders.
layouts
ter, and
the use plorat n t.
perimen actical ex is and availability (see latest issue of Everyday Practical Electronics) before ordering from old lists.
A BEGINNER’S GUIDEex TO TTL DIGITAL
ts m ak es this pr
ICs n ee r
Please obbyprice
and hcheck
en gi n
R.A. Penfold compon al l levels of
en to explai
faildescription
le to somFor etimaesfull to realof these books please see the shop on our website.
accessib do , bu t in ad di ti on
142 pages OUT OF PRINT BP332 re ad er s what to
£5.45 -o n co nfidence Tel 01202
w el as
880299
l the Fax 01202 843233. E-mail: dbs@wimborne.co.uk
oks tell ers hands the principles
as ith
Other bo ves read ented w
rindley gi ght into supplem l
d practica
UNDERSTANDING ELECTRONIC CONTROL
why - B le dg e, and insi an d st eps areOrder from our online shop at: www.epemag.com
pt s an
SYSTEMS know ation s s. Con ce d
Owen Bishop scientific
ll w ri tt en explan bles and graph ic al fo rmulae an
practice
.A
, charts,
ta athemat
s photos £36.99 ly with m
228 pages
numerou
Order code NE35 thorough
ar e ex plained gs . ry,
aspects ic drawin sic theo
schemat s the ba
technical or to ol , explain t to apply th
e
ncept rim en
68 in tr od u ces a co r a si m ple expe th e en d of each
Everyday Practical Electronics, February 2015
apter ions fo s, at
Each ch r instruct d answer
ides clea ctions an
and prov tool, with quiz se
or
concept
chapter.
£20.99
NE????
Books1.indd 68 O rd er code 02/12/2014 11:36:25
ages
COMPUTING AND ROBOTICS
FAULT FINDING
AND TEST NEWNES INTERFACING COMPANION COMPUTING FOR THE OLDER GENERATION
Tony Fischer-Cripps Jim Gatenby
EQUIPMENT 295 pages Order code NE38 £41.00 308 pages Order code BP601 £8.99
ANDROIDS, ROBOTS AND ANIMATRONS
How to Build a Computer Made Easy Second Edition – John Iovine
R.A. Penfold
224 pages Order code MGH1 £16.99
GETTING THE MOST FROM YOUR MULTIMETER 120 pages Order code BP707 £8.49
R. A. Penfold ROBOT BUILDERS COOKBOOK
Easy PC CASE MODDING Owen Bishop
96 pages Order code BP239 £5.49 R.A. Penfold
366 pages Order code NE46 £26.00
PRACTICAL ELECTRONIC FAULT FINDING AND 192 pages + CDROM Order code BP542 £8.99
TROUBLESHOOTING INTRODUCING ROBOTICS WITH LEGO
Robin Pain FREE DOWNLOADS TO PEP-UP AND PROTECT MINDSTORMS
YOUR PC Robert Penfold
274 pages Order code NE22 £41.99 R.A. Penfold 288 pages + Order code BP901 £14.99
128 pages Order code BP722 £7.99
WINDOWS XP EXPLAINED MORE ADVANCED ROBOTICS WITH LEGO
N. Kantaris and P.R.M. Oliver MINDSTORMS – Robert Penfold
298 pages Order code BP902 £14.99
264 pages Order code BP514 £7.99
HOW TO FIX YOUR PC PROBLEMS
The Internet – Tweaks, Tips and Tricks R. A. Penfold
R. A. Penfold
128 pages Order code BP705 £8.49
128 pages Order code BP721 £7.99
Windows 7 – Tweaks, Tips and Tricks
eBAY – Tweaks, Tips and Tricks Andrew Edney
R. A. Penfold
128 pages Order code BP716 £7.50 120 pages Order code BP708 £8.49

AN INTRODUCTION TO eBAY FOR THE OLDER Getting started in Computing for


GENERATION the Older Generation
Cherry Nixon Jim Gatenby

HOW ELECTRONIC THINGS WORK – AND WHAT 120 pages Order code BP709 £8.49 120 pages Order code BP704 £8.49
TO DO WHEN THEY DON’T
Windows 8.1 Explained
Robert Goodman
Noel Kantaris
394 pages Order code MGH3 £21.99 ELECTRONICS 180 Pages Order code BP747 £10.99
OSCILLOSCOPES – FIFTH EDITION
Ian Hickman
TEACH-IN 5
288 pages Order code NE37 £36.99
Electronics Teach-In 5
EE FR
HOW TO USE OSCILLOSCOPES AND OTHER TEST
EQUIPMENT
Jump Start – 15 design and build
circuit projects dedicated to new- CD-ROM RASPBERRY PI
R.A. Penfold
comers or those following courses
104 pages Order code BP267 £5.49 in school and colleges. The projects
are: Moisture Detector, Quiz Machine, Battery Voltage Check-
er, Solar-Powered Charger, Versatile Theft Alarm, Spooky
Circuits, Frost Alarm, Mini Christmas Lights, iPod Speaker, RASPBERRY Pi MANUAL: A practical guide to
Logic Probe, DC Motor Controller, Egg Timer, Signal Injector the revolutionary small computer

AUDIO & VIDEO Probe, Simple Radio Receiver, Temperature Alarm.


PLUS:
176 pages Order code H001 £17.99

RASPBERRY Pi USER-GUIDE – Third Edition


PIC’ N MIX – starting out with PIC Microcontrollers and Prac-
tically Speaking – the techniques of project construction. 262 pages Order code JW001 £16.99
VALVE AMPLIFIERS – Second Edition FREE CD-ROM – The free CD-ROM is the complete PROGRAMMING THE RASPBERRY Pi
Morgan Jones Teach-In 2 book providing a practical introduction to PIC 192 pages Order code MGH4 £10.99
288 pages Order code NE33 £40.99 Microprocessors plus MikroElektronika, Microchip and
L-Tek PoScope software. GETTING STARTED WITH RASPBERRY Pi
BUILDING VALVE AMPLIFIERS
Morgan Jones 160 Pages Order code ETI5 £8.99 164 pages Order code OR01 £11.50

368 pages Order code NE40 £29.00

QUICK GUIDE TO MP3 AND DIGITAL MUSIC BOOK ORDER FORM


Ian Waugh

60 pages Order code PC119 £7.45 Full name: .......................................................................................................................................


MAKING MUSIC WITH YOUR COMPUTER
Stephen Bennett Address: ..........................................................................................................................................

92 pages Order code PC120 £10.95 .........................................................................................................................................................


QUICK GUIDE TO DIGITAL AUDIO RECORDING
Ian Waugh .........................................................................................................................................................
208 pages Order code PC121 £7.95 .............................................. Post code: ........................... Telephone No: ....................................
ELECTRONIC PROJECTS FOR VIDEO
ENTHUSIASTS Signature: ........................................................................................................................................
R.A. Penfold
 I enclose cheque/PO payable to DIRECT BOOK SERVICE for £ ..............................................
109 pages Order code BP356 £5.45
 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, February 2015 69

Books1.indd 69 02/12/2014 11:36:36


PCB SERVICE CHECK US OUT ON THE WEB
PROJECT TITLE ORDER CODE COST

SEPT ’14
Build An AM Radio 06101121 £9.10
LED Ladybird 08103131 £6.94
Lifesaver For Lithium or SLA Batteries 11108131 £5.32
Basic printed circuit boards for most recent EPE constructional projects are Do Not Disturb Phone Timer 12104131 £9.10
available from the PCB Service, see list. These are fabricated in glass fibre,
OCT ’14
and are drilled and roller tinned, but all holes are a standard size. They are SiDRADIO – Main PCB 06109131 £24.75
not silk-screened, nor do they have solder resist. Double-sided boards are – Front & Rear Panel Set 06109132 £19.35
NOT plated through hole and will require ‘vias’ and some components 06109133
soldering to both sides. * NOTE: PCBs from the July 2013 issue with Hi-Fi Stereo Headphone Amplifier – Part 1 01309111 £16.65
eight digit codes have silk screen overlays and, where applicable, are
NOV ’14
double-sided, plated through-hole, with solder masks, they are similar to the GPS Tracker 05112131 £13.15
photos in the relevent project articles.
All prices include VAT and postage and packing. Add £2 per board DEC ’14
for airmail outside of Europe. Remittances should be sent to The PCB PortaPAL-D – Main PCB 01111131
Service, Everyday Practical Electronics, Wimborne Publishing – Microphone Input 01111132 £33.94
Ltd., 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU. – Guitar Input 01111133
Electronic Bellbird 08112131 £11.53
Tel: 01202 880299; Fax 01202 843233; Email: orders@epemag.wimborne.
co.uk. On-line Shop: www.epemag.com. Cheques should be crossed and
JAN ’15
made payable to Everyday Practical Electronics (Payment in £ sterling only). “Tiny Tim” Stereo Amplifier 01309111 £16.65
NOTE: While 95% of our boards are held in stock and are dispatched – Power supply 18110131 £11.80
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. FEB ’15
Audio Delay For PA Systems 01110131 £13.42
Back numbers or photocopies of articles are available if required – £9.33
Teach-In 2015 – Part 1 905
see the Back Issues page for details. WE DO NOT SUPPLY KITS OR
COMPONENTS FOR OUR PROJECTS.
* See NOTE left regarding PCBs with eight digit codes *

PROJECT TITLE ORDER CODE COST 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.
November ’13
Mains Timer For Fans Or Lights 10108121 £9.10
CLASSiC-D Amplifier (inc. 3 Rockby Capacitors)
– Speaker Protector
01108121
01108122
£26.50
£9.10 EPE SOFTWARE
 All software programs for EPE Projects marked with a star, and others
december ’13 previously published can be downloaded free from the Library on our website,
CLASSiC-D Amplifier – Power Supply 01109111 £16.66 accessible via our home page at: www.epemag.com
USB Instrument Interface 24109121 £26.38
– Front Panel 24109122 £28.54
JANUARY ’14
Champion 1109121/2 £8.88
Simple 1.5A Switching Regulator 18102121 £5.53
FEBRUARY ’14 PCB MASTERS
2.5GHz 12-Digit Frequency Counter – Display PCB 04111122 PCB masters for boards published from the March ’06 issue onwards can
£12.88
– Main PCB 04111121 £27.13 also be downloaded from our website (www.epemag.com); go to the
– Front Panel 04111123 £22.38 ‘Library’ section.
High-Energy Electronic Ignition System 05110121 £9.10
Mobile Phone LOUD Ringer! 12110121 £9.10
MARCH ’14
Extremely accurate GPS 1pps Timebase For A
Frequency Counter 04103131 £8.88
EPE PRINTED CIRCUIT BOARD SERVICE
Infrasound Detector – Pre CHAMP PCB 01107941
01102941
£5.54
£5.54
Order Code Project Quantity Price
– CHAMP PCB
Automatic Points Controller (inc. 2 sensor PCBs) 09103132 £13.42 ..............................................
Automatic Points Controller – Frog Relay 09103133 £5.54

APRIL ’14 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


A Capacitor Discharge Unit For Twin-Coil Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Points Motors 09203131 £9.10
Deluxe GPS 1pp Timebase For Frequency ..............................................
Counters 04104131 £16.66
Jacob’s Ladder 05110121 £9.10 Tel. No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAY ’14 I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only) to:
The CLASSiC-D ±35V DC-DC Converter 11104131 £16.66

JUNE ’14 Everyday Practical


Electronics
Mini Audio Mixer 01106131 £22.06
Cranial Electrical Stimulation Unit 99101111 £16.66
Teach-In 2014 – Part 9 Pi Camera Light 905 £13.44

JUly ’14
Verstile 10-Channel Remote Control Receiver 15106131 £16.66
IR to 433MHz UHF Transceiver 15106132 £9.10 Card No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Li’l Pulser Model Train Controller Main PCB 09107134 £16.66
Valid From . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . .
– Front & Rear Panel Set 09107132 £17.20
09107133 Card Security No. . . . . . . . . Maestro Issue No. . . . . . . .
AUG ’14
Active RF Detector Probe For DMMs 04107131 £8.02 Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Infrared To UHF Converter 15107131 £5.86
UHF To Infrared Converter 15107132 £9.64 Note: You can also order PCBs by phone, Fax or Email or via the
Revised 10-Channel Remote Control Receiver 15106133 £16.66
PCBirdies 08104131 £9.64
Shop on our website on a secure server:
USB Port Voltage Checker 24107131 £5.86 http://www.epemag.com
iPod Charger Adaptor 14108131 £5.86

70 Everyday Practical Electronics, February 2015

PCB Service.indd 70 05/12/2014 11:39:04


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.

If you want your advertisements 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. Advertisements, together with remittance, should be sent
to Everyday Practical Electronics Advertisements, 113 Lynwood Drive, Merley,
Wimborne, Dorset, BH21 1UU. Phone: 01202 880299. Fax: 01202 843233. Email:
stewart.kearn@wimborne.co.uk. For rates and information on display and classified
advertising please contact our Advertisement Manager, Stewart Kearn as above.

MISCELLANEOUS
Teach them to solder! Fun, low-cost
kits for youngsters and soldering workshops:
RADIO frequency BOWOOD ELECTRONICS LTD www.pocketmoneytronics.co.uk
equipment Suppliers of Electronic Components
Inductors, coils, trimmers, Place a secure order on our website or call our sales line PIC DEVELOPMENT KITS, DTMF kits and
filters etc All major credit cards accepted
Web: www.bowood-electronics.co.uk modules, CTCSS Encoder and Decoder/
Visit Section 21 Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield, Display kits. Visit www.cstech.co.uk
Derbyshire S40 2QR. Sales: 01246 200222
www.partridgeelectronics.co.uk Send 60p stamp for catalogue
VALVES AND ALLIED COMPONENTS IN
STOCK. Phone for free list. Valves, books
BTEC ELECTRONICS and magazines wanted. Geoff Davies
(Radio), tel. 01788 574774.

ADVERTISE HERE
TECHNICIAN TRAINING
NATIONAL ELECTRONICS FOR SALE: 1. MICROCHIP PICKIT2 Debug-
VCE ADVANCED ICT
FOR JUST £50 +VAT Express Kit; 2. Cathodeon PC mounting crys-
tal oscillator, frequency 6.7584Mhz, 5off; 3.

CALL
HNC AND HND ELECTRONICS
FOUNDATION DEGREES Ditto 4.096Mhz 2off; 4. Hexadecimal single
NVQ ENGINEERING AND IT digit display unit 4 off. Please send offers to

STEWART KEARN
DESIGN AND TECHNOLOGY Mr, W.L. Alton, 163 West Way, Broadstone,
Dorset, BH18 9LQ. Tel. 01202 691849.

ON 01202 880299
LONDON ELECTRONICS COLLEGE
20 PENYWERN ROAD KITS, TOOLS, COMPONENTS. S.A.E.
EARLS COURT, LONDON SW5 9SU Catalogue. SIR-KIT ELECTRONICS, 52
TEL: (020) 7373 8721 STEWART.KEARN@WIMBORNE.CO.UK Severn Road, Clacton, CO15 3RB, http://
www.lec.org.uk sir-kit.webs.com

BETA LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 SPIRATRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4


CISECO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 STEWART OF READING . . . . . . . . . . . . . . . . . . . . . . . . Cover (iii)
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . 59 ZEAL ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . 6
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 ADVERTISEMENT OFFICES:
LABCENTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv) 113 LYNWOOD DRIVE, MERLEY, WIMBORNE,
LASER BUSINESS SYSTEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 DORSET BH21 1UU
L-TEK POSCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 PHONE: 01202 880299
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) FAX: 01202 843233
MIKROELEKTRONIKA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 EMAIL: stewart.kearn@wimborne.co.uk
PEAK ELECTRONIC DESIGN . . . . . . . . . . . . . . . . . . . . Cover (iii) WEB: www.epemag.com
PICO TECHNOLOGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 For editorial address and phone numbers see page 7
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/3
Bowood - Jan 09.indd 1 17/11/2008 16:12:31

Everyday Practical Electronics, February 2015 71

EPE Classifieds_100144WP.indd 71 12/12/2014 14:12:39


Next Month
Stereo Echo & Reverb Unit
Based on the Stereo Audio Delay featured in the February 2015 issue, this modified unit
can be used to provide adjustable echo or reverberation for recording or public address (PA)
work. By using revised software and slight changes to the circuitry, we show how the same
hardware can provide these different functions. We’ll also describe some extra features that
can be useful in either mode.

10A/230V Speed Controller for Universal Motors – Part 1


Most mains motor speed controllers aren’t very good! They often have very poor low-speed
control or won’t allow control right up to the motor’s maximum speed. Here’s one that is
exceptional: a microcontroller-powered full-wave circuit that overcomes both these problems
with smooth control. It’s ideal for electric drills, lawn edgers, circular saws, routers or any other
appliance with universal (ie, ‘brush-type’) motors.

“Tiny Tim” Stereo Amplifier – Part 3


In this final instalment we finish building the Tiny Tim Stereo Amplifier by fitting all the
modules into the case and wiring it up. We’ll also look at testing the unit, its final performance
and some other useful tidbits.

Teach-In 2015
In next month’s Teach-In 2015, we will show you how we used our favourite software applications,
TINA and Circuit Wizard, to design, analyse and construct the pre-amplifier module. We will also
show how the project can be configured for use in a variety of different applications. To help you
with this, we will introduce some powerful virtual instruments.

MARCH ’15 ISSUE ON SALE 5 FEBRUARY 2015


Content may be subject to change

Welcome to JPG Electronics YEARS


Selling Electronics in Chesterfield for 29 Years
Open Monday to Friday 9am to 5:30pm
And Saturday 9:30am to 5pm SPECIAL PRICE
to celebrate our anniversary!
• Aerials, Satellite Dishes & LCD Brackets
• Audio Adaptors, Connectors & Leads
• BT, Broadband, Network & USB Leads
• Computer Memory, Hard Drives & Parts *
• DJ Equipment, Lighting & Supplies € 444,00
• Extensive Electronic Components
- ICs, Project Boxes, Relays & Resistors Complete SMD
• Raspberry Pi & Arduino Products Workstation:
• Replacement Laptop Power Supplies Anniversary
• Batteries, Fuses, Glue, Tools & Lots more... Reflow Kit V3

T: 01246 211 202


E: sales@jpgelectronics.com * including VAT. Shipping
JPG Electronics, Shaw’s Row, costs not included
** compared with purchase
Old Road, Chesterfield, S40 2RB of individual items
W: www.jpgelectronics.com
Shaw’s Row

JPG Electronics
Britannia Maison Mes Amis
Inn
Old Road
Email: sales@pcb-pool.com
ad

Rose & Crown


Johnsons Free phone UK: 0800 389 8560
all Ro

oa d
th R
Old H

or
tsw
Cha
Morrisons

Sparks www.beta-eSTORE.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: subs@epemag.wimborne.co.uk. 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 - FEB 2015.indd 72 02/12/2014 09:16:35


} or components are not connected using the correct rows in the
Upload this sketch to the board, and if everything has uploaded breadboard, they will not work. l
successfully, the LED fades from off to full brightness and then
back off again. If you don’t see any fading, double-check the More on this and other Arduino projects can be found in the
wiring: ‘Arduino For Dummies’ book by John Nussey.

www.electronicsworld.co.uk

IBC.indd 39 15/09/2014 12:21:01


Labcentre AUG 2014.indd 1 12/06/2014 11:40:48