Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Electronics: Practical

Download as pdf or txt
Download as pdf or txt
You are on page 1of 76

Practical

Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Fox Report Audio Out
Using digipots with Hopeless helplines and Universal board for dual
active filters NASty problems audio op amps

WIN! 500W Power


Microchip
dsPIC33EV 5V
amplifier
CAN-LIN
Starter
Kit

Three low-noise
HF-UHF Amplifiers

Building the Capacitor


Discharge Welder

Amplifier
PLUS!
Clipping Indicator
Techno Talk – Robots... down on the farm! Apr 2023 £5.99
04
Cool Beans – Arduino Bootcamp: 7-segment displays
9 772632 573030
Net Work – Smart devices with ‘Plug and Play’ simplicity
www.electronpublishing.com @practicalelec practicalelectronics
High Precision Sensing for Modern Applications
AVR® EA Microcontroller Family
AVR® EA Microcontrollers make it easy to incorporate intelligent control into embedded systems with
analog sensors. The purpose-built MCUs offer a 12-bit differential ADC (with integrated Programmable
Gain Amplifier), 10-bit DAC and an on-chip comparator for incredible flexibility when interfacing with
analog components.

Combined with the powerful AVR CPU and “core independent” digital peripherals, the AVR EA family enables
you to build compact designs with built-in flexibility and lower system cost.

Key Features
• AVR CPU running up to 20 MHz
• 16-64KB Flash Memory with dedicated Read-While-Write (RWW) section
• 2-6KB SRAM
• 512 B EEPROM
• 28 to 64 pins in SPDIP, SSOP, TQFP and VQFN packages
• Standard and Extended temperature grades: -40°C to 85°C and -40°C to 125°C

The Microchip name and logo and the Microchip logo


are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries. All other
trademarks are the property of their registered owners.
© 2023 Microchip Technology Inc. All rights reserved.
microchip.com/AVREA MEC2478A-UK-02-23
Volume 52. No. 4

Practical April 2023


ISSN 2632 573X

Electronics Contents
Projects and Circuits
500W Power Amplifier – Part 1 by John Clarke 17
This large power amplifier produces big, clear sound with low noise and distortion. It
delivers 500W RMS into a 4Ω load and 270W into an 8Ω load.
Capacitor Discharge Welder – Part 2 by Phil Prosser 26
This Capacitor Discharge Welder has been carefully designed to deliver just the right
amount of weld energy. We described how it works last month, so now let’s make it!
Amplifier Clipping Indicator by John Clarke 38
This easy-to-build Amplifier Clipping Indicator is ideal for avoiding unpleasant sounds
and protecting your speakers; its LED shows even the briefest of clipping events.
Three low-noise HF-UHF Amplifiers by Jim Rowe 42
Useful overview of three low-cost HF-UHF amplifier modules offering 20dB of
gain over frequency ranges of 1MHz to 3GHz, 5MHz to 6GHz and 50MHz to 4GHz.

Series, Features and Columns


Techno Talk by Max The Magnificent 8
AI, Robots, Horticulture and Agriculture
The Fox Report by Barry Fox 10
Hopeless helplines and NASty problems
Net Work by Alan Winstanley 12
This month’s Net Work looks at the latest smart device protocol that promises ‘Plug
and Play’ simplicity, radio astronomer Frank Hyde and the ‘Queen of the Skies’.
Circuit Surgery by Ian Bell 46
Electronically controlled resistance – Part 8
Audio Out by Jake Rothman 52
Universal op amp board (optimised for audio electronics) – Part 3 (dual opamp/
adaptor version)
Max’s Cool Beans by Max The Magnificent 59
Arduino Bootcamp – Part 4

Regulars and Services


Wireless for the Warrior 2
Subscribe to Practical Electronics and save money 4
NEW! Practical Electronics back issues DOWNLOADS – 2022 now available! 6
Reader services – Editorial and Advertising Departments 7
Editorial 7
Power!... And more amps… Maximum Max!
Exclusive Microchip reader offer 9
Win a Microchip dsPIC33EV 5V CAN-LIN Starter Kit
PE Teach-In 8 16
PE Teach-In 9 51
Practical Electronics PCB Service 68
PCBs for Practical Electronics projects
Classified ads and Advertiser index 71
Next month! – highlights of our next issue of Practical Electronics 72
Made in the UK.
Written in Britain, Australia,
the US and Ireland.
Read everywhere.
© Electron Publishing Limited 2023
Copyright in all drawings, photographs, articles,
technical designs, software and intellectual property
published in Practical Electronics is fully protected,
and reproduction or imitation in whole or in part are
expressly forbidden.
The May 2023 issue of Practical Electronics will be
published on Thursday, 6 April 2023 – see page 72.

Practical Electronics | April | 2023 1


WIRELESS FOR
THE WARRIOR
by LOUIS MEULSTEE
THE DEFINITIVE TECHNICAL HISTORY OF RADIO
COMMUNICATION EQUIPMENT IN THE BRITISH ARMY

The Wireless for the Warrior books are a the introduction of VHF FM and
source of reference for the history and hermetically sealed equipment.
development of radio communication
equipment used by the British Army Volume 3 covers army receivers from
from the very early days of wireless up 1932 to the late 1960s. The book not
to the 1960s. only describes receivers specifically
designed for the British Army, but also
The books are very detailed and include the Royal Navy and RAF. Also covered:
circuit diagrams, technical specifications special receivers, direction finding
and alignment data, technical receivers, Canadian and Australian
development history, complete station Army receivers, commercial receivers
lists and vehicle fitting instructions. adopted by the Army, and Army Welfare
broadcast receivers.
Volume 1 and Volume 2 cover
transmitters and transceivers used Volume 4 covers clandestine, agent or ‘spy’
between 1932-1948. An era that starts radio equipment, sets which were used by
with positive steps taken to formulate special forces, partisans, resistance, ‘stay
and develop a new series of wireless sets behind’ organisations, Australian Coast
that offered great improvements over Watchers and the diplomatic service. Plus,
obsolete World War I pattern equipment. selected associated power sources, RDF and
The other end of this timeframe saw intercept receivers, bugs and radar beacons.

ORDER YOURS TODAY!


JUST CALL 01202 880299 OR VISIT www.electronpublishing.com
All prices include 20% VAT. Free UK mainland delivery on orders over £60.
Quasar Electronics Limited Postage & Packing Options (Up to 1Kg gross weight): UK Standard 2-5 Day
PO Box 6935, Bishops Stortford Delivery - £4.95 : UK Mainland Next Day Delivery - £9.95 : Please order online
CM23 4WP, United Kingdom if you reside outside the UK (our website will calculate postage for you).
Payment: We accept all major credit/debit cards. Make UK cheques/PO’s
payable to Quasar Electronics Limited and include P&P detailed above.
Tel: 01279 467799 !! Order online for reduced price postage and fast despatch !!
E-mail: sales@quasarelectronics.co.uk Please visit our online shop now for full details of over 1000 electronic kits,
Web: quasarelectronics.co.uk projects, modules and publications. Discounts for bulk quantities.

Solutions for Home, Education & Industry Since 1993

NEW! Mr Robot Kit Digitally Controlled FM Radio Kit


A fun, wearable electronic Build your
gadget that you can pin to your own mod-
clothes. Easy to solder begin- ern, high
ners kit. Two flashing bicolour quality FM
LEDs resemble the eyes. 65 x receiver
40 x 15 mm. CR2032 battery project with
powered (not included). excellent
Order Code: WSL108 - 6.68 sensitivity
powered
LED Electronic Dice Kit by a simple
Still popular! A must-build 9V PP3
soldering kit for all beginners. battery (not included. Auto-seeking button. 4
Dice slowly rolls to stop on a station presets. Volume control. Excellent
Great Brands - Official Main Dealer random number when the learning project for schools and colleges.
push button is released. 9V Order Code: WSAH194 - £20.39
battery (not included). Ideal
Electronic Kits & Modules for educational courses. Wide Audio Analyser Display Kit
We have a massive selection of self- selection of component types.
assembly electronic kits and pre- Order Code: MK109 - £7.08
assembled modules. Please see the full
range on our website or call for details. 3 Channel RGB LED Light Organ Kit

LED Buddy / LED Tester Kit


Hold any
type of
LED to Small, compact LCD display, ideal for panel
the con- mounting. Give your homemade audio gear
tact pads 3 outputs react to different sound frequen- a high-tech look. Upgrade existing equip-
to see it's cies. On-board microphone picks up sur- ment. Provides Peak Power, RMS Power,
polarity, rounding sound or music and drives the low, Mean dB, Peak dB, Linear Audio Spectrum
forward voltage & the recommended series mid & high frequency outputs. Connect 12- And 1/3 Octave Audio Spectrum. Auto /
resistor value. Adjustable target current & 24Vdc RGB or separate colour LED strips or Manual range selection. Peak-hold function.
forward voltage. Great design aid. LEDs (not included). Master & separate Speaker impedance selection.
Order Code: WSMI198 - £16.66 channel sensitivity adjustment. 1.25 A max. Order Code: K8098 - £38.39
per channel. Panel mountable facia 127 x
12-in-1 Solar Hydraulic Construction Kit 44mm. Terminal block or jack power supply Electronic Component Tester Kit
Solar & hydraulic connection. Control knobs included. Build your
powered robot Order Code: WSL209 - £14.10 own versa-
can be trans- tile compo-
formed into twelve Signal Generator Kit nent test-
different animals Sine wave, triangle, square er. Shows
and mechanical wave and integrator value and
robots (monkey, (selectable through jumper) pin layout
T-Rex, scorpion, with 0 - 100Vrms adjustable infor-
excavator, etc). Moves easily. Provides great output level. 1kHz (approx.) mation for
interaction with kids. Teaches the benefit of fixed signal frequency. 9V resistors
alternative energy. Aged 14+. battery (not included). (0.1 Ohm
Order Code: KSR17 - £29.95. Order Code: resolution,
WSAH105 - £6.12 max. 50M Ohm), coils (0.01mH - 20H), ca-
Stereo Ultrasonic Bat Detector Kit pacitors (28p - 100mF), diodes, BJT, JFET,
Bidirectional DC Motor Speed Controller E-IGBT, D-IGBT, E-MOS & D-MOS.
Control the Order Code: WSMI8115 - £44.15
speed of most
common DC LCD Oscilloscope Educational Kit
motors (rated Build your own
up to LCD oscillo-
28Vdc/5A) scope with this
from fully OFF exciting new
to fully ON in kit. Learn how
both direc- to read signals.
Educational & fun kit converts high frequen- tions. Single potentiometer controls speed & See the elec-
cy sounds (20 - 90kHz) normally impercepti- direction. Screw terminal block connectors. tronic signals
ble to humans like bat signals into audible PCB: 90x42mm. Not suitable for use with you learn about
noise. Can also help detect failures in ma- lead acid batteries! displayed on your own LCD oscilloscope.
chines, engines, etc. Stereo feature adds the Kit Order Code: 3166KT - £19.96 Despite the low cost, this oscilloscope kit
possibility to pinpoint the source. Frequency Assembled Order Code: AS3166 - £29.95 has a lot of features found on expensive
range 20-90kHz. 3.5mm jack output. units like signal markers, frequency, dB, true
129x60x40mm. Requires 3x AA batteries RMS readouts and more. A powerful auto-
and stereo headphones (not included). Card Sales setup function will get you going in a flash!
Order Code: WSAK8118 - £20.39 & Enquiries Order Code: WSEDU08 - £48.54
Practical
Electronics
UK readers SAVE £1 on every issue

SUBSCRIBE NOW!
Understanding
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Universal op amp board
Make it with Micromite
Detecting, comparing and storing Simulating digipots
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Further circuits for the
Make it with Micromite
Multiple displays Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Kick Start
BME280 humidity, pressure
Make it with Micromite
PicoMite Fingerprint
Circuit Surgery
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Fox Report
Keeping one step ahead of
Make it with Micromite
Updating the PicoMite
Circuit Surgery
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Fox Report
Hopeless helplines and
Audio Out
Universal board for dual

01202 087631
and using digipots (optimised for audio) fingerprints with a PicoMite in LTspice Universal op amp board for a PicoMite op amp amplifiers and temperature sensor Reader coding linear regulators scammers is a full-time task firmware active filters NASty problems audio op amps

WIN!
Microchip
Remote Control Driveway Gate Cooling Fan Controller & Raspberry Pi WIN! 500W Power
Hummingbird WIN!
Microchip
PIC32CX-BZ2
and WBZ451
Range Extender Remote Control Loudspeaker Protector Pico BackPack Microchip amplifier
dsPIC33EV 5V
Amplifier PIC32MM
Curiosity
Curiosity
Development
CAN-LIN
Development Board
WIN! Starter
Board Microchip Kit
Curiosity
Development WIN!
Board Fingerprint Microchip
WIN! PIC32CM JH01
Three low-noise
Reader Curiosity Pro
Development
Board HF-UHF Amplifiers
Classic LED Fingerprint Capacitor
Metronomes Reader Discharge
Welder Building the Capacitor
35MHz-4.4GHz Discharge Welder
Build a PicoMite Signal Generator LTDZ V5.0
SMD Trainer board budget
fingerprint reader
Spectrum
Analyser
USB Tesla Coil Semaphore
Cable Multi-Channel Solid-State Signal for
Tester Speaker Protector Flame OO-Gauge Amplifier
Discharge Model Railways Clipping Indicator
PLUS! PLUS! PLUS! PLUS! PLUS!
Dec 2022 £5.49 Jan 2023 £5.49 Feb 2023 £5.99 Mar 2023 £5.99 Apr 2023 £5.99
Techno Talk – Giant boost for batteries 12
Techno Talk – Raudive voices revisited 01 Techno Talk – Mushroom magic 02 Techno Talk – It’s handover time 03
Techno Talk – Robots... down on the farm! 04
Cool Beans – LogiSwitch debounce breakout board Cool Beans – Introducing the Arduino Bootcamp Cool Beans – Arduino Bootcamp Cool Beans – Arduino Bootcamp: two LEDs (twice the fun)! Cool Beans – Arduino Bootcamp: 7-segment displays
9 772632 573023 9 772632 573023
Net Work – Energy-saving and monitoring resources Net Work – Smart light bulbs and Alexa’s skills Net Work – Alexa update, plus space and energy news 9 772632 573030
Net Work – Satellites and the roots of the Information Age 9 772632 573030
Net Work – Smart devices with ‘Plug and Play’ simplicity 9 772632 573030

www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics

Take out a one-year subscription and save more than £10 over the year.
Even better – save over £1 per issue if you subscribe for two years – a total saving of £26.

Overseas rates represent exceptional value


You also: • Avoid any cover price increase for the duration of your subscription
• Get your magazine delivered to your door each month
• Guarantee a copy, even if your local newsagent sells out
Order by: • Phone or post with a cheque, postal order or credit card
• Or order online at: www.electronpublishing.com

SUBSCRIPTION ORDER FORM


Practical  6 Months: UK £33.99, Europe £38.99 (Airmail),

Electronics
Rest of the World £46.99 (Airmail)
 1 Year: UK £59.99, Europe £69.99 (Airmail),
Rest of the World £84.99 (Airmail)
 2 Years: UK £114.99, Europe £129.99 (Airmail),
SUBSCRIPTION PRICES Rest of the World £164.99 (Airmail)
Subscriptions for delivery direct to any address in: To: Practical Electronics Subscriptions
PO Box 6337
UK: 6-months £33.99, 12-months £59.99, 24-months £114.99 Bournemouth BH1 9EH
Europe Airmail: 6-months £38.99, 12-months £69.99, United Kingdom
24-months £129.99 Tel: 01202 087631
Email: pesubs@selectps.com
Rest Of The World Airmail: 6-months £46.99, 12-months
£84.99, 24-months £164.99 I enclose payment of £ ..............
(cheque/PO in £ sterling only)
Cheques (in £ sterling only) payable to Practical Electronics payable to Practical Electronics
and sent to: Practical Electronics Subscriptions, PO Box 6337,
 Please charge my Visa/Mastercard
Bournemouth BH1 9EH, United Kingdom
My card number is: .......................................................................
Tel: 01202 087631 Please print clearly, and check that you have the number correct
Email: pesubs@selectps.com
Card Security Code .................. Valid From Date........................
Also via our online shop at: www.electronpublishing.com (The last 3 digits on or just under the signature strip)

Subscriptions start with the next available issue. We accept Card Ex. Date ......................................
MasterCard or Visa.
Name ............................................................................................
(For past issues see the Back Issues page.)
Address ........................................................................................

Post code .................................. Tel. ...........................................


DIGITAL SUBSCRIPTIONS
Electronic subscriptions are available from £29.99 for 12 months, Email ............................................................................................
more details at: www.electronpublishing.com Subscriptions start with the next available issue.

4 Practical Electronics | April | 2023


Subscribe to The VERY BEST
DIY Projects!
DECEMBER 2021
ISSN 1030-2662

9 771030 266001
12

11
$ 50* NZ $1290
INC GST INC GST

SMD
Trainer
and how to solder surfac
e-mount parts
The small but powerful
Hummingbird
Amplifier
Hands-on with the
Raspberry Pi Pico
The smallest Raspberry
Pi yet!

Australia’s top electronics magazine


SILICON CHIP is one of the best DIY electronics magazines in the Published in
world. Each month is filled with a variety of projects that you can build SILICON CHIP
yourself, along with features on a wide range of topics from in-depth
electronics articles to general tech overviews.

Print Combined Online


$100 $110 $50
Big Brother is Tracking
6 months ≈₤54 ≈₤60 ≈₤27 You; November 2021
≈€64 ≈€70 ≈€31
$195 $215 $95
1 year ≈₤105 ≈₤116 ≈₤51
≈€124 ≈€137 ≈€60 USB Cable Tester;
November 2021
$380 $415 $185
2 years ≈₤205 ≈₤224 ≈₤100
≈€242 ≈€264 ≈€118

• Combined subscriptions include both the printed magazine and online access.
• Prices are in Australian dollars (AUD) unless otherwise specified. Hummingbird Amp;
• Prices listed are for everywhere in the world except Australia and New Zealand. December 2021
View siliconchip.com.au/Shop/SubRates for a full list of current prices.
• Price estimates are just that and should only be used as a guide, we primarily
take payment in the form of Australian dollars.

Raspberry Pi Pico;
Try our Online Subscription – now with PDF downloads! December 2021
An online issue is perfect for those who don’t want too much
clutter around the house and is the same price worldwide.
Issues can be viewed online, or downloaded as a PDF.

To start your subscription go to


siliconchip.com.au/Shop/Subscribe
DOWNLOAD YOUR PE/EPE BACK ISSUES
COMPLETE-YEAR collections – all 12 issues for each year!
From just £5.95 each
VOL 28 – January to December 1999 – £5.95 VOL 40 – January to December 2011 – £12.95
VOL 29 – January to December 2000 – £6.95 VOL 41 – January to December 2012 – £14.95
VOL 30 – January to December 2001 – £7.95 VOL 42 – January to December 2013 – £15.95
VOL 31 – January to December 2002 – £7.95 VOL 43 – January to December 2014 – £16.95
VOL 32 – January to December 2003 – £7.95 VOL 44 – January to December 2015 – £17.95
VOL 33 – January to December 2004 – £7.95 VOL 45 – January to December 2016 – £19.95
VOL 34 – January to December 2005 – £8.95 VOL 46 – January to December 2017 – £22.95
VOL 35 – January to December 2006 – £8.95 VOL 47 – January to December 2018 – £27.95
VOL 36 – January to December 2007 – £8.95 VOL 48 – January to December 2019 – £27.95
VOL 37 – January to December 2008 – £8.95 VOL 49 – January to December 2020 – £29.95
VOL 38 – January to December 2009 – £10.95 VOL 50 – January to December 2021 – £32.95
VOL 39 – January to December 2010 – £11.95 VOL 51 – January to December 2022 – £34.95– NEW!

FIVE-YEAR collections – 60 issues!


From just £14.95 each
PE2832: Jan 99 to Dec 03 – £14.95 PE3842: Jan 09 to Dec 13 – £33.95
PE2933: Jan 00 to Dec 04 – £14.95 PE3943: Jan 10 to Dec 14 – £33.95
PE3034: Jan 01 to Dec 05 – £14.95 PE4044: Jan 11 to Dec 15 – £33.95
PE3135: Jan 02 to Dec 06 – £14.95 PE4145: Jan 12 to Dec 16 – £35.95
PE3236: Jan 03 to Dec 07 – £14.95 PE4246: Jan 13 to Dec 17 – £37.95
PE3337: Jan 04 to Dec 08 – £14.95 PE4347: Jan 14 to Dec 18 – £38.95
PE3438: Jan 05 to Dec 09 – £19.95 PE4448: Jan 15 to Dec 19 – £39.95
PE3539: Jan 06 to Dec 10 – £25.95 PE4549: Jan 16 to Dec 20 – £42.95
PE3640: Jan 07 to Dec 11 – £25.95 PE4650: Jan 17 to Dec 21 – £44.95 – NEW!
PE3741: Jan 08 to Dec 12 – £25.95

20 YEARS OF PE! PE2832: Jan 99 to Dec 03


PLUS!
AMAZING BUNDLE OFFER PE3337: Jan 04 to Dec 08
Every issue from 1999 – 2018 PLUS!

240 magazines for just


PE3842: Jan 09 to Dec 13
PLUS!
£59.95 PE3447: Jan 14 to Dec 18

Do you have the 15-year bundle?


Upgrade to the new 20-year bundle for just £14.95 with: PE15to20

Download your collections at: www.electronpublishing.com


Practical
Volume 52. No. 4
April 2023
ISSN 2632 573X

Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619 Power!
Electron Publishing Limited Mob 07973 518682 We have a super, packed Practical Electronics for you this month,
1 Buckingham Road Fax 01202 843233
Brighton Email pe@electronpublishing.com especially if you like to learn about or build amplifiers. But even
East Sussex BN1 3RA Web www.electronpublishing.com if that’s not your primary interest we have plenty of other topics to
Advertisement offices
whet your appetite for electronics.
Practical Electronics Adverts Tel 01273 777619
1 Buckingham Road Mob 07973 518682 Our two big projects are all about the control of electrical power:
Brighton Email pe@electronpublishing.com
East Sussex BN1 3RA the conclusion of the Capacitor Discharge Welder and the start of a
new 500W Power Amplifier. The welder is an unusual, fascinating
Editor Matt Pulzer
General Manager Louisa Pulzer
design – in fact, I’m not sure I’ve ever seen one like this before. It
Digital subscriptions Stewart Kearn Tel 01202 880299 has a thousand and one uses for makers working with lightweight,
Online Editor Alan Winstanley
Web Systems Kris Thain
sheet-metal designs. I’d welcome photos and reports of how you
Publisher Matt Pulzer use yours – do let us know.

Print subscriptions
Practical Electronics Subscriptions
When it comes to headcount, there’s not much doubt we produce
PO Box 6337 a larger number of designs for pre-amplifiers compared to power
Bournemouth BH1 9EH Tel 01202 087631 amps. There are many more opportunities for design variation
United Kingdom Email pesubs@selectps.com
with pre-amplifiers – input choices, tone controls, remote control
Technical enquiries and so on. Plus, pre-amplifiers tend to be cheaper compared to
We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase,
their much larger siblings, so experimentation requires less outlay.
repair or modification of commercial equipment or the incorporation Therefore, when a new power amplifier design does come along,
or modification of designs published in the magazine. We cannot we try to make it something special. This month, we present the
provide data or answer queries on articles or projects that are
more than five years old. first part of our 500W Power Amplifier module – and yes, you read
that correctly, it can output half a kilowatt! But this is no dumb,
Questions about articles or projects should be sent to the editor
by email: pe@electronpublishing.com
muscle-bound over-sized, clunking amp. It’s a sophisticated design
with a whole host of nice features from clever cooling fan control
Projects and circuits to accurate clipping detection. As with so many big projects
All reasonable precautions are taken to ensure that the advice and
data given to readers is reliable. We cannot, however, guarantee these days, it does come with its own set of component sourcing
it and we cannot accept legal responsibility for it. challenges, but we have made an agreement with our partner
A number of projects and circuits published in Practical Electronics
magazine Silicon Chip to provide a kit of all the hard-to-find parts.
employ voltages that can be lethal. You should not build, test,
modify or renovate any item of mains-powered equipment unless And more amps…
you fully understand the safety aspects involved and you use an
RCD (GFCI) adaptor. Following on from the popularity of the Single Op Amp Universal
Board in the December-January issues, Jake Rothman has
Component supplies produced a Dual Op Amp version. It’s a really useful design and
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We development tool for audio and instrumentation tinkerers.
advise readers to check that all parts are still available before
commencing any project in a back-dated issue.
Maximum Max
Advertisements In last month’s editorial we bade farewell to Techno Talk’s Mark
Although the proprietors and staff of Practical Electronics take Nelson, and welcomed Clive ‘Max’ Maxfield to the column. Max
reasonable precautions to protect the interests of readers by
ensuring as far as practicable that advertisements are bona fide, has hit the ground running and I thoroughly enjoyed his first
the magazine and its publishers cannot give any undertakings piece. That’s not Max’s only contribution this month, he’s up to
in respect of statements or claims made by advertisers, whether
these advertisements are printed as part of the magazine, or in Part 4 of his must-read Arduino Bootcamp. If you’ve ever
inserts. The Publishers regret that under no circumstances will wondered why the Arduino has such a strong following but felt
the magazine accept liability for non-receipt of goods ordered, or
for late delivery, or for faults in manufacture.
that digital control was perhaps not for you, then think again and
read Max’s thoroughly engaging pieces.
Transmitters/bugs/telephone equipment
We advise readers that certain items of radio transmitting and
telephone equipment which may be advertised in our pages
Matt Pulzer
cannot be legally used in the UK. Readers should check the law Publisher
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.

Practical Electronics | April | 2023 7


AI, Robots, Horticulture Techno Talk
and Agriculture Max the Magnificent

Can you imagine visiting a farm and seeing autonomous tractors ploughing the fields while AI-powered
drones zip through the sky detecting and addressing problems. Later, in a greenhouse, you find robots
planting vegetables and picking fruits. Far future? It’s already yesterday’s news!

I
’ve been reading science fiction scene with a metaphorical fanfare of autonomous tractor. Now suppose that
ever since I was a young sprog. It’s sarrusophones. Now, AI is everywhere, you have some sort of problem with a
amazing to think how many of the powering everything from chatbots to small portion of the crop located in the
things that once seemed to be the far- drones to robots. centre of the field. Perhaps an outbreak
future ramblings of deranged minds of fungus, for example.
are now part of our everyday lives. But who can replace a man? Your first problem is detecting the out-
I’m thinking of robots, artificial intel- One short story I read when I was a break as soon as it starts before it spreads.
ligence (AI), and AI-powered robots in youngster was, But Who Can Replace Your next problem is that your autono-
horticultural and agricultural settings. a Man? Written by Brian Aldiss, this mous tractors (well, any tractors) are big
When did people start seriously think- post-apocalyptic tale involved a group of and heavy, which means you can’t use
ing about AI? We’ve all heard about robots on a farm. They were complaining them in fields after it’s been raining be-
Charles Babbage and his work on a me- that they couldn’t do their work because cause they will compact and damage the
chanical computer called the Analytical no orders were coming from the city. soil. Even if it’s not been raining, if you
Steam Engine circa the 1840s. We’re also Based on rumours they’d heard about send a tractor in to spray the problem
familiar with his assistant, Ada Lovelace, humans fighting each other to extinction, area, there’s a good chance it will pick
who was the daughter of Lord Byron. the robots decided to go to the city and up fungal spores, which it will subse-
Babbage thought of his invention only take over themselves. While journeying quently disperse as it exits your field.
in terms of performing mathematical to the city, they talk about all of the won- One solution is to use an agricul-
calculations. Lady Ada, by compari- derful things they are going to do, until tural drone. Equipped with AI and
son, realised that the data manipulated they meet a survivor. When he croaks, cameras, a drone can fly over a field
by computers was not obliged to repre- ‘Get me food,’ they all scurry to do his and detect the onset of a problem. It
sent only numerical values, but could bidding. This classic story is available can then deliver whatever is required
instead be employed to represent more for free download: https://bit.ly/3xAHnc4 (fertiliser, insecticide…) in a highly
abstract symbols like musical notes. In focused and cost-effective manner.
her writings, Ada mused that future Autonomous tractors Consider the Hylio Model AG-172,
incarnations of the Analytical Engine, Suppose we wish to spray a field of crops for example. This beauty is the largest
‘might compose elaborate and scientific with pesticide. Just a couple of years ago, spray drone platform on the market!
pieces of music of any degree of com- the way things worked would be that a With a 150-litre capacity and up to 12m
plexity or extent.’ human would drive a tractor pulling a delivery width, the AG-172 can cover
sprayer whose booms extended up to 10m up to 0.4km2/hour – see: www.hyl.io
Not my first rodeo on either side. This would spray every-
This is not my first experience with AI. thing indiscriminately, whether it needed Strawberry-picking robots
Things called ‘expert systems’ origi- it or not. In addition to costing a lot of Recently, I’ve been introduced to all sorts
nated in the 1970s and proliferated in money, the result was vast quantities of cool technologies, such as the EVE
the 1980s. These systems embodied the of pesticide entering the environment. humanoid robot from Halodi Robotics
first serious stab at what we think of as The next step was for companies like (www.halodi.com). These little scamps
AI today. Unlike today’s artificial neu- Blue River Technology to develop AI- are already being used for security and
ral networks (ANNs), however, expert controlled ‘See and Spray’ technology. In health care and supermarket applica-
systems were designed to solve complex this case, the sprayer arms are equipped tions around the world. In the case of
problems by ‘reasoning’ through bodies with cameras that look at the crops and supermarkets, for example, an EVE can
of knowledge mainly using if–then rules. instruct individual spray heads which wander up and down the aisles, report-
By the 1990s, the marketing weenies plants (or parts of plants) to target. More ing spills, detecting misplaced items and
had climbed on the AI bandwagon and details at: https://bit.ly/3IAuHbx returning them to their rightful destina-
were stamping ‘Powered by AI’ labels More recently, John Deere announced tions, and restocking shelves as required.
on anything that moved, much like their a fully autonomous tractor. Using a Of course, robots don’t have to be
counterparts today enthusiastically pro- combination of GPS, satellite imag- shaped like humans. I recently saw a
claim products that have never seen a ery, and six stereo cameras providing video of strawberry picking robots in
hint of a sniff of a whiff of gluten as be- 360° vision, these tractors can run 24 California. Using their cameras, these lit-
ing ‘Gluten Free!’ As a result, by the end hours a day, seven days a week, see: tle scamps can sense texture and colour
of the 1990s, the word ‘AI’ had started to https://bit.ly/3lOHNca and pick just-ripened strawberries on an
leave a bad taste in everyone’s mouths. individual basis: https://bit.ly/3Ia2uak
To be honest, I’d forgotten all about AI Agricultural drones The examples presented here are only
until sometime around the early 2010s Suppose you have a huge field that you’ve the tip of the iceberg, and new develop-
when it suddenly re-emerged on the tilled and seeded and fertilised using your ments are racing our way as we speak.

8 Practical Electronics | April | 2023


Exclusive offer

Win a Microchip dsPIC33EV


5V CAN-LIN Starter Kit
Practical Electronics is offering its readers the chance to win a Microchip’s dsPIC33EV family of digital signal controllers
Microchip dsPIC33EV 5V CAN-LIN Starter Kit (DM330018) – and (DSCs) features a 5V 70 MIPS dsPIC DSC core with enhanced
even if you don’t win, receive a 15%-off voucher, plus on-chip features and is ideal for operating in harsh
free shipping for one of these products. environments such as appliances, and industrial
and automotive applications.
The dsPIC33EV 5V CAN-LIN Starter Kit
features the dsPIC33EV256GM106 digital
Worth The 5V dsPIC33EV family comes with rich
signal controller (DSC) for automotive and
motor control applications. The Starter Kit
$103.49 peripheral integration which includes CAN,
SENT, high-speed PWMs, op amps and error-
contains serial data ports for CAN, LIN and (approx £84.49) correcting code Flash for increased reliability
SENT, a self-contained USB programming/
debug interface, and an expansion footprint for
each and safety. The dsPIC33EV family of devices
enables the design of high-performance,
flexibility in application hardware development. precision motor control systems that are more
energy efficient. They can be used to control BLDC,
This board allows users to explore three popular permanent magnet synchronous, AC induction and
automotive and industrial serial data formats (CAN, LIN and stepper motors. These devices are ideal for high-performance
SENT). The PICkit On-Board (PKOB) USB programmer and general purpose, Touch, advanced sensor interfacing and
debugger allows simple programming without the need for control applications in automotive, industrial, consumer and
an additional hardware interface. No other external tools are medical segments.
required to program the device.

Free-to-enter competition

Microchip DM330018 Microchip dsPIC33EV 5V


CAN-LIN Starter Kit

How to enter December 2022 winner


For your chance to win a Microchip dsPIC33EV 5V Dave Phillips
CAN-LIN Starter Kit or receive a 15%-off voucher,
including free shipping, enter your details in the
online entry form at:
https://page.microchip.com/PE-CAN.html

Closing date He won a PIC32MM


The closing date for this offer is 31 March 2023 Curiosity Development Board

Practical Electronics | April | 2023 9


The Fox Report
Barry Fox’s technology column

Hopeless helplines and NASty problems

I
n today’s endlessly ‘online’, suffers from terrible help support. In Brainless bots
never face-to-face world, too many my experience, NatWest bank’s Arti- The extent to which Help and Feed-
helplines simply don’t help, using ficial Intelligence chatbot Cora is so back services are now under unthink-
faceless staff who work from a script, Unintelligent that it fails to understand ing bot control is nicely evidenced
filibustering with instructions to try even the simplest customer question. by the Microsoft system used to auto-
irrelevant fixes. I previously reported here on a vet comments on this news site:
gung-ho speech made by Dan Fahy https://bit.ly/pe-ape23-msn
Sky’s the limit of Paramount at the annual Digital I innocently tried to add a polite
The last time I looked, Sky’s NowTV TV Group conference, ahead of the comment suggesting that Paramount
had still not solved the problem of Paramount + streaming service launch. should look at the quality of its Cus-
some programmes stopping half-way Essentially, Fahy was promising Nir- tomer Support, and briefly noted my
through or failing to start after the vana, and in good faith I quoted him. experience of 14 emails needed to
adverts which paying subscribers But when I later tried the service for answer a simple question. But all
are forced to watch – an annoyance myself it took a time-wasting trudge useful versions of the comment were
which brings unhappy memories of 14 emails before the Paramount repeatedly rejected with the error
of retail DVDs which could not be Help Line admitted what it should message ‘Does not meet The Microsoft
fast-forwarded through the jungle have been able to advise immediately; Start Community Guidelines.’
of trailers, adverts and promotions although Roku streaming devices work Inquisitive readers may like to ex-
embedded ahead of the programme. with Paramount, the device which periment with their own test messages
For many months, the adverts on Roku makes for Sky is designed not designed to discover whether it is
Sky Now have been in audio-only. to work with Paramount. length, content or key word that makes
The screen only springs into life as I’ve contacted Dan Fahy and Para- the Microsoft computer say, ‘No’.
the adverts end and the programme mount (several times) to report what
begins. I have greatly enjoyed not it’s like for real world customers to NASty
wasting my time on reporting this use Fahy’s help line. But no reply. With expensive hardware, it may not
user-benefit fault. I’ll bet many others With subscription service help lines be easy, or even possible, to get out of
have happily not reported it either. the customer usually has the last word a deal. I’ll recount one story because
Sky’s technical support either does and final sanction – cancel the sub. The the fix I found for myself, with next
not monitor its own NowTV service clear moral of any and all subscription to no useful help from the company,
or is unable to fix faults. All in all, service stories is don’t subscribe to has much broader value.
it’s a win-win for paying customers. any service for a year. Instead, start off IT company Terramaster specialises
opting for a week or month, until you in NAS (Network Attached Storage)
Artificial unintelligence know it works for you. Ideally take up devices. I bought myself the solidly
If only things worked like that with an offer of a free period and really test built, and attractively priced, two-
other services where the customer it before paying a penny. bay F2-210, built round an ARM

e w !
n ze s
1555F IP68 sealed flanged enclosures si
Learn more: hammfg.com/1555f
Contact us to request a free evaluation sample.
uksales@hammfg.com • 01256 812812

10 Practical Electronics | April | 2023


with buggy versions Finally – and with no meaningful
quickly superseded help from Terramaster Help – the
by newer versions penny dropped. Although the NAS
with fresh problems. was checking the HDDs every time
The language barrier it initialised them, and then going
between English and ahead and wiping them clean, the
Chinese repeatedly initialisation software was sniffing the
blocked useful help relics of the previously created NAS
and support. I reg- proprietary file system and performing
ularly took myself only minimal HDD checks. This is
back to brownfield, comparable to the difference between
by re-initialising the a PC performing a quick, simple disc
NAS with the recom- format, and slow, full formatting. The
mended procedure simple disc check misses any embed-
– remove HDDs, run ded HDD corruption (perhaps caused
the maker’s initialisa- by bad shutdown or power glitches)
There’s no such thing as a free NAS.
tion App (TNAS-PC) and thus skips some set-up steps. So,
on a PC and replace any corruption buried deep inside the
processor. I quickly found why it the NAS HDDs to trigger automatic disc structure remains intact.
had been attractively priced; it was download of a bootloader App. The simple (when you twig it) solu-
saddled with an out-dated Operating Obstacles abounded and with no tion is to force the HDDs back to their
System (TOS Ver.4) that relied on real help from Terramaster’s Help, ‘factory fresh’ state, with only unal-
obsolete Adobe Flash. I discovered by tedious trial and er- located space. This has to be done by
Terramaster said it was developing ror a trick which may well be more physically removing the drives from
an updated, Flash-free Operating widely useful. Here it is. the NAS, hooking them direct to a
System, TOS 5. But it would work PC, by SATA lead or USB/HDD con-
only with Terramaster’s newer models The trick nector, and using a software tool such
such as the F2-221, which uses an Thanks to an industry-wide move as Windows Disc Management App.
Intel processor. The company, which from http to https IP addressing, This tool is well hidden behind: My
is based in Shenzhen, Guangdong, browsers now often refuse to load Computer>Manage> Disc Management!
China, and has no visible local West- pages and throw the error message When the HDDS have been totally
ern contact points, offered to send me ‘Not Secure’. This bedevilled the NAS wiped clean, with only unallocated
an F2-221 in return for my taking part set-up process. If you suffer from a space, any disc initialisation pro-
in a Beta test on pre-release TOS 5. It similar affliction, with any procedure, cess starts from greenfield and fully
sounded like a good trade, but I was try clicking on the Error display to re-formats the discs according to its
soon reminded that there really is no ‘Turn on Warnings’. Then try again to own preferred file system.
such thing as a free lunch (or NAS). load the page. After several tries (how
The NAS arrived, without any many tries seems unpredictable) the Main takeaways
HDDs, so I had to go out and buy browser may throw a different error The lesson to be learned here extends
myself two 4TB drives. Various which again warns that the IP is Not far beyond a troublesome Terramaster
download versions of the TOS 5 Secure but now gives the option to NAS. If any HDD is giving inexplicable
Beta followed, thick and fast, and ‘Continue to Site’. and persistent problems, even after
it quickly became apparent that the Yippee. Unfortunately, this was supposedly complete re-initialisation,
way Terramaster (and probably other only the start of the obstacle course. try returning it to factory-fresh state
Chinese companies) run Beta trials The HDDs for any NAS will need with only unallocated space.
is very different from the way other initialisation, which involves down- I tried sharing this fix with Ter-
IT companies run them. Beta testers loading the latest version of the NAS ramaster and got back the ‘strong’
are guinea pigs who devote man days operating system (in this case TOS 5), advice to replace the HDDs – which
to installing new versions, hitting formatting the HDDs, synchronising seems a very costly alternative to
multiple problems, describing them them for RAID working and creating a wiping them clean!
to the Chinese developer ‘Help Line’, secure username and password with I suspect the language barrier is
getting back multiple and often off- online registration. at work here. Who am I to criticise
point suggestions on what to try, and But mysteriously, the result may be Chinese IT Help engineers for having
then describing what did and didn’t a NAS which appears to have been difficulty with my English? I don’t
work, until a new version is offered successfully initialised but is in fact speak a word of Chinese. But, I don’t
and the whole time-consuming cycle unable to store data, even its own try and sell IT into China.
starts again. name and password. Repeating the Apart from the specific tech tip to
Obviously, what’s needed, but is initialisation, any number of times, try returning troublesome HDDs to
missing, is a shared database showing leads to the same failure. factory fresh, unallocated state, the
what issues other testers have already Terramaster Help was so totally much broader lesson to be learned
found. Without information sharing, stumped that they ended up send- is that there are very real pitfalls in
everyone wastes a shedload of time ing me replacement hardware to try buying non-trivial IT direct from a
on describing duplicate discoveries. with my 4TB HDDs. The result was Chinese company, with no UK sub-
Eventually, TOS 5 limped from still the same; failure to retain data sidiary or agency to contact, and thus
Beta to a series of official releases, even after complete re-initialisation. having to rely on Help from China.

Practical Electronics | April | 2023 11


Net Work
Alan Winstanley
This month’s column brings news of the latest smart device protocol that promises ‘Plug and
Play’ simplicity. We rediscover the British radio astronomer Frank Hyde and commemorate the
end of the ‘Queen of the Skies’.

E
ver since the Internet became
the essential ‘fourth utility’,
increasing numbers of households
now use their Internet connection for
managing various Internet of Things
(IoT) gadgets around the home. You can
control any number of IoT electrical
sockets, switches, bulbs, security
cameras, LED lighting strips, sensors
or even a robot vacuum cleaner, pressure
washer or lawnmower, all with a tap
on a smartphone screen. Then of course
there’s turning on your electric vehicle
charger remotely or downloading route
maps onto the car’s satnav. Plus, there
are now myriad options for casting TV,
music and video over the web onto your
devices, which usually involves signing
up to a monthly subscription or two.
The new Matter protocol for smart devices promises simple, touch-free ‘plug & play’
Simple ‘If This Then That’ (IFTTT) simplicity. Amazon’s Alexa range has already signed up.
applets enable certain basic Inter-
net-related actions to be triggered by
all kinds of events, such as notifying the broadband connection, or (say) products. Some smart device stand-
you when your robot lawnmower has Amazon’s cloud? ards include Zigbee and Z-Wave, but
finished, or alerting when the weath- Now, as I write, one Tapo bulb they use different frequencies and are
er is turning for the worse, or when a (lifespan 15,000 hours) has failed not inter-operable.
certain term is ‘tweeted’. More details after 750 hours. I’ve probably been The Zigbee protocol is a wireless
for experimenters, together with both unlucky, but the usual rigmarole fol- device control standard that was de-
free and subscription-based plans are lowed: soft-resetting, hard-resetting, veloped at a time when Wi-Fi and the
available at: www.ifttt.com re-installing, re-booting, checking the likes of Bluetooth were first taking
As regular readers know, I’ve been firmware, trying it in another light fix- shape. It’s getting on for 20 years old
trying out some TP-Link ‘Tapo’ smart ture and so on – complications that a and is used by Bosch and Philips,
devices using a budget-priced Mer- non-technical user might struggle to for example, but Apple (HomeKit),
cusys (also made by TP-Link) whole do. TP-Link’s boilerplate support was Samsung (ARTIK), LG (AllJoyn) and
home mesh system. I found that they polite and responsive, and a free re- others have scrambled to jump onto
mostly work well enough, most of the placement was offered, provided I post the home network bandwagon, each
time, but the system is not entirely the faulty item back at my expense. having their proprietary protocols.
trouble-free. When things go wrong In an effort to simplify the way in
(eg, a smart bulb doesn’t respond), It really Matters which smart devices are designed, sold,
troubleshooting can be frustrating The Internet of Things has grown set up and (at last!) work together, the
and time-consuming. Is the prob- over the years in quite a piecemeal Connectivity Standards Alliance (the
lem caused by the Wi-Fi home mesh way, with manufacturers adopting name behind Zigbee) has now finalised
hubs, the smart bulb itself, the app, their own protocols to suit their smart a new, IP-based open standard protocol
that readers will gradually start to hear
about when they shop for IoT gadgetry.
The new ‘Matter’ protocol will become
the touch-free ‘Plug-and-Play’ stand-
ard for the smart device world, and it’s
intended to unify the installation and
operation of Matter-compatible smart
devices. It’s also designed to enable
manufacturers to turn around new
Matter products more quickly.
Fans of IoT home, garden and office control of smart devices, gadgets and gizmos It’s claimed that Matter will unite
should keep an eye open for the Matter logo. IoT interoperability in the future and

12 Practical Electronics | April | 2023


Matter-compatible smart devices will
become a breeze to set up and manage.
An added benefit is that Matter devic-
es can communicate locally between
themselves, instead of having to reach
out to the cloud before phoning home
with a response (as would, say a Tapo
smart bulb controlled by an Alexa skill
– which might account for some smart
bulb problems that I experienced).
Apart from assuring us of future com-
patibility, we are told there is no need
to throw away old devices as ‘Matter
will play nicely with them’. Nice
words, but time will tell.
Readers might watch out for the new
Matter logo that will gradually appear
on new generation IoT product spec
sheets. Google, Samsung and others are
very slowly rolling out updates and a
handy status list of Matter compatibil-
ity is at: https://bit.ly/pe-apr23-mtr1
(noting that mostly we see ‘announce-
ments’ confirmed rather than ‘ready’
at the present time).
You can learn more about Matter at
the CSA YouTube video at: https://bit.
ly/pe-apr23-mtr2 – commendably, it’s
a very smooth six-minute explanato-
ry video that (remarkably) was filmed
in a single take and without any cuts.
In 1975, PE reader SJ Baxendale eerily
The CSA website also has more at:
foresaw working from home, video
https://bit.ly/pe-apr23-mtr3 conferencing, the world-wide web and
The era of an altogether smarter on-demand TV, while AJ Williams forecast
home is hopefully arriving, thanks to the use of smart meters and RFID tags!
the new Matter protocol which should
finally put paid to all those compatibil-
ity, setup and installation frustrations. of the Advanced Research Projects and technologies, and when the at-
Agency (ARPA) – see https://bit.ly/ traction of putting man on the Moon
Watch this Space pe-apr23-darpa – and accelerated the beckoned brightly.
Periodically, I find myself sifting need to build a ‘self-healing’ robust I was not yet a teenager when Space-
through my old electronics magazines packet network that would form the watch went monthly in Practical
in search of facts or some historical in- basis of the Internet itself. Electronics from the April 1969 issue,
formation. Sometimes my hours-long Net Work’s interest in space pro- following the remarkably successful
searches are fruitless, but nevertheless grammes is mainly focussed on the Apollo 8 manned lunar orbit mission,
I come away having been reminded of idea of Internet connectivity beaming see: https://bit.ly/pe-apr23-nasa1
how things were, many decades ago. I down from a growing constellation NASA astronauts sent a Christmas
never cease to be amazed at the fore- of satellites stationed in LEO (low- message from the Moon, immortal-
sight that some of our readers (and earth orbit). The main contender is ised at https://bit.ly/pe-apr23-nasa2
writers) showed when they predicted of course SpaceX, whose Starlink ser- and that month Frank Hyde described
what the future would likely bring: vice now hosts some 3,300 satellites, NASA’s launch of their largest space
in the January 1975 issue of Practical inter-communicating using lasers. My observatory satellite, the Orbiting As-
Electronics, for example, the advent of computer/IT colleague has been im- tronomical Observatory which was an
‘working from home’ and the world- pressed with the ease of setting up early ‘Hubble’ space telescope. The
wide web, as well as the use of smart Starlink terminals for UK custom- 2-tonne platform bristled with 11 tel-
meters and RFID tags, were correctly ers, but the running costs will deter escopes that would plot the stars, and
forecast, if slightly ahead of their time! mainstream users. You can sign up for it had an expected lifespan of just six
As some long-time readers of early satellite-based Internet connectivity months. Less widely known in the
Practical Electronics magazines may at: starlink.com 1960s was the US Air Force plan to
know, PE originally had a dedicated A glance through our 1960s archives launch a secret manned spy platform
column called Spacewatch which revealed plenty for Spacewatch col- called MOL, which was eventually
brought the latest news of space explo- umnist Frank Wilsenham Hyde to write cancelled due to budget restraints,
ration, radio astronomy, the moonshot about in his occasional column that see: https://bit.ly/pe-apr23-mol
and the ambitions of various space sat- first appeared in 1967. That was at a Weather satellites were already being
ellite programmes. Recall how Russia time when NASA and Russia were launched into sun-stationary orbits
managed in 1957 to beat the US into living through their share of triumphs 50 years ago in 1973, and Pioneer sat-
space by launching Sputnik, an ‘alarm- and tragedies while competing to de- ellites were heading towards Venus
ing’ event that hastened the creation velop space exploration programmes by 1978.

Practical Electronics | April | 2023 13


NASA’s modified Boeing 747 Shuttle Carrier Aircraft with the Space Shuttle Endeavour on top lifts off to begin its ferry flight back to
the Kennedy Space Center in Florida. (Image: NASA Photo)
Frank Hyde was an extraordinary He interviewed astronaut Neil Arm- It’s sometimes humbling and hard
British radio astronomer who has strong in 1970, which can be seen at: to believe that the NASA space shut-
been recognised for constructing the https://youtu.be/EIPn_iuLPA4 tle program first took shape more than
largest amateur radio observatory in Sadly, the brilliant Frank Hyde hit half a century ago, when the idea
1960s Britain. He would work with financial hard times, and his own of building a re-usable space cargo
the Jodrell Bank observatory and it’s radio and TV repair business eventu- plane gained ground. The vehicles,
said his work influenced some of the ally folded. His latter years were not originally called ‘orbiters’, were ex-
experiments on board NASA’s Pioneer exactly covered in glory either, and tensively flight-tested as gliders and
missions. He also knew the popular, his close relationship with the Brit- transported around using ‘shuttle car-
if slightly eccentric, British astrono- ish Astronomical Association (BAA) rier aircraft’ based on two specially
mer Patrick Moore, who became well terminated on a sour note. He died in adapted Boeing 747s. The Enterprise
known for the BBC TV Sky at Night March 1984 aged 75, and the founding was an engine-less prototype orbiter,
series, with Frank Hyde also appearing editor of Practical Electronics, Fred while Columbia was the first orbiter
occasionally on the same programme. Bennett, to whom I owe my electron- that would be launched into space. I
Patrick Moore believed he was possi- ics writing career, wrote an obituary was glued to the TV watching space
bly the only person to have met the in Frank Hyde’s final column, pub- shuttle test flights glide back to earth.
first aviator, Orville Wright, the first lished in the June 1984 edition. Patrick The connection with the Boeing
man in space, Yuri Gagarin, and the Moore then took over the Spacewatch 747 and space shuttle Columbia is
first man on the moon, Neil Armstrong. column. I managed to unearth an particularly poignant this month as
excellent biography of Frank Hyde, the final Boeing 747 ‘Queen of the
originally published in the BAA Jour- Skies’ to be made was delivered on
nal, at: https://bit.ly/pe-apr23-fh1 and 1 February to the airline Atlas Air.
there is a little more local history at: The plane’s flight was commemorated
https://bit.ly/pe-apr23-fh2 when its flight path traced out ‘747’,
If you’re at all interested in astron- as shown in a BBC news report at:
omy, it’s worth considering becoming https://bit.ly/pe-apr23-747
a member of the BAA – more details Another milestone in space explo-
can be found at https://britastro.org ration was passed this month – it’s
exactly 20 years ago in 2003 that the
A 50-year milestone Columbia space shuttle disintegrated
Thumbing through old issues I was during re-entry, leaving no survivors.
struck by the way the Spacewatch This came almost exactly 17 years after
column graphic changed over the the Challenger launch disaster of 1986.
years: a timestamp reflecting the pro- Following the Columbia disaster, space
gress made in man’s desire to reach shuttle missions were suspended for
the stars. The magazine artwork in- two years before resuming, and the
corporated the Lunar Module, before increasingly elderly shuttle fleet was
being updated to show a new type grounded for good in 2011.
of ‘space plane’ atop a Boeing 747 Readers who enjoy looking at the
instead, before changing to a space nuts and bolts of legacy space hard-
vehicle flying solo in space. ware might like to check out some of

14 Practical Electronics | April | 2023


On the rocks: SaxaVord has attracted
attention from Rocket Factory Augsburg
Opening for business: Spaceport Sweden is readying to enter the microsatellite launching (RFA), with one launch pad being snapped
business with an expanded pad located at Esrange, just north of the Arctic Circle. up by the German rocket launcher.

the Owner’s Workshop Manuals pub- but they are touting for business with Yet more competition for micro-
lished by Haynes – famed for their the likes of Amazon’s Kuiper LEO satellite launchers is arriving on the
car repair manuals – which includes satellite program, and they’ve raised market, as Germany’s Rocket Facto-
the Saturn V and Space Shuttle. The over $400m in funding, according to ry Augsburg (RFA) launching service
Apollo 11 Manual includes details of Crunchbase. In January, ABL attempted has signed up with SaxaVord Space-
the first moon landing. You can buy to launch their first RS1 rocket from port for exclusive use of one of its
it via the usual outlets or direct from: Alaska Spaceport, but the rocket fell three proposed launch pads, starting
https://bit.ly/pe-apr23-man back to earth 11 seconds after launch- by the year end. SaxaVord is based in
ing. There is no video, but the PR states the Shetland Islands and is Britain’s
Other space news that a loss of power just after 10 sec- northernmost launching site. More
Still on the subject of space launch- onds shut down all nine engines and info at: https://saxavord.com/r/
es and Boeing 747s, investigations are the rocket fell back down laden with
continuing into finding the reason why 95% of its fuel, creating ‘an energet- Other news
Virgin Orbit’s first satellite launch from ic explosion’. Various storage tanks, My thanks go to reader Stephen Hors-
Britain failed during the ‘Start Me Up’ ground-based equipment and hangars man who followed up on my February
mission (see last month). Virgin Orbit were destroyed, they added. column: ‘I enjoy your columns and
stated that every other satellite they Spaceport Sweden recently cut have just got round to reading your
have launched had reached orbit suc- the ribbon on their new launching Feb 23 column re. backup technolo-
cessfully, and they are pressing on with facility which is now open for busi- gy. I was an IT manager in the early
their next launch from California. Virgin ness. The newly expanded Esrange 2000s and got sick of restoring the
Orbit’s CEO is quoted as saying that the Space Center site on the very north- tape catalogues from tape drives to
mission failure was possibly caused by ernmost edge of Sweden is the first get one file back, and I started using
a dislodged filter shutting off the first such facility on mainland Europe Drive Snapshot to disc image to USB
stage prematurely. More flights from and has previously been used for Hard drives. It was/is written in ma-
Cornwall will follow later this year. launching ‘sounding rockets’ (small- chine code and could be booted from a
California-based ABL Space Sys- er scientific test and measurement floppy, or USB drive these days. Images
tems (https://ablspacesystems.com) rockets), but now has its eyes on the can be mounted, and files dragged and
is a low-profile startup rocket lobber satellite business. More details are at: dropped very easily. I still use it to this
that not many people have heard of, https://sscspace.com/esrange/ day and it’s well worth checking out.

Practical Electronics | April | 2023 15


Regards, Stephen.’ For more details, instead of dismissing the pop-up, we had originally hoped’, Amazon
see: http://drivesnapshot.de actually clicks through to an advert explained. A new ‘Amazon for Char-
Thanks for the suggestion, Stephen. instead, thereby earning the advertis- ities’ store service will allow charities
Another backup product suited to the er some revenue. In a self-defeating to sell wares on Amazon and collect
IT enthusiast that came recommended move to monetise mobile content, 100% of profits, but only a handful
is Casper by Future Systems Solu- increasing numbers of news portal of big names have signed up so far.
tions. Various versions are available, websites are becoming unusable when Amazon raised £18.5m for UK char-
see: www.fssdev.com/products/casper viewed on a small screen – blizzards ities in total, and £382m worldwide.
Users of barcode scanner apps have of pop-ups for privacy, cookies, spe- Long predicted in Net Work, some
been alerted to the risks of scanning cial offers and other opt-ins fill the British consumers were for the first time
untrusted or dodgy QR codes, as they screen, sometimes locking up the offered an energy rebate for reducing
could link through to malware or scam display as well. The problem has consumption in January in order to ease
sites. The problem of ‘QR Jacking’ is reached saturation point. Also likely peak period demand on the energy net-
increasing because ordinary users trust to incur my wrath is the plethora of work. The ‘Demand Flexibility Service’
QR codes implicitly, but they could over-designed websites that have an requires a smart meter and 30-minute
link through to a fraudster’s site that ‘X’ [close] icon sited well out of the reporting of usage, and could result in
may attempt to steal logins, IDs or current field of view, perhaps greyed a rebate of a few pounds.
other sensitive data. In one reported out somewhere in a nearby colour- Australian start-up Recharge In-
case, bogus QR codes were stuck on ed panel so you have to hunt around dustries appears to have rescued the
local authority parking meters encour- for it. This ‘designer-itis’ idiocy only collapsed BritishVolt battery gigafactory
aging drivers to scan them and pay ever makes the web less accessible after the business fell into adminis-
– but the bogus website merely stole and harder to use for everybody, and tration. The giant factory, one of the
their cash instead. Look closely at QR if anything, it turns people off. largest in Britain, will produce batteries
codes stuck on meters, signs or even Amid a slew of redundancies and for electric vehicles and the military.
authentic-looking forms and if you’re cutbacks, and with shoppers starting That’s all for this month’s column.
unsure, treat them as dodgy-looking to re-discover traditional bricks- Readers will find an online summary
file attachments and steer clear. and-mortar High Street retailers, with links on the Net Work blog of our
Amazon Smile closed permanently website at: www.electronpublishing.
Virtually unusable on 20 February. The service donated com – see you next month!
I’m getting increasingly annoyed by a small portion from a buyer’s pur-
pop-ups that appear on my smartphone chase to their appointed charity at
that contain a phoney ‘X’ [close] icon. no extra cost, but the programme had The author can be reached at:
They’re a form of click-bait which,
alan@epemag.net
‘not grown to create the impact that

 Teach-In
8 CD-ROM EE
FR -ROM
CD
ELECTRONICS
£8.99

Exploring the Arduino TEACH-IN 8


FROM THE PUBLISHERS OF
FREE
CD-ROM
SOFTWARE

SERIES
FOR
THE TEACH-IN
8

This CD-ROM version of the exciting and popular Teach-In 8 series INTRODUCING THE ARDUINO
• Hardware – learn about components and circuits

has been designed for electronics enthusiasts who want to get to grips • Programming – powerful integrated development system
• Microcontrollers – understand control operations
• Communications – connect to PCs and other Arduinos

with the inexpensive, immensely popular Arduino microcontroller,


as well as coding enthusiasts who want to explore hardware and
interfacing. Teach-In 8 provides a one-stop source of ideas and
practical information.
The Arduino offers a remarkably effective platform for developing a
huge variety of projects; from operating a set of Christmas tree lights
PLUS...
to remotely controlling a robotic vehicle wirelessly or via the Internet. PIC n’MIX
PICs and the PICkit 3 - A beginners

Teach-In 8 is based around a series of practical projects with plenty of guide. The why and how to build
PIC-based projects

information for customisation. The projects can be combined together


in many different ways in order to build more complex systems
that can be used to solve a wide variety of home automation and
environmental monitoring problems. The series includes topics such
as RF technology, wireless networking and remote web access.
PRICE
£8.99
PLUS: PICs and the PICkit 3 – A beginners guide Includes P&P to UK if
ordered direct from us
The CD-ROM also includes a bonus – an extra 12-part series based around the popular
PIC microcontroller, explaining how to build PIC-based systems.

SOFTWARE
The CD-ROM contains the software for both the Teach-In 8 and PICkit 3 series.

ORDER YOUR COPY TODAY!


JUST CALL 01202 880299 OR VISIT www.epemag.com

16 Practical Electronics | April | 2023


500 POWER
WATTS AMPLIFIER PART 1 BY JOHN CLARKE

This large power amplifier produces big, clear sound with low noise and
distortion. It delivers 500W RMS into a 4Ω load and 270W into an 8Ω load.
It has been designed to be very robust and includes load line protection
for the output transistors and speed-controlled fan cooling that remains
off until needed. With two of these, you could deliver 1000W into a single
8Ω loudspeaker. Good luck finding one that will handle that much power!

Features and Specifications


Output power >500W into 4Ω, >270W into 8Ω – see Fig.3
Frequency response +0, −0.1dB over 20Hz-20kHz (−3dB @ 97kHz) – see Fig.1
Signal-to-noise ratio 112dB with respect to 500W into 4Ω or 250W into 8Ω
Total harmonic distortion (4Ω) <0.005% @ 1kHz for 1.5-350W – see Fig.2 and Fig. 3
Total harmonic distortion (8Ω) <0.025% @ 1kHz for 2-270W – see Fig.2 and Fig.3
Input impedance 10kΩ || 4.7nF
Input sensitivity 1.015V RMS for 500W into 4Ω, 1.055V RMS for 270W into 8Ω
Power supply ±80V nominal from an 800VA 55-0-55V transformer
Quiescent current/power 94mA, 15W
Protection DC fuses, dual-slope thermal tracking, SOA current limiting, output clamping diodes
Other features output offset nulling, blown-fuse indicators, onboard power indicator

Practical Electronics | April | 2023 17


O
ur 500W amplifier is big in several ways. This article will concentrate on describing the Amplifier
It is physically big, requiring two heatsinks stacked Module circuit. Over the next two months, we’ll also give the
end-to-end to keep the temperature under control. It full assembly details for this Module, plus describe a suit-
requires a significant power supply using an 800VA trans- able power supply. Then we’ll show you how to build the
former, and the amplifier and power supply fit into a three Module, power supply, speed-controlled fan cooling (which
rack unit (3RU) rack case, again of rather large dimensions. switches off at light loads), speaker protector and clip detec-
It does deliver a prodigious amount of power. It is ideal tor – all into an aluminium 3RU rack-mountable chassis.
for a public address system where high power can be nec-
essary for sound reinforcement in a large venue. It is also Performance
well-suited to driving inefficient loudspeakers. As noted The main performance parameters are summarised in
above, used in bridge mode, it could deliver just over the specification panel and Fig.1 to Fig.3. These indi-
1000W per channel. Build two pairs for a sound system cate that just because a power amplifier delivers a lot of
so massive, it would need to be plugged into two differ- power, that does not mean that it cannot deliver high per-
ent mains power points! formance as well.
Two of these amplifiers could also be the basis of an For one, the frequency response is ruler-flat from 20Hz
amazing stereo system for use in a large listening room. to 20kHz, a mere 0.1dB down in response at 20kHz.
You might think that a 500W per channel stereo system Power into 4W is a genuine 500W. At typical power lev-
is just too much power. Whether that is true depends on els, between 1.5W and 350W, the total harmonic distortion
what sort of music you like listening to and how efficient plus noise (THD+N) is below 0.007% at 1kHz.
your loudspeakers are. If you like rock music with its For an 8W load, maximum power is around 270W until
somewhat limited dynamic range, then with this ampli- the onset of clipping, with <0.004% THD+N at 1kHz at
fier, you will be able to play it loud. That makes it ideal more typical power levels from 1W to 200W. Under ideal
for music that just has to be loud to be enjoyed. conditions, it’s close to what we’d call ‘CD quality’ at
But please don’t deafen yourself with the extreme sound around 0.002% THD+N.
levels possible with such a large amplifier. You might also As you can see from Fig.2, distortion rises somewhat
need to provide ear protection for your neighbours! with frequency; in fact, it’s considerably lower than quoted
It isn’t just for rockers, either. Classical music requires above at more typical audio frequency ranges for most
lots of power as well. This is not because the performance instruments of around 100-500Hz. Above 1kHz, distor-
is necessarily loud, but it allows the wide dynamic range tion rises modestly, although it’s still relatively low even
in volume of concert hall performances to be replicated. by 10kHz, above which the filters in our test equipment
You want high power without distortion to produce the start attenuating the harmonics.
high peak volume levels of the performance, like massive The THD+N result of under 0.05% for 266W into 3W
kettle drum hits or pipe organ stings, with low noise from shows that the performance of this amplifier does not
the amplifier so that it does not drown out the whisper- degrade significantly even under harsh conditions, driv-
quiet passages. ing lower load impedances than you’d expect to see with
Big power like this does not come easily. The amplifier most high-power 4W loudspeakers.
uses 12 output transistors and they are all mounted on a Perhaps the most important aspect of this high-power
400mm-wide heatsink. The main circuit board is also sig- amplifier is the very good signal-to-noise ratio of 112dB.
nificant at 402 x 124mm. The final installation within the This means that you can get a very high output level,
3U rack enclosure measures 559mm x 432mm x 133.5mm including loud transients, without an annoying back-
and weighs just over 12kg. ground hiss the rest of the time.

Fig.1: the frequency response of this amplifier is Fig.2: THD+N plots for 8W, 4W and 3W loads (two
exceptionally flat, varying by less than 1/20dB between different power levels are shown for 4W) with 20Hz-22kHz
20Hz and 20kHz. The upper −3dB point is just short of bandwidth. You can see that the base distortion largely
100kHz. While the lower −3dB point is not visible in this depends on the load impedance, and it rises steadily with
plot, it’s likely around 1Hz. An active subsonic pre-filter frequency above about 100Hz. The 3W curve is mainly
would be necessary to prevent over-extension if you’re presented as a ‘worst-case scenario’ and shows that it can
using this amp to drive a subwoofer directly. drive very low load impedances without too much difficulty.

18 Practical Electronics | April | 2023


Two of our other projects: the Cooling Fan and
Loudspeaker Protector (February 2023) and
Amplifier Clipping Indicator (this issue) are both
used in the 500W Amplifier.

Circuit details transistors as used in previous amplifiers. However, we


The full circuit diagram is shown in Fig.4. Aside from the would have needed 12 of these transistors per side or 24
large number of output transistors, the circuit is similar in in total to ensure it was robust.
configuration to many of our previous amplifiers, includ- The ThermalTrak transistors have two main advantages:
ing the Ultra-LD Mk.2 (August and September 2010). good linearity and each device includes a separate diode
One major difference is the addition of safe operating for biasing. The diode within the transistor package allows
area (SOA) protection for the output transistors. This the quiescent (idle) current to be controlled accurately with
helps prevent damage to them if the amplifier is short- temperature variations. Unfortunately, the sheer number
circuited or presented with a load that exceeds their safe of these transistors required would make the amplifier
operating area (SOA). This is not just protection against impractically large and expensive, so they are unsuitable.
a short circuit; it works over the entire operating range Instead, we are using MJW21196/MJW21195 transis-
of the amplifier. tors, with only six required per side, thanks to their gen-
We’ve heard it stated in the past that SOA protection erous SOA curves.
degrades the performance of an amplifier, but we tested this The input signal is AC-coupled via a 47μF non-pola-
one with it in-circuit and disconnected, and we couldn’t rised electrolytic and high-frequency stopper compo-
measure any differences. So you don’t need to be con- nents, ferrite bead FB1 and a 22W resistor to the base of
cerned about its impact on sound quality. transistor Q1. The 22W input resistor and 4.7nF capaci-
The supply rails are ±80V or 160V in total. This high tor constitute a low-pass filter with a −6dB/octave roll-
voltage requires rugged transistors, particularly the out- off above 1.5MHz.
put and driver transistors, which need a large SOA. We Q1 is part of the input differential pair of Q1 and Q2,
could have used the NJL3281D/NJL3282D ThermalTrak which are Toshiba 2SA1312 PNP low-noise transistors.

Fig.3: THD+N vs power at 1kHz. Distortion starts to rise above The finished
350W for 4W loads but it delivers 500W without gross distortion Amplifier Module
(and even more on a short-term basis). The performance is shown mounted in its 3RU
pretty good in the middle power range, from a few watts to a case with heatsink and fans. Note
couple of hundred watts; it will give ‘CD quality’ into 8W up to the 120mm PWM fans attached to the
about 200W. Double the numbers on the horizontal axis and heatsink, as anything larger wouldn't fit in the
check the 4W curve for 8W bridged performance! case with its lid on.

Practical Electronics | April | 2023 19


Fig.4: the main difference between this amplifier and our last few designs is the
sheer number of output devices (six pairs) and the addition of SOA/load line
protection circuitry. This protection circuitry is based on voltage references REF1
and REF2, transistors Q25 and Q26 and the associated resistor network, including
500W Amplifier the series of 3.3kW resistors connected to the emitter of each output transistor.

These are responsible for the very low to 0.33Hz. The relatively high gain Diodes D1 and D2 are included
residual noise of the amplifier. helps to keep the amplifier stable across the 2200μF feedback capac-
2SA1312 transistors are becoming and makes the input sensitivity rea- itor as insurance against possible
somewhat challenging to get, but we sonable at around 1V RMS for full- damage if the amplifier suffers a
have secured a good supply for our power output. fault where the output is pulled to
readers as we couldn’t find any suit- the −80V rail. In this circumstance,
able alternatives – see the parts list for Coupling capacitors the capacitor would have a signifi-
our sourcing recommendation. The high-value electrolytic capacitors cant reverse voltage.
(Editor’s note – the practice of man- for the input coupling (47μF) and feed- We use two diodes instead of one to
ufacturers discontinuing components back (2200μF) networks eliminate any ensure that there is no audio distor-
with no direct replacement is very effects of capacitor distortion in the tion due to the non-linear effects of a
frustrating, and it has bitten us sev- audio pass-band and also minimise single diode junction at the maximum
eral times.) the source impedance. feedback signal level of about 1V peak.
The bias resistor for Q1 and the To explain, if we use a smaller input This prevents diode conduction under
series feedback resistor to the base of capacitor at say 2.2μF, its impedance normal operating conditions.
Q2 are set to a relatively low value will be 1447W at 50Hz. This will only
of 10kW to minimise signal source have a small effect on the audio fre- Voltage amplification stage
impedance and thereby reduce ther- quency response but represents a sub- Most of the amplifier’s voltage gain is
mal noise. The 10kW input resistance stantial increase in the source imped- provided by Q9, fed via emitter-fol-
and the 47μF input capacitor provide ance at low frequencies. By contrast, lower Q8 from the collector of Q1.
a low-frequency roll-off at 0.34Hz. the 47μF input capacitor we used has Together, these transistors form the
The amplifier gain is set by the an impedance of only 67.7W at 50Hz. voltage amplification stage (VAS). Q8
ratio of the 10kW and 220W feedback This also means that the voltage buffers the collector of Q1 to minimise
resistors at the base of Q2. This gain across these capacitors is minimal non-linearity.
is 46 times (33dB), while the 2200μF compared to the audio signals, so the Q9 is operated without an emitter
capacitor sets the low-frequency roll- inherent non-linearity of electrolytic resistor to maximise gain and also
off (−3dB point) in the feedback loop capacitors does not matter. maximise its output voltage swing.

20 Practical Electronics | April | 2023


Maximum voltage swing is required Similarly, the collector load for Q9 the waveforms will be a similar shape
from the voltage amplifier stage to is a constant-current load compris- for a sinewave, just time-shifted com-
obtain as much power as we can from ing transistors Q6 and Q7. Interest- pared to each other.
the output stages. ingly, the base bias voltage for con- So, for example, when the positive
stant current source Q5 is also set half of the output stage (Q13 to Q18)
Current mirror by Q6. Q5 is the constant current conducts, the current waveform is
The collector loads of Q1 and Q2 are tail for the input differential pair of effectively the positive half-wave of
NPN transistors Q3 and Q4 which Q1 and Q2, and it sets the current the signal waveform; ie, rectification
operate as a current mirror. Q4 acts through these transistors. LED1 is occurs. Similarly, when the negative
as a sharp cutoff diode, providing connected to this circuit as a ‘free’ half of the output stage (Q19 to Q24)
a voltage at the base of Q3 equal to power-on indicator. conducts, the current is the negative
the base-emitter voltage drop of Q4 The reason for the somewhat com- half-wave of the signal.
(about 0.6V) plus the voltage drop plicated bias network for Q5, Q6 and So we have half-wave rectification
across its 68W emitter resistor. Q7 is to produce a major improvement ripple of the signal superimposed on
If Q2 draws more than its share of in the power supply rejection ratio the supply rails, as well as the 100Hz
emitter current from Q5, the voltage at (PSRR) of the amplifier. Similarly, the ripple from the power supply itself.
the base of Q3 increases, so Q3’s col- PSRR is improved by the bypass filter And while the PSRR of an amplifier
lector current also rises. This forces Q1 network consisting of the 100W 1W can be very high at low frequencies, it
to pull a bit more current and stops Q2 resistor and 470μF 100V capacitor in is always worse at high frequencies. If
from taking more than its fair share. the negative supply rail. these ripple voltages can get into the
As Q3 mirrors the current of Q4, Q1 Why is PSRR so important? Because earlier stages of the amplifier, they will
is provided with a collector load that this amplifier runs in class-AB, it cause distortion, so we need to mini-
has a higher impedance than would pulls large asymmetric currents mise them there.
otherwise be the case. from the positive and negative sup- Diode D3 is included to improve
The result is increased gain and ply rails. The currents are asymmet- recovery performance when the
improved linearity from the differen- ric in the sense that it’s pulling from amplifier is driven into hard clipping.
tial input stage. one or the other at any given time; It makes the recovery from negative

Practical Electronics | April | 2023 21


K
Parts List – 500W Amplifier Module (to build one)
1 double-sided, plated-through PCB coded 01107021, 1 BAV21 250V 250mA low-capacitance switching
402 x 124mm – see bottom of page diode● (D3) [RS 436-7846]
2 200mm-wide heatsinks [Altronics H0536] 2 TL431 programmable voltage references, TO-92
2 small PCB-mounting heatsinks [Jaycar HH8516] (REF1, REF2) [element14 3009364] ●
12 TOP-3 silicone insulating washers 1 5mm green LED (LED1)
3 TO-220 silicone insulating washers 2 5mm red LEDs (LED2, LED3)
2 insulating bushes for the TO-220 transistors Capacitors
4 M205 fuse clips (for F1 and F2) 1 2200μF 16V or low-ESR 10V electrolytic
2 fast-blow ceramic M205 fuses 3 470μF 100V electrolytic [element14 3464457]
(5A for 8W load, 10A for 4W load) (F1, F2) 1 47μF non-polarised (NP/BP) electrolytic
1 ferrite bead (FB1) [Jaycar LF1250, Altronics L5250A] 1 47μF 50V electrolytic
1 6-way PCB-mount screw terminal with barriers 1 47μF 16V electrolytic
(CON2) [Altronics P2106] 1 1μF 100V MKT polyester
1 2-way pluggable vertical terminal socket (CON3) 1 470nF 100V MKT polyester
[Altronics P2572, Jaycar HM3112] 2 100nF 100V MKT polyester
1 2-way pluggable screw terminal (CON3) 1 100nF 250V AC metallised polypropylene X2-class
[Altronics P2512, Jaycar HM3122] 2 10nF 100V MKT polyester
1 vertical PCB mount RCA (phono) socket (CON1) 1 4.7nF MKT polyester
[Altronics P0131] 1 1nF 100V MKT polyester
1 pot core bobbin for L1 1 75pF 200V COG [Mouser 80-C315C750JCG or
[Altronics L5305, Jaycar LF1062] 80-C325C750KAG5TA] ●
1 2m length of 1.25mm enamelled copper wire
Resistors (all 1/4W, 1% thin film unless specified)
(for winding L1)
1 1MW
1 60mm length of 0.7mm diameter tinned copper wire (links)
2 35.7kW ● (or 2 82kW and 2 62kW)
12 M3 x 20mm panhead machine screws
1 33kW
5 M3 x 15mm panhead machine screws
2 33kW 1W 5% (carbon type OK)
6 M3 x 6mm panhead machine screws
1 22kW
17 M3 hex nuts
2 18kW
12 M3 steel washers
5 10kW
6 M3 tapped 9mm spacers
1 10kW 1W 1% thin film [Yageo MFR1WSFTE52-10K] ●
2 transistor clamps [Altronics H7300, Jaycar HH8600]
2 8.2kW
1 15mm length of 25mm diameter heatshrink tubing (for L1)
2 4.7kW
1 60mm length of 1mm heatshrink tubing
14 3.3kW
(for the wire links)
3 2.2kW
1 small tube of heatsink compound/thermal paste
2 470W
Semiconductors 2 220W
6 MJW21196 250V 16A NPN transistors (Q13-Q18) 2 205W ● (or 2 430W and 2 390W)
[element14 1700966] ● 3 100W
6 MJW21195 250V,16A PNP transistors (Q19-Q24) 1 100W 1W 5% (carbon type OK)
[RS 790-5410] ● 2 68W
1 MJE15035G 350V 4A PNP transistor (Q11) 2 68W 5W 5% wirewound (for testing purposes)
[Mouser 863-MJE15035G] ● 8 56W 1W 5% (carbon type OK)
1 MJE15034G 350V 4A NPN transistor (Q12) 2 47W
[Mouser 863-MJE15034G] ● 1 39W
1 FZT558TA 400V 300mA PNP transistor (Q7) 1 22W
[RS 669-7388P] ● 1 10W
1 FZT458TA 400V 300mA NPN transistor (Q9) 12 0.47W 5W 5% wirewound
[RS 669-7326] ● 1 100W single-turn top-adjust trimpot (VR1)
2 2SA1312 120V 100mA low-noise PNP transistors (Q1,Q2) ● [Altronics R2591]
3 BC546 65V 100mA NPN transistors (Q3, Q4, Q25) 1 200W multi-turn top-adjust trimpot (VR2)
1 BC639 80V 500mA NPN transistor (Q8) [Altronics R2372A]
3 BC556 65V 100mA PNP transistors (Q5, Q6, Q26)
1 BD139 80V 1.5A NPN transistor (Q10) The parts list for the power supply, chassis, wiring etc
2 1N4148 75V 200mA signal diodes (D1, D2) will be presented in an upcoming issue.
4 UF4003 200V 1A ultra-fast switching diodes● (D4-D7)

UK readers – kit of parts for the 500W Power Amplifier project means this restriction does not apply. Note: UK
This is a large project with hard-to-find parts, especially the purchasers will be liable for import duty and VAT.
transistors. We normally supply the PCB and then readers
The parts supplied in the kit are detailed on the Silicon
source components using the Parts List. However, for this
Chip website and include: the 500W amplifier module
project constructors should buy kit SC6727 from Silicon
PCB; set of hard-to-get parts for the 500W amplifier
Chip in Australia: www.siliconchip.com.au/Shop/20/6727
module, including most of the semiconductors (marked
The UK’s 2021 VAT/import regulations mean it is not with red dot above); Clipping Indicator PCB; Fan
worthwhile for Silicon Chip to sell to UK customers for Controller/Speaker Protector PCB with programmed
purchases under AUD250 (plus p&p), but the size of this microcontroller, plus three 4-pin PWM fan headers.

22 Practical Electronics | April | 2023


voltage clipping as clean and fast as
that from positive voltage clipping,
improving signal symmetry and
reducing ringing under these con-
ditions. For this role, we are using a
BAV21 diode with a low capacitance
of 2pF at 1MHz so that it doesn’t affect
sound quality.

Feedback and compensation


As mentioned, the feedback compo-
nents at the base of Q2 set the closed-
loop gain of the amplifier. The bottom
end of the feedback network is con-
nected to ground via a 2200μF electro-
lytic capacitor. As this reduces DC gain
to unity, the amplifier output offset volt-
age is dramatically lower than it would
otherwise be (by a factor of 38 times).
The 75pF compensation capacitor
connected between the collector of Q9
and the base of Q8 prevents oscillation
by limiting the slew rate.
The first part of our 500W Amplifier series focuses on describing how the
The 22kW resistor in Q8’s collector Amplifier Module works; assembly and testing will be handled in later parts.
limits the current through Q9 under
fault conditions. Should the amplifier temperature of the output stage transis- Load line protection
output be shorted, it will try to pull tors. As the output transistors become It is crucial to prevent the output tran-
the output either up or down as hard hotter and their base-emitter voltages sistors from operating beyond their
as possible, depending on the output reduce, Q10’s collector-emitter voltage Safe Operating Area (SOA). A high-
offset voltage polarity. should also drop, so that the quiescent power amplifier like this is quite likely
If it tries to pull it up, the output current is the same or less as at lower to see abuse, being driven beyond its
current is inherently limited by the temperatures, averting the danger of limits at times.
15mA current source driving Q9 from thermal runaway. Fig.5 shows plots of collector cur-
Q7. However, if it tries to pull down, rent versus collector-emitter volt-
Q9 is capable of sinking much more Output stage age (VCE) for the six-per-side paral-
current. The 22kW resistor limits Q9’s The amplifier’s output stage is effec- leled MJW21196 and MJW21195 out-
base current and therefore, its collector tively a complementary symmetry put transistors. Of the two types, the
current and dissipation. The 1nF par- emitter follower comprising six NPN MJW21195 (PNP) has the lower SOA
allel capacitor is required to keep its transistors (Q13-18) and six PNP tran- curve, with a lower current allowed
AC collector impedance low, improv- sistors (Q19-Q24). beyond 150V than the complementary
ing stability. Each output power transistor has a MJW21196, so that is the curve we’ve
0.47W emitter resistor, and this more- plotted (the solid green line).
Driver stage or-less forces the output transistors The SOA curve is based on a transis-
The output signal from the volt- to share the load current equally. The tor junction temperature of 150°C and
age amplifier stage Q9 is coupled to emitter resistors also help to stabi- a case temperature of 25°C. That is not
driver transistors Q11 and Q12 via lise the quiescent current to a small a very practical case temperature to
47W resistors. The 47W resistors act degree, and they slightly improve the maintain, especially when the transis-
as stoppers to help prevent parasitic frequency response of the output stage tors are dissipating significant power.
oscillation in the output stage. They by providing current feedback. The actual transistor case tempera-
are also needed to allow the load line ture depends on the dissipation, the
protection circuitry to override the Output offset adjustment thermal resistance of each transistor’s
drive from the VAS. DC offset adjustment is provided by junction to its case (0.7°C/W) and the
Q10 sets the DC voltage between Q7 the 100W trimpot (VR1) between the case-to-ambient thermal resistance,
and Q9, and this determines the quies- emitters of the input pair, Q1 and which is determined by the heatsink
cent current and power in the output Q2. VR1 adjusts the current balance and fans. Having a large heatsink with
stages. It provides a bias of about 2.3V between the input pair, and this causes fan-forced air greatly helps to keep
or so between the bases of Q7 and Q9 the DC offset at the output to vary. The transistor temperatures low.
so that they are always slightly con- trimpot is set to make the DC offset as At elevated temperatures, it is
ducting, even without an input signal. close to 0V as possible; it should be essential to ensure the transistors are
Q10 is a ‘VBE multiplier’, multiply- possible to keep this within ±5mV. not operated beyond their maximum
ing the voltage between its base and This is generally a good figure to power rating, 200W at 25°C, reducing
emitter by the ratio of its collector- keep low, but it’s especially critical if by 1.43W per °C. This power rating
emitter and base-emitter resistances. using the amplifier to drive a step-up curve can further reduce the power
While trimpot VR2 varies the resulting transformer for 100V line operation. they can handle beyond that imposed
collector-emitter voltage, it is actually That’s because the DC resistance of by the SOA secondary breakdown area.
adjusted to set the quiescent current the transformer primary is much lower We plotted both the 25°C case tem-
through the output transistors. than that of a loudspeaker voice coil, perature power curve (green curve)
It is important that the bias voltage so significant DC can otherwise flow and the 50°C case temperature power
produced by Q10 changes with the through it. curve (mauve curve). While a total of

Practical Electronics | April | 2023 23


1200W is available with the six 200W
transistors at 25°C, only 985W is allow-
able with a 50°C case temperature.
The curves assume that each of
the six parallel transistors share the
current equally, a fair assumption
since each has a relatively high-value
emitter resistor. If one of the power
transistors tends to take more than
its share of load current, the voltage
drop across its emitter resistor will
be proportionately higher. This will
throttle the transistor back until its
current comes back into line with
the others. A close-up of the front-end circuitry of the 500W Amplifier Module.
The blue and red curves show resis-
tive 8W and 4W loads (straight lines) impedances are equal. The plots show Calculation of the total impedance
that assume the load is purely resis- the worst-case impedance that occurs can be visualised as the two imped-
tive. In practice, this is not true for over the operating frequency range. ances forming two sides of a right-
loudspeakers as there is a consider- For example, for a 4W speaker, we angle triangle with the hypotenuse
able reactive impedance in a practical plot the curve with a 2.83W resistance length equalling the total, which in
loudspeaker that causes its resistance and 2.83W reactive impedance that’s this case is either 4W or 8W.
to vary with frequency. 90° out of phase with it (‘j’ is like ‘i’ These plots are for a rather severe
The curved blue and red lines show in mathematics, the imaginary unit of amplifier load. Typically, a loud-
the load impedance curves assum- value √-1, forming a complex imped- speaker will not exhibit such a load,
ing that the resistive and reactive ance value). but we want to ensure the amplifier
will not be damaged by designing for
worst-case loads.
Note how the curved impedance
plots encroach quite a bit closer to the
Fig.5: here are the load lines for 4W and 8W operation. The straight
SOA curve than the purely resistive
lines are for resistive loads, while the arched lines are for reactive
4W (2.83W + j × 2.83W) and 8W (5.65W + j × 5.65W) loads. loads. Note also that at elevated tem-
The green and mauve lines are the power limit hyperbola at peratures, the allowable dissipation
25°C and 50°C, while the orange line is the one-second SOA curve comes close to the 4W reactive
curve for six MJW21195/6 power transistors. impedance plot, especially around
The dashed green and mauve lines are the dual-slope load the 60V to 100V VCE region. At case
line protection curves at 25°C and 50°C. temperatures above 50°C, the allow-
able transistor dissipation could pos-
sibly be exceeded.
The two protection lines on the
graph prevent this. The dashed green
line is for a transistor case tempera-
ture of 25°C, while the dashed mauve
line is for a 50°C case temperature.
The lines show the points on the
graph where the output transistors
are protected by reducing their base
drive should the load reach the pro-
tection line.
The protection lines shift closer to
the 4W impedance curve with increas-
ing temperature. Also, the protec-
tion lines have a dual slope with one
straight line between the Y-axis and
the small circle (dot), and the second
line between that dot and the X-axis.
Note that where the line meets the
X-axis, it must be at least the total sup-
ply voltage (160V) to prevent spuri-
ous limiting near zero output current.
As the temperature rises, the volt-
age at the zero current axis reduces.
However, even the 50°C curve meets
the axis above 160V, at 165V. If the
amplifier gets significantly hotter,
perhaps beyond 60°C, the output will
probably get cut off, but maybe that
is not a bad thing, as it’s a sign that
the cooling system might have failed.

24 Practical Electronics | April | 2023


While the difference between the
two slopes in the protection curve
is subtle, this is necessary to more
closely follow the power rating
curve and hence prevent the protec-
tion curve at 50°C and beyond from
encroaching on the 4W impedance
curve at a VCE of around 70V.

SOA protection circuitry


This dual-slope foldback protec-
tion scheme is based on the research
paper titled, The Safe Operating Area
(SOA) Protection of Linear Audio
Power Amplifiers by Michael Kiwa-
nuka, BSc (Hons) Electronic Engi-
neering, which you can view at:
https://bit.ly/pe-apr23-soa
The supply voltage, output volt-
age and current through the output
transistors are all monitored to pro-
vide load-line protection over the
entire voltage and current ranges of
the amplifier.
Transistors Q25 and Q26 and The finished case is simple, with only a power button and clipping indicator
LED on the front and audio input/output and power socket on the back.
diodes D6 and D7 provide the pro-
tection feature. Q25 (NPN) can shut
off the MJW21196 transistors, while to be triggered. Similarly, as the VCE filter, comprising a 2.2μH air-cored
Q26 (PNP) acts on the MJW21195 increases, the trip current decreases, choke, eight paralleled 56W resistors
transistors. The diodes are included forming the ‘curves’ shown in Fig.5. (giving 7W) and a 100nF capacitor.
to prevent Q25 and Q26 from shunt- The dual slope in the protection This output filter effectively isolates
ing the drive signal when they are circuit is created by voltage reference the amplifier from any large capac-
reverse-biased. This happens for REF1 for the positive half of the cir- itive reactance in the load, thereby
every half-cycle of the signal to the cuit and REF2 for the negative half. ensuring unconditional stability.
driver transistors. The bias current to operate these It also helps attenuate any RF signals
The circuits around Q25 and Q26 devices comes via 18kW series resis- picked up by the loudspeaker leads
are essentially identical. tors. REF1 and REF2 are adjustable and stops them from being fed back to
Normally, Q25 and Q26 are biased voltage references, with the 10kW the early stages of the amplifier, where
off and play no part in the amplifi- and 3.3kW resistors setting the volt- they could cause RF breakthrough.
er’s operation. However, if the load age across them to 10V.
encroaches upon the protection The protection circuit relies on the Fuse protection
curve, Q25 and/or Q26 switch on to base-emitter voltage of Q25/Q26 being The output stage supply rails are fed
throttle back drive to the output tran- around 0.6V at 25°C. This voltage via fuses F1 and F2 from the +80V
sistors, limiting the output current drops to 0.55V at 50°C, so these tran- and −80V main power supply rails.
and protecting the transistors. This sistors switch on with less applied These provide ‘last-ditch’ protection
also protects against short circuits. voltage at higher temperatures. This to the amplifier, limiting the damage
Transistor Q25 and Q26 are shifts the protection line downwards in the case of a severe fault. The rec-
mounted on the amplifier’s heatsink with elevated temperature, following ommended fuses are ceramic types.
so that the protection circuit curves the downward movement of the out- LED2 is a blown-fuse indicator for F1
shift with temperature as required. put transistors’ power rating curve. and LED3 for F2. They light up if the
In more detail, the voltage across Diodes D4 and D5 between the fuse is blown as it isn’t always obvi-
each 0.47W output stage emitter resis- amplifier output and supply rails are ous, especially with ceramic types.
tor is monitored via a set of 3.3kW also part of the protection circuitry.
resistors. These voltages are aver- They absorb any large spikes gener- Next month
aged (equivalent to being summed) ated by the loudspeaker’s inductance The following article next month
at the base of Q25 or Q26. Resistive when the protection circuit cuts the will have the full module construc-
dividers formed from pairs of paral- drive to the output transistors. D4 and tion details, including the heatsink
leled resistors provide output volt- D5 are fast recovery diodes, included drilling and instructions for winding
age and supply voltage monitoring to ensure their operation at high fre- inductor L1.
by feeding extra current into these quencies and high power. In the June issue, we’ll show you
summing points. These diodes are even more crit- how to build a suitable power supply,
Effectively, what these dividers ical if driving a line transformer as mount it and the Amplifier Module in
do is make it so that as the volt- its primary inductance is likely to be the chassis, and wire it all up along
age across a set of output resistors significantly higher than any loud- with the Fan Controller, fans, Speaker
reduces (either due to reduced sup- speaker load. Protector and Clipping Indicator.
ply voltage, or the output swinging
closer to that rail), the protection Output RLC filter Reproduced by arrangement with
circuitry becomes more insensitive The remaining circuit feature is the out- SILICON CHIP magazine 2023.
and requires a higher output current put RLC (resistor-inductor-capacitor) www.siliconchip.com.au

Practical Electronics | April | 2023 25


CapaCitor DisCharge
Welder part 2
By phil prosser
This Capacitor Discharge Welder
has been carefully designed to
deliver just the right amount of weld
energy each time. When completed,
it makes a neat package that’s easy
to build and safe to use, so long
as you follow our advice. Having
described how it works last month,
let’s get into making it.

safe and low voltage


T
he Capacitor Discharge Because of this modular approach, Supply Module, one Controller Mod-
Welder comprises three main not only can you scale the system to ule and several Energy Storage Mod-
electronic modules: the Power meet your needs, but the PCB cost is ules (ESMs). Each is built on a differ-
Supply, which is responsible for kept down, and assembly is relatively ent PCB, but all the PCBs are the same
charging the capacitors; the Controller straightforward. You build and test the size at 150 x 42.5mm.
Module, which determines when volt- modules, assemble them into the case, We’ll start with the Power Supply
age is applied across the welding tips; make the welding tips and cables, and Module. Its PCB is coded 29103221 and
and an Energy Storage Module bank, finally wire it all up. Fig.6 is its overlay diagram, which shows
typically made from around 10 mod- the parts’ location mount on the board.
ules joined to a common pair of bus Construction Start by soldering the sole SMD
bars, that hold the storage capacitors The first step in building the CD ceramic capacitor (100nF) near the
and MOSFETs. Welder is to assemble one Power MC34167 regulator IC. Next, mount the

Safety warning
Capacitor Discharge Welding works by generating extremely high current pulses, and
consequently, strong magnetic fields. Do not build or use this project if you have a
pacemaker or similar sensitive device.
This device can generate sparks and heat. Users must wear appropriate personal
protective equipment such as AS/NZS 1337.1, DIN 169 Shade 3 welding glasses.
These provide mechanical and IR/UV protection.

26 Practical Electronics | April | 2023


INA282 current sense amplifier, which
comes in an SMD package (SOIC).
Watch its orientation; make sure its
pin 1 is facing as shown before solder-
ing its pins and then check for bridges.
Follow with all the resistors and
diodes (except for diode D1) with the
diode cathode stripes facing as shown,
leaving the taller shunt resistor until
last. There are three different diode
types used: 1N4148, 1N4004 and zener,
so don’t get them mixed up.
Pay attention to the two different
resistor value options shown in Fig.6.
If you are using a DC power supply that
can deliver at least 5A, you can use the
values shown for 5A charging. Other-
wise, stick with 2A charging.
Now install the sole transistor, facing
as shown, then all the capacitors. Many
of the latter are not polarised, but for
those which are polarised (the electro-
lytics), these all have the longer pos-
itive leads going to pads on the right-
hand side. Note that while you could
use 100nF MKT capacitors, multi-layer
ceramics will also work. The CD Welder fully assembled
Next come the connectors. There and ready to be used in anger (or
calmly, it’s up to you).
are two screw terminals, a polarised
header for the Charge LED and a 2x5
pin header to connect to the other Control board plug on the other so that it can plug
modules. Make sure the screw termi- The Controller PCB is coded 29103222 into CON8. Alternatively, you could
nal wire entries face the outside of the – refer to Fig.7. install a jumper on CON8 and fix this
board as shown. Start by installing all the resistors setting, as we did.
Mount the 6TQ045-M3 diode (D1) and diodes, checking that the diodes
close to the board by pushing it down are the right way around, then follow Energy Storage Modules
fully before soldering and trimming its with the four NE555 timer chips, with The ESM boards are coded 29103223,
leads. Also install the fuse clips (with their pin 1 notches/dots to the left. and the components are mounted as
the tabs towards the outside) and fuse, Next, fit all the ceramic MKT and shown in Fig.8 and Fig.9. Presumably
the LM358 op amp and 10kW linear electrolytic capacitors. Note the two by now you will have figured out how
voltage control potentiometer. different types of 1µF capacitor as well many you need to build and obtained
Now fit the LM7815 regulator and as different types of 220nF capacitors. the appropriate capacitors. Generally,
attach a small flag heatsink using a The electrolytics have longer leads for there are three caps per board, but
machine screw, shakeproof washer and their positive connections, and these some of the recommended configura-
nut as it gets warm during operation. go to the side marked + on the overlay. tions use two. In this case, fit the two
Mount the 220µH toroidal induc- Now mount the small transistor, fac- closest to the headers.
tor on the board, then finally the ing as shown, followed by the 100kW Start by fitting the surface-mount
MC34167 switch-mode regulator. linear potentiometer and the 2-way and resistors and capacitors on the under-
This also requires a small heatsink 10-way headers. side of the PCB. Make sure the 100nF
such as Altronics H0625 with an If you want to make the controller capacitors are mounted either side of
insulating bush and silicone pad. switchable for two pulses, make a cable the MOSFET driver (IC8). Then solder
Hold this all together using an M3 with a switch at one end and a header that driver IC, being careful not to short
machine screw, star washer and nut
in the usual manner.

Fig.6: the Power Supply board is built mainly using through-hole components. The only SMDs are IC2 and one 100nF
capacitor near IC1, so fit those first. Watch the orientations of IC2, IC3, the diodes, electrolytic capacitors, REG1 and the
terminal blocks.

Practical Electronics | April | 2023 27


any leads (you can clean up any bridges n

Check pin 1 of CON2, the ‘Power Out’ (eg, stripped from spare ribbon cable)
using flux paste and solder wick). connector, is between 2V and 25V. and solder/crimp this to a polarised
Next, mount the RFN20NS flyback Also check that this can be controlled header plug which connects to CON5.
diode (D9) to the PCB. It’s easier if you using potentiometer VR1. If this is not Connect your oscilloscope to the
spread a thin layer of flux paste on all working, check the following: output pins (pin 3) of IC4, IC5 and
its pads first. You will want to get a n

Check the INA282 (IC2) is in the right IC7. If you only have a single-chan-
good lot of heat into the PCB; start by way around. nel or two-channel oscilloscope, start
tacking down the two anode leads, then n

Verify that the 82W test resistor is with IC4 and/or IC5 and then test the
solder the main body of the diode. This connected correctly (eg, measure rest later.
will not dissipate much power, but you the resistance across the terminals Press the footswitch and check that
want a good solder joint here. of CON2). IC4 generates a pulse of about 0.1ms
Then fit the two MOSFETs, keeping n

Check the MC34167 is oscillating; and IC5 generates a pulse of about
their leads short. Their metal tabs face there will be a 72kHz signal at pin 2. 5ms. Then check that IC7 generates a
away from the capacitors, and their n

Check D1 is in the right way around. pulse length that is controllable using
source and drain pins connect to cop- n

Check that the feedback pin 1 of the potentiometer VR2, from about 0.2ms
per fills. These junctions will see very MC34167 has about 5.05V on it. If to over 20ms.
high current pulses, so be sure to get not, verify that the LM358 op amp is Next, check that the trigger output
these properly hot when soldering to operating properly. Check the volt- on pin 9 of the 2x5 header (or pin 3 of
form nice-looking fillets. ages at its power and ground pins IC7) contains one or two pulses as set
Now mount the 2x5 control header, (pins 8 and 1, respectively), and ver- by the switch/jumper on CON8.
the terminal block and finally, the ify that the voltage at input pin 5 is If there are problems, check the
capacitors. Make sure their positive an appropriate fraction of the output power supply to the NE555 ICs; there
sides go in the direction indicated, and voltage, and that pin 7 is an amplified should be 15V between pins 8 and 1
the negative side stripes face away from version of this. Check that diodes D4 of each chip.
this. (Reversed capacitors will likely and D5 are in the right way around. Verify that the trigger input (pin 2)
lead to an earth-shattering kaboom!) n

Assuming that’s working, put an is being pulled low on IC4, and that
Repeat the ESM assembly until you ammeter on its 10A range across the the inputs to subsequent NE555s have
have enough of these modules, and are terminals of CON2 and check that the a short negative-going pulse (this is
ready to test them and then proceed to current is close to the expected 2A capacitively coupled, so look closely
final assembly. or 5A. If not, look for problems near with the scope).
the INA282 (IC2). Check also that the diodes are in the
Testing right way around, that Q2 is indeed a
Start by testing the modules individu- Testing the Controller PNP device and that the INHIBIT line
ally, beginning with the Power Supply To test the controller, ideally, you will is not pulled low by the Power Supply.
Module. To start with, solder the leads need an oscilloscope. Make a 10-way Make sure that you are happy with
of one LED to a length of light-duty IDC lead to connect the Power Sup- the operation of the power supply and
twin-lead cable (eg, two wires stripped ply module to the Controller module, controller modules before assembling
from ribbon cable) and solder/crimp ensuring that pin 1 connects to pin 1. the CD Welder.
the other end into a pluggable header, Apply power and check the following:
and connect this to CON3, the charge n
Each NE555 chip has 15V at its pin 8. Testing the ESMs
LED header. Make sure the anode (lon- n
The base of transistor Q1 is pulled up To check out each Energy Storage
ger LED lead) goes to pin 1. to within 0.6V of the 15V rail, turn- Module, connect one at a time to the
Connect the Power Supply board to ing it off. Controller and Charger modules. Use
a DC voltage source of at least 25V – n
The TRIGGER output of IC6 (pin 3) medium-duty hookup wire (0.7mm
up to 35V is acceptable. Make sure you is close to 0V diameter copper/21AWG) such as
have set the current limit (2A or 5A) The next part is easiest if you assem- Altronics Cat W2261/W2260 or Jay-
to match your supply. Set your DVM ble the foot pedal trigger by extending car Cat WH3045/WH3046 to connect
to a DC volts range and put a 5W 82W the existing lead with the two-metre the Power Out connector on the Power
resistor across CON2, ‘Power Output’. length of microphone cable. You can Supply board (CON2) to the Power
Apply power and check the following: simply snip off the screen wires as they In connector (CON10) on the Energy
n
The output of the LM7815 is 15V are not required; just use the two inter- Store Module.
±0.25V. Its output is accessible on nal conductors, then add liberal layers You’ll also need a control ribbon
pin 2 of CON4, the control header. of heatshrink to protect the junction. cable with three 10-way IDC line sock-
If not, check that it is the right way Now temporarily soldering a length ets to connect the Power Supply, Con-
around and there are no shorts. of light-duty twin lead to the other end troller board and ESM together.

Fig.7: the Control board uses all through-hole parts and assembly is straightforward. Again, be careful to orient the
diodes, electrolytic capacitors and ICs as shown.

28 Practical Electronics | April | 2023


Mount the modules to the bus
bar using 6mm-long M3 panhead
machine screws and star washers.
As you assemble the modules to the
The bus bar bus bars, put 10mm M3 spacers, 6mm
layout for 10 screws and star washers between the
modules, holes at the far end of the PCBs from
five on the bus bars, securing pairs of boards
either side to one another, stabilising the assem-
of the bus bly. Now tighten the screws well; these
bars. The will be carrying a lot of current.
holes at the You may find another way to lay
end of the bus
the modules out. While it might be
bars are drilled
and tapped for possible to run machine screws right
M4 to secure the through holes drilled in the bus bars
welding leads; all the other with nuts on the other side, we feel
holes are tapped M3. We have allowed that using threaded holes into the
enough length for the bus bars to protrude through aluminium is important to keep the
holes in the case, as we do not want any joints in these. resistance down. So we strongly
advise you to take the time to tap all
Connect an 82W 5W test resistor Check all cabling and the orientation these holes (aluminium is soft, and
across the ESM output using 16mm of the components. you can use a through-tap, so it isn’t
M3 machine screws, nuts and wash- Now swap that 82W resistor for a that hard).
ers. Apply power and check that the 0.27W 5W resistor. Repeat the test, and
capacitors charge and that you can check that everything works. At 25V, Cabling
adjust the voltage using VR1. this will pass close to 100A. We have endeavoured to keep cabling
The ‘Output -VE’ connection (right You will see the Charge LED come as simple as possible. Fig.10 shows
near the edge of the PCB) will be on, especially with long pulse lengths the complete layout. We extended
pulled up to the same voltage by that and high voltages. You will also feel the ribbon and power cable from the
82W resistor. Use an oscilloscope to the 0.27W resistor get hot after several Energy Store Modules to the Charge
watch the voltage on that pin and shots. This is normal. You may blow and Control modules to suit our
press the trigger. There is a conve- this resistor, so if things look odd, application. Try not to make these
nient ground on the power header; we check it is still 0.27W. more than a few hundred millime-
also added a ground via on the board tres long.
between the capacitors. Bus bars Fig.12 shows the layout we came up
After triggering, you should be able Once you’ve tested the modules, it’s with to fit the modules inside the case
to see the output pulled to ground in time to put them all together. and how most of the wiring is routed.
two pulses (with dual pulse mode We have laid these boards out such Note that it is necessary to cut the
on). If this does not work, use the that they can mount back-to-back Inhibit line in the ribbon cable so that
scope to check for the trigger pulses on two 260mm-long bus bars. Fig.11 it only connects the Controller and
on the control cable, check the +15V shows where to drill holes to allow M3 Power Supply modules. This is to pre-
rail and check that the TC1427 is screws to hold pairs of modules into vent it from acting as an antenna and
sending pulses to the MOSFET gates. common tapped holes. picking up pulses during welding.

Fig.8 and Fig.9:


the ESM has
parts on both
sides, although
the underside
components
are limited to a
few SMDs near
the MOSFETs;
mainly, the
driver IC and
associated
passives. Fit all
those first, then
flip the board
over and solder
the remaining
components to
the top side. Be
very careful with
the electrolytic
capacitor
and MOSFET
orientations, as
putting them in
backwards would
be disastrous.

Practical Electronics | April | 2023 29


You will need to make up a cable for While the ribbon cable connects the approach we could come up with that
the enable switch similar to the one you output of the Power Supply to each was not big or too expensive. By paral-
made before for the charge LED. This ESM, it is only rated at 1A per wire. leling the ribbon cable, this heavy-duty
will plug into CON6 at one end and go Two wires are used for power, plus two wire will take the majority of current
to the terminals of a toggle switch at for ground, limiting charging over the during charging.
the other end. ribbon cable to 2A. Make sure you connect each termi-
Now would also be a good time So if you want to charge at 5A, nal with the same polarity; otherwise,
to disconnect the twin lead from the the IDC headers will ‘need help’. it will short out the Power Supply!
microphone cable in the footswitch This is the purpose of CON10 on To make the ribbon cable that con-
assembly you made earlier, and instead each ESM. You will need to wire all nects all the modules, assuming you
solder these to the microphone plug those headers back to CON2 on the have 10 ESMs, you need 12 10-way
(footswitch end) and socket specified Power Supply using 5A-rated cable. IDC line sockets and about 610mm of
in the parts list last month. We used Altronics Cat W2109 for 10-way ribbon cable, depending on
In our application, we started with this job. Don’t use thicker wire if you your layout. Fit the IDC connectors as
300mm lengths of twin lead and can avoid it, as you need to fit two shown in Fig.13.
trimmed them as required. pairs into each terminal block to dai- We crimped the IDC connectors
The power connection from the sy-chain them. using a vice, although specific tools
chassis DC socket to the Power Supply For this, we cut nine 60mm lengths are also available to do this. If using
board needs to be made using 5A-rated plus one long length, stripped and a vice, add timber blocks or sheets on
cable; the type of wire used earlier to tinned these together and used a bit either side of the connectors to avoid
connect the Power Supply to the ESMs of heatshrink to make it look tidy. marring them and make it less likely
should be suitable. This is a little fiddly, but it is the best to break them when squeezed.

30 Practical Electronics | April | 2023


As mentioned earlier, we recom- non-insulated eyelet lugs at the Welder handles and drilled and tapped an
mend cutting the inhibit line (wire 7) end (Jaycar PT4936 is equivalent). M3 threaded hole to hold the tip. We
between the Power Supply Module and We were lucky and our crimping tool tried various copper welding tips and
the Energy Store modules. Simply slit worked on these, but we know from feel that 3mm rod filed to a point are
the ribbon cable on either side of wire experience that you can also solder them pretty good.
7 over a 10mm section and snip a 5mm (with a powerful iron) or crimp them in We used small pieces of 20mm heat-
section from it using side cutters. This a vice. We put 10mm heatshrink over the shrink to ensure the positive and nega-
reduces the chance of EMI pick-up. terminal to ensure nothing shorts to it. tive welding cables remain close to one
We made the welding handles and another along the bulk of their length.
Cables tips as shown in Fig.14. These com- We do this to minimise the inductance
The footswitch is our solution to keep- prise a 100mm length of 10mm square in the welding cable loop. If there is a
ing your hands free to weld, but you aluminium bar with a 4mm hole drilled lot of inductance, then there will be
could place a button on one of the in the end to accept the welding cable. so much energy stored in this that the
leads as an alternative if you wish. Two additional M4 threaded holes MOSFETs have to switch, and the fly-
The recommended footswitch comes allow 6mm-long M4 screws to fix the back diodes need to redirect.
with a short lead, hence our earlier welding cable.
instructions to extend it with about After making them, we applied Case assembly
two metres of microphone cable. Now 13mm heatshrink tubing over the han- There are many ways of packaging
that you’ve added the plug and socket, dles to make them easier to hold and this up. By avoiding mains wiring,
this cable should be complete. act as strain relief for the cables. we don’t need to be so worried about
For the all-important welding At the welding tips, we have again earthing and suchlike. We used an
cables, we crimped Altronics H1757B drilled 3mm holes in the end of the Altronics H0364A case, which is just

Reproduced by arrangement with


SILICON CHIP magazine 2023.
www.siliconchip.com.au

Fig.10 (left): this shows the


required cabling for the
complete system, which is
relatively simple. You can
have more or fewer ESMs,
but six is the minimum.
All cables connect to
headers or terminal
blocks, except the optional
voltmeter we added,
which tacks onto a solder
pad that joins to the +15V
supply rail.

Fig.11 (below): to make


the bus bars, cut 10mm
square aluminium bar to
two 260mm lengths and
drill and tap M3 holes in
the locations shown. Use
kerosene or light machine
oil to lubricate the tap
and if it sticks, withdraw
it and clear out the swarf
before continuing. You
don’t want to break the
tap off in the bar.

Practical Electronics | April | 2023 31


Fig.12: this diagram shows how we mounted the modules in the recommended case and wired them up (62.5% scale).

large enough to fit all the modules. easily occur. Note that there is no dan- Welding!
This allows us to mount the ESM ger here unless the ‘trigger’ footswitch You will need to experiment to find
‘bundle’ on its bus bars in the base is pressed, but we do not want any the settings that work best for you. We
with the Power Supply and Controller chance of accidentally firing into a used flat AA and D cells to test the sys-
modules just behind the front panel, dead short. The cutting and folding tem out, and found that with 0.12mm
secured to the side of the case. details for this are shown in Fig.15. nickel strip, setting the pulse width to
The photograph of the case with We cut two square holes in the front maximum and voltage to about 12-14V
the lid off shows this arrangement of the case to allow the bus bars to gave extremely solid welds.
pretty clearly. poke through, shown in Fig.16, along We started with a low voltage and
We found that the potentiometer with the other front-panel cutouts. increased the voltage until the welds
shafts were only just long enough All controls were placed in locations just stuck, which was about 8V. From
– you might find a better way of that felt convenient, and we used four that point, we increased the voltage to
mounting these. As our application holes to fix the Presspahn sheet to the get a solid weld (in our case, at around
is stationary in the lab, we used long front panel. 12V), then added a bit.
tie wraps (thick cable ties) to secure We found a cheap voltmeter on To test your welds, take pliers and try
the energy store to the case and put eBay and decided to add this – these to pull the tab off. It should be excep-
firm foam under the lid to hold it all are available on your favourite auc- tionally well attached and require you
together when the lid is attached. tion site for a few dollars if you go to tear the weld ‘beads’ off.
We folded and mounted a sheet of looking. We will leave the selection You will find the copper weld tips
Presspahn between the output bus and integration of this to you, as there wear and get dirty if you experience
bars (visible in the lead photo) to are many choices out there, and the arcing. Clean them up with sandpa-
ensure that accidental shorts cannot wiring is pretty straightforward. per or a sharp knife for consistent

Fig.13: we used 610mm of ribbon


cable to connect our 12 modules as
shown here. Adjust the total length
and connector positions if you aren’t
using 10 ESMs or want to arrange
them in a different layout.

32 Practical Electronics | April | 2023


The finished Capacitor Discharge Welder, with the welding cables attached.

Fig.14: a cross-section of the welding probes we made from 10mm square aluminium bar. The welding tips are 3mm
copper rods ground to a sharp point. A close-up of one of the tips is shown adjacent to this diagram.

results. Once you have worked your been blown away. This was accom- example); this will lead to danger-
settings out, this CD Welder should panied by sparks and a flash. The ous arcing and quite possibly break
provide solid service and consistent photo of the inside of the can shows something expensive.
weld energy. that all the welds are visible, but n

Always wear safety glasses.
with significantly more damage on n

Do not use welding leads with cop-
Some tips the 25V welds. per wider than 3.3mm in diameter
n

We found 12-15V to be the sweet n

Never short the output bus bars (8 Gauge) or shorter than 1m, as this
spot for welding. While we did directly (with a screwdriver, for forms part of the design.
install 25V capacitors, if you are
welding only light gauge battery
tabs, you will probably find that Fig.15: cut, drill and fold the
you need to charge them no higher Presspahn as shown here to
make the bus bar insulator.
than 16V. Then again, you gain a
This ensures that the Welder
lot of headroom for the slight cost cannot be accidentally fired
increase of using 25V capacitors. with a short circuit across
n
o check the effect of weld energy,
T the bus bars.
we welded tabs to the top of a soup
can, using this as a battery surro- Holes A are 3mm in
gate. From the outside, the 15V diameter. All dimensions
welds are reasonably light ‘dim- are in millimetres.
ples’, while with the 25V welds,
some of the tab material has clearly

Practical Electronics | April | 2023 33


n

Always keep the leads parallel and
never curl them into a coil. Coiling
leads will increase inductance in the
system and give the flyback diodes a
hard time.
n

Note that some plug packs have their
negative output connected to mains
earth. Be careful of these packs as the
output leads are at your weld voltage.

Finally, we have a couple of spread-


sheets available for download from
To illustrate the energy involved, and A look inside a can used for testing. the April 2023 page of the PE website.
potential danger, this shows the result of This image shows the damage caused These include many of the calcula-
placing the probes across the tab between by excessive voltage. The higher tions used to verify this design – see:
two AA cells. The capacitors were energy welds have made holes right https://bit.ly/pe-downloads
charged to 15V, about 127J of energy. through the metal.

Fig.16: the front panel


cutting diagram for
the layout used in our
prototype. This box suits
our application in the
lab, but you might be
able to come up with a
better arrangement.

34 Practical Electronics | April | 2023


The home for specialist audio, analogue and historic

AOShop components – provided by Jake Rothman, PE’s


Audio Out columnist. The AOShop is your best bet for
classic analogue ‘NOS’ (new old stock) components,
including all parts for Audio Out projects and designs.

Ge semiconductors Dual transistors Tantalum – metal cased Potentiometers


2N2639, 2N2223, 2N2910 (NPN) £4.00 22/50, 47/35, 68/25, 100/20, 120/10,
Small-signal PNP transistors E401 (JFET) £4.00 150/16, 220/10, 330/6 £2.00 Bourns 81
AC125, NKT214F, OC57 DMMT3904/6 £0.50 22/35, 33/35, 47/20, 68/15, 100/10, 25kΩ lin cermet £2.00
OC59 £1.00 150/6 £1.25 25kΩ lin conductive plastic £3.00
Low-noise PNP transistors Loudspeakers 4.7/50, 6.8/35, 10/25, 10/35, 22/15 £1.00 Plessey moulded-track
GET106 £2.50 PE Mini-Monitor Moulded-case tantalum 5kΩ log with switch £3.00
Volt PE165 6.5-inch woofer (each) £85 Kemet axial 6.8/10 £0.30 50kΩ A/log £3.00
Small power PNP transistors
Morel MDT29 tweeter (each) £25 Kemet radial 33/10 £0.40 Mil 250kΩ lin dual £5.00
AC153, AC153K, AC188 £1.50
Kit pair of PE165/MDT29 plus Volt STC radial 100/20 £1.50 Alpha
High-voltage PNP transistors crossover parts and PCBs £299
Tantalum bead 16mm 4.7kΩ A/log £0.80
OC77, CV7001, ACY20 £1.50 Monacor DT-28N tweeter (each) £45
22/50 £1.00 220kΩ A/log £0.80
TO3 PNP power transistors Vifa 19mm BC20SC15-04 tweeter 10kΩ lin centre-detent dual-gang £1.50
470/3 £2.00
OC22, CV7054 (OC23), OC25, (each) £15
680/6.3 £3.00 Allen Bradley J series/Honeywell
OC35, OC36, AD143, AD149, Volt PE110 5-inch woofer (each) £75
Wet tantalum 10kΩ lin 1 million cycles £5.00
AD161, AD162 £2.00 Volt crossover inductors
220/25 axial £3.20 Blore Edwards AB 45 dual 5kΩ A/log
AD140 £3.50 1.2mH, 1.5mH, 2mH, 2.7mH, 0.5mH
Castanet button 140/30, 470/3 £3.20 with switch £3.50
AD149 matched pair £5.00 (tapped at 0.3mH) (each) £5.85
Hughes 540/10 £3.20 Alps RK9 dual-gang 5kΩ RD law £4.00
RF PNP transistors LS3/5A transformer-core 15Ω BI P260 500kΩ log conductive plastic
OC41, OC42, 2SA12, 2SA53,AF124, assembled crossover board (each) £60 Bipolar 1 million cycles £3.00
AF128, GET872A £1.50 Hermetic bipolar tantalum 16/35 £3.20 Colvern wire-wound 100kΩ or 50kΩ
Fully assembled and tested high-quality
Callins Elcap wet aluminium 10/50 £0.50 dual-gang 3W £8.00
NPN transistors speaker prototypes – ask for details
OC139, OC140, ASY73, AC141K, LS3/5As and other similar speaker Philips solid-aluminium (axial) 121/123 Mil Spec hermetic 10Ω £8.00
AC176K, AC176 £2.00 systems (pair) £200-£350 47/16 £1.00
330/6.3 £2.00 Miscellaneous
Diodes Fully tested reclaimed speakers
100/35 £4.00 Theremin Clearance Sale!
CV7049 (OA10), CG92 (OA91) £0.50 Vifa BC14 5-inch woofer (each) £15
Vifa TC26 1-inch tweeter (each) £15 Philips Pearl 122 series (radial) Elysian Theremin MIDI box £300
Si semiconductors 10/16 £0.30 PCBs
Low-price speakers
10/25 £0.50 Pocket Theremin (EPE, 1996) £4.00
Diodes Celestion elliptical 6x4-inch 5Ω
ZC5800 RF Schottky £0.20 (Robert’s Radio) £3.50 Silvered mica (radial) Elysian Theremin (EPE, 1996) £12
Philips 4-inch 4070 £2.00 4.7nF/500 5% £1.00 Synth VCF, VCO (EPE, 2017) £3.00
Low-noise silicon transistors EMI 10x6-inch, 30Ω Alnico £10 48V PSU (EPE, 2019) £3.00
BFW16A, 2SC3071 £1.50 Trimmer capacitors
64mm 64Ω neodymium £1.20 Vishay plastic-film 4-40pF £0.80 Relays
2SC2204, 2SD655 £0.50 3.5-inch 25Ω £3.50
ZTX651 £0.30 Vishay plastic-film 5.5-45pF £1.00 STC hermetic 4190 24V DPDT £4.00
5x3-inch elliptical 50Ω or 80Ω Vishay plastic-film 5-80pF £1.20
RF transistors (suitable for Theremin) Alnico £3.50 Switches Blore Edwards/Plessey
Vishay plastic-film 10-250pF £2.00 MH1 4-pole 3-way £3.00
BF199 £0.50 1.65x2.75-inch 8Ω £1.50 Mica 1-12pF, 2-40pF £1.00
BF245 £0.60 Elma 01 2-pole 6-way £6.00
3PDT guitar pedal stomp switch £2.50
Audio power MOSFETs Can’t see what you Audio transformers and
Exicon 10N20, 10P20 £6.50 inductors Valves
want? Just ask – we EC88, PCL84 £3.00
Hitachi 2SJ99, 2SK343 £3.50 Eagle transformers
Hitachi 2SJ 50, 2SK135 £7.00 have a huge stock LT44, LT722 driver, LT700, LT723 Robert’s Radio modules
Hitachi 2SJ56, 2SK176 £8.50 of inexpensive 500Ω output £2.50 Tuners LP1169, LP1179 £7.00
JFETs high-quality parts! LT30 500mW output £3.50 IF strip LP1171 £7.00
BFW11, BFW10, TIS73L, J177, J113, Repanco Knobs – large Bakelite
U1994, U1898, 2SJ176 £1.00 T/T3 splitter transformer £4.00 Bulgin 1960s and Sifam 1970s £1.50
Capacitors CH2 5mH RFC £2.00
MOSFETs
ZVP2106A £0.30 Note ‘10/63’ denotes ‘10µF 63V’.
Balanced output transformer Contact
Dual-gate 3SK45, BFS28 £1.50 Polyester Vigortronix 600Ω VTX-101-007 £10 Jake Rothman
Metal-cased transistors 3.3/100, 4.7/250, 4.7/63 £1.00 Vigortronix 600Ω VTX-101-3001 £10 The Old Rectory, Arlais Road,
BC143 £0.35 5.6/63, 8.2/63, 10/63 £2.00 Vigortronix 600Ω VTX-101-3002 £15 Llandrindod Wells, Powys
2N1711 £0.50 Mullard ‘Mustard’ C296 0.22/400 £2.00 Gardners 150Ω £10 LD1 5HE (visit by appointment)
BCY71 £0.30 Reclaimed BBC LL74/MPC nickel +44 (0)1597 829102
Polycarbonate
BC109C £0.60 core 600Ω £12
Axial 2.2/63 1%, 4.7/160, 6.8/63 £1.00 jrothman1962@gmail.com
Amplifiers Radial Reclaimed mic input transformer £15
TL082 dual JFET input op amp £0.25 6.8/160V, 10/63 £2.00 Minimum order £5.00 inc post
LM318 high-speed op amp £0.35 Inductors Quantity discounts negotiable
Reclaimed 22/63 £2.00
µA709 metal-cased op amp £2.00 82µH, 4.7mH, 100µH, 270µH £2.00
5534H metal-cased op amp £3.00 Polystyrene 7-inch ferrite rod with MW and LW Payment
LM384, TDA2030A £1.50 Philips 1% 4.7nF/160, 6.2nF/500, windings £3.00 PayPal, cards (via phone), bank
TAA435 (power amp driver) £1.20 12nF/63, 22nF/63, 110nF/63 £1.00 transfer, cheques (payable to ‘J
RIFA 1% 100nF/100 £2.00 Special resistors Rothman’, UK pounds only)
Synthesiser ICs Suflex 2.5% 10nF/63 (rad. or ax.) £0.50 Bourns wire-wound trimmer 5kΩ No VAT payable
3059 JM panel-mount £2.00
That/dbx 2180 VCA/VCF £6.00 Radiation resistant
Thermistor RA53, A13 £4.00 Postage
CA3080 VCA/VCF (vocoder) £2.80 Siemens cellulose acetate MKL
Thermistor CZ1, CZ6 £1.50 Small Jiffy bag £2.99
CA3082 VCA/VCF £4.00 2.2/25 £0.80
Holco H2 2.2MΩ 1W, 1% £1.00 Small package £4.99
LM13600/ LM13700 VCA/VCF £2.00 Electrolytic – Mullard blue 017 series Welwyn 1GΩ 2W £1.00 Big boxes and overseas at cost
CA3086 transistor array £1.00 10/25, 22/25, 100/10 £0.50 Allen Bradley 1.2kΩ 2W C-comp £1.00 – ask for a quote
PT2399 echo/delay £1.50 150/40, 470/40,1000/40 £1.00 Lots of big valve resistors available.

Practical Electronics | April | 2023 35


innovative Technology Projects
www.itp101.com

Introducing our range of Multi Channel Oscilloscopes


With over 20 years in the business, we have a wide variety of Multi Channel Oscilloscopes
in different configurations and formats. Below is a small selection of some of the models we
offer, to view the full range please visit our website or contact info@itp101.com for further
details.

Handyscope
Handyscope HS5 Key specifications
8, 12, 14, 16 bit resolution, 0.25 % DC vertical
accuracy, 0.1 % typical
Up to 500 MSa/s sampling, up to 250 MHz
bandwidth
Up to 32 Mpts memory per channel Handyscope HS5
20 MSa/s, 14 bit continuous streaming
The 500 MSa/s 14 bit dual channel High Resolution
1 ppm time base accuracy
Oscilloscope with function generator.
Arbitrary Waveform Generator

WiFiScope
Using a computer based oscilloscope was
never easier than with the WiFiScope WS6
DIFF: simply switch it on and start the
software on the computer:
no power cables required as it is battery
powered and can operate hours on a fully
WiFiScope WS6 DIFF charged battery
no interface cables required as it uses WiFi
The 1 GSa/s 14 bit quad differential channel
to connect to the computer
High Resolution WiFi Oscilloscope.

Automotive
Automotive Test Scope ATS605004D-XMS
Key specifications
14 bit (0.006 %) resolution (16 bit enhanced
resolution)
Up to 500 MSa/s sampling
250 MHz bandwidth
Up to 100 MSa/s continuous streaming
Up to 256 Mpoints memory per channel
0.25 % DC vertical accuracy, 0.1 % typical Automotive Test Scope
1 ppm time base accuracy
ATS605004D-XMS
All models and configurations can be found
on our website: itp101.com/tiepie-price-list

Handyscope HS5

WiFiScope WS6 DIFF

Automotive

For orders and inquiries, email info@itp101.com


All prices exclude Delivery & VAT.
This information is subject to change without notice.

QUOTE CODE: ITP10


10% DISCOUNT WHEN CONTACTING INFO@ITP101.COM
Exclusive for Practical Electronics Readers OFFER EXPIRES 31ST MAY 2023
By John Clarke

Amplifier
Clipping
Indicator
Driving an amplifier into clipping can cause unpleasant sounds and even
damage expensive speakers. So it is best to find out right away if you’re
about to run into clipping. This easy-to-build Amplifier Clipping Indicator
is ideal for that; its LED shows even the briefest of clipping events.

A
clipping indicator is a You can build a single unit for a mono Detecting positive clipping
valuable accessory for any amplifier or two for monitoring two The positive reference voltage (V+ −
audio amplifier. It indicates channels in a stereo amplifier. 4.7V) is connected to the emitter of
when the amplifier has reached its Power for the circuit is derived from NPN transistor Q1. Its base goes to the
limit and is clipping the peaks of the the amplifier’s supply; it only draws amplifier’s output via a 100kW current-
audio signal. In practice, quite a lot of a few tens of milliamps, so it won’t limiting resistor, while diode D2 stops
clipping can occur before you notice affect the amplifier’s maximum out- Q1’s base-emitter junction from being
it and even brief clipping events can put power to any significant degree. reverse-biased.
cause tweeter damage. When building a stereo version, you Just before clipping, the amplifier
That’s because when an amplifier could use a single, common LED to output voltage will rise above the V+
clips, it ‘squares up’ the waveform; the indicate clipping from either channel − 4.7V reference plus Q1’s base-emitter
result contains lots of higher-frequency or a separate LED indicator for each on-voltage of about 0.7V. Q1 switches
harmonics, which can easily damage channel. The second PCB does not on when the amplifier output voltage
the tweeters in loudspeaker systems. require the full complement of com- is within 4V of the positive supply. It
Our Amplifier Clipping Indicator ponents for the common LED version. then sinks current via diode D1, the
flashes its LED whenever clipping is 100W resistor and zener diode ZD3.
detected. That’s considered to be any Circuit The anode of ZD3 connects to the
time the amplifier output is within The clipping detector circuit is shown pin 2 trigger input of IC1, and as this
about 4V of the positive or negative in Fig.1. A few components don’t have voltage drops, timer IC1 starts running.
supply rails. Most amplifiers will clip values: resistors R1a, R1b, R2 and R3 This means that IC1’s pin 3 output goes
within about 3V of the supply rail, and zener diodes ZD4 and ZD5. Their high, switching on Q4 and the indi-
although some can require slightly values depend on your amplifier’s cator LED (LED1) via a 1kW current-
more headroom; choosing 4V gives a power supply voltage. Table 1 shows limiting resistor. A second external
small safety margin. the component values required to suit LED will also be lit if connected to the
There can be a significant ripple on amplifiers with supplies ranging from external LED connections.
the amplifier supply rails when it’s ±10V to ±80V. IC1 is a CMOS version of the 555
delivering a lot of power (when clip- The clipping detector generates pos- timer and is set up to operate as a
ping is most likely to happen). So a itive and negative reference voltages. monostable timer. Timing is initiated
proper Amplifier Clipping Indicator For the positive reference, zener diode when the pin 2 trigger input goes
like this one will compare the output ZD1 generates a voltage about 4.7V below a third of its supply voltage.
waveform to the instantaneous sup- below the V+ positive rail. Resistors With a 4.7V supply, the trigger point
ply voltages to compensate for that. R1a and R1b limit the current through is 1.56V above the V+ − 4.7V rail or
Its thresholds adapt as power supply ZD1 to approximately 10mA; together, 3.13V below the V+ supply rail.
voltages fluctuate. they connect across the V+ and 0V Pin 2 is usually held at V+ by a
A timer is included to extend the amplifier supply rails. The generated 100kW pull-up resistor. However,
duration of the LED lighting up, to voltage is shown on the circuit as V+ when current flows through ZD3, D1
ensure even momentary clipping is − 4.7V at Q1’s emitter. and Q1, the voltage at pin 2 goes low
visible. The indicator LED is mounted The 4.7V between this rail and V+ is enough to trigger the timer.
on the Amplifier Clipping Indicator also used to power timer IC1. We allow Once the pin 3 output goes high,
PCB, but it also provides a connec- 5mA for IC1’s supply and 5mA to bias the 1μF capacitor at pins 6 and 7 of
tion for an external LED mounted on ZD1. More on IC1’s operation later. IC1 begins to charge from the V+ sup-
the amplifier’s front panel. Zener diode ZD2 and resistor R2 ply through a 100kW resistor. When
This Amplifier Clipping Indicator is between the V− supply and 0V gen- the capacitor reaches two thirds of
presented as a bare PCB designed to be erate the negative reference; R2 limits the supply (3.13V above the V+ −
housed within an existing amplifier. the current through ZD2 to about 5mA. 4.7V reference), the pin 3 output goes

38 Practical Electronics | April | 2023


Fig.1: the Clipping Indicator monitors
the amplifier’s output and lights LED1
whenever it comes within about 4V
of either supply rail. NPN transistor
Q1 detects positive signal excursions,
while PNP transistor Q2 detects when
the signal approaches the negative
rail. IC1 lights the LED for at least
110ms each time clipping is detected.
Amplifier Clipping Indicator
low, and this capacitor discharges BC546. Table 1 shows the required the version used for a mono ampli-
into pin 7. values for resistors R2, R3 and zener fier, or for the left channel in a stereo
This sequence of events occurs diodes ZD4 and ZD5 for various ampli- amplifier (or both channels if you want
when the trigger voltage at pin 2 is only fier supply voltages. independent clip indication).
low for a very short period. If the trig- Resistor R3 is included to limit cur- If the second channel is built as
ger voltage is low for longer than the rent in zener diode ZD3 when transis- shown in Fig.3, clipping in either
timing period, the pin 3 output will tor Q3 conducts. channel will be indicated with a sin-
stay high until pin 2 goes high again. While this is not the simplest clip- gle LED.
The timing period is about 110ms, ping detector circuit, it has the advan- Begin by fitting the resistors. First,
as set by the 100kW resistor and 1μF tage of presenting an almost entirely refer to Table 1 to select the resistor
capacitor values. IC1 acts as a pulse linear load to the amplifier output, to value and power ratings for R1a, R1b,
extender for brief detection of ampli- minimise the possibility of any distor- R2 and R3. (Ideally, you should check
fier clipping. It ensures that clipping tion due to loading. each resistor using a digital multime-
is shown on the LED for at least 110ms Note that if you want to monitor ter (DMM) before installing it.
(ie, a bit more than 1/10th of a second). clipping in a stereo amplifier and Once these parts are in place, follow
use a single indicator LED, you can with diodes D1, D2 and D3, orienting
Detecting negative excursions dispense with the components in them correctly. The zener diodes can
ZD2, PNP transistor Q2 and diode D3 the blue shaded areas for the second be mounted next. ZD1 and ZD2 are
work to detect negative excursions from channel. Interconnection is made 4.7V types, while ZD3 is rated at 3.9V.
the amplifier. When the amplifier out- between the two PCBs at the top end The ZD4 and ZD5 voltages are as per
put swings low, within 4V of the neg- of R3. This way, a clip event at either Table 1, or replaced with a wire link
ative supply, transistor Q2 switches on input will trigger IC1 on the board if indicated.
and, in turn, switches on transistor Q3. where it is fitted. Transistors Q1, Q2, Q3 and Q4 can
This then pulls the pin 2 trigger input Alternatively, you can build two be mounted next. There are three dif-
of IC1 low via two series zener diodes complete copies of the circuit for ferent types (although Q1, Q3 and Q4
(ZD4 and ZD5) and resistor R3. independent channel clipping indi-
Transistor Q3 is rated for a maxi- cation. The boards are small and can
mum collector-emitter voltage of 80V. be stacked to take up relatively lit-
Without the two zener diodes, the tle room.
transistor could be subject to the total
of the V+ and V− supply rails and so Construction
would only be suitable for use with The Amplifier Clipping Indi-
a maximum of ±40V supply rails. By cator is constructed on a dou-
including the zener diodes, the voltage ble-sided, plated-through PCB
at the collector is reduced to a maxi- coded 01112211 that mea-
mum of around 66V. sures 54 x 60mm and is avail-
While we could have used a tran- able from the PE PCB Ser-
sistor with a higher voltage rating, vice. There are two overlay
they are not as readily available as the diagrams shown. Fig.2 is

Practical Electronics | April | 2023 39


Fig.2 and Fig.3: the board is not difficult to assemble; the components are fitted as shown at left. The diodes, LED, IC and
electrolytic capacitors are polarised. If you’re building a mono version or a stereo version to drive two independent LEDs,
build the fully populated version. For a stereo version with a single clip indicator LED, build one of each version and join
the indicated pad between the two boards (not present on the prototype PCB pictured).
can all be BC546s if desired), so take LED, build a second board as per tapped spacers on top of the threads
care to install each in its correct place. Fig.3 and solder a ~20mm length of once the first module is in place. If you
The screw terminal blocks making solid-core ‘Bell wire’ to the top of have space, you could mount the two
up CON1 need to be joined together that board, into the pad between ZD3 modules separately, eg, side-by-side.
first by fitting each side-by-side by slid- and Q4. It makes sense for the more Connect the Amplifier Clipping Indi-
ing the dovetail mouldings together. sparsely populated board to be at the cator(s) to the amplifier’s V+, V− and 0V
Solder them in place with the wire bottom of the stack as it lacks the LED, supply rails and the amplifier speaker
entry side of the terminals facing the and you’ll want to be able to see the + output(s) to AMP OUT input(s) on
nearest edge of the PCB. LED on the other board. the Clipping Indicator module(s). Make
Now fit LED1 with its longer lead Alternatively, if you’re building a sure the wiring is suitably voltage-
inserted into the anode hole. Mount it two-channel version with separate rated, especially when the supply rails
so that the top is about the same level LED indicators, make a second identi- are at high voltages from earth.
as the adjacent screw terminal. cal board and don’t fit the vertical wire. The external LED connects to the
IC1 can be soldered directly onto A and K terminals on the board. If
the PCB, making sure its pin 1 is Mounting it and wiring it up you are building the minimised ste-
facing as shown. Finally, install the Use the board to mark out four holes reo version with IC1 and associated
capacitors. The 1μF capacitor must in a convenient location within the components missing, feed the wire
be oriented correctly, with its longer amplifier chassis, ideally, between the you soldered earlier to the bottom
+ lead into the pad shown. You could amplifier modules and speaker termi- board up through the matching pad
use a non-polarised 1μF plastic film nals, or at least near the terminals. on the top board. Solder it on top
capacitor, but it will be substantially If it’s a stereo amplifier, you can and mount the upper board using
larger and probably more expensive stack the two boards by feeding lon- longer tapped spacers and short M3
than the electrolytic. ger machine screws up through the machine screws.
If you’re building the two-channel spacers on which the lower board is In all cases, when using a second
version to light a single clip indicator mounted, then screwing some ~16mm Amplifier Clipping Indicator module,

Table 1 – component values that vary with amplifier supply rail voltages
Supply R1a R1b R2 R3 (½W) ZD4 ZD5
±80V 15kW 1W 15kW 1W 15kW 1W 33kW 75V (1N4761) 18V (1N4746)
±75V 15kW 1W 15kW 1W 15kW 1W 33kW 75V (1N4761) 9.1V (1N4739)
±70V 12kW 1W 12kW 1W 12kW 1W 33kW 75V (1N4761) wire link
±65V 12kW 1W 12kW 1W 12kW 1W 33kW 33V (1N4752) 33V (1N4752)
±60V 12kW 1W 12kW 1W 12kW 1W 33kW 27V (1N4750) 27V (1N4750)
±55V 10kW ½W 10kW ½W 10kW ½W 33kW 22V (1N4748) 22V (1N4748)
±50V 9.1kW ½W 9.1kW ½W 9.1kW ½W 33kW 16V (1N4745) 18V (1N4746)
±45V 8.2kW ½W 8.2kW ½W 8.2kW ½W 33kW 12V (1N4742) 12V (1N4742)
±40V 7.5kW ½W 7.5kW ½W 7.5kW ½W 30kW 15V (1N4474) wire link
±35V 6.2kW ½W 6.2kW ½W 6.2kW ½W 30kW 3.9V (1N4730) wire link
±30V 5.1kW ½W 5.1kW ½W 5.1kW ½W 27kW wire link wire link
±25V 3.9kW ½W 3.9kW ½W 3.9kW ½W 22kW wire link wire link
±20V 3kW ½W 3kW ½W 3kW ½W 18kW wire link wire link
±15V 2kW ½W 2kW ½W 2kW ½W 13kW wire link wire link
±10V 1kW ½W 1kW ½W 1kW ½W 8.2kW wire link wire link

40 Practical Electronics | April | 2023


all three supply connections must be The external LED or LEDs can be
made to both boards, along with the AMP attached to the amplifier chassis using
OUT terminal. The only terminals that suitable LED bezels, or (less ideally)
aren’t needed on the board with com- glued into tight-fitting holes using
ponents missing are the LED A and K. neutral-cure silicone sealant.

Parts List – Clipping Indicator (per channel)


1 double-sided, plated-through PCB coded 01112211, 54 x 60mm available
from the PE PCB Service www. poscope. com/ epe
2 3-way screw terminals with 5.08mm spacing (CON1) OR
2 2-way screw terminals with 5.08mm spacing (CON1; for minimised
second channel)
Semiconductors
1 7555 CMOS timer, DIP-8 (IC1●)
2 BC547 or BC546 NPN transistors (Q1, Q4●)
1 BC557 PNP transistor (Q2)
1 BC546 NPN transistor (Q3)
1 yellow, amber or red 3mm or 5mm LED (LED1●)
1 yellow, amber or red LED (optional; external LED●)
2 4.7V 1W (1N4732) zener diodes (ZD1, ZD2)
1 3.9V 1W (1N4730) zener diode (ZD3●)
3 1N4148 small-signal diodes (D1-D3)
2 zener diodes or wire link (ZD4▲, ZD5▲)
1 LED bezels (optional; for chassis-mounting external LED)
4 M3 x 6mm tapped nylon spacers (or 15mm spacers for the upper board in
the stack)
8 M3 x 6mm machine screws (or 4 M3 x 15mm machine screws for the
upper board in the stack) - USB - PWM
1 20mm+ length of solid-core hookup wire (optional; to join stacked stereo - Ethernet - Encoders
version) - Web server - LCD
- Modbus
Various differently coloured hookup wires, rated for amplifier supply voltage - CNC (Mach3/ 4)
- Analog inputs
- Compact PLC
Capacitors - IO
1 1μF 16V PC electrolytic●
1 100nF 63V or 100V MKT polyester● Reproduced by arrangement with
1 10nF 63V or 100V MKT polyester● SILICON CHIP magazine 2023.
www.siliconchip.com.au
Resistors (¼W, 1% axial metal film)
6 100kW (● 4 required for minimised version)
1 10kW●
2 1kW●
1 100W
4 other resistors, values as per Table 1▲ - up to 256
● not required for the minimised second channel - up to 32
microsteps microsteps
▲ see Table 1 for values and power ratings - 50 V / 6 A - 30 V / 2. 5 A
- USB configuration
- Isolated

PoScope Mega1+
PoScope Mega50

- up to 50MS/ s
- resolution up to 12bit
- Lowest power consumption
- Smallest and lightest
- 7 in 1: Oscilloscope, FFT, X/ Y,
Recorder, Logic Analyzer, Protocol
This shows the Clipping Indicator installed inside our 500W Amplifier chassis decoder, Signal generator
(see p.17 for more details).

Practical Electronics | April | 2023 41


Using Cheap Asian Electronic Modules By Jim Rowe

Three low-noise HF-UHF


Amplifiers

Left-to-right: module one (1MHz-3GHz), module two (5MHz-6GHz), module three (50MHz-4GHz)

All three of these low-cost wideband HF-UHF amplifier modules claim to


provide 20dB of gain, over frequency ranges of 1MHz to 3GHz, 5MHz to
6GHz and 50MHz to 4GHz. They vary mainly in terms of size, shielding,
supply voltage and price.

T
he 1MHz to 3GHz module I don’t have the equipment to mea- terminal block fitted to the PCB for
is the largest, with a PCB mea- sure the NF, but I was able to use the power, but there are two pads at top
suring 50 x 50mm. It has SMA SA44B with Spike to measure the mod- centre ready to mount such a block (on
input and output connectors at each ule’s DANL (distortion and noise level) either side of the PCB).
end and a mini 2-way terminal block at 1GHz and 3GHz with a 50W input The amplifier circuitry is again inside
for the power connections at the rear. termination. I then compared these a shielding box in the centre of the PCB,
The amplifier circuitry is inside a 32 x measurements with the DANL of the measuring 18.5 x 14.5 x 3.5mm. There
30 x 6.5mm shielding box in the centre SA44B alone (50W input termination) is no power indicator LED.
of the PCB, visible in the photo below. at the same frequencies. This module is available from Bang-
There’s also a small power indicator The results showed a rise in the good (code 1119141) – https://bit.ly/
LED at upper right (D2). DANL from −153dBm to −138dBm pe-apr23-amp2 – for around $16, plus
This module is currently available at 1GHz (+15dB), and a rise in DANL shipping from China (free for orders
online from Amazon UK (and others) from −149dBm to −139dBm at 3GHz over $50).
for around £9 and up, including deliv- (+10dB). This is perhaps not good It is designed to operate from a 5V DC
ery – search for ‘1-3000MHz 2.4GHz enough to qualify the module as an supply, with a nominal current drain
20dB RF Broadband Low Noise Ampli- LNA, but quite acceptable for many of 85mA, so it can be powered from a
fier Module UHF HF VHF’. It’s the possible applications. standard USB power pack. Again, it is
cheapest of the three amplifier mod- I also checked the module’s current claimed to provide a nominal gain of
ules we’re describing. drain from the 12V supply, and it mea- 20dB, this time from 5MHz to 6GHz,
It has been designed to run from a 12V sured precisely 75mA. with a maximum input level of 0dBm.
DC supply, with a stated current drain of So overall, this module is a good The maximum output power is stated
75mA. It has a maximum input level of choice if you only need to amplify to be +21dBm (around 120mW) at the
0dBm, and the maximum output power signals at frequencies up to about 1dB compression point. This module
is said to be +19.5dBm (approximately 3GHz, and would be happy with the doesn’t claim to be an LNA.
100mW). While it’s described on the gain curve shown in red
PCB as a low-noise amplifier (LNA), no in Fig.1, the maximum
noise figure (NF) is given. output of 100mW and
I could find no information regard- the modest noise perfor-
ing its internal circuit, or the active mance. It would likely
devices inside. But when I powered it provide a good way to
up and checked its gain with my Signal boost the output from a
Hound SA44B spectrum analyser and drone control transmitter,
TG44A tracking generator (controlled for example.
using their Spike software), the results
were quite impressive, as you can see The second module
from the red trace in Fig.1. The next amplifier mod-
The gain measured about 21dB at ule is physically smaller,
the low end, drooping fairly smoothly with a PCB measuring
to 13.5dB at 3GHz, and then wobbling 33 x 24.5mm and again
up and down a bit before falling to 3dB with SMA input and out-
at about 4GHz. That’s not bad for a low- put connectors at each Module one is the largest of the three, measuring
cost module with a rated frequency end. This module doesn’t 50 x 50mm, it uses a two-way screw terminal
range of 1MHz to 3GHz. come with a mini two-way block for the power connection.

42 Practical Electronics | April | 2023


for the connection of the negative
power lead.
This module is available from Ama-
zon UK (and others) for around £19
and up, including delivery – search
for ‘50M-4GHz Low Noise Amplifier
0.6dB RF LNA Amplifier’.
Like the second module, this one
operates from a 5V DC, with a nomi-
nal current drain of 90mA. So again, it
can be powered from a standard USB
power pack.
The nominal bandwidth is 50MHz
to 4.0GHz, with a typical gain of
19dB and a maximum output power
of +22dBm (about 150mW) for 1dB
Fig.1: the gain curve for the three modules – red (1MHz-3GHz), blue (5MHz-
6GHz), green (50MHz-4GHz).
compression at 2GHz. The maximum
input signal level is stated as less than
+10dBm, or 10mW.
I could find very little information at the same frequencies. The results The noise figure is quoted as typi-
regarding this module’s internal cir- this time showed a rise in the DANL cally 0.6dB, suggesting that this mod-
cuitry, apart from the suggestion that from −153dBm to −140dBm at 1GHz ule is intended for use as an LNA to
it’s based on a Qorvo SBB5089Z InGaP (+13dB), and a rise from −140dBm to boost the sensitivity of receivers and
MMIC (monolithic microwave inte- −132dBm at 4.0GHz (+8dB). test equipment like spectrum analysers.
grated circuit) amplifier device. This This is a little better than the results I measured its current draw at
comes in a 3- or 4-pin SOT-89 package, for the first module, but still perhaps 82mA, just a little lower than the
and in the data sheet, Qorvo gives the not good enough to be regarded as an claimed value, but as before, this was
circuit for an evaluation board which I LNA, even though it would be quite when the module’s input was termi-
have redrawn in Fig.2. That is a pretty acceptable for many applications. nated with 50W. It will likely rise when
standard MMIC circuit, and probably So this module would probably be a the module is handling an RF signal.
close to what is inside this module. good choice if you want to amplify sig- Next, I checked its gain, as before
When I powered it up, the first thing nals at frequencies above 3GHz, up to with the SA44B/TG44A/Spike test
I checked was its current drain from about 6GHz, and would be happy with setup. The result is shown in green
a 5V power pack. This turned out to the gain curve shown in Fig.1 (blue in Fig.1. The gain is highest at around
be 36mA, less than half the claimed trace) and its ability to deliver up to 50MHz (27dB), drooping down to
nominal value of 85mA. However, the approximately 120mW. The noise per- around 15dB at 1.32GHz, 10dB at
current might increase when the mod- formance is not too bad, either. 2.2GHz and 2dB at around 4.0GHz.
ule is delivering its maximum output On the down side, this module will This is a little disappointing, con-
power of +21dBm. cost you a little more than the first sidering the amplifier is claimed to
Next, I checked its gain with my one, and doesn’t come with a terminal have a gain of 18dB and a bandwidth
Spike test setup. This combination block already fitted. But its smaller size of 50MHz to 4.0GHz, but it would still
only goes up to 4.4GHz, but the result might make it easier to fit into equip- be quite useful if you are mainly deal-
is shown in blue in Fig.1. As you can ment like a drone control transmitter. ing with signals below 1.8GHz.
see, it was pretty respectable over this As noted earlier, I don’t have the
range, varying between about 13.5dB The third module equipment to measure the NF directly.
and 16.5dB with an average value of The final amplifier module we’re look- But when I used the SA44B spectrum
around 15dB. ing at differs from the other two as it analyser with Spike to compare the
The Qorvo data sheet for the is completely housed in a cast alu- amplifier’s DANL at 1GHz and 4GHz
SBB5089Z suggests that it probably minium case, so it’s fully shielded. against that of the SA44B alone (in
extends to provide at least 14.5dB of The case measures 42 x 32 x 12mm, each case with a 50W input termina-
gain at 6.0GHz, but I can’t confirm that. with the SMA input and output con- tion), the results were noticeably better
After this, I used the SA44B with nectors at each end and an insulated than for the other two modules.
Spike to measure this module’s DANL feed-through pin fitted to the rear of At 1GHz, the DANL rose from
at 1GHz and 4GHz with a 50W input the case for its power input. −153dBm to −143dBm (+10dB), while
termination, and again compare them A small solder lug held by the feed- at 4GHz the DANL rose from −140dBm
with the figures for the SA44B alone, through pin’s external body allows to −135dBm; a rise of only 5dB. So it
might be a bit lacking in terms of gain
The second module and bandwidth, but it probably does
is the smallest and qualify as an LNA.
most sparse of
the three. It only The bottom line
has two unused Based on these test results, each mod-
pads for the power
connection.
ule has strengths and weaknesses. The
best choice depends on the gain and
bandwidth you need, the kind of appli-
cation you want to use the amplifier
for and how much you can pay.
For example, the second mod-
ule offers the best gain/bandwidth

Practical Electronics | April | 2023 43


Fig.2: little information is given on the 5MHz-6GHz
module, so the circuit shown is based on a Qorvo
SBB5089Z-based evaluation board. It should be close to
what the module is comprised of.

performance, coupled with a reasonable noise performance


and the ability to provide an output of around 100mW. It’s
The third and last amplifier module is housed inside a cast
also not that much more expensive than the cheapest (first) aluminium case. There’s an insulated pin fitted to the edge
module, so it is probably the best choice for applications of the case which is used for power, along with a solder lug
like boosting the output of a drone control transmitter. adjacent for the negative power lead.
But the first module provides much the same perfor-
mance at frequencies below 3GHz, so with its lower price, bumps on either side of 3GHz, and no discernible bumps
it is an attractive choice for the same kind of application. at all around 4GHz.
Suppose you are mainly interested in signals below about I must conclude then that the second, less-expensive
1.8GHz and noise performance is critical, such as boost- amplifier module with a stated frequency range of 5MHz
ing the signals going into a receiver or spectrum analyser. to 6GHz is the best option for improving the sensitivity of
In that case, the third module is probably the best choice, the LTDZ analyser, and does give a helpful improvement
despite its significantly higher price. in sensitivity, of about 10.5dB at 1GHz, 10dB at 2GHz, 7dB
at 3GHz and 6.5dB at 4GHz.
Using these amps with the LTDZ V5.0 spectrum analyser
You might recall that towards the end of my review of the Reproduced by arrangement with
low-cost LTDZ V5.0 spectrum analyser (PE, February 2022), SILICON CHIP magazine 2023.
I mentioned that I would be testing this type of amplifier www.siliconchip.com.au
module to see whether they could be used to improve that
device’s sensitivity.
That’s because the LTDZ analyser has a relatively high
noise floor of about −77dBm, meaning that any signals lower
than this (or possibly even slightly higher) would essentially
be ‘lost in the noise’. An LNA could be used to boost these
signals well above the noise floor, allowing them to be dis-
tinguished and measured.
After checking out the three modules reviewed here, I
decided that the second and third (LNA) modules would
be the best candidates for this job, so I tested both.
First, I inserted the amplifier modules in front of the
LTDZ analyser, with their inputs terminated with 50W, and
ran some plots to see if their noise affected its noise floor.
They did not; the noise floor measured −77dBm with or
without both amplifiers.
The next set of tests involved feeding a −80dBm CW sig- JTAG Connector Plugs Directly into PCB!!
nal from my signal generator through the relevant ampli- No Header! No Brainer!
fier module and into the LTDZ analyser at four frequen-
cies: 1GHz, 2GHz, 3GHz and 4GHz. Without the amplifier,
I would expect a flat line at −77dBm. Any peaks above this
would mean that the amplifier was providing some benefit.
With the second (cheaper) module, I saw two bumps of
about 7.5dB on either side of 1GHz in the first test, about
7dB on either side of 2GHz, about 4dB on either side of
3GHz, and about 2.5dB on either side of 4GHz. So this
module does give the LTDZ analyser a modest increase in Our patented range of Plug-of-Nails™ spring-pin cables plug directly
sensitivity up to 4GHz, without affecting its noise floor. into a tiny footprint of pads and locating holes in your PCB, eliminating
The reason why there were two bumps rather than one the need for a mating header. Save Cost & Space on Every PCB!!
peak is explained in the main body of the article linked Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
above. It’s a property of the analyser’s unnecessarily broad Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
resolution bandwidth, not a failing of the amplifier module.
I also tested the more expensive LNA and got two bumps
www.PlugOfNails.com
about 8dB high on either side of 1GHz, two much smaller Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
bumps (<1dB) on either side of 2GHz, two similarly small

44 Practical Electronics | April | 2023


STEWART OF READING
17A King Street, Mortimer, near Reading, RG7 3RS
Telephone: 0118 933 1111 Fax: 0118 933 2375
USED ELECTRONIC TEST EQUIPMENT
Check website www.stewart-of-reading.co.uk
Fluke/Philips PM3092 Oscilloscope HP 54600B Oscilloscope
(ALL PRICES PLUS CARRIAGE & VAT)
2+2 Channel 200MHz Delay TB, Analogue/Digital Dual Trace 100MHz
Autoset etc – £250 Please check availability before ordering or calling in
Only £75, with accessories £125
LAMBDA GENESYS PSU GEN100-15 100V 15A Boxed As New £400 Marconi 2305 Modulation Meter £250
LAMBDA GENESYS PSU GEN50-30 50V 30A £400 Marconi 2440 Counter 20GHz £295
IFR 2025 Signal Generator 9kHz – 2.51GHz Opt 04/11 £900 Marconi 2945/A/B Communications Test Set Various Options POA
IFR 2948B Communication Service Monitor Opts 03/25 Avionics POA Marconi 2955 Radio Communications Test Set £595
IFR 6843 Microwave Systems Analyser 10MHz – 20GHz POA Marconi 2955A Radio Communications Test Set £725
R&S APN62 Syn Function Generator 1Hz – 260kHz £295 Marconi 2955B Radio Communications Test Set £800
Agilent 8712ET RF Network Analyser 300kHz – 1300MHz POA Marconi 6200 Microwave Test Set £1,500
HP8903A/B Audio Analyser £750 – £950 Marconi 6200A Microwave Test Set 10MHz – 20GHz £1,950
HP8757D Scaler Network Analyser POA Marconi 6200B Microwave Test Set £2,300
HP3325A Synthesised Function Generator £195 Marconi 6960B Power Meter with 6910 sensor £295
HP3561A Dynamic Signal Analyser £650 Tektronix TDS3052B Oscilloscope 500MHz 2.5GS/s £1,250
HP6032A PSU 0-60V 0-50A 1000W £750 Tektronix TDS3032 Oscilloscope 300MHz 2.5GS/s £995
HP6622A PSU 0-20V 4A Twice or 0-50V 2A Twice £350 Tektronix TDS3012 Oscilloscope 2 Channel 100MHz 1.25GS/s £450
HP6624A PSU 4 Outputs £400 Tektronix 2430A Oscilloscope Dual Trace 150MHz 100MS/s £350
HP6632B PSU 0-20V 0-5A £195 Tektronix 2465B Oscilloscope 4 Channel 400MHz £600
HP6644A PSU 0-60V 3.5A £400 Farnell AP60/50 PSU 0-60V 0-50A 1kW Switch Mode £300
HP6654A PSU 0-60V 0-9A £500 Farnell XA35/2T PSU 0-35V 0-2A Twice Digital £75
HP8341A Synthesised Sweep Generator 10MHz – 20GHz £2,000 Farnell AP100-90 Power Supply 100V 90A £900
HP83630A Synthesised Sweeper 10MHz – 26.5 GHz POA Farnell LF1 Sine/Sq Oscillator 10Hz – 1MHz £45
HP83624A Synthesised Sweeper 2 – 20GHz POA Racal 1991 Counter/Timer 160MHz 9 Digit £150
HP8484A Power Sensor 0.01-18GHz 3nW-10µW £75 Racal 2101 Counter 20GHz LED £295
HP8560E Spectrum Analyser Synthesised 30Hz – 2.9GHz £1,750 Racal 9300 True RMS Millivoltmeter 5Hz – 20MHz etc £45
HP8563A Spectrum Analyser Synthesised 9kHz – 22GHz £2,250 Racal 9300B As 9300 £75
HP8566B Spectrum Analsyer 100Hz – 22GHz £1,200 Solartron 7150/PLUS 6½ Digit DMM True RMS IEEE £65/£75
HP8662A RF Generator 10kHz – 1280MHz £750 Solatron 1253 Gain Phase Analyser 1mHz – 20kHz £600
Marconi 2022E Synthesised AM/FM Signal Generator 10kHz – 1.01GHz £325 Solartron SI 1255 HF Frequency Response Analyser POA
Marconi 2024 Synthesised Signal Generator 9kHz – 2.4GHz £800 Tasakago TM035-2 PSU 0-35V 0-2A 2 Meters £30
Marconi 2030 Synthesised Signal Generator 10kHz – 1.35GHz £750 Thurlby PL320QMD PSU 0-30V 0-2A Twice £160 – £200
Marconi 2023A Signal Generator 9kHz – 1.2GHz £700 Thurlby TG210 Function Generator 0.002-2MHz TTL etc Kenwood Badged £65

HP33120A Function Generator 100 microHz – 15MHz £350


HP53131A Universal Counter 3GHz Boxed unused £600
HP53131A Universal Counter 225MHz £350
Audio Precision SYS2712 Audio Analyser – in original box POA
Datron 4708 Autocal Multifunction Standard POA
Druck DPI 515 Pressure Calibrator/Controller £400
Datron 1081 Autocal Standards Multimeter POA
ENI 325LA RF Power Amplifier 250kHz – 150MHz 25W 50dB POA
HP/Agilent HP 34401A Digital Keithley 228 Voltage/Current Source POA Marconi 2955B Radio
Multimeter 6½ Digit £325 – £375 Time 9818 DC Current & Voltage Calibrator POA Communications Test Set – £800

ESR Electronic Components Ltd

All of our stock is RoHS compliant and CE


Your best bet since MAPLIN approved. Visit our well stocked shop for
all of your requirements or order on-line.
Chock-a-Block with Stock
Visit: www.cricklewoodelectronics.com We can help and advise with your enquiry,
from design to construction.
Or phone our friendly knowledgeable staff on 020 8452 0161
Components • Audio • Video • Connectors • Cables
Arduino • Test Equipment etc, etc
3D Printing • Cable • CCTV • Connectors • Components •
Enclosures • Fans • Fuses • Hardware • Lamps • LED’s •
Leads • Loudspeakers • Panel Meters • PCB Production •
Power Supplies • Relays • Resistors • Semiconductors •
Soldering Irons • Switches • Test Equipment • Transformers
and so much more…
Monday to Friday 08:30 - 17.00, Saturday 08:30 - 15:30

Station Road
Visit our Shop, Call or Buy online at: Cullercoats
North Shields
www.cricklewoodelectronics.com Tyne & Wear
Visit our shop at: NE30 4PQ
020 8452 0161 40-42 Cricklewood Broadway
London NW2 3ET Tel: 0191 2514363 sales@esr.co.uk www.esr.co.uk

Practical Electronics | April | 2023 45


Circuit Surgery
Regular clinic by Ian Bell

Electronically controlled resistance – Part 8

T
his month, we conclude our
Gain Gain
series on electronically controlled Low pass High pass

resistance with a look at using di-


gipots to control active filter circuits. Like
previous articles, we will discuss gener-
al circuit design issues and approaches
to simulation using LTspice. Filters are
a large and complex area of electronics, Frequency Frequency
so we will start with some general back-
ground before discussing digipot circuits. Gain Bandpass Gain Bandstop

Filter basics
A filter is a circuit which passes certain
frequencies and rejects others. That is, the
gain is designed to be relatively high over a
range of wanted frequencies (the passband)
and low for frequencies outside this range Frequency Frequency

(the stopband). There are four basic classes


of filter, referred to as ‘bandforms’, which Fig.1. Basic filter bandforms.
are shown in idealised form in Fig.1. These
are graphs of the filter’s frequency response gain A the value (in decibels,dB) is given but their gain decreases more rapidly
– that is, plots of gain versus frequency. by: 20 × log10(A). The (horizontal) frequency near the cut-off.
Low-pass filters let low frequencies through axis of the graph is also usually logarithmic, For an ideal filter, the transition from
and block high frequencies. High-pass filters with the scale marked in multiple-of-ten passband to stopband occurs at a single
let high frequencies through and block low steps, referred to as ‘decades’. frequency. For real filters the transition from
frequencies. Bandpass filters let a specific passband to stopband occurs over a range
range of frequencies through. Bandstop Response types of frequencies so we need to specify exactly
filters reject a specific range of frequencies. There are various filter response types what we mean by ‘cut-off frequency’. For
There are few other bandforms forms available named after their related a flat passband the cut-off is often defined
beyond these basic classes. A notch mathematics, such as Butterworth, Bessel as the frequency where the filter’s gain is
filter is a bandstop filter with a very and Chebyshev filters. The features shown –3dB with respect to the passband gain.
narrow stopband, which can be useful for in Fig.2 vary with different response This is the point where the output signal has
rejecting a specific unwanted frequency. types and there is a trade-off in terms half the power it has in the passband. For
A comb filter has multiple, regularly of desirable features. For example, filters with ripple, the cut-off frequency is
spaced stopbands and passbands. There Butterworth filters have maximally flat usually defined as the frequency where the
are also ‘all pass’ filters which have passbands with a relatively slow change response has dropped by an amount equal
constant gain, but a specific phase shift of gain near the cut-off, while Chebyshev to the ripple size relative to the maximum
response with frequency. filters have significant passband ripple, passband gain (as seen in Fig.2).
The idealised (so-called ‘brick wall’)
filters in Fig.1 cannot be implemented – Gain/dB
it is not possible to have an infinitely fast Pass band
transition from passband to stopband in a
Passband Pass band ripple
real circuit, so the transition occurs over gain
a range of frequencies. Furthermore, the
gain in the passband may not be constant Transition region
Roll-off gradient
(as it is implied by Fig.1) and the stopband in dB/decade
gain will not be either zero (complete
rejection) or constant at some low level. Stop band
Fig.2 shows a low-pass response with Stopband
gain Stopband ripple
various features that occur in real circuits.
Cut-off frequency fc Stopband frequency fS Frequency f
On filter response plots the gain or (log scale)
attenuation is usually expressed in decibels,
which is a logarithmic scale. For voltage Fig.2. Features of filter frequency response curves.

46 Practical Electronics | April | 2023


Fig.3. Low-pass response for various Q values.
The slope of the frequency response in and bandstop filters are often required The scaling factors are typically, but
the transition region/stopband (see Fig.2) in radio circuits. not always, in the range 0.2 to 2. For
indicates how quickly the filter’s gain For low-pass filters we typically Butterworth filters with the cut-off defined
drops as the frequency moves away from require relatively low Q values because as –3dB, the frequency scaling factor is 1.
cut-off. For many filters, at frequencies higher Q values result in a sharp peak We have discussed frequency response
well into the transition region/stopband, around the cut-off frequency (see in detail, but filters are also characterised
the response tends to decrease as a Fig.3). Usually, we would not want in terms of their phase response (how
straight line when plotted on a graph this peak to be very high. The situation phase shift varies with frequency). Phase
of decibels against log frequency. The is the same for high-pass filters. For shift is a measure of delay relative to the
slope is measured in dB per decade and these filters the damping factor (ζ =1/ cycle time at the frequency of interest and
is called the ‘roll-off’. The roll-off may be (2Q)) is often used instead of Q as it is ideally increases linearly with frequency
different (and changing) near the cut-off, perhaps more intuitive However, the – this implies that the absolute delay time
but the term usually refers to ultimate reciprocal relationship means they are is equal at all frequencies. Different filter
roll-off, at a frequency sufficiently far fundamentally the same thing. Higher types have different phase responses. As
from the cut-off. damping results in a slower, smoother well as the variation of gain and phase
The ultimate roll-off is determined transition from passband to stopband. with frequency, the time-domain response
by the order of the filter, the higher the The properties of filters are related to of filters is important. Typically, this is
order the faster the falloff. A single RC resonance – the tendency of some systems characterised by looking at the response
filter is first order and rolls off at 20dB/ to respond at greater amplitude when to a step change in the input voltage.
decade, while an N-th order filter rolls applied oscillations match the system’s Again, this depends on the order and
off at 20 × N dB/decade. The order of natural frequency of vibration. The response type and there are trade-offs
the filter determines the ultimate roll- peaks seen in Fig.3 occur at the resonant in desirable properties.
off, but the response type (Butterworth, frequency. The resonant frequency is a
Chebyshev and so on.) determines the ‘natural’ property of the filter, or to put Filter circuit design
shape of the response near the cut-off. it another way, fundamentally related to There are many different circuits
the mathematics of the filter’s function. which can be configured to implement
Q – quality factor The cut-off frequency is effectively a desired filter response (for example
The Q, or ‘quality factor’, of a filter arbitrarily defined, so they are not the Sallen-Key, multiple feedback and
determines the response type (shape). same thing. state variable). These have different
Fig.3 shows the response of several non-ideal characteristics which might
second-order low-pass filters with Frequency scaling factor need to be taken into consideration and
different Q values. The responses are For a particular response type, order balanced against factors such as cost
the same at frequencies a long way from and definition of cut-off frequency (fc) and complexity. When designing a filter,
cut-off (both high and low) but are very there will be a fixed relationship the bandform and cut off frequency are
different around the cut-off point. between the resonant frequency (f0) and usually straightforward to determine from
For bandpass filters, Q is the ratio of cut-off frequency, which can be the application. The order, response type
bandwidth relative to centre frequency. If expressed as a frequency scaling factor (Butterworth, Chebyshev) and circuit
Electronically
a band-pass filter has aControlled Resistance –(FPart
centre frequency 8 implementation choices will be based
s), such that:
of f0 and a bandwidth of fb the Q factor on the performance requirements – for
is given by Q = f /f . High-Q bandpass 𝑓𝑓! = 𝐹𝐹" 𝑓𝑓# example, how close are unwanted signals
0 b

Practical Electronics | April | 2023 47


𝑅𝑅$
𝐴𝐴 = 1 +
𝑅𝑅%
Fig.4. (left)
C2
Sallen-Key
second-order C2

low-pass filter.
R4
Digipot Digipot
– Vout
Vin R1 R2 W W – Vout
+ Electronically
ElectronicallyControlled
Vin Resistance
Controlled – Part
Resistance 8 8
– Part
Fig.5. (right) +
Electronically Controlled ResistanceUnity-gain
– Part 8 B B
C1 R3 R1
𝑓𝑓! =𝑓𝑓!𝐹𝐹"=𝑓𝑓# 𝐹𝐹R" 𝑓𝑓#
Sallen-Key low- 2 C1
𝑓𝑓 = 𝐹𝐹 𝑓𝑓#
Electronically Controlled Resistance – Partpass
8 ! filter" with
digipot cut- 𝑅𝑅$
𝐴𝐴 =𝐴𝐴1= + 1 + 𝑅𝑅$
𝑓𝑓! =off𝐹𝐹"frequency
𝑓𝑓# 𝑅𝑅% 𝑅𝑅
control. 𝑅𝑅$ %
𝐴𝐴 = 1 +
𝑅𝑅%
to wanted ones and how much do they values than can 𝑅𝑅$ be obtained with the RC should dominate the digipot parasitics,
need to be attenuated. filter,𝐴𝐴which
= 1 + has a maximum Q of 0.5,
𝑅𝑅% so something 1 1 around 10nF may be the
For the various circuit implementations and is often lower. 𝑓𝑓! =smallest
𝑓𝑓! = capacitor value that should be
1 2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶 & 𝐶𝐶
there are equations relating the component The other
𝑓𝑓! = design equations for this used,2𝜋𝜋*𝑅𝑅 but for & 𝑅𝑅 'a&𝐶𝐶real
& 𝐶𝐶& design the details of
values to the resonant frequency and Q. circuit are: 2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& individual digipot devices can be checked
The required response type determines the 1 on datasheets.
Q and frequency-scaling factor. These can 𝑓𝑓! =
2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 𝑅𝑅' 𝐶𝐶
*𝑅𝑅&*𝑅𝑅 & 𝐶𝐶
& 𝑅𝑅'&𝐶𝐶simplifications
& 𝐶𝐶&
be found in filter design tables published 𝑄𝑄 =𝑄𝑄 = Sallen-Key
in various places. A well-known example *𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 𝑅𝑅 𝐶𝐶
& 𝑅𝑅 +
One
& & 𝐶𝐶& + 𝑅𝑅 𝐶𝐶 +
approach
' 𝑅𝑅& ' 𝐶𝐶& +𝑅𝑅 ' (1
& 𝐶𝐶𝑅𝑅 to− 𝐴𝐴)
& 𝐶𝐶' (1 − 𝐴𝐴)
simplifying the Sallen-
of this is the Active Filter Cookbook by 𝑄𝑄 = Key equations is to use equal component
𝑅𝑅& 𝐶𝐶& + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶' (1 − 𝐴𝐴)
Don Lancaster, which was first published values R = R1 = R2, and C = C1 = C2,
in 1975 and is described as the best-selling Where *𝑅𝑅
f 𝑅𝑅' 𝐶𝐶
&is & 𝐶𝐶& resonant frequency.
the which gives:
𝑄𝑄 = 0
book on active filter design. Another 𝑅𝑅These 𝐶𝐶 + 𝑅𝑅 𝐶𝐶 + 𝑅𝑅 𝐶𝐶 (1 − 𝐴𝐴) 1
𝐹𝐹 𝑓𝑓 = 𝑓𝑓 = = 1
& & equations
' & & ' are quite cumbersome,
source is Active Low-Pass Filter Design, an so simplifications are often made, which " # 𝐹𝐹" 𝑓𝑓# != 𝑓𝑓!2𝜋𝜋𝑅𝑅𝐶𝐶 2𝜋𝜋𝑅𝑅𝐶𝐶
1
application note by Jim Karki from Texas we will 𝐹𝐹discuss
" 𝑓𝑓# = 𝑓𝑓! below.
=
2𝜋𝜋𝑅𝑅𝐶𝐶 1
𝑄𝑄 =𝑄𝑄 = 1
Instruments (SLOA049 – see: https://bit.
ly/pe-apr23-ti). An alternative to table- Digipots with1 Sallen-Key 1 filters 3 − 3𝐴𝐴− 𝐴𝐴
𝐹𝐹 𝑓𝑓# = 𝑓𝑓! =
assisted manual calculations is to use a To "use 𝑄𝑄 2𝜋𝜋𝑅𝑅𝐶𝐶
the Sallen-Key= with digipot control
3 − 𝐴𝐴
filter design app or online tool. These make we need to be able to control the cut-off This provides very simple design
things easy but may restrict the options frequency Electronically
1 by varying
just Controlled Resistance –equations
the resistors. Part 8 but does not allow the overall
𝑄𝑄 = Electronically Controlled Resistance – Part1 8
for exactly how the filter is implemented. The capacitors 3 − 𝐴𝐴 should be chosen based gain of the filter1to be set independently of
𝐹𝐹 𝑓𝑓 = 𝑓𝑓#𝑓𝑓 ==𝑓𝑓
on the midpoint of the1required frequency ( #𝐹𝐹the ( 𝑓𝑓 !!= =
𝐹𝐹!2𝜋𝜋𝑅𝑅𝐶𝐶
" 𝑓𝑓# 𝑛𝑛 circuit can be designed
𝐹𝐹√𝑓𝑓#& √𝑛𝑛
Filters represent a huge ‘design space’ Q value. &The
2𝜋𝜋𝑅𝑅𝐶𝐶
𝑓𝑓! =
of possibilities – bandform, response control𝐹𝐹(range.
𝑓𝑓# = 𝑓𝑓The ! = resonant and hence cut- by choosing a"required response, which
type, order, circuit implementation and off frequency is set 2𝜋𝜋𝑅𝑅𝐶𝐶
by &R√1𝑛𝑛and R2, which sets the Q, and choosing R3 and R4 to
√𝑛𝑛𝑅𝑅 𝑛𝑛
1 𝑄𝑄 = = $√gain
so on. To keep things manageable for need to be independently
𝐹𝐹( 𝑓𝑓# = 𝑓𝑓! =
controlled, 𝐴𝐴 = 1𝑄𝑄+the
obtain 2 2 𝑅𝑅required (A) for that Q.
2𝜋𝜋𝑅𝑅𝐶𝐶 √ 𝑛𝑛
𝑛𝑛 𝐴𝐴 𝑅𝑅
= %1 +
$
the remainder of this article on using which implies 𝑄𝑄 = &use√ of two digipots in The Q could be set independently of the
digipots with filters we will just look at rheostat mode. As 2 we have discussed frequency with𝑅𝑅a% digipot, as mentioned
second-order low-pass Sallen-Key Filters. previously,√digipot 𝑛𝑛 resistance values are above, but the gain variation may need to
Sallen-Key filters are widely used, and often not 𝑄𝑄 =particularly accurate,1which be compensated 1 1 for by another variable
2 1 = 1
tools are available to help design them will affect the accuracy 𝑅𝑅with =𝑅𝑅 =which the = gain stage. The frequency = 5181
= 5181
is set by
1 1 2𝜋𝜋𝑓𝑓2𝜋𝜋𝑓𝑓
! 𝐶𝐶& √ 𝑛𝑛 √𝑛𝑛𝑓𝑓2𝜋𝜋
𝐶𝐶 ! =× 2𝜋𝜋 852× × 15𝑛𝑛𝐹𝐹
852 × 1
15𝑛𝑛𝐹𝐹 × √5.099
× √5.099
(select the required component values). cut-off frequency can be controlled. ! &
Use 2𝜋𝜋*𝑅𝑅
choosing 𝑅𝑅 C𝐶𝐶 𝐶𝐶
and controlling R with two
𝑅𝑅 = = = 5181 𝑓𝑓! = & ' & &
Low-pass filters are commonly required in 2𝜋𝜋𝑓𝑓! 𝐶𝐶of
& √a𝑛𝑛 dual2𝜋𝜋digipot
× 852 ×device 15𝑛𝑛𝐹𝐹 × √5.099
would usually digipots2𝜋𝜋*𝑅𝑅 in rheostat& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶mode
& set to the same
microcontroller circuits for anti-aliasing 1 be a good option. 1 resistance to set the resonant frequency.
𝑅𝑅 =
and reconstruction filters before/after = We are probably less likely=to5181 want to The resonant
2𝜋𝜋𝑓𝑓! 𝐶𝐶& √𝑛𝑛 2𝜋𝜋 × 852 × 15𝑛𝑛𝐹𝐹 × √5.099 𝑅𝑅 𝑅𝑅 frequency is calculated
ADCs and DACs, where cut-off frequency control the Q with a digipot – in most 𝐷𝐷 =𝐷𝐷the
from 𝑆𝑆𝑅𝑅
= required
𝑆𝑆& 𝐶𝐶&
𝐶𝐶
cut-off frequency using
*𝑅𝑅& 𝑅𝑅')* 𝑅𝑅)*
programmability may be desirable. cases the requirement 𝑅𝑅 would be𝑄𝑄for = a the frequency-scaling 𝑅𝑅 𝐶𝐶 factor.
𝐷𝐷 = 𝑆𝑆 𝑅𝑅 𝐶𝐶 + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶&' (1 *𝑅𝑅 ' − & 𝐶𝐶𝐴𝐴)
&
fixed response shape 𝑅𝑅)* with a variable&𝑄𝑄&= 𝑅𝑅The gain variations discussed above
& 𝐶𝐶& + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶' (1 − 𝐴𝐴)
Sallen-Key low-pass filter cut-off frequency. 𝑅𝑅 However, it would can be avoided by using a fixed gain.
Fig.4 shows a Sallen-Key low-pass filter. 𝐷𝐷 = 𝑆𝑆 to use a digipot to set the
be possible This requires at least the two resistors
𝑅𝑅)*
It comprises a frequency-dependent amplifier gain (via R3 and R4) and hence or the two capacitors to have different
Resistance circuit
– Part 8formed by R , R , C and C , and 1
1 2 1 2 make Q programmable. We discussed use 𝐹𝐹" 𝑓𝑓#values.
= 𝑓𝑓! =A commonly 1
used variant of the
a non-inverting op amp amplifier. The of digipots to control op amp amplifier Sallen-Key 2𝜋𝜋𝑅𝑅𝐶𝐶
𝐹𝐹" 𝑓𝑓# = 𝑓𝑓!filter = is the unity-gain version
𝑓𝑓! = 𝐹𝐹" 𝑓𝑓#gain (A) is set by R and R , 2𝜋𝜋𝑅𝑅𝐶𝐶
amplifier gain in Part 5. shown in Fig.5, which also shows how
3 4
1
and is given by: Use of digipots may introduce 𝑄𝑄 =
the digipots are1 used.
limitations on the filter design. For Another3− 𝑄𝑄 𝐴𝐴=design simplification approach
𝑅𝑅$ 3 − 𝐴𝐴
𝐴𝐴 = 1 + example, their parasitic capacitance is is to set equal resistors and capacitors
𝑅𝑅% likely to be higher than the same filter with ratio n, that is R = R1 = R2, and C2 =
using fixed resistors. Parasitic capacitance nC1 which gives:
1
The frequency-dependent circuit is is the unwanted capacitance inherent in𝐹𝐹( 𝑓𝑓# = 𝑓𝑓! = 1
similar to a two-stage RC filter, but with structure of the pins and circuitry of the 𝐹𝐹( 𝑓𝑓# = 𝑓𝑓! =& √𝑛𝑛
2𝜋𝜋𝑅𝑅𝐶𝐶
1 2𝜋𝜋𝑅𝑅𝐶𝐶& √𝑛𝑛
C connected to positive feedback from digipot device. This will limit the upper
𝑓𝑓! =2 𝑛𝑛
the2𝜋𝜋*𝑅𝑅
amplifier, rather than to ground. This frequencies than can be used or accurately √
& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 𝑄𝑄 =
allows the circuit to have much higher Q controlled. Frequency-setting capacitors 2𝑄𝑄 = √𝑛𝑛
2
48 Practical Electronics | April | 2023
*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 1 1
𝑄𝑄 =
𝑅𝑅$
ronically Controlled Resistance – Part 8 𝐴𝐴 = 1 +
𝑅𝑅%
𝑓𝑓! = 𝐹𝐹" 𝑓𝑓#
trolled Resistance – Part 8
Fig.6. LTspice
𝑅𝑅$ 1 schematic for 1kHz
𝑓𝑓! = 𝐹𝐹" 𝑓𝑓# 𝑓𝑓! =
𝐴𝐴 = 1 + unity-gain Sallen-Key
𝑅𝑅% 2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶&
low-pass filter.
𝑅𝑅$
𝐴𝐴 = 1 +
𝑅𝑅%
1 *𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶&
𝑓𝑓! = 𝑄𝑄 =
2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 𝑅𝑅& 𝐶𝐶& + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶' (1 − 𝐴𝐴)
1
𝑓𝑓! =
2𝜋𝜋*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶&
*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 1
𝑄𝑄 = 𝐹𝐹" 𝑓𝑓# = 𝑓𝑓! =
𝑅𝑅& 𝐶𝐶& + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶' (1 − 𝐴𝐴) 2𝜋𝜋𝑅𝑅𝐶𝐶

*𝑅𝑅& 𝑅𝑅' 𝐶𝐶& 𝐶𝐶& 1


𝑄𝑄 = 𝑄𝑄 =
𝑅𝑅& 𝐶𝐶& + 𝑅𝑅' 𝐶𝐶& + 𝑅𝑅& 𝐶𝐶' (1 − 𝐴𝐴) 3 − 𝐴𝐴
To design with this approach the1required ripple size below the peak gain, which next represents a larger frequency change.
response type sets the 𝐹𝐹" 𝑓𝑓#Q,=which
𝑓𝑓! = in turn sets in this case is the point where it crosses This in turn means that it is less likely
2𝜋𝜋𝑅𝑅𝐶𝐶
the capacitor ratio (n). The base capacitance 0dB as it transitions into the stopband. that exactly the right resistance value will
1 at the higher frequency end
value, n and the 1calculated 1 resonant This occurs at 1kHz, as designed. 𝐹𝐹( 𝑓𝑓# be
= 𝑓𝑓available
! =
𝐹𝐹" 𝑓𝑓# =
frequency 𝑓𝑓!used
are = to set 𝑄𝑄 the
= resistor value. 2𝜋𝜋𝑅𝑅𝐶𝐶& √𝑛𝑛
of the programmable range.
2𝜋𝜋𝑅𝑅𝐶𝐶 3 − 𝐴𝐴
Setting the digipot code As discussed previously (see Part 5 in
Example design 1 In a typical programmable filter application, √𝑛𝑛 2023) digipots can be modelled
PE, January
Consider𝑄𝑄a = filter
3 − 𝐴𝐴of Chebyshev type with there are likely to be a set of required cut-of as 𝑄𝑄two
= resistors R and R such that the
2 A B
2dB passband ripple and 1kHz cut-off. 1 If frequencies. For these cut-off frequencies total resistance RA + RB = RAB where RAB
we look it up, Q𝐹𝐹(=𝑓𝑓#1.129 = 𝑓𝑓! =
and Fs =√0.907
2𝜋𝜋𝑅𝑅𝐶𝐶 to be implemented in a circuit like that is the resistance between the terminals A
& 𝑛𝑛
and using the equal-resistor unity-gain in Fig.5 the required resistor values must and B and the specified resistance of the
Sallen-Key circuit1we need n = 4Q2 = fall within the range of resistance1values digipot. In1rheostat mode we use just one
𝐹𝐹( 𝑓𝑓# Choosing
= 𝑓𝑓! = √𝑛𝑛 𝑅𝑅 = combined = = 5181
5.099. C =
2𝜋𝜋𝑅𝑅𝐶𝐶& √𝑛𝑛
1 𝑄𝑄 =
15nF gives C 2 = available from the digipot, 2𝜋𝜋𝑓𝑓! 𝐶𝐶& √𝑛𝑛 2𝜋𝜋 of these
× 852 × resistances, say from
15𝑛𝑛𝐹𝐹 × √5.099 terminal B
76.48nF. For 1kHz cut-off we 2 need f = with fixed capacitor values. This means to the wiper (as drawn in Fig.5). For a
0
Fsfc = 0.852 × 1000 = 852. We can then that very wide frequency ranges will not digipot with S steps we need a digital code
√𝑛𝑛
calculate R𝑄𝑄 as: = be possible, but something from 10:1 to D to set a resistance value R as follows:
2 100:1 should be possible.
1 1 𝑅𝑅
𝑅𝑅 = = =The
5181 basic filter calculations discussed 𝐷𝐷 = 𝑆𝑆
2𝜋𝜋𝑓𝑓! 𝐶𝐶& √𝑛𝑛 2𝜋𝜋 × 852 × 15𝑛𝑛𝐹𝐹 × √5.099above determine the required resistance 𝑅𝑅)*

1 1 values, but these need to be mapped to the The actual resistance obtained is:
= = = 5181 digipot codes giving the nearest resistance 𝐷𝐷
2𝜋𝜋𝑓𝑓! 𝐶𝐶& √𝑛𝑛 2𝜋𝜋 × 852 × 15𝑛𝑛𝐹𝐹 × √5.099 values. The exact resistance required may 𝑅𝑅 = 𝑅𝑅)*
𝑅𝑅 𝑆𝑆
𝐷𝐷 = 𝑆𝑆 not be available from the digipot, leading
Fig.6 shows an LTspice schematic 𝑅𝑅)* of the to errors in the frequency setting. The In some cases, there may be a significant
filter implementation. The simulation more positions the digipot has the more difference between the required and
results (AC 𝑅𝑅 likely the frequency can be set close to obtained resistance, in other cases they
𝐷𝐷 =analysis
𝑆𝑆 to plot frequency
response) for this 𝑅𝑅)*
circuit in Fig.7 show the the desired value. will be close. For example, to set a 10kΩ,
gain is 0dB at low frequencies (unity gain). The reciprocal nature of the frequency 256-step digipot to 5181Ω (from the above
The gain peaks at +2dB (this is the 2dB to resistance relationship means that at example) requires a digital code of 256 ×
passband ripple). The cut-off frequency higher frequencies (lower resistance) each (10000 / 5181) = 133. The actual resistance
for this type of filter is defined as the step in resistance from one code to the is 5195Ω , an error of just 0.3%. For a
100kΩ, 256-step digipot the code required
is 13 and the resistance is 5078Ω, a 2%
error. Smaller resistances may produce
larger errors with a given digipot. For
example, 518.1Ω for a 10kHz cut-off with
the above circuit requires codes 13 and
1 with resistance errors of 2% and 25%
respectively for the 10kΩ and 100kΩ
digipots. This assumes a perfectly accurate
digipot, but the RAB value itself may be
subject to quite a large tolerance, for
example 20% in some cases.

Design tools
The filter design calculations above, and the
associated need to obtain the correct Q and
frequency-scaling factor can be avoided by
using a filter design app or online utility.
These tools may reduce the options for
Fig.7. Simulation results for the circuit in Fig.6. component selection compared with manual

Practical Electronics | April | 2023 49


Fig.8. (left)
FilterLab
bandform and
response type
setting.

Fig.9. (right)
FilterLab filter
parameter
settings.

Fig.10. (above) FilterLab circuit settings.


Fig.11. (right) Example FilterLab result.

design, which could be a problem in the Unlike the simplified approach above, digipot will be smaller than with a fixed
context of digipot-controlled circuits. We it is not necessary to have equal resistors. response type.
need to be able to find a set of resistor values In fact, by using different resistor values As was seen in the equal-resistor
to set different cut-off frequencies using a (as calculated by the tool) the response example design above, the capacitor ratio
circuit with the fixed capacitor values and shape can be changed as well as the cut- can influence the Q. The resistors do not
op amp circuit gain. This means we have off frequency, allowing the shape as well have to be equal but similar values will
to be able to set the capacitor values and as cut-off to be programmed. The way the make it easier to make use of a dual digipot.
let the tool calculate the resistor values for numbers work means that if a range of In general, the feedback capacitor (C2 in
a fixed-gain circuit such as the unity-gain response types is required the range of Fig.5) will be larger than the capacitor at
Sallen-Key discussed above. cut-off frequencies possible with a given the op amp input (C1). Unlike the above
example, standard capacitor values should
be used for a real design.

FilterLab
One filter design tool that allows you
to set capacitor values is FilterLab from
Microchip – see: https://bit.ly/pe-apr23-mc
To design a filter using this app, select
Filter > Design from the menu and step
through the three tabs in the dialog (see
Fig.8 to Fig.10). The first tab is used to
select the bandform and response type.

Simulation files
Most, but not every month, LTSpice
is used to support descriptions and
analysis in Circuit Surgery.
The examples and files are available
Fig.12. LTspice schematic for Sallen-Key filter with digipot control. for download from the PE website.

50 Practical Electronics | April | 2023


Here we have selected Chebyshev lowpass
as in the example above. The second tab sets
the filter parameters, here we selected ‘Force
filter order’ – this is to help make sure the
tool uses the required circuit to implement
the design. We select 1000Hz cut-off and
–2dB for the passband to match the 2dB
ripple Chebyshev design discussed above.
The third tab allows the circuit type to be
selected (Sallen-Key in this case) and the
capacitor values to be set, so they are fixed
in the circuit implementation. To do this,
click on both capacitors and select the value
from the dropdown list. The result is shown
in Fig.12 – the schematic of the filter created
by the app. For full details of using FilterLab
consult the manual on the download page.

Example design
Fig.13. Simulation results from the circuit in Fig.12.
FilterLab was used to create three more
circuits with different cut-offs. These can be simulated using all the code combinations in one sweep simulation we can use
the circuit in Fig.12. Using the procedure described above, the LTspice table function which uses an index to look up the
digipot codes were calculated for a 256-step 10kΩ digipot for corresponding value. For four configurations we need index
the following frequencies: values 1 to 4 which can be achieved by defining a parameter
R1 codes: 140 98 49 33 called FSET (frequency set), sweeping it in steps of 1 from 1 to
R2 codes: 239 167 84 56 4 and using this in the look up. For example, for R1:
700Hz 1kHz 2kHz 3kHz
.param Fset=1 RAB=100k N=256
In LTspice we can use a behavioural resistance (as used in R = table({Fset},1,140,2,98,3,49,4,33)*{RAB}/{S}
previous parts) to calculate the actual digipot resistance using
the formula above with the RAB resistance and number of digipot The results of the simulation are shown in Fig.13 and confirm
steps as parameters (RAB and S respectively). To run through that the filter responses are as designed.

EE M
GET T
Order direct from
FR RO £8.99
-

LATES HE
CD
ELECTRONICS
T CO
TEACH-IN 9
FROM THE PUBLISHERS OF

OF OU PY
TEACH R
-IN SE
Electron Publishing GET TESTING!
Electronic test equipment and measuring
techniques, plus eight projects to build
FREE
CD-ROM
TWO TEACH
-INs
FOR THE PRICE

RIES OF ONE

AVAILA
• Multimeters and a multimeter checker
• Oscilloscopes plus a scope calibrator
• AC Millivoltmeters with a range extender

BL PRICE £8.99
NOW! E
• Digital measurements plus a logic probe
• Frequency measurements and a signal generator
• Component measurements plus a semiconductor
junction tester

(includes P&P to UK if ordered direct from us) PI C n ’ Mi x


I n c l u d i n g Pr ac t i c al Di g i t al Si g n al Pr o c e s s i n g

PLUS...
YOUR GUIDE TO THE BBC MICROBIT
A LOW-COST ARM-BASED SINGLE-BOARD
COMPUTER

Teach-In 9
Get Testing

Teach-In 9 – Get Testing! Three Microchip


PICkit 4 Debugger
Guides
Files for:
PIC n’ Mix

PLUS
Teach-In 2 -Using
PIC Microcontrollers.
In PDF format

This series of articles provides a broad-based introduction to choosing and using a wide range © 2018 Wimborne Publishing Ltd.
www.epemag.com

of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints Teach In 9 Cover.indd 1 01/08/2018 19:56

and tips on using, and – just as importantly – interpreting the results that you get. The series
deals with familiar test gear as well as equipment designed for more specialised applications.
 The articles have been designed to have the broadest possible appeal and are applicable to all branches of electronics.
The series crosses the boundaries of analogue and digital electronics with applications that span the full range of
electronics – from a single-stage transistor amplifier to the most sophisticated microcontroller system. There really is
something for everyone!
 Each part includes a simple but useful practical test gear project that will build into a handy gadget that will either
extend the features, ranges and usability of an existing item of test equipment or that will serve as a stand-alone
instrument.  We’ve kept the cost of these projects as low as possible, and most of them can be built for less than £10
(including components, enclosure and circuit board).

PLUS! You will receive the software for the PIC n’ Mix series of articles and the full Teach-In 2 book – Using PIC
Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit De-
bugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4 Debugger User’s Guide.

ORDER YOUR COPY TODAY: www.electronpublishing.com

Practical Electronics | April | 2023 51


AUDIO AUDIO OUT

L R

OUT By Jake Rothman

Universal op amp board (optimised for audio


electronics) – Part 3 (dual op amp version)

I
n the December 2022
R14L*
and January 2023 issues of Sum input L
PE we described a universal C4L R7L
+ C7L* C8L*
board for single op amps. This *Feedback
components L
month we’ll introduce one
R10L* R11L*
for dual op amps which are Bias L
more common and offer better
R3L –input
value. The dual NE5532 for 0V pad L
example, is half the price C1L C3L R5L Output L
+

2
Input – L – R12L C9L
of its single counterpart, 6

+
R4L IC1a
the NE5534, so you get four
+

3
Input + L +
times as many op amps for C2L R13L
+input
the money. Also, one of the R2L
V+ R6L
pad L
few op amps that’s noticeably R1L R9
Vb bias
better for audio than the C5L
Vb
NE5532/4, the LM4652, only
comes in a dual package. + 0V
R8 Link pads L
At the same time, PCB C13
designer Mike Grindle and
I decided to do a whole host
R14R*
of adapter boards for various Sum input R *Feedback
C4R R7R components R
op amp packages, which we’ll Power
+

C7R* C8R*
input
come to next month. 0V
RS2 0V
R10R* R11R* 0.5W
Fearful symmetry + supply
The general circuit of the Bias R V+
dual board is the same as the R3R –input
+ – supply
0V D2 C11
single PCB (Fig.4 in Part 1) pad R
C1R C3R R5R 0V
but duplicated, as shown in Output R
+

6 8
Input – R – C9R
7
+

Fig.29. The dual chip (IC1a R4L IC1B


+

5
and IC1b) is shared between Input + R + 4 R12R
C10
the left and right channels. C2R
100nF R13R
R6R +input
This gave Mike an excuse R2R pad R RS1
0.5W
to create a symmetrical V–
R1R
C5R
mirror-imaged board. The D1 C12
overlay is shown in Fig.30. +
0V
Most of the part numbering Link pads R
is the same – except for R4
and R5 which are swapped.
The component numbers
common to both channels Fig.29. Circuit diagram for the dual universal audio op amp PCB. This is virtually the same as the
are prefixed L and R. The single circuit, bar a single bias network and some extra power supply zener regulators.
half-rail bias components are
renumbered R8, R9 and C13, since only is to be supplied from say a power Don’t be deferential,
one network is needed, shared between amplifier, where the rails are typically go differential!
both channels. Finally, a dual-rail Zener ±22V to ±60V. This situation commonly A suitable dual-channel differential
regulator circuit is added to enable the crops up where an amplifier needs the amplifier to create balanced inputs is
board to be used with supply voltages addition of balanced inputs, such as shown in Fig.31. The main differential
higher than the op amps’ maximum. when converting a Hi-Fi amplifier for amplifier resistors R4, R5, R6 and
This facility is useful if the board professional use. R14 are all 3.3kΩ. This gives a total

52 Practical Electronics | April | 2023


Access these pads for Fig.30. Overlay for the dual op amp
Bias R3L R6L
Non-inverting input IC1a
linking signals to bias or 0V board. It’s a shame to conceal its
Vbias 0V
0V beautiful symmetry in a metal box, but
hum pick-up is a nightmare with RIAA
R3L R2L
+ 0V pre-amps because of the bass boost.
C3L –input L
C2L +input L
R1L
Inverting
an earth loop could develop with the
R5L
+ C1L R6L
input IC1a mains safety earth if metal bolts are
R10L 0V
used. It’s best to use plastic stand-

+
R7L R13L Sum input L
C7L
R14L R11L offs in this situation. A subtle point:
adding the balanced input board
+

R12L R4L 0V
C9L
C8L* Output L made the amplifier have nasty turn-
C4L + RS1 on/off thumps, somewhat negating its
C12
C5L C10 D1
0V
advantages. Of course, this problem
R R C13
IC1 9 8 +
V+ only became apparent in the field, not
V–
C5R D2 RS2 on the test bench. I’ve found the 5534
C11
C4R series op amps to be especially bad in
C8R*
+ C9R
0V this regard. Replacing it with a LM4562
R12R R4R Output
stopped the turn-off thump and gave
+

R14R R11R slightly lower hiss. The switch-on


C7R
R7R 0V
R13R thump was greatly reduced by putting
+

R10R Sum input R


R6R
R5R
Inverting a 470µF 35V electrolytic capacitor
+ C1R C2R input IC1b
C3R
+ R1R (C10) across the op amp’s positive/
0V
–input R** negative power pins.
+input R**
R3R R2R **Ignore the error on the PCB’s
silkscreen, the Right input Molex The vinyl countdown
+/– pin positions are as shown above.
Non-inverting input IC1b 0V Vbias 0V For those of us who go round charity
*Note for C8L/R there is space for
Access these pads for two devices so that capacitors shops buying scratchy old sound effects
linking signals to bias or 0V Bias R3R R6R can be in parallel, or an axial device. records, it seemed sensible to make a

bridging impedance of 9.9kΩ R14L


across the input pins on the 3.3kΩ
1%
XLR. 10kΩ is the standard Sum input L
C4L R7L
+

accepted minimum, so C7L C8L


we are near enough. If 330pF
5%
the equipment driving R11L
Bias L R10L
the amplifier can accept
a lower load impedance, R3L C3L R5L –input
0V 22µF 3.3kΩ pad L
such as 600Ω, reducing the 16V
C9L
C1L 1% R12L 100µF Output L
resistance will reduce the
+

2
Input – L – 47Ω 10V
1
+
IC1a
Johnson noise. The overlay
3 LM4562
+

is shown in Fig.32 and the Input + L +


C2L R4L R13L
final assembled board in 22µF V+ 3.3kΩ
+input 100kΩ
R2L 16V 1%
Fig.33. The photo in Fig.34 100kΩ
pad L
Vb bias L R6L
shows the board installed R1L R9L 3.3kΩ
100kΩ C5L
in an old Citronic SA 200 VbL
1%
330pF
power amplifier, banishing 5%
+ 0V
its unbalanced jack inputs R8L Link pads L
for a hum-free heaven. The C13L
R14R Link Used Not used
power rails were ±43V and 3.3kΩ
1%
the Zener resistors (RS1 Sum input R
and RS2) were chosen to be C4R R7R Power
+

C7R C8R input


0V
2kΩ 0.5W, dropping 27V. 330pF
5%
The current is split with RS2* 0V
R10R R11R D2 0.5W
the 16V Zener diodes (D1 BZY88C16
16V + supply
and D2) passing 5mA, and Bias R

the op amp 8mA. (Note that V+ + C11


–input – supply
R3R C3R R5R 47µF
if you want just normal op 0V 22µF 3.3kΩ pad R 25V C9R
16V 1% 0V
amp supply voltages (±15V) C1R 100µF Output R
+

6 8
Input – R – 10V
then RS1/2 should both be IC1b 7
+

5 LM4562
+

22Ω and the Zener diodes Input + R + 4 R12R


R4R C10 47Ω R13R
can be omitted). C2R 3.3kΩ 100nF 100kΩ
22µF 1% R6R +input RS1*
Note that since the 16V pad R 0.5W
R1R 3.3kΩ
board mounting holes are 100kΩ R2R
1%
C5R V–
connected to signal ground, 100kΩ D1 C12
330pF BZY88C16 + 47µF
Link pads R 5% 16V 25V
0V
Fig.31. Dual-channel differential/ *RS1/2: 2kΩ for ±43V supply, 22Ω for normal op amp supply (±15V)
balanced input amplifier.

Practical Electronics | April | 2023 53


Fig.32. Overlay for dual balanced
Access these pads for input board.
linking signals to bias or 0V Bias R3L R6L

0V Vbias 0V decrease in the signal to noise ratio


(−77dB to −76dB referenced to 5mV
input). The impedance of the feedback
R2L
+ 0V network was also doubled, as shown in
C3L –input L
+input L
Fig.24 (lower) in Part 2. This increases
R1L C2L
noise a little, but in the context of a
R5L
R6L needle ploughing a dust-filled groove,

+
R13L it is practically insignificant. However,
R14L the lower loading (442Ω at 20kHz) of
R12L R4L the feedback network improves the
C9L 0V
Output L overload performance on scratches.
C8L* + RS1
C12
The circuit is shown in Fig.35, the
C10 D1
C5L
0V overlay in Fig.36 and the assembled
IC1
+
V+ board in Fig.37.
V–
C5R D2 RS2 If you want to use a single-rail power
C11
supply for this design, the half-rail
C8R* 0V
+ C9R Output
bias network is deployed and the
R12R R4R
extra components are inserted. These
R14R
comprise R9, R8 (both 22kΩ) and
R13R
C13 22µF 25V. R6L and R6R must be
+

R6R
R5R connected to the bias pads via links.
C2R
C3R
+ R1R
0V
–input R Bidirectional caps
+input R
R2R Note that the polarisation of electrolytic
*Note for C8L/R there is space for
coupling capacitors does not matter
two devices so that capacitors with op amps on dual-rail supplies.
0V Vbias 0V can be in parallel, or an axial device.
It makes no real difference since
Access these pads for
Bias R3R R6R
aluminium electrolytic and solid-
linking signals to bias or 0V
tantalum capacitors can tolerate a
continuous reverse polarity of up to
a few hundred millivolts. With the
lower-cost stereo RIAA preamplifier the old days, when mains-powered 5534 series of op amps, where high
using one board, useful for installing synchronous motors were used, an source impedances are presented to the
inside rescued cheap decks. It can be overwind was sometimes placed on the input pins (as in the RIAA amplifier)
possible to derive the preamplifier coil, effectively making a transformer. input bias current flowing through the
power from the motor transformer Going from two single NE5534s to resistance always generates a small
using voltage-doubler networks. In a dual NE5532 incurs a small 1dB negative offset. These ICs have NPN
input transistors run at a relatively
high collector current, giving rise to
significant input currents.

Components
The special value 1% RIAA equaliser
components C7 (24.76nF), C8 (7.15nF),
R5 (442Ω), R10 (127kΩ) and R11
(10.5kΩ) are available in a bargain
pack from PE PCB Service or the
author (see page 35 for contact details).
Having built several of these boards
and plotted their frequency responses
on an Audio Precision analyser I was
pleased to see all the plots matched
looking like a single plot when
overlaid. This shows the benefits of
1% tolerance devices and the near
cancellation of the −200ppm/°C

Fig.33. A view of the stuffed dual


balanced input board. For the eagle-
eyed among you, note that there was
a small error on this prototype board –
the op amp’s pin 5/6 connections were
reversed. This has been corrected for
production boards. (They will also have a
smart red silk screen!)

54 Practical Electronics | April | 2023


negative temperature coefficient
of polystyrene capacitors with the
+100ppm/°C positive coefficient of
metal-film resistors.

Distorted view
I thought it would be interesting to
measure the distortion of the RIAA
amplifier with regard to the high gain
and complex filtering. Interestingly, the
only way I could get meaningful results
was to precede the RIAA amplifier with
a passive inverse RIAA filter – shown in
Fig.38 – to get an overall (theoretical) flat
frequency response. This attenuation
followed by gain, gives rather high noise
and hum levels which are added to the
distortion residual. The end result was
a total harmonic distortion and noise
(THD+N) figure of 0.02%, as shown in
Fig.39. This is ten-times higher than a
normal non-inverting 5532 amplifier
with moderate gain. I thought this was
bad, but other amplifiers I measured
were much worse. Again, in the context Fig.34. Another view of the assembled balancing board installed in a power-amplifier.
of vinyl playback distortion,
typically in the order of a few
R14L
percent, it is little to worry
Sum input L
about. However, distortion C4L R7L C7L* C8L*
+

plots do reveal much about 24.76nF, 1% 7.15nF, 1%

amplifier behaviour during


*Special RIAA R10L* R11L*
design, even if its effect 127kΩ, 1% 10.5kΩ, 1%
Bias L components
may never be heard. A
strange surprise was that the R3L C3L R5L* –input
0V 100µF 442Ω pad L
THD+N was lower with the C1L 10V 1%
C9L
R12L 100µF Output L
+

2
single-rail version. I suspect Input – L – 47Ω 10V
IC1a 1

+
R4L
additional power supply 100Ω 3 NE5532
+

Input + L +
noise was to blame. C2L
R13L
33µF V+
R6L +input 220kΩ
R2L 10V 130kΩ pad L
A useful device R1L
75kΩ
Vb bias
These general-purpose op R9
C5L
amp boards were designed Vb 220pF
with experimentation in + 0V
mind and of course that’s R8 Link pads L
C13
what happened while
messing about with the RIAA
R14R
board. I was thinking about
Sum input R
the power supply for a single- C4R R7R C7L* C8L*
Power
+

24.76nF, 1% 7.15nF, 1%
rail RIAA preamplifier, and it 0V input
suddenly struck me: why not *Special RIAA R10L* R11L*
RS2
0V
22Ω
make it phantom powered? components 127kΩ, 1% 10.5kΩ, 1% 0.5W
This would be very useful Bias R
+18V
because most mixing desks V+ + C11
–input –18V
and USB audio interfaces R3R C3R R5R*
pad R
D2 10µF
0V 100µF 442Ω 25V C9R
have microphone inputs C1R 10V 1% 0V 100µF Output R
+

6
(with phantom power) not Input – R – 8 10V
IC1b 7
+

R4R
RIAA inputs for record 100Ω 5 NE5532
+

Input + R + R12R
4
decks. A quick conflab with C2R C10 47Ω R13R
Mike Grindle revealed he was 22µF R6R +input 100nF RS1 220kΩ
16V 130kΩ pad R 22Ω
R1R
wondering how to connect a 1% 0.5W
R2R
record deck to his mixer for a 75kΩ V–
C5R C12
gig and my son had a similar 220pF D1 10µF
+
25V
problem with a Focusrite 0V
computer interface. The Link pads R
Link Used Not used
classic and expensive way of
phantom powering a circuit
is to use output transformers Fig.35. Stereo RIAA pre-amplifier circuit. The special RIAA equalisation components marked * are
and harness the power from available as a kit from the PE PCB Service.

Practical Electronics | April | 2023 55


Fig.36. Overlay for the stereo RIAA amplifier.
Access these pads for
Bias R3L R6L linking signals to bias or 0V

0V Vbias 0V a centre tap, as shown in Fig.40. The


physical ‘lash-up’ is shown in Fig.41.
A few measurements of the current
R2L
+ 0V capability of some representative
C3L –input L
+input L
phantom-powered input XLRs showed
C2L
a typical maximum current delivery of
R5L
R6L 6.6mA. This concurs with the standard
R10L

+
R13L dual 6.8kΩ feed resistors used. Most
C7L
R11L commercial units tested gave less than
R12L R4L
the official +48V. A £29 Behringer
C9L 0V
C8L Output L mixer gave +44V and the Focusrite gave
+ RS1 +46.5V. However, it was clear that it
C12
C5L C10 was possible to power a 5532 op amp,
0V
IC1 V+ that typically needs a 30V single rail
V–
C5R RS2 drawing 8mA. The setup was tested
C11
and worked perfectly. However, the
C8R
0V transformers were expensive (at least
R4R Output
R12R £20 a pair) and I was worried about the
R11R stress on the single op amp chip, already
C7R
R13R doing 50dB gain at 20Hz, along with
+

R10R
R6R turntable rumble, possibly saturating the
R5R
+
+ C1R C2R transformer cores. My usual approach
C3R 0V
–input R
is to prove a concept works with no-
+input R compromise expensive parts – and
R2R
then find a way of doing it for less.
*Note for C8L/R there is space for The transformers’ unique advantage, a
two devices so that capacitors
0V Vbias 0V can be in parallel, or an axial device. floating output, was not realisable here
Access these pads for
anyway, because of the earth return
linking signals to bias or 0V Bias R3R R6R required for the phantom power.

Quasi-balancing
Since the output of the RIAA
amplifier is around 150 to 600mVpk-pk
with a typical moving magnet cartridge,
a truly balanced output is not necessary
for low noise. It is perfectly satisfactory
to drive just one leg of the balanced
line. The other leg is held at the
same impedance to ground to obtain
common-mode interference rejection
of the balanced input. Of course, both
lines can be used to provide phantom
power. This is blocked off by capacitors
and steered to the op amps’ power
rail via resistors. Unlike the centre-
tapped transformer supply where
cancellation occurs, there is audio
riding on top of the +48V DC, so a big
supply decoupling capacitor (C11)
is necessary. The circuit is shown in
Fig.42. Connecting the 820Ω phantom
feed resistors must be done partly off-
board, as shown in Fig.43a.

Lighting-up time
It’s a good idea to put in a low-current
LED to show phantom power is present
(there could be one for each XLR). I use
Kingbright L-7104SEC orange LEDs
because they are bright enough with
1mA. They are ‘costly’ (for LEDs) at
25p from Rapid (part No. 72-8972),

Fig.37. Assembled stereo RIAA PCB.

56 Practical Electronics | April | 2023


Output
Oscillator

Control
RIAA amplifier link
30dB gain at 1kHz

Output Distortion
analyser
Input Input Input

Passive inverse
RIAA filter dB
Loss approx 40dB Fig.38. (left) Plotting the distortion of RIAA amplifiers is tricky. In
at 1kHz
this set-up, the overall frequency response is rendered flat by
f inserting an inverse RIAA filter on the input.
Opposite curves in series give flat response Fig.39. (above) Distortion plot for RIAA amplifier using an NE5532.
Most of the distortion was noise due to the massive attenuation
(-40dB) from the inverse filter.

but worth it. Every milliamp


470Ω
counts in this application. To
1N4001 0.5W Optional power the LED, I used four
Single-rail stereo RIAA board external
V+ 28V to 34V power 150kΩ resistors connected to
Polyfuse
each XLR live pins, as shown
D2 2x Schottky diodes
BZX61C36
100mA eg, BAT49 in Fig.43b. The maximum
PTC 80V, 500mA
36V, 1.3W voltage available on a 5532
C11 + 5mA op amp with this phantom
47µF power circuit is 27V. However,
8mA 35V
0V Currents Equipment with phantom power this increases to 32V using
6.6mA each
an LM833 (an early National
Input T1 +48V
IC1a VTX-101-007 Semiconductors audio op
+

NE5532 amp) which works just as well


C9L Internal 6.8kΩ
100µF 13nF resistors in this application.
0V 25V 3 (–)

1 Adapting the board


2 (+) Universal boards can often
1.1kΩ 0V
XLR end up rather messy – as
output
shown in the overlay in Fig.44
0V – illustrating the adaptation
Input T2 +48V of a single-rail stereo RIAA
IC1a VTX-101-007
+

NE5532 board. Note the spare input on


C9R Internal 6.8kΩ the balanced input connector
100µF 13nF resistors
25V 3 (–) is used to feed the ‘fake’
balanced output pin to its
1
grounded capacitor (C1).
2 (+)
1.1kΩ 0V
XLR
output All boxed up
0V Since we now have no big
Fig.40. Feeding a circuit from phantom power using output transformers. transformers to worry about,
the PCB, two phono connectors
and two male XLR connectors can all be
fitted in a neat Hammond diecast box,
as shown in Fig.45. The final unit of
symmetrical design, shown in Fig.46,
can be placed alongside the turntable,
where its low impedance output will
drive very long cables. It is effectively
a phantom-powered RIAA direct-inject
(DI) box.

Fig.41. The dual op amp board can


be phantom-powered using a pair of
Vigotronix transformers wired centre-
tapped to obtain a 48V output (yellow
wire), as shown here using the PE
transformer mounting boards.

Practical Electronics | April | 2023 57


C11 +
330µF
50V 820Ω C1L 820Ω
47µF
0V 50V

+
D2
BZY88
36V *
47Ω**
C9L 3 (–)
R12L 47µF Phantom
– +34V 47Ω 50V 0V power
2 (+) 1 input
+
+ 0V
LM833
(or similar) 820Ω
*Middle pin on
0V 820Ω C1R input connector
47µF
50V **Links can be

+
replaced with
47Ω resistors for
* better balance.
47Ω**
C9R 3 (–)
R12R 47µF Phantom
– 47Ω 50V 0V
2 (+)
power
1 input
+

+ 0V
820Ω supply resistors are off board

Fig.42. Circuit for phantom powered, quasi-balanced outputs. This


trick is often used in ‘transformerless’ microphones, such as the
Neumann TLM170.

Mis-cued tracks
An eagle-eyed reader has noticed that the links near R6 on the
single channel RIAA board in Fig.23 Part 2 have to be dropped
down by one hole. The links are shown correctly in the photo of
Fig.24 (upper) Part 2.
Fig.43. a) (top) The phantom power is collected together
PCB / RIAA parts via four 820Ω resistors and fed into the board; b) (below)
The Dual Op amp PCB (AO1-APR23) and the stereo RIAA set of using four 150kΩ resistors to powering an LED to show
precision capacitors and resistors (AO2-APR23) are available phantom power is on.
from the PE PCB SERVICE.

Fig.44. (below) Overlay for the phantom powering components on the PCB.

0V Vbias R6L
0V

R2L Phono input


+
C3L
C2L
C1L
R5L 3 (–)
+ R6L XLR
R10L
+

R7L R13L 1 output


C7L
R11L 2 (+)

R12L R4L
C8L 0V
+ C9L Fig.45. The assembled phantom-powered RIAA
C10 820Ω 820Ω preamplifier interior.
C5L
R R C13
IC1 9 8
C5R
C11 D2 Power in 820Ω 820Ω
C8R +
C9R R4R 0V
R12R

R11R XLR
C7R output
R7R R13R
+

R10R R6R 1 2 (+)


R5R
+ C1R C2R
+ 3 (–)
C3R

R2R

0V
0V Vbias R6R

Fig.46. Finished phantom-powered RIAA pre-amp.

58 Practical Electronics | April | 2023


Max’s Cool Beans
By Max the Magnificent

Arduino Bootcamp – Part 4

H
ello there – how’s your day clipboard. Now, place your cursor in the Suppose we wish to count in deci-
going? I’m having an awesome Arduino IDE window and use its Edit > mal. Starting with 0 in the first column,
time (thanks for asking). One of Select All command followed by its Edit we keep incrementing (adding 1 to) our
the great things about writing for PE is > Paste command to select its existing first column until we reach 9, at which
receiving emails from readers around contents and overwrite them by pasting point we’ve exhausted all of our digits.
the world saying how wonderful I am. the contents of the clipboard into the IDE. Thus, the next time we add 1, we reset
Actually, if the truth be told, these Before you do anything else, use the the first column to 0 and increment the
messages are usually focused on my IDE’s File > Save command to save your next column to 1, thereby resulting in
columns, but I’m reading between the updated program contents. Now, make 10. Similarly, when we reach 99, we set
lines, as it were. sure your Arduino Uno is connected to the first two columns to 0 and increment
For example, I just heard from retired your host computer via its USB cable, then the third column, resulting in 100, and
computer studies teacher Tom Boyd, who use the IDE’s Sketch > Upload command so it goes… for ever.
describes himself as ‘a computer addict to load the program into your Arduino I’m reasonably sure you’re saying to
since when programming was done with and run it. You should see the 7-seg- yourself, ‘Good grief! All of this is pain-
paper tape.’ As Tom noted, ‘The internet ment display present a cheery ‘HELLO’ fully obvious,’ but hold onto your hat
is all well and good, but a properly pro- greeting, after which it will start to count because we are setting the scene for the
duced product like Practical Electronics from 0 to 9 repeatedly. The rest of this horrors delights that are to come.
is so much better!’ Tom went on to say, column will walk us through the vari-
‘I am a long-time Arduino evangelist ous elements we’ve brought together to Take a number!
and I love what you’re doing with your make this program perform its magic. As we discussed in Part 3 (PE, March
Arduino Bootcamp articles to get more 2023), we can use transistors to create
people started.’ We all count! simple logical building blocks that can
Of particular interest to us here, Tom As Mickey Mouse famously said, ‘Arith- detect the difference between two volt-
introduced me to his website, which con- metic is being able to count up to twenty age values and present the results of their
tains a cornucopia of Arduino-related without taking off your shoes,’ and who operations in terms of the same two volt-
goodies, projects, and ‘How To’ guides: amongst our number (no pun intended) ages. These building blocks can be con-
https://bit.ly/3WFTQp4 would argue with logic like that? nected to create larger functions, which
Speaking of numbers, since ancient can themselves be connected to realise
Ooh! Shiny! peoples counted using their fingers, and sophisticated systems like computers –
Let’s kickoff with a little pizazz. After all, given that we are equipped with ten fin- see my column, Arduino 0s and 1s, LOW
who deserves it more than us? Assuming gers (including thumbs), the number and HIGH, False and True and Other
you’ve still got your 7-segment display system with which we are most familiar Stuff at: https://bit.ly/3DeMQsl
wired up the way we left things in our is decimal (a.k.a. ‘denary’). As decimal Rather than think in terms of voltages,
previous column (PE, March 2023), then has ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), we prefer to think in terms of 0s and 1s.
download file CB-Apr23-06.txt – all the it’s said to be base-10 or radix-10. This leads us to the binary number system,
files mentioned in this column are avail- Decimal is a place-value number system, which is said to be base-2 or radix-2. A
able from the April 2023 page of the PE which means the value of a digit depends binary digit, which is known as a ‘bit,’
website at: https://bit.ly/pe-downloads on the digit itself and its location (place) can assume only two values: 0 or 1.
Now, launch your Arduino integrated within the number. If we visualise the Like decimal, binary is a place value
development environment (IDE). Use the digits as being presented in columns, then system. In this case, however, the column
File > New Sketch command to create a each column has a ‘weight’ associated weights are powers of two. Starting with
new program, then use the File > Save As with it, where these weights are powers the right-hand bit, which is known as the
command to save this file with a name of ten. Starting with the right-hand digit, least-significant bit (LSB), these weights
of your own choosing (the name Hello- which is known as the least-significant are: 20 = 1, 21 = 2, 22 = 2 × 2 = 4, 23 =
Count would work if you happen to find digit (LSD), these weights are 100 = 1, 101 2 × 2 × 2 = 8, and so on.
yourself filename challenged). Next, we = 10, 102 = 10 × 10 = 100, 103 = 10 × 10 As before, each bit forming a binary
want to delete the existing contents of × 10 = 1000, and so on. number is multiplied by its column’s
this file and replace it with the contents Each digit forming a decimal number weight and the results are summed to
of our CB-Apr23-06.txt file. If any of this is multiplied by its column’s weight and give the total value of that number. For
is new to you, all you need do is open the results are summed to give the total example, we understand 1100 in binary
the CB-Apr23-06.txt file with your text value of that number. For example, we to be: (1 × 8) + (1 × 4) + (0 × 2) + (0 × 1)
editor and use the editor’s Edit > Select understand 6174, which is known as Ka- = 12 in decimal.
All command followed by the Edit > prekar’s constant after the Indian math- Counting in binary is easy-peasy lemon
Copy command to select and copy the ematician Dattatreya Kaprekar, to be: squeezy (Fig.1). As with decimal, we start
contents of the file to your computer’s (6 x 1000) + (1 x 100) + (7 x 10) + (4 x 1). with 0 in the LSB. Actually, we start with

Practical Electronics | April | 2023 59


Fig.1. Binary vs decimal. humour by computer scientists, which
Binary Decimal
3 2 1 0
2 2 2 2 goes some way to explain why they don’t
0000 0 0s in all of the bits. get invited to parties.
0001 1 This is as good a time
0010 2 as ever to note that we Binary-coded decimal (BCD)
0011 3
usually write binary Unfortunately, we now have something
0100 4
0101 5
numbers with leading of a dichotomy when it comes to number
0110 6 0s, which serves to in- systems. On the one hand (no pun in-
0111 7 dicate the size of the tended), we have people who prefer to
1000 8 bus, field, or memory work in decimal (base-10). On the other
1001 9
location being used grasping appendage, we have comput-
1010 10
1011 11
to represent and/or ers, which prefer to perform their magic
1100 12 store the value. For using binary (base-2).
1101 13 example, 0101 tells us One solution is to employ a class of
1110 14 we are working with binary encodings of decimal numbers
1111 15 a 4-bit binary number that we collectively call binary-coded Fig.3. A 302109000 BCD thumbwheel
whose current value is decimal (BCD). Since four bits can rep- switch (Source: C&K)
5 in decimal. By comparison, 00000101 resent 24 = 2 × 2 × 2 × 2 = 16 different so comfortable using decimal, it seemed
indicates we are working with an 8-bit combinations of 0s and 1s, it takes only to make sense to implement computers
binary number whose current value is, four bits to encode (map) our ten deci- as decimal machines. What this means
once again, 5 in decimal. mal values, leaving six combinations is that computers like the ENIAC, IBM
So, when counting with a 4-bit binary unused. In fact, there are a variety of NORC, and UNIVAC Solid State 80 rep-
number, we start with 0000 (0 in deci- mapping possibilities, three of which resented and manipulated numbers and
mal). In this case, as soon as we’ve added (BCD 8421, BCD 2421, and Excess-3) are addresses in decimal without converting
1 to the LSB to give 0001 (1 in decimal), illustrated in Fig.2. them to pure binary equivalents.
we’ve already exhausted all of our digits. The form of BCD with which most It didn’t take long before comput-
Thus, the next time we wish add 1, we people are familiar is formally known er scientists started to recognise the
reset the first column to 0 and increment as BCD 8421, where the numbers refer inherent advantages associated with
the next column to 1, thereby resulting to the weights of the four columns. In binary machines. Having said this, BCD
in 10 (2 in decimal). Similarly, when we fact, this form is so common that if you continues to be used much more than
reach 11 (3 in decimal), we set the first say BCD, everyone will assume you are you might expect. One example is to
two columns to 0 and increment the third talking about BCD 8421. As we see, these allow operators in industrial facilities
column, resulting in 100 (4 in decimal), are the same weights as for the natural to easily specify decimal values using
and so it goes. binary number scheme we presented in BCD thumbwheel switches, such as the
Fig.1 (ie, 23, 22, 21 and 20, which equate 302109000 from C&K shown in Fig.3 – see:
Fancy a nybble? to 8, 4, 2, and 1, respectively). We use the https://bit.ly/3RaO0uY
As we previously noted, a binary digit, term ‘natural’ in this context because it Rotating the thumbwheel on the front
which is called a bit, can adopt only two follows the general counting method em- causes the corresponding BCD 8421 code
values: 0 and 1. It doesn’t take long to re- ployed in decimal and other place-value to be presented on four terminals at the
alise that there’s a limit to what we can numbering systems. For this reason, BCD rear. By mounting groups of these switch-
accomplish with a single bit. The solu- 8421 may also be referred to as Natural es together, users can specify larger nu-
tion is to gather groups of bits together, BCD (NBCD) or Simple BCD (SBCD). merical values.
and to then use these groups to repre- BCD 8421 is said to be a ‘weighted code’ Another way in which BCD is used
sent things like numbers or characters. because each of its columns has a weight today is to drive 7-segment light-emit-
Some grouping sizes are more common associated with it. Similarly, BCD 2421 ting diode (LED)-based displays like the
than others. One very common grouping is also a weighted code, although in this one we are currently using in our experi-
is eight bits, which is known as a ‘byte’. case the weight of the most-significant bit ments (Fig.4).
This term, which is a deliberate respell- (MSB) is 21 = 2. By comparison, Excess-
ing of ‘bite’ to avoid accidental muta- 3, which is generated by adding 0011 (3 What a character!
tion to ‘bit’, was coined by the German- in decimal) to the encodings used in BCD Before we proceed further, we need to
American computer scientist Werner 8421 is not a weighted code because it decide which segment combinations we
Buchholz in 1956. isn’t possible to assign weights to the wish to use to represent the numbers 0
Another common grouping is four bits, columns in such a way that they add up
which is known as a ‘nybble’ (or ‘nybl’ or to their corresponding decimal values.
‘nibble’). The fact that two nybbles make For the remainder of our discussions,
a byte is considered to be the height of and for our experiments, we will be
employing BCD 8421. Before we pro-
BCD 8421 BCD 2421 Excess-3 Decimal
ceed, however, can you spot anything
0000 0000 0011 0
interesting with respect to BCD 2421
0001 0001 0100 1
0010 0010 0101 2 and Excess-3 (some characteristic they
0011 0011 0110 3 share with each other but not with BCD
0100 0100 0111 4 8421)? The answer is given at the end
0101 1011 1000 5
of this column.
0110 1100 1001 6
0111 1101 1010 7
1000 1110 1011 8 Then and now
1001 1111 1100 9 When people first started to build electro-
mechanical and electronic digital comput-
Fig.2. Three flavors of binary-coded ers in the 1940s, binary techniques were
decimal (BCD). not widely understood. Since people were Fig.4. Single-digit 7-segment display.

60 Practical Electronics | April | 2023


A reason we’ve shown greyed-out Eeek! That’s eight lines of code, which
F B
G 0 values associated with the DP means we would require 80 lines to cover
E C
D column in the truth table in Fig.7 all 10 of our digits. And that’s just the be-
Fig.5. Segments used to represent 0 through 9. is to match what we are going to ginning. Suffice it to say that using this
discuss in a moment. approach to control our display would
5V
not be pretty, efficient or fun.
7-Segment Display
E
150Ω
E
Software BCD decoders As an alternative, the approach we are
5V 1 A
7
D DWe will be using hardware BCD decod- going to use is to create a pseudo-BCD
6 2
F B
5
C Cers in future columns when we start to
4 decoder in the form of a look-up table. Do
DP DP
Arduino B B
4 G employ multiple 7-segment digits in
5 you recall earlier in this column where
3 6
A A E C our projects. For the moment, however,
7
we noted that a common 8-bit group-
2
F F
9 D we are going to implement a pseudo-
9 DP ing is called a byte? Well, the Arduino
G G
GND 83 8 BCD decoder in software.
10 environment supports a byte data type
0V We are currently using Arduino pins (the equivalent generic C/C++ data type
2, 3, 5, 6, 7, 9, 8 and 4 to drive display would be unsigned char). This data
Fig.6. Using 8 pins to drive a 7-segment display. segments A, B, C, D, E, F, G, and DP, type can represent unsigned (positive)
respectively (Fig.6). A word of warn- integers in the range 0 to 255 in decimal,
through 9 (Fig.5). Although this seems ing… don’t do what I just did, which is 00000000 to 11111111 in binary, or 00 to
strange, there is no standard for this sort to mistakenly used the numbers from the FF in hexadecimal, which is a number
of thing by any relevant entity, such as 7-segment display in my pin array so that system we have yet to introduce. We will
the IEC, IEEE, or ISO, which means we my program didn’t work. It took me ages discuss hexadecimal in Part 5. For now,
are obliged to come up with our own. to figure it out and caused me some con- we indicate hexadecimal values in C/C++
For example, we are using segments B sternation... eventually driving me to ex- by prefixing them with ‘0x’.
and C to represent the number 1, which claim ‘Oh Dear’ (or words to that effect). We can assign positive integer values
is the most common scenario, but there In Part 3, we experimented with a red- (eg, 42) and hexadecimal values (eg, 0x2A)
is nothing to stop us using segments E green LED combo, but we won’t be need- to variables of the byte data type. Also,
and F if we wish. Similarly, we’ve in- ing that anymore, so you can remove those unlike regular C/C++ environments, we
cluded segment A in our representation components from your breadboard. All can assign 8-bit binary values prefixed by
of 6 and segment D in our representation we expect to see on the breadboard now the letter ‘B’ (eg, B00101010). Assuming
of 9, while some may consider the use are our main power LED, our 7-segment we’ve defined NUM_DIGITS to be 10, this
of these segments in these cases to be display, and any associated current-lim- allows us to create our look-up table as
superfluous to requirements. iting resistors. follows (remember that anything to the
Our current breadboard layout, includ- right of // is understood by the compiler
Hardware BCD decoders ing connections to our Arduino Uno, was to be a comment):
So, why have I been waffling on about shown in Part 3. If you don’t happen to
BCD? Well, we are currently using eight have that issue close to hand (for shame!), byte DigitSegs[NUM_DIGITS] =
of our Arduino Uno’s digital output pins you can download a copy of this layout {
to drive our single-digit common cath- (file CB-Apr23-01.pdf). // ABCDEFGDP
ode 7-segment display (Fig.6). In our previous programs, we defined B11111100, // 0
Suppose we were pin-limited, and we SEG_ON as being HIGH and SEG_OFF as B01100000, // 1
couldn’t afford to dedicate eight pins to being LOW. Bearing this in mind, if we B11011010, // 2
this task. One solution would be to pur- wished to display the number 5, for ex- B11110010, // 3
chase a BCD-to-7-segment decoder inte- ample, we could do so using the follow- B01100110, // 4
grated circuit (IC). We could drive this ing statements: B10110110, // 5
decoder using just four of our Arduino’s B10111110, // 6
pins, leaving the decoder to control the digitalWrite(2, SEG_ON); // A B11100000, // 7
segments on the display (Fig.7). digitalWrite(3, SEG_OFF); // B B11111110, // 8
We should note that a decoder of this digitalWrite(5, SEG_ON); // C B11110110 // 9
type doesn’t drive the display’s decimal digitalWrite(6, SEG_ON); // D };
point (DP) segment, which would require digitalWrite(7, SEG_OFF); // E
its own control. This is because only one digitalWrite(9, SEG_ON); // F Compare these bit patterns to those il-
decimal point is typically required when digitalWrite(8, SEG_ON); // G lustrated in Fig.7. In particular, observe
using a group of such displays. The only digitalWrite(4, SEG_OFF); // DP that we’ve included the 0s associated
with the DP segment. We were obliged to
do this to fully pack our 8-bit byte fields,
BCD In 7-Segment Out Display even though we don’t plan on using the
8 4 2 1 A B C D E F G DP
DP segment at the moment.
0 0 0 0 1 1 1 1 1 1 0 0 0
7-Segment Display
0 0 0 1 0 1 1 0 0 0 0 0 1
A
Bare bones
A 0 0 1 0 1 1 0 1 1 0 1 0 2
The way I usually set about building a
B 0 0 1 1 1 1 1 1 0 0 1 0 3
From Arduino

BCD8 new application is to spend a little time


F B
C 0 1 0 0 0 1 1 0 0 1 1 0 4
BCD4 BCD 8421 thinking about what I want to do and
Decoder D 0 1 0 1 1 0 1 1 0 1 1 0 5
BCD2 G then creating a skeleton program. In this
E 0 1 1 0 1 0 1 1 1 1 1 0 6
BCD1
F E C
case, we want a program that will dis-
0 1 1 1 1 1 1 0 0 0 0 0 7
G
play our decimal digits for one second
1 0 0 0 1 1 1 1 1 1 1 0 8
D
DP
at a time, but we also want to be able to
1 0 0 1 1 1 1 1 0 1 1 0 9
vary the order in which the digits will
be displayed (you’ll see what I mean by
Fig.7. Using a BCD-to-7-segment decoder IC. this a little later).

Practical Electronics | April | 2023 61


The reason we’re doing things
this way will become clear as
we proceed.
In addition to our Digit-
Segs[] look-up table, we also
declare an integer variable called
DigitToDisplay to which we
assign a value of –1. The reason
for using this –1 value was intro-
duced in Part 3, and we discuss
it again later in this column.
This would be a great time
for us (well, you) to enter the
contents of Listing 1 into your
Arduino IDE. Once you’ve
done so, it’s a good idea to
click the Verify icon (or use
the Sketch > Verify/Compile
command) to make sure our
skeleton program compiles
without errors. It’s a lot easier
to sort any problems out now
before we add more code to
confuse the issue.

Fleshing things out


Now we’re going to flesh things
out a little. Let’s start by sum-
marising what we know about
functions. The simplest defi-
nition is that a function is a
group of statements that per-
form a task. We’ve already had
some experience with these little
scamps in the form of the man-
datory setup() and loop()
Listing 2. Fleshing things out a little.
functions, which the Arduino’s
IDE automatically inserts into
our programs. We’ve also noted that the for calls to a function versus the dec-
IDE includes a wealth of built-in func- laration of that function.
tions, such as the pinMode(), digi- In previous columns, I’ve used the
Listing 1. Skeleton program. talWrite() and delay() functions term ‘argument’ and qualified this by
we’ve employed in previous programs. saying ‘think parameter,’ but now it’s
My first step would be to create the Now we’re going to create two functions time to delve a little deeper. When we
bare bones program shown in Listing of our own. We’ll call these functions declare a function, part of this decla-
1. As usual, we start with some of the GetNewDigit() and DisplayNewDig- ration is a comma-separated list of pa-
definitions we’ll be using (we may add it(), as illustrated in Listing 2. rameters in parentheses. In the case of
to these later). From Part 3, we know Before we consider the code with which our DisplaySegs() function, for ex-
that NUM_SEGS defines the number of we’re going to populate these functions, ample, we have one parameter of type
segments in the display as being 8. there are several points that are worthy byte called theseSegs.
We’ve added NUM_DIGITS to define of note. Let’s start with the fact that, in By comparison, when we call a func-
the number of digits we wish to dis- addition to using an initial capital letter tion, like our call to DisplaySegs()
play as being 10. We’re going to use for my global variable names, I also use from within our loop() function, we
the ON_TIME definition to display the an initial capital letter for my function pass in a comma-separated list of argu-
current digit for one second. And I’d names because I think of them as being ments in parentheses. In this case, we
like to think that the ALL_SEGS_OFF global entities (we can’t do anything are passing in a single argument of type
definition is self-explanatory. about the names of the Arduino IDE’s byte called charSegs.
Observe the PinsSegs[] array dec- built-in functions). Of course, if a function is declared
laration. We use this to assign the Ar- Remember that C/C++ doesn’t care with an empty parameter list, then,
duino pins we’re going to use to drive about our use of whitespace charac- when we call it, we will pass in an
the eight segments in our 7-segment ters. Having said this, when I declare empty argument list (in both cases we
display (remember that DP is consid- a function, I include a space between keep the parentheses).
ered to be a segment). If you compare the name and its parentheses, like Get- As I mentioned in a previous column
this to our programs from Part 3, you’ll NewDigit (), for example. By com- (PE, October 2020): ‘In the real world,
see that we’ve reversed the order of parison, when I call a function from a lot of people use the terms param-
the pin assignments. This time, we’re elsewhere in the program, I omit this eters and arguments interchangeably.
starting with pin 4, which drives the space, like GetNewDigit(), for exam- So long as the person you are talk-
DP segment, and we’re ending with ple. The reason for doing this is that ing to understands the message you
pin 2, which drives the A segment. it facilitates using the editor to search are trying to convey, then there’s ‘no

62 Practical Electronics | April | 2023


harm, no foul,’ as they say. The problem comes when you if (someCondition)
are talking with professional programmers who will take {
great delight in painstakingly instructing you in the error // Do stuff
of your ways. Personally, I don’t care to give the little ras- }
cals the satisfaction.’
Have you ever wondered why the setup() and loop() We discussed conditions and the concepts of true and false
function declarations are prefixed by the void keyword in toe-curling detail in Part 3. In this case, if the evaluation
(similarly for our new DisplaySegs() function)? Well, in of someCondition returns true, then we will execute the
the same way that we specify a data type when we declare statements inside the curly brackets. Alternatively, if the test
a variable, we also specify a data type when we declare returns false, we will skip everything inside the curly brack-
a function. In the case of functions that don’t return any ets and move onto the next statement.
values, we use void as a data type that represents no data. A slightly more sophisticated version of this statement in-
Now consider our new GetNewDigit() function. Instead cludes an else clause as follows:
of void, we’ve declared this as being of type int. This
allows us to use the function to return an integer value by if (someCondition)
means of a return statement located at the end of the func- {
tion (I’m simplifying things a little, but the gist is there). // Do stuff
Now look at the DigitToDisplay = GetNewDigit() }
statement in our loop() function. What this says is that else
whatever value is returned from the GetNewDigit() func- {
tion call will be assigned to our DigitToDisplay variable. // Do other stuff
I know that this can all seem to be a little overwhelming }
at first, but it won’t take long before it’s second nature to
you. I should also point out that some of the code we are Once again, if the evaluation of someCondition returns
using here is a little ‘clunky,’ but we’re doing things this true, then we will execute the statements inside the curly
way to provide us with examples to talk about. brackets associated with the if. Alternatively, if the test
Apart from the contents of our new functions, the rest of returns false, then we will skip everything inside the
the program is complete. The setup() function, which – curly brackets associated with the if, and instead exe-
because of the way the Arduino’s IDE does things – will be cute the statements inside the curly brackets associated
executed only one time, uses a for() loop to declare the with the else.
pins we want to drive our display as being of type OUTPUT But wait, there’s more, because we can also associate a new
(we introduced for() loops in Part 2 and Part 3). The if with an else as follows:
setup() function also calls our DisplaySegs() function
to turn all the display’s segments off. if (someCondition)
Contrariwise, because of the way the Arduino’s IDE does {
things, the loop() function will be executed over and over. // Do stuff
This function calls our GetNewDigit() function, which }
we will use to generate the next digit we wish to display. else if (anotherCondition)
We use this returned value as an index into our Digit- {
Segs[] array to retrieve the entry associated with the digit // Do other stuff
we wish to display. We then pass this value into our Dis- }
playSegs() function, whose job it will be to turn the ap-
propriate segments On and Off. We can keep on adding more else-if constructs and we can
Before we proceed, this would be a good time to add these end everything with a final else if we so desire.
new statements to your program and then verify that this If there’s only one statement inside any of the pairs of curly
fleshed-out version compiles without errors. brackets, then we can omit that pair of brackets and just use
the statement on its own. For example:
Questions, questions
We are now poised to use a new form of control statement if (someCondition)
called if(), which essentially asks a question. The sim- DisplaySegs(AllSegsOff);
plest form of this statement is as follows:
Having said this, I strongly recommend that you
AND OR XOR always use a pair of curly brackets, even if they cur-
(a)
a a a rently embrace only a single statement. There are two
& y | y ^ y
b b b reasons for this. First, they make it easier to read and
understand your code. Second, they prevent your
a b y a b y a b y introducing errors if you add more statements later,
0 0 0 0 0 0 0 0 0 which is often the case when you are debugging a
(b) 0 1 0 0 1 1 0 1 1
program and trying to determine why it’s not doing
1 0 0 1 0 1 1 0 1
1 1 1 1 1 1 1 1 0 what you expect it to do.

A 1 0 1 0 1 1 0 0 A 1 0 1 0 1 1 0 0 A 1 0 1 0 1 1 0 0 The &, | and ^ bitwise operators


B 1 1 0 0 1 0 1 0 B 1 1 0 0 1 0 1 0 B 1 1 0 0 1 0 1 0 As we’ve previously noted, computers are constructed
(c)
& |
out of simple logical building blocks. These are often
^
called primitive gates, primitives, logic gates, or gates.
Y 1 0 0 0 1 0 0 0 Y 1 1 1 0 1 1 1 0 Y 0 1 1 0 0 1 1 0
The reason for the ‘gate’ moniker is that, in the same
way a wooden gate can allow or prevent the passage
Fig.8. AND, OR and XOR functions: (a) Logic gate symbols, (b) Truth tables of a person or an animal through an opening, so a
and (c) Examples of bitwise operators applied to two 8-bit bytes. logic gate can allow or prevent the passage of signals.

Practical Electronics | April | 2023 63


feeding our A and B values into eight In this case, the result from the bitwise
A[7] B[7] A[1] B[1] A[0] B[0]
2-input gates. The processor will per- & is temporary in nature. That is, it’s not
form the selected operation between each assigned to anything; it is used only as
Gate[7] Gate[1] Gate[0]
bit forming A and the corresponding bit part of the test. The 0s in bits 0, 1, 2, 4,
forming B (Fig.9). In the case of the & 5, 6, and 7 of our B00001000 value will
Y[7] Y[1] Y[0]
operator the gates will be AND gates, in force these bits in the temporary result
the case of the | operator they will be to 0. Meanwhile, the 1 in bit 3 of our
Fig.9. How the bitwise operators are
OR gates, and in the case of the ^ oper- B00001000 value will allow whatever 0
realised in logic gates.
ator they will be XOR gates. This is the or 1 is in the corresponding bit in A to
Three of the most common gates are the way the central processing unit (CPU) in appear in the temporary result, and it is
AND, OR, and XOR (Fig.8). These gates our microcontroller implements these this value that will be compared to 0.
accept bit-size values on their inputs operators; that is, by using real, physi- I have a trick question. Suppose we
and generate bit-sized values on their cal logic gates. wish to perform some action if bit 3 of
outputs. If you want to know how these Suppose we previously assigned binary A is 1. Look at the previous statement.
little rapscallions can be constructed out values of 10101100 and 11001010 to Is your knee-jerk reaction to replace the
of transistors, this topic is discussed in variables A and B, respectively. In this == 0 with == 1? It’s not that easy, I’m
excruciating exhilarating detail in my case, the results from using the bitwise afraid, because a 1 in bit 3 is 00001000
book Bebop to the Boolean Boogie – see: operators will be as illustrated in Fig.8c. in binary, which is equivalent to 8 in
https://amzn.to/3X0rF4i These operators work with byte vari- decimal. But turn that frown upside
The symbols for these gates are shown ables (which are always unsigned), char down into a smile, because we can
in Fig.8a. Their corresponding truth variables (signed or unsigned), and int achieve the desired effect using the fol-
tables are presented in Fig.8b. Observe variables (short, regular, long; signed or lowing statement:
that the output from the AND gate is 1 unsigned), the only rule being that all
(true) only when both of its inputs are the variables (input and output) must if ( (A & B00001000) != 0)…
1, otherwise the output is (0) false. By be of the same type.
comparison, the output from the OR So, as opposed to thinking about this as
gate is 1 if either of its inputs are 1. Using masks ‘Is the result one?’ we instead think ‘Is
Although we rarely do so, the OR gate One thing the bitwise operators can be the result non-zero?’ If you wish to dive
is more properly referred to as an ‘in- used for is creating and applying masks. deeper into the mysteries of masks, you
clusive OR’ because the output being Suppose we have a variable of type byte will probably not be overly surprised to
1 includes the case where both the called A, but we don’t know its contents. discover I’ve written a column on this
inputs are 1. By comparison, with an Now suppose we want to determine the very topic – see: https://bit.ly/3Yd3UaS
exclusive OR (XOR) gate, the output contents of the least-significant four bits
being 1 excludes the case where both of A. We could extract these bits using a The << and >> shift operators
the inputs are 1. bitwise & as follows: The C/C++ programming languages sup-
In Part 3 of this epic saga, we intro- port two bitwise shift operators: the left-
duced the conditional operators && Y = A & B00001111; shift << and the right-shift >>. These op-
(AND) and || (OR). The reason we erators require two operands – the first is
call these conditional operators is that In this case, the binary value 00001111 the variable or value to be shifted, and the
we use them as part of condition state- is our mask. Remind yourself of the way second (which can be a positive number
ments. For example, assuming a, b, c, an AND gate works (Fig.8a). The result of or a variable of type int containing a
and d to be integer variables, we could this operation will be to clear the most- positive value) specifies by how many
have a condition like (a > b) && (c significant four bits of Y to 0; meanwhile, bits the shift will involve. For example
< d), which we can think of as ‘a is the least-significant four bits of Y will (assuming A is a variable of type byte):
greater than b AND c is less than d.’ end up as a copy of the least-significant
The output of this condition will only four bits of A. Y = A << 1; // Shift A left 1 bit
return true if both sub-conditions are Remember that the bits forming an Y = A >> 5; // Shift A right 5 bits
true. Similarly, we could have a condi- 8-bit byte are numbered from 0 (on the
tion like (a > b) || (c < d), which right) to 7 (on the left). Now suppose we When a value is shifted left, the most-
we can think of as ‘a is greater than b want to force bit 2 (ie, the third bit) of A significant (left-hand) bit or bits effec-
OR c is less than d.’ The output of this to 0 while leaving the other bits as-is. We tively ‘fall off the end.’ Meanwhile, 0
condition will return true if either of could do so using a bitwise & as follows: values are shifted into the newly vacated
the sub-conditions are true. right-hand bit or bits. This is known as a
Now, this is where we take tentative A = A & B11111011; ‘logical shift’ and is true for both signed
steps into new territory because we can and unsigned values.
also use &, | and ^ as bitwise operators. Contrariwise, suppose we wish to force Similarly, when a value is shifted right,
The easiest way to visualise what this bit 6 of A to 1 while leaving the other bits the least-significant (right-hand) bit or
means is to assume that we’ve declared as-is. We could do so using a bitwise | bits effectively ‘fall off the end.’ If the
three variables of type byte called A, B as follows: data being shifted is an unsigned char
and Y. Now, suppose we use the bitwise or int data type (the byte data type is
operators in a program as follows: A = A | B01000000; unsigned by default), then the result is
a logical shift, and 0 values will be shift-
Y = A & B; // Bitwise AND This is another point where things start ed into the newly vacated left-hand bits
Y = A | B; // Bitwise OR to get interesting. Suppose we wish to (we’ll leave what happens when perform-
Y = A ^ B; // Bitwise XOR perform some action if bit 3 of A is 0. ing shift-right operations on signed data
We could achieve this using an if() types as a topic for another day).
Since we are using bitwise operators on statement with the following condition: Not surprising, shifting left or right by 0
variables of type byte, and since bytes bits has no effect. One interesting nugget
contain eight bits, this is equivalent to if ( (A & B00001000) == 0)… of knowledge is the fact that shifting left

64 Practical Electronics | April | 2023


Fig.10. (left)
Start 0 0 1 1 0 1 1 1 Start 0 0 0 0 0 0 0 1 iSeg = 0
Performing shift
<< 1 0 1 1 0 1 1 1 0 << 1 0 0 0 0 0 0 1 0 iSeg = 1 operations on
>> 1 0 0 1 1 0 1 1 1 << 1 0 0 0 0 0 1 0 0 iSeg = 2 an 8-bit byte.
<< 2 1 1 0 1 1 1 0 0 << 1 0 0 0 0 1 0 0 0 iSeg = 3
Listing 4 (right)
<< 1 1 0 1 1 1 0 0 0 << 1 0 0 0 1 0 0 0 0 iSeg = 4 Random
>> 4 0 0 0 0 1 0 1 1 << 1 0 0 1 0 0 0 0 0 iSeg = 5
version of
GetNewDigit()
<< 6 1 1 0 0 0 0 0 0 << 1 0 1 0 0 0 0 0 0 iSeg = 6

>> 3 0 0 0 1 1 0 0 0 << 1 1 0 0 0 0 0 0 0 iSeg = 7

(a) Various shift examples (b) Shifting a bit mask

by one bit is the same as multiplying by statement, the use of a mask, a bitwise Now it’s time to become more adven-
21 = 2. For example, shifting the value & (AND), and a bitwise << (shift left) as turous and start displaying all the num-
00000110 (6 in decimal) left by one bit shown in Listing 3. bers from 0 to 9 (I’m too young for all
results in 00001100 (12 in decimal). As we’ve already discussed, we pass this excitement).
Similarly, shifting left by two bits is the an 8-bit byte into this function. The 0s
same as multiplying by 22 = 2 × 2 = 4; and 1s in this byte, whose name is the- Tossing a coin
shifting left by three bits is the same as seSegs inside the function, correspond Can you cast your mind back to Part 2
multiplying by 23 = 2 × 2 × 2 = 8, and so to the segments we want to turn off and (PE, February 2023) when we created a
forth. Contrariwise, shifting right by one on, respectively. We start by declaring a program to randomly turn On and Off
bit is the same as dividing by 2; shifting variable called mask of data type byte the segments in our 7-segment display?
right by 2 bits is the same as dividing by and assigning it a value of B00000001. The problem was that we didn’t include
4, and so on. The main body of this function involves a test to see if the new random number
In the not-so-distant past, knowing this a for() loop. The first thing we do inside was the same as the previous random
sort of thing used to be extremely useful this loop is to use the & operator to per- number. This meant that, every now and
when working with simple, resource- form a bitwise AND between the mask then, a segment stayed on for some mul-
limited processors like the Arduino Uno and theseSegs, then we use an if() tiple of the expected time.
– and it can still come in handy on oc- to compare the result to 0. If there’s a 0 In Part 3 (PE, March 2023), we imple-
casion – but today’s compilers are very in theseSegs in the same bit position mented a solution that involved repeat-
clever, and they will automatically take as the 1 in mask, then the result of this edly generating new random numbers
full advantage of these tricks without you comparison will be true, in which case until we determined that the new value
having to worry about things. we turn the corresponding segment Off, was different to the old value.
The shift operators work with byte otherwise we fall through to the else Now, I want you to see if you can add
variables, char variables (signed or un- clause and turn the segment On. the code to our GetNewDigit() func-
signed) and int variables (short, regular, The final statement in our for() loop tion to do something similar. This time,
long; signed or unsigned). A series of ex- shifts our mask one bit to the left. The however, we want to randomly present
amples of various shifts performed on a way the values in the mask correspond numbers between 0 and 9 on the 7-seg-
byte variable are illustrated in Fig.10a to the values in our iSeg index variable ment display. Before reading further, try
(read this sequence from top to bottom). is illustrated in Fig.10b. to do this on your own, and then com-
Consider the way the 1 value slides pare your solution to mine, as shown in
Bringing it all together through our mask from right to left, there- Listing 4 (file CB-Apr23-03.txt).
Let’s leave our GetNewDigit() func- by testing the segments in the order DP, Now we remember why we initialised
tion for the moment and instead focus on G, F, E, D, C, B, A. It now becomes appar- our global DigitToDisplay variable to
our DisplaySegs() function. The way ent why we reversed the order of the Ar- have a value of –1. We did this to guar-
I’ve implemented this employs an if() duino pins driving the 7-segment display antee that the first time we generate a
in our PinsSegs[] array new value, that value will be different
declaration, because this to our old (–1) value.
makes things match up
just the way we want Count on me
them to. The next thing I want you to do is to
Add this code to your modify the contents of our GetNew-
DisplaySegs() func- Digit() function in such a way that
tion and upload the pro- our program repeatedly counts from 0
gram into your Ardui- to 9. Once again, try to do this on your
no. If you run into any own first, and then compare your solu-
problems that you can’t tion to the two versions I came up with,
resolve, you can down- as shown in Listings 5a and 5b.
load my version (file Let’s start with my first version, as
CB-Apr23-02.txt). shown in Listing 5a (file CB-Apr23-04.
Observe that the 7-seg- txt). Once again, remember that, when
ment display presents our program starts, our global DigitTo-
only the number 6. This Display variable has been initialised to
isn’t too surprising since have a value of –1. Happily, this isn’t a
all our GetNewDigit() problem because the first thing we do is
function currently does add 1 to this value, which means we will
Listing 3. Displaying the segments. is return the number 6. start off displaying the value 0.

Practical Electronics | April | 2023 65


Listing 5. Two ways of counting 0 to 9: (a) (left) With test, (b) (right) With modulo operator.

The problem occurs when we reach 9. Adding 1 will give


us a value of 10, which we can’t replicate on our single-digit
7-segment display. We could perform a test to see if tmpDigit
== 10. In fact, this is what we do do (if you see what I mean),
except we replace the explicit 10 value with NUM_DIGITS,
which we previously defined as being equal to 10. (We do this
to future-proof our program in case we add any more digits in
the future, or in Part 5, whichever comes first.)
If you’ve been paying attention, you will be squirming in
your seat saying, ‘You rotter!’ You say this because, when talk- Fig.11. The segments associated with the ‘HELLO’ characters.
ing about if() tests earlier, I said, ‘I strongly recommend that
you always use a pair of curly brackets, even if they currently wise.’ In this case, breaking the rule made it easier for us to
embrace only a single statement,’ but on Line 59 of Listing 5a compare Listings 5a and 5b.
I’m flouting my own rule. Speaking of which, I dislike having to employ tests to get
The thing is, this is an unwritten rule (the best kind to apply around end conditions, like reaching 10 in this example. As
to oneself in my experience). Always remember the adage, an alternative, we can implement the solution shown in List-
‘Rules are for the obedience of fools and the guidance of the ing 5b (file CB-Apr23-05.txt). In this case, after incrementing
our DigitToDisplay value, we use the modulo % operator
to divide the result by NUM_DIGITS, which is 10.
The modulo operator returns the remainder from an integer
division. After a few moments thought, we realise that that
0 % 10 = 0, 1 % 10 = 1, 2 % 10 = 2, and so forth up to 9 % 10 =
9. However, 10 % 10 = 0, which brings us back to where we
started (I feel a small ‘Tra-la’ is in order).

Hello there!
Do you remember when we ran the program at the beginning
of this column, and it started by bidding us a cheery ‘HELLO’?
When you think about it, since we can control all of the seg-
ments on our display, we can use them to create characters
other than the numbers 0 through 9. For example, ‘H’, ‘E’, ‘L’,
and ‘O’ (Fig.11).
Just for giggles and grins, see if you can take our previous
program and modify it to display the ‘HELLO’ message before
it starts counting. As before, try to do this on your own first,
and then compare your solution to mine, as shown in List-
ing 6 (file CB-Apr23-06.txt).
Note that this augments our existing code – it doesn’t replace
it. I started off by adding some new definitions as follows:

#define NUM_HELLO_CHARS 5
#define ON_TIME 1000
#define OFF_TIME 150
#define PAUSE_TIME 1000

As shown in Listing 6, I also declared an array called Hel-


loSegs[] to define the segments I wish to use to display
my message.
Next, I modified my setup() function to display this mes-
sage. The reason for putting this code in the setup() func-
tion is that we wish to display the message only one time.
The question you should be asking is why we need to turn
all the segments off for the OFF_TIME (150 milliseconds) after
Listing 6. Adding the code to bid a cheery hello. displaying each character. The reason is that, if we didn’t do

66 Practical Electronics | April | 2023


0 at the start of our
Online resources count sequence. Components (from Part 1)
For the purposes of this series, I’m LEDs (assorted colours) https://amzn.to/3E7VAQE
going to assume that you are already Next time Resistors (assorted values) https://amzn.to/3O4RvBt
familiar with fundamental concepts ‘HELLO’ is just one Solderless breadboard https://amzn.to/3O2L3e8
like voltage, current and resistance. of the words that Multicore jumper wires (male-male) https://amzn.to/3O4hnxk
If not, you might want to start by pe- we can display.
rusing and pondering a short series of While we are wait-
Components (from Part 2)
articles I penned on these very topics 7-segment display(s) https://amzn.to/3Afm8yu
ing for the next ex-
– see: https://bit.ly/3EguiJh citing installment
Similarly, I’ll assume you are no of this mega-mini-
stranger to solderless breadboards. series, try to think of other characters 8, the complementary value to 2 is (9
Having said this, even if you’ve used and symbols and messages we could – 2) = 7, and so forth.
these little scamps before, there are create (but don’t cheat by looking on Now, pick two complementary num-
some aspects to them that can trap the internet!). bers, let’s say 2 and 7. Their correspond-
the unwary, so may I suggest you feast Last, but certainly not least, we still ing Excess-3 codes are 0101 and 1010,
your orbs on a column I wrote just have the question we posed earlier in respectively. What this means is that
for you – see: https://bit.ly/3NZ70uF this column, which was ‘What differ- we can generate the complement of an
Last, but not least, you will find a entiates BCD 2421 and Excess-3 from Excess-3 code (or a BCD 2421 code) by
treasure trove of resources at the Ardu- BCD 8421.’ The answer is that BCD simply inverting all its bits, which was
ino.cc website, including example pro- 2421 and Excess-3 are known as ‘self- a very useful trick in the early days of
grams and reference documentation. complementing codes’. What does this computing. If you want to learn more
mean? Well, in decimal, the comple- about BCD, bounce over to my column
mentary value of a number n between Mysteries of the Ancients: Binary Coded
this, we wouldn’t be able to distinguish 0 and 9 is (9 – n). Thus, the comple- Decimal (BCD) (https://bit.ly/3wwnUsx).
between the two ‘L’ characters. mentary value to 0 is (9 – 0) = 9, the Until next time – cunningly titled Part
This also explains why we add a delay complementary value to 1 is (9 – 1) = 5 – have a good one!
of PAUSE_TIME (1000 millisec-
onds = 1 second) after displaying Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he
the final letter in our message. If surveys at CliveMaxfield.com – the go-to site for the latest and greatest
we didn’t do this, it would be hard in technological geekdom.
to distinguish between the letter
‘O’ in ‘HELLO’ and the number Comments or questions? Email Max at: max@CliveMaxfield.com

Practical
Electronics BACK ISSUES
Practical Practical Practical Practical Practical Practical Practical
Electronics Electronics Electronics Electronics Electronics Electronics Electronics
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out Make it with Micromite
Circuit Surgery Audio Out KickStart Circuit Surgery
Make it with Micromite Audio Out Cool Beans Circuit Surgery
Make it with Micromite Audio Out Wind turbine Electronic Building Blocks
Circuit Surgery Audio Out Circuit Surgery
Make it with Micromite Audio Out Circuit Surgery
Make it with Micromite KickStart Make it with Micromite
Exploring op amp PE Analogue Vocoder: Using and interfacing the
Exploring op amp Vocoder: Driver Using the Exploring
Using and interfacing the the Vocoder: Mastering switch Build an iButton-based
Exploring the Vocoder final Small-scale Building a budget Distortion and Designing a practical Code for an iButton-based
Simulating distortion Using transformers in Installing MMBASIC on
Using
a distortion and Exploring DACs and MMBASIC + RPi Pico + display
exponential amplifiers Driver Amplifier design versatile iButton input offsets Amplifier build I2C bus versatile iButton LM35 temp sensor Audio PSU debounce Royer oscillator
Electronic Door Lock assembly garden set-up electronic stethoscope
distortion circuits de-thump circuit Electronic Door Lockand distortion circuits audio electronics Raspberry Pi Pico distortion circuits microcontrollers = PicoMite Backpack!

64-key MIDI WIN!


Microchip Microchip
WIN!
WIN!
Microchip
Matrix SAM C21
Xplained Pro
SAM V71
Xplained Ultra
MPLAB
Starter Kit for
Evaluation Kit
WIN!
Multi-purpose Battery Evaluation Kit
WIN!
Digital Power
WIN Manager
Completing Retro gaming
PIC18F Development MiniHeart Mastering our impressive 8/14/20-pin PIC
Introducing the Introduction to
Board: using displays AC meters Programming Helper with Nano Pong!
Heartbeat Analogue Vocoder Raspberry Pi Pico linear actuators
SimulatorBuild this handy WIN! Single-Chip Silicon
Flowcode
WIN! Microchip
Soothing WIN!High-current
Digital FX SAM E54 Labs FM/AM/SW
C
Arduino-based Electronic
Microchip
Digital FX Explorer 8
Curiosity Ultra
Digital Radio Receiver
void interrupt(void)
{ if (intcon & 4)
WLR089
Battery Balancer WIN! Unit Development Kit High-current Development Controlling a Flowcode
Xplained Pro
Unit
{

power supply
Assembly
Board
clear_bit(intcon, 2);
Microchip
Learn Wind Chimes Evaluation Kit from Microchip
FCM_INTERRUPT_TMR

Battery Balancer linear actuator


movlw D′7′
o(); bsf STATUS, RP0
MPLAB ICD 4
Digital Clock
bcf STATUS, RP1
movwf _adcon1
movlw D′192′
Hex
:040000008A01122837 WIN! In-Circuit WIN!
Flowcode
movwf _option_reg :08000800F000F00S030
Flowcode
Debugger
Design
EF10000
:10001000040EF2000A0

Simple
EF300BA110A122928352

WIN
Flowcode

Programming
86C
:2000200D928FE28073 Flowcode C
void interrupt(void)
{ if (intcon & 4) C

Toot toot! MIDI


{
C clear_bit(intcon, 2); Assembly void interrupt(void)
FCM_INTERRUPT_TMR movlw D′7′ { if (intcon & 4)

Learn
void interrupt(void) o(); {
bsf STATUS, RP0 Assembly
{ if (intcon & 4) clear_bit(intcon, 2);
bcf STATUS, RP1

Model Railway Level Music


{
Assembly movwf _adcon1
Hex FCM_INTERRUPT_TMR movlw D′7′
clear_bit(intcon, 2);
movlw D′192′ :040000008A01122837
o(); bsf STATUS, RP0
FCM_INTERRUPT_TMR movlw D′7′ movwf _option_reg bcf STATUS, RP1

Flowcode
:08000800F000F00S030 Hex

192kHz, 24-bit
o(); bsf STATUS, RP0
EF10000 movwf _adcon1
bcf STATUS, RP1 movlw D′192′
Hex :10001000040EF2000A0 :040000008A01122837

Full-wave Crossing with moving Keyboard


movwf _adcon1 movwf _option_reg
EF300BA110A122928352 :08000800F000F00S030
movlw D′192′

Learn
:040000008A01122837 86C EF10000
movwf _option_reg

Vintage Battery
:08000800F000F00S030 :2000200D928FE28073 :10001000040EF2000A0

Programming:
EF10000 EF300BA110A122928352
:10001000040EF2000A0

SuperCodec:
86C

Universal Motor barriers, flashing


EF300BA110A122928352 :2000200D928FE28073
86C

Radio Li-ion Flowcode :2000200D928FE28073

PIC, Arduino and 16x2 LCD


Balanced Input Programming Speed Controller lights and bell! Advanced GPS Computer:
Power Supply and Attenuator Battery Monitor Logger Advanced GPS Computer construction and use
PLUS! PLUS! PLUS! PLUS! PLUS! PLUS!
Techno Talk – Communing with nature Jan 2022 £5.49 Feb 2022 £5.49
Techno Talk – Go eco, get ethical! Apr 2022 £5.49 May 2022 £5.49 Jun 2022 £5.49 Jul 2022 £5.49 Aug 2022 £5.49
PLUS!
01 02 Techno
04 Talk – From nano to bio Techno
05 Talk – Positivity follows gloom Techno
06 Talk – Mixed Menu Techno
07 Talk – Time for a total rethink? 08
Fox Report – Power as free as the wind Techno Talk – Should we be worried? Fox Report – Another fine mess: moving to Windows 11 Cool Beans – Simple filtering with software Cool Beans – Amazing Analogue AI and a handy PSU Cool Beans – Choosing servos and a little competition Cool Beans – Touch-sensitive robots and using servos
Net Work –EVs, upgrading to Windows 11 and space tech 9 772632 573023
Net Work – Electricity generation and streaming radio 9 772632 573023
Net Work – Scanners, eVTOLs and the latest from space 9 772632 573023
Net Work – UK gigafactories, Rolls-Royce electric planes 9 772632 573023
Net Work – Google Lens plus energy and space news 9 772632 573023
Net Work – NFC and the rise of mobile payments 9 772632 573023
Net Work – The irresistible rise of automotive electronics 9 772632 573023

www.electronpublishing.com @practicalelec practicalelectronics


www.electronpublishing.com @practicalelec practicalelectronics
www.electronpublishing.com @practicalelec practicalelectronics
www.electronpublishing.com @practicalelec practicalelectronics
www.electronpublishing.com @practicalelec practicalelectronics
www.electronpublishing.com @practicalelec practicalelectronics
www.electronpublishing.com @practicalelec practicalelectronics

BACK ISSUES – ONLY £5.95 ORDER FORM – BACK ISSUES


£5.95 per issue for UK incl p&p n £8.95 Europe Air Mail n £9.95 ROW Air Mail  Back issues required (month / year) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
We can supply back issues of PE/EPE by post. Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
We stock magazines back to 2006, except for the following: Address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2006 Jan, Feb, Mar, Apr, May, Jul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2007 Jun, Jul, Aug
2008 Aug, Nov, Dec Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2009 Jan, Mar, Apr  I enclose cheque/PO to the value of £ . . . . . . . . . . . .
2010 May, Jun, Jul, Aug, Oct, Nov
2011 Jan  Please charge my Visa/Mastercard £ . . . . . . . . . . . . . . .
2014 Jan Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2018 Jan, Nov, Dec Valid From . . . . . . . . . . . . . Card Expiry Date . . . . . . . . . . . . .
2019 Jan, Feb, Apr, May, Jun
Card Security Code . . . . . . . . . . (Last three digits on or under the signature strip)
Issues from Jan 1999 are available on CD-ROM / DVD-ROM
SEND TO: Practical Electronics, Electron Publishing Limited
If we do not have a a paper version of a particular
113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU
issue, then a PDF can be supplied for the same price.
Your email address must be included on your order. Tel: 01202 880299 Email: stewart.kearn@wimborne.co.uk On-line Shop: www.electronpublishing.com
Please make sure all components are still available before Payments must be in £ sterling – cheque must be drawn on a UK bank and made payable to ‘Practical Electronics’.
Practical
commencing anyElectronics
project from| aApril | 2023issue.
back-dated 67
All items normally posted within seven days of receipt of order. Copy this form if you do not wish to cut your issue.
Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
APRIL 2023 MAY 2022
500W Amplifier Module ............................................................see p.22, April 2023 Bus board PCB for Analogue Vocoder .............................. AO1-MAY22 10.95
Clipping Indicator (per channel) ...............................................01112211 7.95 Complete set of 14 PCBs for Analogue Vocoder ............... AO2-MAY22 97.95
CD Welder Power Supply (one needed) .................................29103221 9.95 Programmed EEPROM for Digital FX Unit ........................ FX1-MAY22 10.95
CD Welder Controller (one needed) ........................................29103222 9.95 Programmed PIC for Digital FX Unit using potentiometer....FX2-MAY22 8.95
CD Welder Energy Storage module (several needed) ...........29103223 7.95
AO Universal Dual Op Amp Board .......................................AO1-APR23 9.95 APRIL 2022
AO Stereo RIAA precision passives kit for dual op amp ......AO2-APR23 8.95 64-key MIDI Matrix shield .................................................. 23101211 8.95
64-key MIDI Matrix switch board ....................................... 23101212 11.95
MARCH 2023 High-current Battery Balancer .......................................... 14102211 10.95
Pico BackPack..........................................................................07101221 9.95 Digital FX Unit – using potentiometer ................................ 01102211 9.95
Semaphore Signal (controller) .................................................09103221 7.95 Digital FX Unit – using BCD switch ................................... 01102212 9.95
Semaphore Signal (blade) .......................................................09103222 5.95 Universal Audio PSU ......................................................... AO1-APR22 11.95

FEBRUARY 2023 MARCH 2022


Tesla Coil driver board..............................................................26102221 9.95 Mini Isolated Serial Link..................................................... 24102211 £5.95
Tesla Coil potentiometer board ................................................26102222 5.95 Busy Loo Indicator ............................................................. 16112201 £5.95
Cooling Fan Controller & Loudspeaker Protector ...................01102221 8.95 Analogue Vocoder – Band-pass filter board ...................... AO1-MAR22 9.95
Remote Gate Controller ...........................................................11009121 12.95 Analogue Vocoder – HP/LP filter board ............................. AO2-MAR22 9.95

JANUARY 2023 FEBRUARY 2022


Classic LED Metronome – 8-LED............................................23111211 7.95 Arduino-based Power Supply ............................................ 18106201 9.95
Classic LED Metronome – 10-LED..........................................23111212 8.95 Battery Monitor Logger ...................................................... 11106201 10.95
Multi-Channel Speaker Protector – 6 channel ........................01101221 9.95 Electronic Wind Chimes .................................................... 23011201 10.95
Multi-Channel Speaker Protector – 4 channel ........................01101222 7.95 Analogue Vocoder – Driver Amplifier ................................. AO-FEB22 8.95
Remote Control Range Extender – IR-to-UHF .......................15109212 5.95
Remote Control Range Extender – UHF-to-IR .......................15109211 7.95 JANUARY 2022
AO Universal Single Op Amp Board .....................................AO1-JAN23 7.95 Vintage battery Radio Li-ion Power Supply ....................... 11111201 9.95
MiniHeart: A Miniature Heartbeat Simulator ...................... 01109201 8.95
DECEMBER 2022
Hummingbird Amplifier .............................................................01111211 9.95 DECEMBER 2021
SMD Trainer PCB .....................................................................29106211A 8.95 AM/FM/SW Digital Receiver .............................................. CSE200902A 13.95
SMD Trainer PCB + parts ........................................................29106211B 13.95 Balanced Input and Attenuator for USB CODEC............... 01106202 11.95

NOVEMBER 2022 NOVEMBER 2021


USB Cable tester – main PCB .................................................04108211 12.95 Dual Battery Lifesaver ....................................................... 11111202 £6.95
USB Cable tester – front panel ................................................04108212 5.95
USB Cable tester – optional panel...........................................SC5970 5.95 OCTOBER 2021
Model Railway Carriage Lights – PCB ....................................09109211 6.95 Mini Wi-Fi LCD BackPack ................................................. 24106201 £8.95
AO transfmr PCB – standard VTX-A range ....................... VTX-101-007 6.95
AO transfmr PCB – dual-outline VTX102-3001/101-3002 ...VTX-Dual 6.95 SEPTEMBER 2021
USB SuperCodec PCB ...................................................... 01106201 £14.95
OCTOBER 2022 Audio DDS Oscillator PCB ................................................ 01110201 £5.95
SMD Test Tweezers – PCB and pair of tweezer arms ............04106211-2 11.95 Audio DDS Oscillator rotary encoder................................. 01110201-ENC 6.95
SMD Test Tweezers – programmed PIC12F1572-I/SN ..........0410621A 7.95 Programming Adaptor Board for Audio DDS Oscillator ..... 01110202 £5.95
Tele-com ............................................................................ 12110211 12.95 High-power Ultrasonic Cleaner main PCB ........................ 04105201
£14.95
High-power Ultrasonic Cleaner front-panel PCB ............... 04105202
SEPTEMBER 2022 Night Keeper Lighthouse PCB........................................... 08110201 £5.95
Touchscreen Digital Preamp – main board........................ 01103191 12.95
Touchscreen Digital Preamp – adaptor board pair ............ 01103192 5.95 AUGUST 2021
20A DC Motor Speed Controller ........................................ 11006211 9.95 Ol’ Timer PCB .................................................................... 19104201 £11.95
Ol’ Timer 8x8 RGB LED module using WS2812B ............. 19104201-88 £8.95
AUGUST 2022 Ol’ Timer set of acrylic case pieces and spacer ................ 19104201-ACR £8.75
Multi-purpose Battery Manager – I/O Expander module ... 11104212 5.95 Ol’ Timer DS3231 RTC IC wide SOIC-16................................19104201-RTC £5.95
Multi-purpose Battery Manager – Switch Module .............. 11104211 8.95 Wideband Digital RF Power Meter .................................... 04106201 £9.75
Simple MIDI Music Keyboard (for 8 switches) ................... 23101213 6.95 Switchmode 78xx regulators (PACK of 5!) ....................... 18105201 £7.95
Nano Pong......................................................................... 08105212 7.95 Cool Beans SMAD display ................................................ CB-AUG21 £11.95

JULY 2022 JULY 2021


Silicon Labs AM/FM/SW Radio.......................................... CSE210301C 10.95 ATtiny816 Breakout / Dev Board with Capacitive Touch ... 24110181 £9.75
Level Crossing Controller .................................................. 09108211 6.95 IR Remote Control Assistant (Jaycar version) ................... 15005201 £8.95
IR Remote Control Assistant (Altronics version)................ 15005202 £8.95
JUNE 2022 PIC18F Development Board.............................................. PNM-JUL21 £12.95
Full-wave Motor Speed Controller ..................................... 1010221 8.95 Microphone Preamplifier .......................................................AO-JUL21 £11.95
PIC Programming Helper for 8-pin PICs only .................... 24106211 7.95
PIC Programming Helper for 8, 14 or 20-pin PICs ........... 24106212 10.95
Advanced GPS Computer ................................................. 05102211 9.95

PCBs for most recent PE/EPE constructional projects are available. From the July 2013 issue onwards, PCBs with eight-digit codes
have silk screen overlays and, where applicable, are double-sided, have plated-through holes, and solder mask. They are similar to
photos in the project articles. Earlier PCBs are likely to be more basic and may not include silk screen overlay, be single-sided, lack
plated-through holes and solder mask.
Always check price and availability in the latest issue or online. A large number of older boards are listed for ordering on our website.
In most cases we do not supply kits or components for our projects. For older projects it is important to check the availability
of all components before purchasing PCBs.
Back issues of articles are available – see Back Issues page for details.

68 Practical Electronics | April | 2023


Double-sided | plated-through holes | solder mask

PROJECT CODE PRICE PROJECT CODE PRICE


JUNE 2021 JUNE 2020
Roadies’ Test Signal Generator (surface-mount version) .. 01005201 £8.95 Arduino breakout board – 3.5-inch LCD Display ............... 24111181 £6.95
Roadies’ Test Signal Generator (through-hole version) ..... 01005202 £9.95 Six-input Audio Selector main board ................................. 01110191
£10.95
Touchscreen Wide-range RCL Box (Resistor module) ...... 04104201 Six-input Audio Selector switch panel board ..................... 01110192
£18.95
Touchscreen Wide-range RCL Box (Ind/Cap module) ...... 04104202
KickStart Part 3 – Gyrator-based Audio Filter.................... KS3-2021 £7.95 MAY 2020
Ultra-low-distortion Preamplifier Input Selector ......................... 01111112
£11.25
MAY 2021 Ultra-low-distortion Preamplifier pushbutton Input Selector ..... 01111113
7-Band Equaliser (Mono)................................................... 01104201 £8.95 Universal Regulator .................................................................... 18103111 £7.95
7-Band Equaliser (Stereo) ................................................. 01104202 £10.95 433MHz Wireless Data Repeater .............................................. 15004191 £8.50
Car Altimeter ...................................................................... 05105201 £7.95 Bridge-mode Adaptor for Amplifier ............................................. 01105191 £7.95
iCEstick VGA Terminal ................................................................ 02103191 £5.95
APRIL 2021 Analogue noise with tilt control ................................................... AO-0520-01 £7.95
Reflow Oven – DSP Active Crossover (CPU).................... 01106193 Audio Spectrum Analyser ........................................................... PM-0520-01 £8.95
Reflow Oven – DSP Active Crossover (Front panel) ......... 01106195 £19.95
Reflow Oven – DSP Active Crossover (LCD) .................... 01106196 APRIL 2020
Frequency Reference Signal Distributor.................................... CSE200103 £8.95 Flip-dot Display black coil board................................................. 19111181
Flip-dot Display black pixels ....................................................... 19111182
£14.95
MARCH 2021 Flip-dot Display black frame ....................................................... 19111183
Nutube Guitar Effects Pedal .............................................. 01102201 £12.95 Flip-dot Display green driver board ............................................ 19111184
Programmable Thermal Regulator (Peltier Interface)........ 21109181
£18.95
Programmable Thermal Regulator (Peltier Driver) ............ 21109182 MARCH 2020
Tunable HF Preamp .......................................................... CSE190502 £8.95 Diode Curve Plotter ........................................................... 04112181 £10.95
Steam Train Whistle / Diesel Horn Sound Generator ............... 09106181 £8.50
FEBRUARY 2021 Universal Passive Crossover (one off) ...................................... UPC0320 £12.50
4G Remote Monitoring ...................................................... 27111191 £9.95 For the many pre-2016 PCBs that we stock please see the
JANUARY 2021 PE website: www.electronpublishing.com
Nutube Valve Preamplifier ................................................. 01112191 £12.95
Arduino DCC Controller ..................................................... 09207181 £10.95 PE/EPE PCB SERVICE
DECEMBER 2020 Order Code Project Quantity Price
Pseudo-Random Sequence Generator ............................. 16106191 £7.95
Clever Charger .................................................................. 14107191 £11.95 .........................................................
PE Theremin Amplifier ....................................................... AO-1220-01 £8.95
.........................................................
NOVEMBER 2020
LED Christmas Tree (1 off) ................................................ 16107181-1 £6.95 .........................................................
LED Christmas Tree (4 off) ................................................ 16107181-2 £14.95
LED Christmas Tree (12 off) .............................................. 16107181-3 £24.95 .........................................................
LED Christmas Tree (20 off) .............................................. 16107181-4 £34.95
USB/SPI Interface Board ................................................... 16107182 £5.95 .........................................................
45V/8A Power Supply PCB plus acrylic spacer ................. 18111181 £14.95
45V/8A Power Supply front panel five-way display bezel .. 18111181-BZ £3.95
Five-way LCD Panel Meter/Display ................................... 18111182 £7.95
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OCTOBER 2020
Digital Audio Millivoltmeter................................................. 04108191 £9.95 .........................................................
Precision Signal Amplifier .................................................. 04107191 £7.95
Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEPTEMBER 2020 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PE Theremin PSU ............................................................. AO-0920-01 £5.95
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95 I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
Micromite Explore-28......................................................... 07108191 £6.95
Ultrabrite LED Driver ......................................................... 16109191 £6.95 payable to: Practical Electronics

AUGUST 2020 Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Micromite LCD BackPack V3 ............................................ 07106191 £9.95
Steering Wheel Audio Button to Infrared Adaptor .............. 05105191 £7.95 Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
JULY 2020 Card Security No . . . . . . . . . .
AM/FM/CW Scanning HF/VHF RF Signal Generator ........ 04106191 £13.95
Speech Synthesiser with the Raspberry Pi Zero ............... 01106191 £5.95 You can also order PCBs by phone, email or via the shop
PE Mini-organ PCB ........................................................... AO-0720-01 £14.95 on our website: www.electronpublishing.com
PE Mini-organ selected parts ............................................ AO-0720-02 £8.95
High-current Solid-state 12V Battery Isolator – control ..... 05106191 £6.95 No need to cut your issue – a copy of this form is just as good!
High-current Solid-state 12V Battery Isolator FET (2oz) ... 05106192 £9.95

All prices include VAT and UK p&p. Add £4 per project for post to Europe; £5 per project outside Europe.
Orders and payment should be sent to:
Practical Electronics, Electron Publishing Ltd
113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU
Tel 01202 880299 Email: shop@electronpublishing.com
On-line Shop: www.epemag.com
Cheques should be made payable to ‘Practical Electronics’ (Payment in £ sterling only).
NOTE: Most boards are in stock and sent within seven days of receipt of order, please allow up to 28 days delivery if we need to restock.

Practical Electronics | April | 2023 69


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
FEBRUARY 2020 SEPTEMBER 2018
Motion-Sensing 12V Power Switch ................................... 05102191 £5.95 3-Way Active Crossover .................................................... 01108171 £17.95
USB Keyboard / Mouse Adaptor........................................ 24311181 £8.50 Ultra-low-voltage Mini LED Flasher ................................... 16110161 £5.95
DSP Active Crossover (ADC) ............................................ 01106191
DSP Active Crossover (DAC) ×2 ...................................... 01106192 AUGUST 2018
DSP Active Crossover (CPU) ............................................ 01106193 £29.95 Universal Temperature Alarm ............................................ 03105161 £7.95
DSP Active Crossover (Power/routing).............................. 01106194 Power Supply For Battery-Operated Valve Radios ........... 18108171
DSP Active Crossover (Front panel).................................. 01106195 18108172 £24.95
DSP Active Crossover (LCD)............................................. 01106196 18108173
18108174
JANUARY 2020 JULY 2018
Isolated Serial Link ............................................................ 24107181 £8.50 Touchscreen Appliance Energy Meter – Part 1 ................. 04116061 £14.95
Automotive Sensor Modifier .............................................. 05111161 £12.95
DECEMBER 2019
Extremely Sensitive Magnetometer ................................... 04101011 £16.75 JUNE 2018
Four-channel High-current DC Fan and Pump Controller ... 05108181 £8.75 High Performance 10-Octave Stereo Graphic Equaliser ... 01105171 £14.95
Useless Box ....................................................................... 08111181 £11.50
MAY 2018
NOVEMBER 2019 High Performance RF Prescaler........................................ 04112162 £10.45
Tinnitus & Insomnia Killer (Jaycar case – see text) ........... 01110181 £9.95 Micromite BackPack V2..................................................... 07104171 £8.45
Tinnitus & Insomnia Killer (Altronics case – see text) ........ 01110182 £9.95 Microbridge ........................................................................ 24104171 £5.95

OCTOBER 2019 APRIL 2018


Programmable GPS-synced Frequency Reference .......... 04107181 £11.50 Spring Reverberation Unit ................................................. 01104171 £13.95
Digital Command Control Programmer for Decoders ........ 09107181 £9.95 DDS Sig Gen Lid ............................................................... Black £5.95
Opto-isolated Mains Relay (main board) ........................... 10107181 DDS Sig Gen Lid ............................................................... Blue £5.95
£11.50
Opto-isolated Mains Relay (2 × terminal extension board)...10107182 DDS Sig Gen Lid ............................................................... Clear £5.95

AUGUST 2019 MARCH 2018


Brainwave Monitor ............................................................. 25108181 £12.90 Stationmaster Main Board ................................................. 09103171 £17.75
Super Digital Sound Effects Module .................................. 01107181 £6.95 + Controller Board .............................................. 09103172
Watchdog Alarm ................................................................ 03107181 £8.00 SC200 Amplifier Module – Power Supply .......................... 01109111 £16.45
PE Theremin (three boards: pitch, volume, VCA) ............. PETX0819 £19.50
PE Theremin component pack (see p.56, August 2019) ... PETY0819 £15.00 FEBRUARY 2018
GPS-Synchronised Analogue Clock Driver ....................... 04202171 £11.95
JULY 2019 High-Power DC Motor Speed Controller – Part 2
Full-wave 10A Universal Motor Speed Controller .............. 10102181 £12.90 + Control Board ................................................... 11112161 £11.95
Recurring Event Reminder ................................................ 19107181 £8.00 + Power Board .................................................... 11112162 £15.30
Temperature Switch Mk2 ................................................... 05105181 £10.45
JANUARY 2018
JUNE 2019 High-Power DC Motor Speed Controller – Part 1 .............. 11112161 £15.30
Arduino-based LC Meter ................................................... 04106181 £8.00 Build the SC200 Amplifier Module ..................................... 01108161 £13.95
USB Flexitimer................................................................... 19106181 £10.45
DECEMBER 2017
MAY 2019 Precision Voltage and Current Reference – Part 2............ 04110161 £14.95
2× 12V Battery Balancer ................................................... 14106181 £5.95
Deluxe Frequency Switch .................................................. 05104181 £10.45 NOVEMBER 2017
USB Port Protector ............................................................ 07105181 £5.95 50A Battery Charger Controller ......................................... 11111161 £12.95
Micropower LED Flasher (45 × 47mm) ......................... 16109161 £7.95
APRIL 2019 (36 × 13mm) ......................... 16109162 £5.95
Heater Controller ............................................................... 10104181 £14.00 Phono Input Converter ...................................................... 01111161 £7.95

MARCH 2019 SEPTEMBER 2017


10-LED Bargraph Main Board ........................................... 04101181 £11.25 Compact 8-Digit Frequency Meter..................................... 04105161 £12.95
+Processing Board ............................................. 04101182 £8.60
AUGUST 2017
FEBRUARY 2019 Micromite-Based Touch-screen Boat Computer GPS ....... 07102122 £10.45
1.5kW Induction Motor Speed Controller........................... 10105122 £24.95 Fridge/Freezer Alarm ......................................................... 03104161 £7.95

NOVEMBER 2018 JULY 2017


Super-7 AM Radio Receiver .............................................. 06111171 £15.95 Micromite-Based Super Clock ........................................... 07102122 £10.45
Brownout Protector for Induction Motors ........................... 10107161 £12.90
OCTOBER 2018
6GHz+ Touchscreen Frequency Counter .......................... 04110171 £12.95 JUNE 2017
Two 230VAC MainsTimers ................................................ 10108161 Ultrasonic Garage Parking Assistant ................................. 07102122 £10.45
£11.95
10108162 Hotel Safe Alarm................................................................ 03106161 £7.95
100dB Stereo LED Audio Level/VU Meter ......................... 01104161 £17.75

70 Practical Electronics | April | 2023


CLASSIFIED ADVERTISING

Practical
Electronics
If you want your advertisements to be seen by the largest readership
at the most economical price then our classified page offers excellent Practical Electronics
value. The rate for semi-display space is £10 (+VAT) per centimetre reaches more UK
high, with a minimum height of 2·5cm. All semi-display adverts have a readers than any other
width of 5.5cm. The prepaid rate for classified adverts is 40p (+VAT) per UK monthly hobby
word (minimum 12 words).
electronics magazine.
Cheques are made payable to ‘Practical Electronics’. VAT must be
Our sales figures prove it.
added. Advertisements with remittance should be sent to: Practical
Electronics, 113 Lynwood Drive, Wimborne, Dorset, BH21 1UU. We have been the leading
Tel 07973518682 Email: pe@electronpublishing.com monthly magazine in
For rates and further information on display and classified advertising this market for the last
please contact our Advertisement Manager, Matt Pulzer – see below. twenty-seven years.
Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield,

Send large letter stamp for Catalogue

BOWOOD ELECTRONICS LTD Electrical Industries Charity (EIC)


Suppliers of Electronic Components We help people working in the
electrical, electronics and energy COAST ELECTRONICS
www.bowood-electronics.co.uk community as well as their family BREAKOUTS-COMPONENTS-
Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield, members and retirees. CONTRACT DESIGN-3D PRINTER PARTS-
Derbyshire S40 2QR. Sales: 01246 200 222 We use workplace programmes that MUSICAL-MICROCONTROLLERS
Send large letter stamp for Catalogue
give the industry access to financial WWW.COASTELECTRONICS.CO.UK

grants and a comprehensive


range of free and
MISCELLANEOUS confidential services. Andrew Kenny – Qualified Patent Agent
EPO UKIPO USPTO
VALVES AND ALLIED COMPONENTS? www.electricalcharity.org
Circuits Electric Machinery Mechatronics
For free stock list and/or advice, please Web: www.akennypatentm.com
contact me: geoffdavies337@gmail.com Email: Enquiries@akennypatentm.com
Telephone: 01788 574774 Tel: 0789 606 9725

PIC DEVELOPMENT KITS, DTMF kits


and modules, CTCSS Encoder and
Decoder/Display kits.
Visit www.cstech.co.uk

ADVERTISING INDEX
AO SHOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Advertisement offices
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 45 Matt Pulzer
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 45
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Electron Publishing Ltd
iTP (INNOVATIVE TECHNOLOGY PROJECTS LTD) . . . . . . . . . . 36
1 Buckingham Road
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Brighton
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) East Sussex BN1 3RA
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . Cover (iv) Tel 07973 518682
POLABS D.O.O.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Email pe@electronpublishing.com
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Web www.electronpublishing.com
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 For editorial contact details see page 7.
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Practical Electronics | April | 2023 71


Next Month – in the May issue
Precision AM-FM DDS Signal Generator
This signal generator provides very high calibrated accuracy with an error
of just ten parts in a billion, which translates to 0.1Hz at 10MHz. It also has
plenty of features, including amplitude and frequency modulation.

500W Power Amplifier – Part 2


We’ve described our mighty new 500W Amplifier, and we follow on next
month with the amplifier construction, beginning with the PCB (Amplifier
Module) assembly.

Improved SMD Test Tweezers


Our SMD Test Tweezers project from the October 2022 issue has been
extremely popular. They are handy, compact, easy to use, easy to build and
inexpensive. So, we decided to see what features we could add simply by
upgrading the microcontroller at its heart.

CJMCU-7620 Gesture Recognition Module


With this module, you can experiment with sensing and recognising
gestures made with your hands. It is very small, relatively low in
cost and can easily be hooked up to an Arduino or a Micromite.

PLUS!
All your favourite regular columns from Audio Out, Cool Beans and Circuit
Surgery, to Make it with Micromite, Techno Talk and Net Work. On sale 6 April 2023
Content may be subject to change

Welcome to JPG Electronics NEW subscriptions hotline!


Selling Electronics in Chesterfield for 29 Years
Open Monday to Friday 9am to 5:30pm
And Saturday 9:30am to 5pm Practical
• Aerials, Satellite Dishes & LCD Brackets
• Audio Adaptors, Connectors & Leads
• BT, Broadband, Network & USB Leads
Electronics
• Computer Memory, Hard Drives & Parts We have changed the way we sell and renew
• DJ Equipment, Lighting & Supplies subscriptions. We now use ‘Select Publisher
• Extensive Electronic Components
Services’ for all print subscriptions – to start a
- ICs, Project Boxes, Relays & Resistors
• Raspberry Pi & Arduino Products new subscription or renew an existing one you
• Replacement Laptop Power Supplies have three choices:
• Batteries, Fuses, Glue, Tools & Lots more...
1. Call our NEW print subscription hotline:
01202 087631, or email: pesubs@selectps.com
T: 01246 211 202
E: sales@jpgelectronics.com 2. Visit our shop at: www.electronpublishing.com
JPG Electronics, Shaw’s Row,
Old Road, Chesterfield, S40 2RB
3. Send a cheque (payable to: ‘Practical
W: www.jpgelectronics.com Electronics’) with your details to:
Practical Electronics Subscriptions, PO Box 6337,
Shaw’s Row

JPG Electronics
Britannia Maison Mes Amis
Bournemouth BH1 9EH, United Kingdom
Inn
Old Road Remember, we print the date of the last issue
ad

Rose & Crown


Johnsons of your current subscription in a box on the
all Ro

d
Roa
Old H

Cha
tsw
orth
Morrisons
address sheet that comes with your copy.
Sparks
Digital subscribers, please call 01202 880299
Retail & Trade Welcome • Free Parking • Google St View Tour: S40 2RB or visit: www.electronpublishing.com

Published on approximately the first Thursday of each month by Electron Publishing Limited, 1 Buckingham Road, Brighton, East Sussex BN1 3RA. Printed in England by Acorn Web Offset Ltd., Normanton WF6
1TW. Distributed by Seymour, 86 Newman St., London W1T 3EX. Subscriptions UK: £33.99 (6 months); £59.99 (12 months); £114.99 (2 years). EUROPE: airmail service, £38.99 (6 months); £69.99 (12 months);
£129.99 (2 years). REST OF THE WORLD: airmail service, £46.99 (6 months); £84.99 (12 months); £164.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box
6337, Bournemouth BH1 9EH, United Kingdom. Email: pesubs@selectps.com. 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.

72 Practical Electronics | April | 2023


Did you know our online shop
now sells the current issue of
PE for £5.99 inc. p&p?
Practical
Electronics Prac
Electro tical
The UK’s premier electronics and computing maker magazine
The UK
Circuit Surgery
Using digipots with
active filters
Fox Report
Hopeless helplines and Cir
NASty problems
c
Using
nics
d
Audio’s p
rg
Out

op
e
linear igipots with
r
remier
Universal board
uitaudio
S u yamps
foredual

F
lectron
o x R
ics and
compu
ting ma
regula eport ker ma
tors Keepin
WIN! 500W Power
scamm
g one
step a
gazine
ers hea Ma ke it
Microchip
dsPIC33EV 5V
amplifier is a full-time tad sokf Updati with Micro
n m
firmwa g the PicoM ite
CAN-LIN
Raspb re ite
Pico B erry Pi
Starter
Kit
ackPa
ck
Three low-noise Finger
HF-UHF Amplifiers Reade print WIN!
r Mic
PIC32Crochip
Curios M JH01
Ca p a Develo ity Pro

Building the Capacitor Disch citor


pm
Board ent
a
Discharge Welder Welde rge
r

Amplifier
Clipping Indicator S ema
p
PLUS!
P Signa hore
LUSfarm!
Techno Talk – Robots... down on the ! Apr 2023 £5.99 l for
T chno
Cool Beans – Arduino Bootcamp:e7-segment
04
OO-G
Mode auge
Talk –displays
Cool B It’s han
eanPlay’ simplicity
Net Work – Smart devices with ‘Plug and dover 9 772632 573030 l Railw
Net Wo s – Arduino tim
rk – Sa Bootca e ays
www.electronpublishing.com @practicalelec mp: tw
tellites practicalelectronics
www.e and th o LEDs Mar 20
lectro e roots (twice 23
npubli of the the fun £5.99
shing Inform )!
.com ation A 03
@pra ge 9 772
632 5
cticale 73030
lec
practi
calele
ctronic
s

You read that right! We now sell the current issue of your favourite electronics
magazine for exactly the same price as in the High Street, but we deliver it
straight to your door – and for UK addresses we pay the postage. No need to
journey into town to queue outside the newsagent. Just go to our website, set
up an account in 30 seconds, order your magazine and we’ll do the rest.

www.electronpublishing.com

You might also like