Practical Electronics 2023-02

Download as pdf or txt
Download as pdf or txt
You are on page 1of 76
At a glance
Powered by AI
This issue of Practical Electronics magazine features several electronics projects like a Tesla coil, cooling fan controller, and driveway gate remote control. It also includes regular sections on technology news, tutorials, and circuit design.

Projects featured include a Tesla coil, cooling fan controller and loudspeaker protector, and a driveway gate remote control.

Recurring sections include Techno Talk, The Fox Report, Net Work, KickStart, Make it with Micromite, and Circuit Surgery providing news, commentary and tutorials.

Practical

Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Kick Start Make it with Micromite
Using digipots with BME280 humidity, pressure PicoMite Fingerprint
op amp amplifiers and temperature sensor Reader coding

Driveway Gate Cooling Fan Controller &


Remote Control Loudspeaker Protector
WIN!
Microchip
Curiosity
Development
Board
WIN!

Fingerprint
Reader
LTDZ V5.0
budget
Spectrum
Analyser
Tesla Coil
Solid-State
Flame
Discharge
PLUS!
Feb 2023 £5.99
Techno Talk – Mushroom magic 02
Cool Beans – Arduino Bootcamp
9 772632 573030
Net Work – Alexa update, plus space and energy news
www.electronpublishing.com @practicalelec practicalelectronics
See The World In Higher Resolution
Introducing the PIC16F17146 MCU Family, With Integrated 12-bit
ADC and Op Amp
The PIC16F17146 family of microcontrollers is packed full of peripherals to enable analog sensor
applications at low cost. With an integrated operational amplifier (op amp) and 12-bit differential ADCC, the
PIC16F17146 family brings your analog projects into focus. Now available in 8- to 40-pin packages, these
devices are a cost-effective solution for analog sensing.

Key Features
• 12-bit differential Analog-to-Digital Converter with Computation (ADCC)
• One op amp
• Two Capture/Compare/PWM (CCP)
• Two 16-bit PWM with dual outputs
• Two 8-bit DACs (1x internal, 1x external/buffered)
• Two Analog comparators
• Four configurable logic cells
• Flash CRC, 1x NCO, 1x CWG, ZCD
• Two EUSART (with LIN support)
• Two MSSP (I2C or SPI)
• Timer 0/1/2 (1x 16- / 2x 16- / 1x 8-bit)

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.
© 2022 Microchip Technology Inc. All rights reserved.
DS30010243A. MEC2465A-UK-12-22
microchip.com/PIC16F171
Volume 52. No. 2

Practical February 2023


ISSN 2632 573X

Electronics Contents
Projects and Circuits
Tesla Coil by Flavio Spedalieri 16
This simple device generates extremely high voltages, enough to form a ‘flame
discharge’ resembling a flame. It can also demonstrate wireless power transmission.
Cooling Fan Controller & Loudspeaker Protector by John Clarke 24
This board controls up to three cooling fans, switching them on at a preset
temperature and ramping their speed. It also protects speakers from damage.
Driveway Gate Remote Control by Dr Hugo Holden 32
Sliding/swinging gate controllers inevitably fail after some years of service.
The solution is to replace the controller with this much more robust design.
Geekcreit’s LTDZ V5.0 Spectrum Analyser by Jim Rowe 40
This compact unit is low in cost but can perform spectral analysis from 35MHz to
4.4GHz, controlled from a PC using a very impressive free application.

Series, Features and Columns


Techno Talk by Mark Nelson 8
A thousand words
The Fox Report by Barry Fox 10
Paying the price for not buying a TV licence
Net Work by Alan Winstanley 12
This month’s Net Work looks at backup software and ICT hardware that promised
much but failed to deliver. Plus, how Alexa has become a money-sink for Amazon.
KickStart by Mike Tooley 46
Part 11: Sensing the environment – introducing the BME280 sensor
Make it with Micromite by Phil Boyce 50
Part 44: A PicoMite Fingerprint Reader – Part 2
Circuit Surgery by Ian Bell 56
Electronically controlled resistance – Part 6
Max’s Cool Beans by Max The Magnificent 62
Arduino Bootcamp – Part 2

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
What is it about Tesla?... Free downloads... Apologies
Exclusive Microchip reader offer 9
Win a Microchip Curiosity Development Board
PE Teach-In 9 23
Teach-In bundle – what a bargain! 45
PE Teach-In 8 55
Practical Electronics PCB Service 68
PCBs for Practical Electronics projects
Made in the UK. Classified ads and Advertiser index 71
Written in Britain, Australia, Next month! – highlights of our next issue of Practical Electronics 72
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 March 2023 issue of Practical Electronics will be
published on Thursday, 2 February 2023 – see page 72.

Practical Electronics | February | 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 timeframe saw the introduction of VHF FM
a source of reference for the history and and hermetically sealed equipment.
development of radio communication
equipment used by the British Army from the Volume 3 covers army receivers from 1932 to
very early days of wireless up to the 1960s. the late 1960s. The book not only describes
receivers specifically designed for the British
The books are very detailed and include Army, but also the Royal Navy and RAF. Also
circuit diagrams, technical specifications covered: special receivers, direction finding
and alignment data, technical development receivers, Canadian and Australian Army
history, complete station lists and vehicle receivers, commercial receivers adopted by the
fitting instructions. Army, and Army Welfare broadcast receivers.

Volume 1 and Volume 2 cover transmitters Volume 4 covers clandestine, agent or ‘spy’
and transceivers used between 1932-1948. radio equipment, sets which were used by
An era that starts with positive steps special forces, partisans, resistance, ‘stay
taken to formulate and develop a new behind’ organisations, Australian Coast
series of wireless sets that offered great Watchers and the diplomatic service. Plus,
improvements over obsolete World War I selected associated power sources, RDF and
pattern equipment. The other end of this 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: [email protected] 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

Brightdot Clock Kit - BLACK Edition Digitally Controlled FM Radio Kit


Build your
own mod-
ern, high
quality FM
receiver
project with
excellent
sensitivity
powered
by a simple
9V PP3
Brighten any room or space with this fully battery (not included. Auto-seeking button. 4
Arduino® compatible, ESP32 controlled station presets. Volume control. Excellent
Great Brands - Official Main Dealer BrightDot clock kit. This designer black edi- learning project for schools and colleges.
tion features 60 bright RGB LEDs that reflect Order Code: WSAH194 - £21.59
against the surface on which you mount the
clock, hence telling you what time of day it is. Audio Analyser Display Kit
ESP32 data cable & power supply included.
Order Code: K2400B - £117.43
3 Channel RGB LED Light Organ Kit
Electronic Kits & Modules
We have a massive selection of self-
assembly electronic kits and pre-
assembled modules. Please see the full
range on our website or call for details.
Small, compact LCD display, ideal for panel
mounting. Give your homemade audio gear
LED Buddy / LED Tester Kit 3 outputs react to different sound frequen- a high-tech look. Upgrade existing equip-
Hold any cies. On-board microphone picks up sur- ment. Provides Peak Power, RMS Power,
type of rounding sound or music and drives the low, Mean dB, Peak dB, Linear Audio Spectrum
LED to mid & high frequency outputs. Connect a 12- And 1/3 Octave Audio Spectrum. Auto /
the con- 24Vdc RGB LED strip or separate colour Manual range selection. Peak-hold function.
tact pads LED strips or LEDs (not included). Master & Speaker impedance selection.
to see it's separate channel sensitivity adjustment. 1.25 Order Code: WSAH8098 - £38.39
polarity, A max. per channel. Panel mountable facia
forward voltage & the recommended series 127 x 44mm. Terminal block or jack power Electronic Component Tester Kit
resistor value. Adjustable target current & supply connection. Control knobs included. Build your
forward voltage. Great design aid. 1x PP3 Order Code: WSL209 - £14.10 own versa-
battery powered. tile compo-
Order Code: WSMI198 - £16.66 Stereo Ultrasonic Bat Detector Kit nent test-
er. Shows
Christmas Tree XL Sol- value and
dering & Programming Kit pin layout
Educational and fun extra- infor-
large Christmas tree kit mation for
combines soldering and resistors
programming skills. Pro- (0.1 Ohm
gram the colours and light resolution,
effects of the different RGB max. 50 MOhm), coils (0.01mH - 20H), ca-
LEDs. Onboard Arduino pacitors (28pF - 100mF), diodes, BJT, JFET,
Nano Every. Ideal for both Converts high frequency sounds (20 - E-IGBT, D-IGBT, E-MOS & D-MOS.
beginners and advanced 90kHz) normally imperceptible to humans Order Code: WSMI8115 - £44.15
makers! 190 x 258mm. like bat signals into audible noise. Can also
Order Code: WSPLX100 - £49.96 help detect failures in machines, engines, LCD Oscilloscope Educational Kit
Rudolf XL & Poly Reindeer XL also available etc. Stereo feature adds the possibility to Build your own
pinpoint the source. Requires 3xAA batter- LCD oscillo-
Snowman Flashing LED Kit ies. 3.5mm jack output for headphones. scope with this
Have some educational Order Code: WSAK8118 - £20.39 exciting new
festive fun with this animat- kit. Learn how
ed LED snowman gadget. LED Christmas Tree Kit to read signals.
69 multicoloured LEDs Ho! Ho! Ho! The classic See the elec-
(great for soldering prac- Christmas kit for the budding tronic signals
tice). Snowflake effect with electronics enthusiast. 15 you learn about
PWM controlled LEDs. blinking blue LEDs. Requires displayed on your own LCD oscilloscope.
Random generator for a 1xPP3 battery. Get cosy… Despite the low cost, this oscilloscope kit
more realistic effect. 1x 9V Order Code: MK100B - £8.39 has a lot of features found on expensive
PP3 battery or 9-12Vdc units like signal markers, frequency, dB, true
wall adapter powered. RMS readouts and more. A powerful auto-
Makes an ideal gift. Card Sales setup function will get you going in a flash!
Order Code: WSSA200 - £18.58 & Enquiries Order Code: WSEDU08 - £48.54
Practical
Electronics
UK readers SAVE £1 on every issue

SUBSCRIBE NOW!
JFETs as electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
KickStart
Low-voltage
Make it with Micromite
Building GPS into
Circuit Surgery
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Audio Out Electronic Make it with Micromite
Using JFETs limiters Using audio Building Blocks Adding a PS/2 keyboard and
Circuit Surgery
Understanding
Audio Out
Practical
Electronics
The UK’s premier electronics and computing maker magazine

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
Circuit Surgery
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Kick Start
BME280 humidity, pressure
Make it with Micromite
PicoMite Fingerprint

01202 087631
controlled resistors transformers op amps PicoMite systems and compressors transformers Using actuators TFT display to a PicoMite 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

WIN!
WIN!
Microchip
Remote Control Driveway Gate Cooling Fan Controller &
Microchip
MPLAB Snap
WIN! Hummingbird WIN!
Microchip
PIC32CX-BZ2
and WBZ451
Range Extender Remote Control Loudspeaker Protector
In-Circuit
Debugger
Microchip
AVR-IoT
Amplifier PIC32MM
Curiosity
Curiosity
Development
Cellular Mini Development Board
WIN!
WIN! Board Microchip
WIN! Curiosity
Development
Board
WIN!
Build a
SMD Test PicoMite
Tweezers USB Cable Tester
computer Classic LED Fingerprint
Intercom using retro Metronomes Reader
analogue phones! 35MHz-4.4GHz
Pocket Weather Station
Build a PicoMite Signal Generator LTDZ V5.0
SMD Trainer board budget
fingerprint reader
Spectrum
Build a GPS Analyser
Preamplifier tracker with USB Tesla Coil
with Digital Touchscreen the PicoMite Self-Contained 6GHz Cable Multi-Channel Solid-State
Tone / Volume Controls Digital Attenuator Tester Speaker Protector Flame
Discharge
PLUS! PLUS! PLUS! PLUS! PLUS!
Oct 2022 £5.49 Nov 2022 £5.49 Dec 2022 £5.49 Jan 2023 £5.49 Feb 2023 £5.99
Techno Talk – Solar flares – time to panic? 10 Techno Talk – Hidden hazards 11 Techno Talk – Giant boost for batteries 12
Techno Talk – Raudive voices revisited 01 Techno Talk – Mushroom magic 02
Cool Beans – Lixie displays and magnetic core memory Cool Beans – Investigating rotary encoders Cool Beans – LogiSwitch debounce breakout board Cool Beans – Introducing the Arduino Bootcamp Cool Beans – Arduino Bootcamp
9 772632 573023 9 772632 573023 9 772632 573023 9 772632 573023
Net Work – Whole-home mesh wireless systems Net Work – Technology and the Queen 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

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: [email protected]
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: [email protected]
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 | February | 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 £6.95 each
VOL 28 – January to December 1999 – £6.95 VOL 40 – January to December 2011 – £8.95
VOL 29 – January to December 2000 – £6.95 VOL 41 – January to December 2012 – £13.95
VOL 30 – January to December 2001 – £6.95 VOL 42 – January to December 2013 – £14.95
VOL 31 – January to December 2002 – £6.95 VOL 43 – January to December 2014 – £15.95
VOL 32 – January to December 2003 – £6.95 VOL 44 – January to December 2015 – £15.95
VOL 33 – January to December 2004 – £6.95 VOL 45 – January to December 2016 – £17.95
VOL 34 – January to December 2005 – £6.95 VOL 46 – January to December 2017 – £20.95
VOL 35 – January to December 2006 – £6.95 VOL 47 – January to December 2018 – £25.95
VOL 36 – January to December 2007 – £6.95 VOL 48 – January to December 2019 – £25.95
VOL 37 – January to December 2008 – £6.95 VOL 49 – January to December 2020 – £27.95
VOL 38 – January to December 2009 – £8.95 VOL 50 – January to December 2021 – £29.95 – NEW!
VOL 39 – January to December 2010 – £8.95

FIVE-YEAR collections – 60 issues!


From just £14.95 each

PE2832: Jan 99 to Dec 03 – £14.95 PE3741: Jan 08 to Dec 12 – £19.95


PE2933: Jan 00 to Dec 04 – £14.95 PE3842: Jan 09 to Dec 13 – £24.95
PE3034: Jan 01 to Dec 05 – £14.95 PE3943: Jan 10 to Dec 14 – £24.95
PE3135: Jan 02 to Dec 06 – £14.95 PE4044: Jan 11 to Dec 15 – £29.95
PE3236: Jan 03 to Dec 07 – £14.95 PE4145: Jan 12 to Dec 16 – £29.95
PE3337: Jan 04 to Dec 08 – £14.95 PE4246: Jan 13 to Dec 17 – £35.95
PE3438: Jan 05 to Dec 09 – £19.95 PE4347: Jan 14 to Dec 18 – £36.95
PE3539: Jan 06 to Dec 10 – £19.95 PE4448: Jan 15 to Dec 19 – £37.95
PE3640: Jan 07 to Dec 11 – £19.95 PE4549: Jan 16 to Dec 20 – £39.95 – NEW!

PE2832: Jan 99 to Dec 03


20 YEARS OF PE! 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!
£55.95 PE3447: Jan 14 to Dec 18

Do you have the 15-year bundle?


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

Download your collections at: www.electronpublishing.com


Practical
Volume 52. No. 2
February 2023
ISSN 2632 573X

Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619 What is it about Tesla?
Electron Publishing Limited Mob 07973 518682 To be clear, I am not talking about Elon Musk’s electric car
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected]
company, but the creative and inventive Serbian, Nikola Tesla.
East Sussex BN1 3RA Web www.electronpublishing.com You have to be pretty special to have a major SI unit named after
you – in his case magnetic flux density – so what did he do?
Advertisement offices Well, he is not only the father of modern alternating current (AC)
Practical Electronics Adverts Tel 01273 777619
1 Buckingham Road Mob 07973 518682
and electricity supply systems, but also found time to work in
Brighton Email [email protected] areas as diverse as radio control, wireless energy transmission,
East Sussex BN1 3RA bladeless turbines and a whole lot more. He was fascinated with
Editor Matt Pulzer
high-voltage systems and also a bit of a showman. One of his
General Manager Louisa Pulzer most-famous inventions is the appropriately named ‘Tesla Coil’,
Digital subscriptions Stewart Kearn Tel 01202 880299 a resonant transformer system that produces impressive electrical
Online Editor Alan Winstanley sparks. Making these can be a quite a challenge, but this month
Web Systems Kris Thain
Publisher Matt Pulzer we have a superb project that is well within the reach of PE
readers. It’s great fun – why not give it a shot? (Once small caveat
Print subscriptions – this is not a project for beginners. Tesla Coils will ‘bite’ you if
Practical Electronics Subscriptions
you’re not careful. Do read the warnings in the project’s write up,
PO Box 6337
Bournemouth BH1 9EH Tel 01202 087631 and remember, Tesla Coils are not for the inexperienced.)
United Kingdom Email [email protected]
Free downloads
Technical enquiries We know many of you like to download the assorted free files
We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase, that are associated with projects (PIC program code, for example)
repair or modification of commercial equipment or the incorporation and to support PE’s regular columns (Circuit Surgery, Cool Beans,
or modification of designs published in the magazine. We cannot Make it with Micromite and so on). These are all located and
provide data or answer queries on articles or projects that are
more than five years old. easily accessed via our website (https://bit.ly/pe-downloads).
What some of you may not realise is that instead of tediously
Questions about articles or projects should be sent to the editor downloading each issue’s files one at a time, the last five years
by email: [email protected]
can be accessed in 12-month groups. A useful timesaver if you
Projects and circuits want to build up your file collection for back issues.
All reasonable precautions are taken to ensure that the advice and
data given to readers is reliable. We cannot, however, guarantee Apologies
it and we cannot accept legal responsibility for it.
The two most popular projects of the year, as measured by PCB
A number of projects and circuits published in Practical Electronics sales, were the USB Cable Tester (November-December 2022)
employ voltages that can be lethal. You should not build, test, and the SMD Trainer (December 2022). The orders flooded
modify or renovate any item of mains-powered equipment unless
you fully understand the safety aspects involved and you use an
in! But, as luck would have it, they were the two projects that
RCD (GFCI) adaptor. were hit hardest by this year’s favourite non-delivery excuse
– ‘supply chain issues’. The USB Cable Tester’s display bezels
Component supplies and the SMD Trainer components were ordered from the same
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We place, dispatched promptly and arrived at Heathrow in the UK
advise readers to check that all parts are still available before within the expected timeframe… and then, absolutely nothing
commencing any project in a back-dated issue. happened. They just sat in customs for over two weeks, then
got delayed with the postal strike, by which time we were well
Advertisements
Although the proprietors and staff of Practical Electronics take into the Christmas period, when delivery inevitable slows down
reasonable precautions to protect the interests of readers by further. All orders for both the above projects have gone out, and
ensuring as far as practicable that advertisements are bona fide, should have arrived by now. I’m very sorry for the delays and
the magazine and its publishers cannot give any undertakings
in respect of statements or claims made by advertisers, whether
thank you for your patience.
these advertisements are printed as part of the magazine, or in
inserts. The Publishers regret that under no circumstances will From all of us at Practical Electronics, we hope 2023 has
the magazine accept liability for non-receipt of goods ordered, or
for late delivery, or for faults in manufacture.
started off well for you and that it’s a successful, peaceful and
semiconductor-rich year.
Transmitters/bugs/telephone equipment
We advise readers that certain items of radio transmitting and Matt Pulzer
telephone equipment which may be advertised in our pages
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 | February | 2023 7


A thousand words Techno Talk
Mark Nelson

… is exactly equal to the value of one picture, according to educationalists, for whom a picture is
definitely worth a thousand words. But that’s not all, as you will soon discover.

T
he logic of the thousand It turns out that this skin can be removed ‘Infineon is paving the way with a new
words notion is not hard to grasp, easily for further processing. Scientists solution for doing away with keys. By
although identifying the origi- can even use it directly for a project; it dispensing with batteries, we are pro-
nator of this saying is more difficult. just needs to be dried. ‘The skin could be viding, for the first time, a reliable,
Wikipedia traces it back to an old used, for example, as a flexible printed low-maintenance and secure way of
Chinese proverb, often attributed to circuit board … to manufacture elec- opening and closing smart locks.’
Confucius. Whatever the source, there’s tronics,’ adds Kaltenbrunner. However, To activate the lock, the mobile phone
little doubt that seeing something is at the moment, producing pulp [for sub- must be held directly on it. Near-field
often a better way of learning than strates] is energy-intensive and not that communication (NFC) is used to check
reading dry text in a book. sustainable, even though these fungus whether the device is actually autho-
Neither technique, however, com- skins only need waste wood to grow. rised to open the lock via encryption
pares to watching a well-made YouTube technology. At the same time, energy is
video on your computer, and to prove Ecological and biodegradable transferred contactlessly to a capacitor
this, I invite you to view https://youtu. The material’s robust, flexible and heat- that powers opening or closing the lock.
be/cM7t1Mpu7s4 where you’ll see the resistant properties could potentially
commendable Dave Jones explaining the become a natural substitute for poly- So how does it work?
difference between linear and switch- mers currently used in making flexible The core of the solution is a programmable
mode methods of reducing DC voltages. electronic components. Kaltenbrunner 32-bit microcontroller with a built-in NFC
He does this in a down-to-earth and en- explained that all types of printed cir- front-end to make it an NFC actuation
gaging way that holds your attention and cuit boards are made from composite controller. This approach enables firms
makes the subject look easy. No wonder materials that are generally difficult to to launch miniaturised smart locks onto
one of his fans writes: ‘I wish I had you separate, recycle or decompose. This the market with very few elements. The
as my teacher in engineering college.’ biodegradable mushroom skin, however, built-in true random number generator
This presentation must be worth a mil- is now emerging as a true alternative. allows data encryption and decryption
lion words, even if some of the other Initially, the researchers are targeting with extremely low power consumption,
stuff on YouTube is pretty wretched. applications in the field of medical tech- enabling developers to create complete
nology, where these kinds of components smart actuation devices with a minimum
Mushroom magic mainly need to work for periods of up number of additional components.
Fungi can now be used to make PCBs or to a year. The easily degradable fungal Continues White: ‘Our battery-less tech-
substrates for electronic components. skin is also surprisingly heat resistant, nology is especially suitable for locks that
Protagonists call this ‘myceliotronics’ able to withstand temperatures of up to require little mechanical effort, such as
and no, it is not an early April Fool’s 250°C, an important factor when building in office furniture, hospitals and fitness
joke. Not all fungi can be used, how- soldered circuits. Is there any relevance studios. Other possible applications are
ever, and so far only one variety is to hobby electronics? Not yet, but just as bicycle locks, mailboxes and parcel boxes.
suitable. Called Ganoderma lucidum, 3-D printers have become a household The solution thus provides greater conve-
it’s a variety that has limited distribu- object for some enthusiasts, maybe one nience and flexibility, while at the same
tion in Europe and parts of China, and day we will all be able to produce plant- time cutting the cost of key management
is now cultivated in India. It is more based PCBs in our workshops at home! in private and commercial properties. It
widely known for its medicinal prop- also comes into its own when batteries in
erties, used in China for 5,000 years to Goodbye to batteries? standard smart locks run out of power, or
treat diseases like diabetes and cancer, For some applications, quite possibly. when keys are lost, dispensing with the
as well as bacterial and skin infections. According to Infineon Technologies in need for expensive locksmith services.’
So, what is its use in electronics? Germany, using traditional keys will be
Martin Kaltenbrunner (Department a thing of the past in many areas of life. Coda
of Soft Matter Physics at the Johannes The company is launching onto the mar- Now you know almost everything about
Kepler University in Austria) claims it as ket a solution that can be used to open a thousand words, but I’ll leave you with
a ‘global first’ that could result in more and close locks using mobile phones – a couple of linked thoughts on this sub-
sustainable electronics. He explains without the need for batteries to power ject. A thousand words are what I am
that it was, ‘more or less an accidental the lock. The application gets the power asked to deliver each month for Techno
discovery, as so often is the case when it needs contactlessly from the mobile Talk, which I have now been doing for
it comes to science.’ phone, using a process widely known 20 years. It is also the number of words
To protect itself from pathogens and as ‘energy harvesting’. I need to write for my final contribu-
other fungi, this fungus forms a closed Adam White, President of Power tion next month. But more of that in a
skin on the surface of its growing medium. & Sensor Systems at Infineon, says: month’s time.

8 Practical Electronics | February | 2023


Exclusive offer

Win a Microchip Curiosity


Development Board

Practical Electronics is offering its readers the chance to win and requires no additional hardware to get started. The
a Microchip Curiosity Development Board (DM164137) – Curiosity Development Board is designed to support
and even if you don’t win, receive a 15%-off voucher, 8-, 14- and 20-pin 8-bit PIC MCUs with low-voltage
plus free shipping for one of these products. programming capability.

Microchip’s Curiosity Development Worth Out of the box, this board offers several
Board offers a cost-effective, fully
integrated microcontroller development
$37.50 options for user interface – including physical
switches, mTouch capacitive sensing and on-
platform targeted at first-time users, (approx £31.95) board potentiometers. A full complement
makers and those seeking a feature-
rich rapid prototyping board. Designed each of accessory boards is available via the
MikroElectronika mikroBUS interface footprint.
from the ground up to take full advantage
of Microchip’s MPLAB X and MPLAB Xpress The Curiosity Development Board can be operated
Integrated Development Environments, the Curiosity as an all-in-one development platform, or you can
platform includes an integrated programmer/debugger customise it to suit your individual needs.

Free-to-enter competition
Microchip Curiosity Development Board

Microchip
DM164137

How to enter October 2022 winner


For your chance to win a Microchip Curiosity Luke Hassan
Development Board or receive a 15%-off voucher,
including free shipping, enter your details in the
online entry form at:
https://page.microchip.com/PE-Curiosity.html
He won a
Closing date Microchip MPLAB Snap
The closing date for this offer is 31 January 2022 In-Circuit Debugger

Practical Electronics | February | 2023 9


The Fox Report
Barry Fox’s technology column

Paying the price for not buying a TV licence

E
veryone (in the UK) has their own view of
the BBC Licence Fee – who should pay and how
much, if anything (see box below). My personal
view of the Beeb’s budgeting is coloured by years of
doing freelance work at pittance pay for unfortunate
programme producers who were starved of the budget
they needed to do a good job – while broadcast stars and
corporation managers were overtly overpaid. One early
January I was in a lift at Broadcasting House when one
‘suit’ commiserated with another: ‘I expect you’ve come
back to a pile of problems’. ‘No problem,’ said the senior
suit. ‘I’ll just sort through it and delegate’.
But the law is the law – until it changes – and in theory,
anyone of any age or gender not destitute and not buying
a licence and watching TV content on any device can
end up locked up. So, are people actually going to jail
for watching but not paying?
I was recently inside a women’s prison, HMP Bronze- the professional producers. Set design, sound and light-
field in Ashford, Middlesex. I go there for live theatre and ing design is top notch. It’s an all-round good enterprise.
musical events staged for charity inside prisons by the After the performance, the deputy director, gave a
enterprising Grange Park Pimlico Opera group. Previous speech in which she referred to the disproportionately
productions have included Our House and Sweet Charity. high numbers of women in prison for not having TV li-
This time it was Betty Blue Eyes, the musical comedy cences. Is it really the case that many more women than
derived from Alan Bennett’s film A Private Function. A men are in prison for not buying a TV licence, I asked
core cast of professional actors and musicians perform her after her speech? Yes, she assured. So, I did some
with a group of prisoners, auditioned and rehearsed by independent digging.
To be accurate, people can go to jail for not paying
fines imposed for not having a licence, but not for not
Funding the BBC having a licence per se. And more women are prosecuted
The BBC is funded via a non-optional, paid-for licence because they are more likely to be at home and open the
for anyone watching any TV programme – not just one door to an inspector during the day. Even if they are at
from the BBC. It is a form of ‘quasi-taxation’. For further home, men are less obliging.
details, see the Wiki page: https://bit.ly/pe-feb23-beeb Most important, the government’s Department for
Digital, Culture, Media and Sport (DCMS) released an

w !
ne
1551W IP68 miniature enclosures
Learn more: hammfg.com/1551w
Contact us to request a free evaluation sample.
[email protected] 01256 812812

10 Practical Electronics | February | 2023


official statement in January 2021 of the non-payment of a TV licence strict rationing laws in force in Brit-
which clearly says: ‘As of 30 June in England and Wales.’ ain after WW2, centring on plans to
2020, there were zero people in prison The DCMS spokesman added: ‘The brutally kill a pet pig with a hammer.
for failing to pay the fine in respect BBC’s funding model is facing chal- But this is not ‘sensitive’, it seems.
of the non-payment of a TV licence lenges and it is right that we examine
in England and Wales.’ the future of the licence fee. The way
Does this mean that over the last people consume media has changed

NEW!
couple of years, largely during Co- radically since the licence fee was
vid lockdown, women have been introduced. The DCMS Secretary of
imprisoned for TV licence evasion? State has been clear she will decide
I asked both the prison director and policy based on the evidence and the
her deputy director, who made the government, as we have committed to,
claim, to clarify. After a month and
reminders neither has responded. But
will carry out a review of the licence
fee funding model ahead of the next
5-year
I shall try asking them both again,
especially as the DCMS has now
Charter period.’
collection
confirmed, unequivocally: ‘There is Horrific?
no one currently in prison as a result
of not paying fines for not having a
A fun footnote: The obviously peeved
Grange Park producers of the show I
2017-2021
TV licence. saw had been forced to cancel a long- All 60 issues from Jan 2017
‘The penalty for TV licence evasion planned production of The Little Shop
to Dec 2021 for just £44.95
is a fine. Imprisonment is pursued of Horrors (a comedy about a man-
rarely and only as a matter of last eating plant) because – to quote the PDF files ready for
resort for those wilfully refusing to producers – ‘the Ministry of Justice immediate download
pay the fine or culpably neglecting / Prison Service suddenly decided
to pay. The courts will do everything at a very late stage that the title was
within their powers to trace those too sensitive, despite having known
See page 6 for further
who do not pay and use a variety about our plans for the production details and other great
of means to ensure the recovery of for months.’
criminal fines and financial penal- Theatre, movie and book buffs will
back-issue offers.
ties. In 2020 and 2021, there were of course know that the short-notice Purchase and download at:
no admissions into prison associated replacement, Betty Blue Eyes, has fun www.electronpublishing.com
with failing to pay a fine in respect with a criminal scheme to break the

tekkiepix pic of the month – Compusonics digital recording


Sound quality was poor and the
player stuck and skipped. The video
version could only manage a couple
of coarse pictures per second.
President David Schwartz hired
investment bankers Blinder, Robinson
and Co of Colorado, who provided
potential investors with a prospectus
complete with some 40 press clippings.
BBC TV’s Tomorrow’s World ran
the story, and British company Ferro-
graph planned to badge a Compusonics
The Compusonics Studio DSP-2000 professional recorder for £4,000 in
Series was billed as, ‘The world’s first September 1986.
super-micro, multi-processor computer However, it was not to be, and Com-
configured as a single-user workstation pusonics is now forgotten, but recording
for audio mixing and recording of live disc. But for two years Compusonics sound and pictures on computer is now
music in a variety of digital formats.’ booths at electronics shows were always commonplace and dirt cheap. Others
not quite ready for demonstration that reaped the rewards from a great idea

E
ver heard of Compusonics, day. Compusonics also promised a that was ahead of its time.
the company that offered floppy digital video version.
disc recording long anyone The first working model was shown Practical Electronics is delighted to be
able to help promote Barry Fox’s project
dreamt of MP3? at the National Association of Broad- to preserve the visual history of pre-
In June 1984, US company Com- casters Convention in Dallas in 1986. Internet electronics.
pusonics announced a digital audio The computer player cost US$3,000 Visit www.tekkiepix.com for fascinating
recorder which stored 45 minutes of and played four minutes of stereo or stories and a chance to support this
stereo on a 5.25-inch computer floppy eight minutes of mono. unique online collection.

Practical Electronics | February | 2023 11


Net Work
Alan Winstanley
This month we ‘Reflect’ on backup software and ICT hardware that promised much but failed
to deliver. Plus, how Alexa has become a money-sink for Amazon, and there’s a round-up of
space and energy news too.

L
ooking back over many years’ For many everyday users, a cloud I described the Amazon Dash Wand, a
worth of Net Work columns, I’ve drive will host data files for peace of new handheld Wi-Fi device that would
come to recognise that many mind, and these days users are spoilt scan the barcodes of produce and add
new technological developments turn for choice. Major big names like Mi- them to your Amazon shopping cart, or
out to be little more than pie-in-the- crosoft, Google, Synology and Dropbox its built-in Alexa voice assistant would
sky vapourware that don’t work as offer cloud storage, and some periph- do the same on demand, making shop-
advertised. The consumer ICT sector is eral makers like Asus and Huawei ping effortless. The Amazon Dash Wand
littered with under-developed or half- will bundle some online storage too. was shut down in 2020, three years
finished products and software that Amazon, however, is dumping its after its launch, and Amazon made the
land users with the job of fault finding Amazon Drive cloud storage this year, scanning devices fit only for electrical
or debugging them, often hindered by and focusing on Amazon Photos in- recycling. The Dash Wand was a sign,
frustrating customer support, before stead – see: https://bit.ly/pe-feb23-nw2 though, of Amazon’s early determination
the product gets discontinued anyway. At a minimum you could back up to integrate Alexa into the domestic su-
essential files on a removable or slave permarket shopping routine.
Backing up drive – but rather than relying on a Then there were Amazon Dash
Back when cloud backups did not exist, cheap and flaky memory stick that buttons (Net Work, July 2015), pre-pro-
probably the most awful IT hardware might get zapped with static, today grammed stick-on buttons that added
the author ever invested in were the my choice would be a reputable USB a product (eg, laundry powder) to
Iomega Zip and Ditto Max drives; re- 3.0 solid state disk such as a Sam- your Amazon shopping cart with a
movable media devices that ran on a sung T5 or T7. I do in fact still take a single button press. Millions of these
PC’s parallel port. The term ‘Click of ‘last gasp’ air-gapped backup from my $5 gizmos were circulated but the Dash
Death’ was coined to describe failing NAS onto SSDs periodically. This also button never caught on and they were
Zip disks or drives that were about helps safeguard against the possibili- discontinued in 2019. The system also
to shred your precious data (see: ty of ransomware. It is also possible received criticism for not providing
www.grc.com/tip/codfaq1.htm). I found to back up the NAS to the cloud, but pricing information beforehand. The
the Ditto Max tape drive was similar- it is a costly and extremely slow pro- idea was never going to sit well with
ly undependable and generally awful cess. During some quiet downtime consumers who scribble out a shopping
to work with. Then a promising new it’s worth checking out some storage list and trundle to the supermarket,
digital tape backup system called On- options and how to back up your es- where non-foods could be quite a bit
stream, invented by Philips, offered sential files from a PC, smartphone, cheaper than Amazon.
slick USB tape drives with 30GB car- tablet or laptop to the cloud. Other instantly forgettable ideas cov-
tridges and superb ‘Echo’ software that ered before in Net Work include the
made it easy to restore earlier file ver- The Dash for cash Amazon Echo Look, an Alexa-pow-
sions with a single click. It worked like Some ideas probably fail not because ered camera device that took snapshots
a dream, until the tape drives started to the engineering was lacking but because of you and offered fashion tips (see
crash without warning. I got through project managers misread the market to https://youtu.be/9X_fP4pPWPw). The
three or four such drives before ditch- begin with. Back in Net Work, July 2014 $200 device was destined for the recycle
ing that idea too, and Onstream then
went bust.
Today, I run the excellent, but quite
involved Macrium Reflect backup soft-
ware, backing up files onto a Synology
RAID-style NAS (network-attached
storage), a long-time favourite. This
software ‘zips’ files together into one
large special-format file that is writ-
ten to the backup drive. In the event
of a total crash, though, the Macrium
software would have to be reinstalled
from scratch before you could restore
backup data – you do keep those serial
numbers and logins safe, don’t you? A
free version of Reflect 8 for home use
is available from www.macrium.com Amazon is keen as mustard to get into home grocery ordering. They have partnered with
and is definitely worth a try. the Morrisons retail chain.

12 Practical Electronics | February | 2023


bin in 2020. As for the Amazon Astro been easier to shop around. As usual, UCAM 247 IP Camera I mentioned in
Robot or ‘Alexa on wheels’ (Net Work, I recommend the Camelizer plug-in Net Work, December 2015 has pulled
December 2021), and the 2020 Ring (www.camelcamelcamel.com) to trig- its smartphone app functionality after
drone-powered security camera, well, ger Amazon price drop alerts. losing their P2P networking service.
let’s not go there. Support has also gone, but at least the
In the UK, Amazon has dipped its Supermarket sweep camera feed is still accessible via a web
toes into bricks-and-mortar stores Apart from running their own Just page login. Some overseas homeowners
that offer a selected range of produce. Walk Out stores, Amazon is trying to used half a dozen cameras to monitor
Their ‘Just Walk Out’ shops were the grab a slice of the supermarket trade their property and are now struggling
first outside the US to use sophisti- and has linked with Morrisons, one to access them, but trying ONVIF-com-
cated scanning techniques and AI to of the UK’s major retail operators. patible software instead might patch
track movements and charge a cus- Indeed, Amazon is offering me £15 the problem. Belkin slashed its WeMo
tomer’s shopping cart automatically off my first three Morrisons shopping smart camera range and cloud ser-
without them needing to check out orders. I see Morrisons vans delivering vice in 2021, thereby ‘bricking’ the
the traditional way. According to to local addresses every day, a service cloud-functionality of these cameras.
trade magazine The Grocer, Amazon that clearly works well for those who Obsolete technology was blamed, and
has 19 Just Walk Out stores, mostly prefer home deliveries. a new range based on the latest ‘Matter’
around London, but its ambition to With all this activity going on, protocol is rumoured to be in the pipe-
expand to some 260 stores has since it’s come as a surprise to learn that line, with Apple HomeKit users being
been shelved, reportedly because sales Amazon’s Alexa-based hardware is the first to benefit.
had fallen below expectations. The proving something of a lame duck
Grocer states something that shoppers after all. Alexa has failed to turn us Other news
knew anyway in today’s straitened into the committed regular shoppers By the time you read this, we will
times: ‘[Amazon] is having to work that Amazon craves, and their smart know if the first space launch from
within an environment where price speaker and display hardware, sold UK soil has been successful. A spe-
is increasingly more of a priority for largely at cost price, has not attract- cially-adapted 747 – the Cosmic Girl
consumers than convenience.’ ed a level of trade to make the Alexa – operated by Richard Branson’s Virgin
There’s nothing that an e-commerce channel viable. Most people simply Orbit space business was set to take
business wants more than to turn its use the gadgets for trivial, non-mon- a LauncherOne carrier rocket aloft in
customers into a steady conveyor belt ey-making interactions with Amazon’s mid-December. An RAF pilot will fly
of repeat business. Products with a assistant, or for setting reminders or the jet from Cornwall Spaceport in
‘Buy Now’ or ‘Dash’ button should checking the time, searching online, south-west England and release the
generate sales with just one click, but or displaying photos. It’s reported LauncherOne, which will then con-
shoppers peel off if there’s ‘friction’ that last year, Amazon’s Alexa voice tinue its journey into orbit to deploy
when purchasing something. Amazon assistant unit was set to lose an as- its payload of ‘SmallSats’. Onboard is
shoppers can ‘Subscribe and Save’ on tonishing $10bn, and its development the new ‘DOVER’ pathfinder research
many lines, another customer lock- staff were facing a sizeable cut of satellite co-funded by the European
in that saves customers the effort of some 10,000 personnel. Space Agency. It will provide data
doing anything at all: toilet rolls or Unlike Google’s smart devices, from space, for use on the ground to
washing powder will now turn up au- though, Amazon promises to keep obtain an accurate position or time –
tomatically, though you can of course its hardware running for at least four the buzzword being PNT (Position,
unsubscribe again at any time – if you years once discontinued from sale, Navigation and Timing), an alterna-
remember, which vendors hope you so there is hopefully life in Alexa tive to the US GPS-based satellite
won’t. But consumers are increasingly yet. One popular range of
ditching convenience and shopping smart devices that is in ter-
around for the best price instead, one minal decline is marketed in
more reason why Dash stick-on but- Britain by Hive. All cameras
tons didn’t really work well. and security devices are des-
Last year’s Black Friday shopping tined for the chop as Hive,
frenzy revealed how Amazon’s retail owned by Centrica (the name
prices are all over the place, espe- behind British Gas), has de-
cially when independent third-party cided to focus its energies on
‘Marketplace’ sellers are involved. A ‘going green’ instead. Hive
dehumidifier, listed at £169 dropped hasn’t exactly been upfront
to £149 (bargain!) then rose to £189. with this news, but more
A certain electric consumable was details are buried at: www.
changing hands at anything from £40 hivehome.com/product-news
to £65, while the Epson V600 flatbed Hive is not the first sup-
scanner that I’ve mentioned in the plier to abandon its users
past trades at anything from £285 to this way. Philips dropped its
£399. By being prudent with pricing first version of its Hue bulbs
I saved over £100 on recent purchas- (with the round Hue Bridge
es, which is not to be sneezed at. hubs), by pulling the plug on
Dr Emma Jones, Business Director UK of satellite
Even small everyday items can cost cloud connectivity in 2020, manufacturer RHEA Group, in Spaceport Cornwall’s
nearly twice as much on Amazon as which meant no more Alexa clean room, overseeing the integration of RHEA’s
they would on eBay, for example. The or Google Assistant support DOVER satellite with the aircraft dispenser system.
differences can be substantial and unless you upgraded to a new Pictured bottom left: this powerful ‘SmallSat’
where price is a key factor, it’s never hub (the square one). The measures a miniscule 30 x 10 x 10cm.

Practical Electronics | February | 2023 13


unlimited paid-for packages cost just
under £45 a year or £5.49 a month in
the UK. Try it out at: www.neeva.com
Microsatellite Internet-of-Things
operator Swarm Technologies has
launched an Asset Tracker that they
claim provides an end-to-end solu-
tion for tracking equipment, vehicles,
and other remote assets. The Swarm
Asset Tracker functions anywhere
in the world using Swarm’s satellite
network, and the transmitters have a
40+ day rechargeable battery. Swarm
reckons it’s ideally suited for remote
locations that lack terrestrial network
coverage. The trackers are currently
Next stop Mars: The Orion capsule looks back at the Earth and the Moon after on offer at $99 and a Swarm data plan
surpassing the maximum distance of any other spacecraft built for humans. Orion met is also needed, from $5 a month – see:
its scheduled splashdown, and returned to Earth on 11 December. (Image: NASA) https://swarm.space/store
What is claimed to be Europe’s larg-
navigation system. The first launch See the BBC article at: https://bit.ly/ est capacity storage battery has now
had been running late due to licens- pe-feb23-nw1 about this audacious been energised in England by Har-
ing issues with the UK’s Civil Aviation form of theft which circumvents 2FA mony Energy. The site, near Hull, is
Authority, but more satellite-launch- and allows a thief to access stolen ac- home to a massive 196MWh capaci-
ing flights are due from the UK next counts. Regards Alan C Pickwick.’ ty battery built using Tesla Megapack
year, with at least two more space- I tried my Android phone with a technology. It is located adjacent to
ports expected to open for business PayPal purchase needing 2FA and the National Grid’s Creyke Beck substa-
in Britain as well. PIN number displayed on my locked tion, which also connects phases ‘A’
NASA’s ambitious Artemis 25-day screen! I found the lock screen no- and ‘B’ of the world’s largest offshore
moonshot mission continues after a tification settings and changed it to wind farm, Dogger Bank, which is set
successful launch of the SLS (Space ‘Show but hide contents’. The BBC to go live in Summer 2023. Battery
Launch System) on 16 November. article gives tips for iPhone and An- energy storage systems (BESS) act as
The Orion capsule orbited the Moon droid users. Thanks for the tip, Alan. a reservoir to buffer against periods of
before heading deeper into space as An alternative search engine to intermittent energy production, and
the next stage of its mission, the fur- Google has arrived in the shape of in an impressive achievement, com-
thest any such spacecraft has ever ad-free Neeva, a company founded in pletion of the project was brought
flown. Orion continued in retrograde 2019 by former Google ad executive forward to meet looming winter de-
orbit around the Moon and then re- Sridhar Ramaswamy. In a blind test, mands for electricity.
turned to Earth and splashed down in nine out of ten preferred Neeva, they Shell has closed its handful of hy-
the Pacific Ocean. Longer term ambi- claim, and their subscription-based drogen filling stations in the UK, the
tions include returning humans to the model is based on the idea that users electric mobility portal site Electrive
Moon and ultimately to Mars. will be willing to pay for a private, reports, saying that the ‘prototype
Returning to 2FA (Two-Factor Au- ad-free search engine that has no cor- tech had reached its end of life’. In
thentication), my thanks go to reader porate influence over search results. practice, there simply weren’t enough
Alan Pickwick who writes: ‘I always A free service is available that pro- hydrogen fuel cell cars around, and the
enjoy your section in Practical Elec- vides 50 ad-free searches a month or sites could not accommodate future
tronics. I thought you could include a
small piece warning users to set their
phones NOT to show PIN codes from
text messages on their lock screen.

Microsatellite operator Swarm Technologies


is now offering an asset tracker that works A new Battery Energy Storage System (BESS) claims to have the largest capacity of its
in conjunction with a Swarm data plan to type in Europe. The new 196MWh utility – seen here under construction – uses Tesla
track assets located anywhere in the world. technology and helps to buffer Britain’s energy supplies.

14 Practical Electronics | February | 2023


An all-new hydrogen-fuelled truck has been developed by Scottish-based EV builder Munro has launched its MK_1 all-
Hydrogen Vehicle Systems and is set to launch in 2025. terrain 4x4 EV and hopes to start deliveries in 2023.

technologies either. Shell reportedly three years, mostly caused by de- Scottish vehicle builder Munro has
wants to re-focus on gassing hydro- fective batteries, incorrect chargers released details of its new electric 4x4,
gen-fuelled trucks instead, leaving just or items being left on charge for too the MK_1, which has an all-terrain
11 public refuelling stations open com- long, they say. Third-party batteries ability and an all-electric powertrain,
pared to 57,000 EV charging points. which can be bought cheaply online making it a candidate for sectors in-
Meantime, Glasgow-based start-up are also to blame. cluding construction, agriculture,
HVS (Hydrogen Vehicle Systems) has Ionetic, a UK-based startup that mining, forestry, mountain rescue,
showcased a fully functional hydro- specialises in electric vehicle (EV) remote infrastructure maintenance and
gen-electric powertrain which will battery pack technology, has launched leisure. The fearsome-looking rugge-
be used on its 40-tonne Articulat- its state-of-the-art EV battery pack dised vehicle has a 220kW motor, a
ed Tractor (truck cab) unit. HVS is design platform which can cut devel- high ground clearance and can carry
first to market with its state-of-the-art opment costs and turnaround time for five and tow 3.5 tonnes. Sales should
powertrain and will build its vehi- EV manufacturers. Ionetic strives to start in the US in 2023. More informa-
cles in the UK, with its first HGV set overcome the design and implemen- tion is at: www.munro-ev.com/mk1
to go on sale in 2025. For details, see: tation hurdles facing lower-volume Plans for a new lithium refinery in
www.hvs.co.uk niche manufacturers. Their new soft- England have been given the green
Previous Net Work columns have ware-based platform can boost energy light. The UK’s first large-scale refinery
covered the risks of Li-ion battery fires density by 30% and increase utilisa- is aimed at supplying raw material for
in some depth. In November, 43 people tion of pack volume by up to 120%, EV batteries and rechargeables, and
were hurt, some very seriously, when compared to existing off-the-shelf will greatly reduce dependence on
an electric scooter battery caught fire solutions. It can also design a battery Chinese-sourced materials. The plant
on the 20th floor of a New York tower pack in a matter of days and reduce in Teesside will take about three years
block (https://youtu.be/q7zNtozubmI). implementation costs by over 90% to complete. You can read more at:
Some landlords now ban e-bikes and for auto industry OEMs. IONETIC https://teesvalleylithium.co.uk
scooters from being taken indoors due plans to open its first UK-based bat- That’s all for this month – see you
to the fire risk. Warnings have also tery manufacturing facility this year, in the next issue for more Net Work.
been issued to steer well clear of cheap which will make IONETIC the only
electric scooters or dodgy chargers, UK-based developer offering a turn-
with Zurich Insurance seeing claims key battery solution. More details at: The author can be reached at:
for lithium battery fires tripling over
[email protected]
https://ionetic.uk

Practical Electronics | February | 2023 15


Flavio
spedalieri’s solid-sTaTe
Flame disCharge

Tesla Coil
This relatively small and simple device generates extremely high voltages,
enough to form a ‘flame discharge’ resembling a candle flame. It can also
demonstrate wireless power transmission by lighting up neon globes and
fluorescent lamps at some distance.

T
he inspiration for this project 150kV, and given its operating fre- emanates. This one is simpler, with a
came from a YouTube video of a quency of around 10MHz, it can cause dome instead, but it’s still a Tesla Coil
Plasma Flame Generator by Jay RF burns. (we’ll describe a larger and somewhat
Bowles of Plasma Channel in January Clearly, you need to be meticulous more complicated Tesla Coil with a
2021. I loved the simplicity of the cir- in building, testing and operating such toroid in a later article).
cuit (tuning and operation is a chal- a device. But we won’t tell you ‘don’t The Tesla Coil is a loosely coupled
lenge, though), its unique output, and try this at home’. Still, We Do Not Rec- resonant transformer invented by
the fact that the resulting device is rel- ommend that beginners assemble such Nikola Tesla in 1899. It is capable of
atively small. a device. producing high-voltage, low-current,
In this design, a solid-state oscillator It is more suitable for someone high-frequency alternating current.
drives a primary coil which excites the who, for example, has built several The voltages produced by Tesla Coils
resonator (secondary) coil, producing mains-powered devices and is used result from resonant voltage rise in the
a high-frequency, continuous-wave to the safety precautions involved in secondary and are not proportional to
output. The discharge produced by working with 230V AC. That’s because the turns ratio between primary and
the Coil is a very interesting ‘flame such people normally have the required secondary windings as with traditional,
discharge’ resembling a candle flame. mindset of ‘hands off when power is tightly-coupled transformers. That
The Coil can be used to demon- applied’, double-checking everything allows exceptionally high voltages to
strate wireless power transmission by before switching power on and thor- be produced with a practical circuit;
lighting up neon globes and fluores- oughly insulating all high-voltage con- in some cases, over 1MV!
cent lamps. ductors. So without further ado, let’s The Tesla Coil comprises two L-C
In the lead photo, you can see a get into it. resonant tuned circuits. The primary
matrix I made using 100 neon lamps, tank circuit consists of the primary
sections of which light up when placed Tesla Coils capacitor and a coil. The secondary
in proximity to a strong electromagnetic This Tesla Coil is based on a Class-E RF coil (and often, high-voltage toroid)
(EM) field (such as generated by this power amplifier that’s tuned to oscil- and the surrounding air form the sec-
Tesla coil). Depending on the panel’s late at around 10MHz. It drives a tap on ondary L-C circuit. The two circuits are
orientation, it can display the ampli- an auto-transformer; the transformer’s connected in series and tuned to reso-
tude of the EM field or the relative secondary is excited by the oscillator nate at the same frequency for efficient
shape. I think this is a really interest- to produce a high-frequency, continu- energy transfer.
ing way to observe such fields. ous-wave output. The classical Tesla coil uses a spark
The first thing you might think of You might be used to seeing Tesla gap arrangement to switch the energy
looking at photos of this device is: ‘is Coils with a doughnut-like metal toroid stored in the primary capacitor into the
it safe?’ Yes, and no. It generates about on top, from which the discharge primary coil.

16 Practical Electronics | February | 2023


This device generates hazardous voltages!
Although the unit operates from a low-voltage DC supply, its high-voltage output will cause
RF burns if you come close to or contact the discharge terminal, even when no discharge is
apparent. The flame produced is a plasma, which is extremely hot and capable of melting
copper wire (not to mention flesh!). Without the brass/stainless steel breakout point, it can
begin to melt the wire at the discharge point.
Always ensure that you are nowhere near the breakout point when powering the
unit up. Keep all parts of your body (or anyone else’s) clear of it until power has been
switched off and the discharge stops. And remember that a high voltage can still be present even when no discharge
is visible. The potentiometer specified has a plastic shaft; use caution if substituting a pot with a metal shaft. At a
minimum, you would need to use a plastic knob and ensure that the knob fully covers the shaft.
For added safety, the coils (L2 and L3) and the breakout point can be encased in a 150mm diameter transparent
plastic film or Perspex surround, with an open top 50mm higher than the breakout point.

Electromagnetic interference warning


This Tesla Coil is an RF generator. The input power can be up to 240W (48V @ 5A) and the Class-E
amplifier is very efficient, converting a considerable amount of input power to RF energy. That
said, when breakout is occurring, most of that energy is converted into light and heat.
Be aware that it can cause RF interference when operating, mainly in the HF (3-30MHz)
band. That includes shortwave radio, multiple amateur radio bands, aviation and maritime
communications and CB radio. The operating frequency of this unit is very close to the
amateur 40m band, so be careful, or you might make some radio hams very unhappy!

The energy in the primary circuit, moving back and forth A continuous-wave coil operates at 100% duty cycle,
between the capacitor and primary coil, transfers (couples) resulting in silent operation. An interesting property of a
some of the energy to the secondary circuit. The voltage high-frequency, high-voltage output is its ability to produce
in the secondary continues to rise until the electrical field a flame discharge, in which the ionised air (plasma) takes
strength exceeds that of the insulating property of air sur- on the appearance of a candle flame. However, producing a
rounding the large surface areas of the top load and breaks stable flame is tricky and requires a fair bit of tuning.
out as an arc.
Tesla coils can be scaled up to produce many millions of Circuit description
volts. Currently, the world’s largest Tesla coil is the ‘Elec- As shown in Fig.1, the circuit uses a simple Class-E RF
trum’ designed by Eric Orr in New Zealand (see www. power amplifier to provide an RF drive current for the oscil-
gibbsfarm.org.nz/orr.php) and built by Greg Leyh of Light- lator. This amplifier design dates back to the mid-1960s.
ning on Demand (www.lod.org). Unlike a typical RF amplifier, which drives a 50W resistive

Excitation methods
There are three main types of excitation methods for Tesla coils: The Tesla Coil
when operating can
Spark gap Tesla coil (SGTC) produce a flame
Includes static gap, triggered gap and rotary gap types. This discharge which
loosely resembles
type of excitation may also be referred to as ‘disruptive’. A
a candle. Care
high-voltage source is typically used. should be taken
when operating
Solid-state Tesla coil (SSTC) the Coil as the
Includes single resonant and dual resonant solid-state flame produced is
(DRSSTC) types. A DC power supply is used to charge the extremely hot and it
capacitor, with a power semiconductor such as a MOSFET produces very high
or IGBT replacing the spark gap. voltages!

Vacuum tube Tesla coil (VTTC)


A similar topology to that used in radio transmitters. The
main difference is that VTTCs operate in continuous-wave
mode instead of the pulsed output of the previous excitation
methods. The VTTC also requires a high-voltage supply
such as specially configured microwave oven transformers.

The Tesla Coil described in this article is interesting, as it


falls within the solid-state coil (SSTC) category. However, it
operates in continuous mode, not dissimilar to a VTTC, but at
a much higher frequency of around 10MHz (rather than sev-
eral hundred kHz to several MHz). We call this an HFSSTC.
The main advantages of the HFSSTC are that it can be
powered from a low-voltage DC supply, it doesn’t make
much noise and you don’t need to deal with high-voltage
primary power supplies.

Practical Electronics | February | 2023 17


load, the Tesla Coil (secondary resona- develops a high voltage at the top of of 0.5mm diameter enamelled cop-
tor) is a high-Q filter network. the Coil when it is excited at the same per wire wound on a 25mm (ID) x
This type of circuit can achieve resonant frequency. The secondary 106mm-tall PVC pipe former. An M4
highly efficient switching using a MOS- comprises approximately 150 turns x 12mm stainless steel bolt and a brass
FET with zero-current switching (ZCS).
This high efficiency is required to pro-
duce enough output power for a sus-
tained discharge. ZCS means that the
MOSFET is switched when the current
flowing through it is at a minimum.
The heart of the circuit is the LC
oscillator formed by L2 (2.4μH) and
C1 (150pF). The values of these com-
ponents determine the oscillator’s fre-
quency. In this case, around 10MHz
(give or take).
The voltage divider formed by VR1
and its 1kW series resistor generates a
5-10V signal at the gate of IRFP260N
MOSFET Q1 to start the circuit oscillat-
ing. Feedback via capacitor C1 triggers
and sustains the oscillation.
The 4.7nF shunt capacitor and TVS
diode provide some protection for the
MOSFET; however, you may lose a few
MOSFETs during testing and operation.
ZD1 and TVS both aim to prevent
the voltage at the gate from exceeding
the gate-source voltage specification of
the device, which is 20V. A 15V zener
diode may also be used.
L1 (10μH) is hand-wound with 24
turns of 0.5mm diameter enamelled
copper wire on a cylindrical former.
Output from the software
A 10μF capacitor is used for supply JavaTC, which is used for
filtering, rated so that the circuit can designing Tesla coils.
be driven from a supply up to 63V
(although 36-48V is sufficient).
The primary coil (L2) consists of five
turns of 1.32mm-diameter enamelled
copper wire wound on a 35mm-high, DOME
COIL WINDING DETAILS
57mm-diameter former. The resonator
coil is installed inside the primary and L1: 24 TURNS OF 0.5mm DIAM. ECW

is modular, so it can be easily removed.


ON A 22mm DIAM. FORMER HF Solid-state
In my Coil, the 150pF and the pri- L2: 5 TURNS OF 1.32mm DIAM. ECW
ON A 57mm DIAM. FORMER
Tesla Coil
mary inductance of 2.4μH gives a the-
L3: 150 TURNS OF 0.5mm DIAM. ECW L3
oretical primary resonator frequency ON A 27mm DIAM. FORMER SECONDARY
of approximately 8.34MHz. However,
the interconnecting wires will increase
inductance. The measured frequency IRFP260N
of my oscillator is 7.42MHz, dropping ZD1 D
slightly when the discharge is ignited, A G
K D
to 7.37MHz. S
L2
The voltage rating on the 150pF PTC1 2.4mH
L1 10mH PRIMARY
capacitor needs to be a minimum of F1

4kV, so four 2kV capacitors are used in 12–63V DC q 150pF


10A 4kV (C1)
(4A LIMITED) 1kW
a series/parallel arrangement to double RXE250 2W D
+
the voltage rating while maintaining the 10mF Q1
80V K 1kW 2W IRFP260N
same capacitance. ZD1 G
– 12V
S
MOSFETs have a fair bit of parasitic VR1 4.7nF 15V
1W 10kW 2kV TVS
capacitance and non-zero switching A 0.5W

time, and therefore ‘dislike’ operating


at high frequencies. However, the use
of zero-current switching (ZCS) oper- Fig.1: the circuit of the Solid-state Tesla coil is simple and elegant, with
ation helps in this respect. Ó2022 HF SOLID STATE TESLA COIL
SC feedback capacitor C1 causing MOSFET Q1 to drive C1 and L2
150pF
at resonance. The inductances are chosen so that C1/L2 resonate at the
Secondary resonator same frequency as L3 and the stray capacitances around it (including the
breakout point at its top). This results in extremely high voltages being
The second resonant circuit is based efficiently generated at the top of L3, creating a flame discharge.
around the secondary coil, L3. This

18 Practical Electronics | February | 2023


acorn nut is used as the breakout point temperature produced by the discharge ‘JavaTC’ (shown opposite). This calcu-
or ‘top load’; it also influences the over- is enough to melt copper wire! lated the resonant frequency of the Coil
all resonant frequency of the Coil. Before constructing the secondary and allowed me to make adjustments
Another important reason for having coil, I modelled the coil parameters as required.
this sort of discharge point is that the in a Tesla Coil design software tool,
Tuning
Parts List – Tesla Coil Dealing with such a high frequency,
it is surprising how minimal changes
1 double-sided PCB coded 26102221, 56 x 107mm, from the PE PCB Service can affect the operation of the Coil. A
1 double-sided PCB coded 26102222, 56 x 25.5mm, from the PE PCB Service slight tweak may mean that it doesn’t
1 12-60V DC 3-8A current-limited supply work at all, produces more of a corona
1 5A trip PTC thermistor (PTC1) [eg, RXE250] discharge (rather than a flame) or blows
2 M205 fuse clips (F1) the MOSFET. Tuning the Coil properly
1 10A fast-blow ceramic fuse (F1) is therefore critical.
1 heatsink with flanges [Jaycar SY4085 recommended] I was fortunate enough that after I
1 plastic knob to suit potentiometer VR1 [Jaycar HK7010] built my Coil, I managed to get it oper-
1 pair of red and black cables with inline bullet connectors [Jaycar WC6018] ating in the desired manner. But this
1 2-way screw terminal with 5.08mm spacing (CON1) [Jaycar HM3172] was not without its challenges.
1 3-way vertical pluggable header [Jaycar HM3113, Altronics P2533] Initially, I was cooking inductor L1. I
1 3-way pluggable terminal block and vertical socket was originally using a 12V SLA battery.
[Jaycar HM3113+HM3123, Altronics P2533+P2513] I later learned that at a particular setting
1 120 x 100 x 3mm sheet of unclad PCB material (FR-4) or acrylic sheet of the control potentiometer, there was
(for coil base) a momentary current surge of more than
1 25mm length of 20mm inner diameter PVC pipe (former for L1) 20A, which turned L1 into a fuse and it
1 35mm length of 55mm inner diameter PVC pipe (former for L2) took the MOSFET with it. Therefore, I
1 106mm length of 25mm inner diameter PVC pipe (former for L3) recommended using a current-limited
1 25mm PVC coupling (to mount L3) supply to run the Coil.
4 6mm-long untapped Nylon Spacers [Jaycar HP0930] In case you still want to use a battery,
4 32mm-long untapped Nylon spacers (tap with M4 threads) I have added a PTC thermistor and fuse
[Jaycar HP0988] at the input of the final circuit, which
4 M4 x 10mm Nylon machine screws [Jaycar HP0160] will hopefully prevent damage under
4 4mm ID Nylon washers [Jaycar HP0166] these conditions. Still, it’s best to use
4 M4 x 10mm panhead machine screws some form of supply current limiting
1 M3 x 10mm panhead machine screw and flat washer if possible. In a pinch, this can be done
1 M4 x 12mm stainless steel machine screw (for breakout point) with a wirewound series resistor of a
1 M4 brass acorn nut (for breakout point) few ohms, although that will reduce the
1 15m length of 0.5mm diameter enamelled copper wire overall efficiency of the circuit.
(for winding L1 and L3) [Jaycar WW4016, Altronics W0405] Once you have achieved stable oper-
1 1m length of 1.3mm ◉ diameter enamelled copper wire (for winding L2) ation, tuning can be accomplished by
1 150mm length of cable tie (for mounting L1) adjusting the number of turns of the
various lengths and colours of insulated hookup wire primary coil (L2), the interwinding
epoxy glue (Loctite brand recommended, eg, Bunnings 1210127) spacing and its overall position (height)
clear polyurethane varnish (for coating the secondary coil) with reference to the secondary coil.
nail and flat wooden ice lolly sticks (to make breakout starting tool) The most significant effect that I
◉ 1.25mm diameter ECW could be used, but some adjustments might need to found was the use of the stainless-steel
be made to the design [Jaycar WW4024, Altronics W0409] bolt and acorn nut. This ‘top load’ low-
ers the Coil’s resonant frequency, and
Semiconductors
adjusting its position has a significant
1 IRFP260N ▣ 200V 50A N-Channel MOSFET, TO-427AC (Q1)
effect. In my case, the final resonant
[Digi-Key IRFP260NPBF-ND, Mouser 942-IRFP260NPBF]
frequency of the secondary is 8.12MHz.
1 12V 1W zener diode (ZD1) [Jaycar ZR1412, Altronics Z0632,
The calculated inductance for L3 is
Digi-Key 1727-1946-1-ND, Mouser 512-1N4742A]
168mH, which in theory should give
1 1.5KE15CA 15V 1500W transient voltage suppressor (TVS)
a resonant frequency very close to
[Digi-Key 1.5KE15CALFCT-ND, Mouser 603-1.5KE15CA/B]
10MHz. It’s likely 20% lower than this
▣ It’s a good idea to buy a few, so you have spares in case they fail during
due to stray capacitance.
testing, the IRFP460N rated at 500V, 20A also works
Capacitors Input current limiting
1 10μF 80V+ electrolytic [Jaycar RE6078, Digi-Key 493-4781-1-ND, As mentioned earlier, I added the PTC
Mouser 647-UCA2W100MHD1TO] ‘fuse’ (PTC1) because I found that it
1 4.7nF 2kV plastic film [Digi-Key 399-12555-ND, is possible to make the circuit draw
Mouser 80-R73UN14704000J] so much power that it blows up the
4 150pF 2kV plastic film [Digi-Key 1928-1172-ND, MOSFET and burns out L1. PTC1 goes
Mouser 505-FKP1150/2000/10] high resistance if it conducts more than
Resistors about 5A. Once you switch power off
2 1kΩ 2W * 5% [Digi-Key A138277CT-ND, Mouser 279-RR02J1K0TB] and let it cool, it should then work nor-
1 10kΩ 24mm ½W potentiometer with plastic shaft (VR1) mally the next time.
[Digi-Key 450D103-3-ND] I have also added a 10A fast-blow
* Increase the power rating for supply voltages greater than 48V fuse in case the PTC can’t act fast
enough. There’s no guarantee that it

Practical Electronics | February | 2023 19


will save the other components, but
The secondary coil was wound with the assistance of a
it’s cheap insurance. hand drill, but it can be done by hand.
Neither of these components should
do much other than provide peace of
mind if you are using a 3.5A to 5A
current-limited supply as suggested.
But I expect many people will not
have such a supply. In theory, with
this final circuit, you can power it from
something like a battery that can sup-
ply many amps, and it should hope-
fully survive.

Construction easily. The central channel provides a 20mm diameter PVC pipe. However, I
The first construction task is to pre- space to mount the driving electronics. had to rewind this three times during
pare and wind the secondary reso- Also, it has flanges to act as feet, with initial testing due to it burning up.
nator coil. The former is made from holes to attach spacers for holding the 0.5mm wire will not handle 20A, which
standard 25mm inner diameter PVC upper structure. I discovered during troubleshooting.
pipe available from any plumbing The base plate supporting the pri- However, after moving to a current-lim-
or DIY supply store. I cut mine to a mary and secondary coils is made from ited power supply, I have not had any
length of 106mm, which was based an off-cut of 3mm FR-4 substrate (basi- problems with it.
on my calculated winding data from cally a PCB without copper). Alter- If doing it all over again, I would con-
JavaTC and allowed for extra mate- natively, you can also use an acrylic sider using larger diameter wire.
rial at each end for mounting. The (Plexiglas/PMMA) sheet. To connect the base of the secondary
outer diameter of the PVC tube is The heatsink needs holes to be back to the driver, I used a 2mm banana
26.9mm, and the winding itself is drilled and tapped for the mounting plug and socket so that I could remove
82.2mm high. points, as well as the MOSFET. and disconnect the secondary to work
I gave the surface a light sand- I mounted the driving components on the device.
ing, followed by a light coating with on a cut piece of unclad, punched lam- The connections to the MOSFET
electrical-grade varnish; however, this inate, 56mm x 107mm. We have pro- are terminated on the underside of
is not critical. duced a PCB design to make assembly the board (the solder side). The wires
As mentioned earlier, the secondary easier. I cut the board so that it fit snugly pass through holes drilled in the heat-
coil is wound using 0.5mm diameter inside the heatsink channel. sink and are terminated to a three-
enamelled copper wire; for example, Our driver PCB is coded 26102221, pole pluggable screw terminal. The
from Jaycar, Cat WW4016 or Altron- measures 56 x 107mm and is available MOSFET is connected via the plug. I
ics, Cat W0405. from the PE PCB Service. Mount the highly recommend this approach, as
The secondary coil can be wound by parts on that now, using the overlay it is reasonably likely that you will
hand or with the assistance of a hand diagram (Fig.2) as a guide to see which blow up a MOSFET at some point
drill. Once finished, apply several parts go where. during testing.
coats of clear polyurethane varnish to The control potentiometer is I also recommend purchasing a bulk
seal the coil. Another option is ‘Ulti- mounted on a PCB measuring 56 x quantity (eg, 10 pieces) to ensure you
meg’ electrical varnish, which I have 30mm, also available from the PE PCB can continue to experiment.
used; it is available from Hi-Wire (see: Service. This is mounted at 90° on the I glued the primary coil (L2) former
https://www.hi-wire.co.uk/acatalog/ end of the main PCB using tinned cop- and secondary (L3) plastic coupling to
Varnish.html). per wire braces to produce a robust the FR-4 fibreglass base using two-part
I built the base of the unit around a mechanical support. epoxy. I have begun to use the Loctite
large heatsink, Jaycar Cat SY4085. As L1 is a 10μH inductor. In my design, brand (see parts list) over Araldite and
well as cooling the MOSFET, it’s heavy this is 24 turns of 0.5mm diameter have not looked back. It works very well
enough that the Coil won’t fall over enamelled copper wire on a length of and is also cheaper.

Fig.2: we designed this driver board based on Flavio’s, which he made on a piece of unclad, punched FR4 fibreglass
insulation. It’s pretty straightforward as there aren’t that many components, but we have kept the tracks well spaced
apart to prevent arcing.

20 Practical Electronics | February | 2023


MOSFET choice
I recommend using the IRFP260N
MOSFET, but I have also tested the
IRFP460N. This is a 500V, 20A device
(compared to 200V, 50A for the 260N).
So far, it has been working well.
In total, I have blown up three
IRFP260N and two IRFP460N MOS-
FETs and burnt out L1 twice in the
process of building and experimenting
with this device.

Testing
Before proceeding, make sure to keep
your body away from the secondary
coil at all times, especially the exposed
metal at the top. This sort of voltage at
such a high frequency can cause severe
RF burns. Always power the unit up While this Tesla Coil prototype was built on a veroboard, a manufactured
with the potentiometer would fully PCB is available.
anti-clockwise.
As mentioned earlier, the recom- To start the Coil, slowly rotate the con- this purpose. The tool is simply made
mended power supply is a current- trol pot until the circuit starts to pull cur- by sandwiching a nail between two
limited supply delivering around rent, then tap the acorn nut with an insu- sticks, with the assembly held together
32V DC. A current rating of 3.0-3.5A lated metal tip. The Coil will not estab- by epoxy glue. For a nice touch, cover
should be sufficient. lish the discharge on its own; the arc the sticks with heatshrink tubing.
You can test the unit initially without must be established using a small metal Start the breakout by turning the
the secondary coil. Place a small neon tip quickly tapped on the acorn nut. control pot to about halfway and tap
lamp near the primary (not connected I made a simple little tool from flat the breakout point with the tool. One
electrically) and power up the circuit. wooden ice lolly sticks and a nail for advantage of this approach is that it
The electromagnetic field will cause
the neon to light up if it is oscillating
correctly, as shown in the lead photo. The finished board is then
Remember that you will need to wind mounted comfortably inside the
the potentiometer clockwise a bit before heatsink. The adjacent photo
anything happens. shows the mounting arrangement
Power it down and place the second- for the MOSFET, which is located
ary inside the primary. When powered on the other side of the heatsink
underneath the main board.
back up, you may be able to observe a
discharge. If you have a compact fluo-
rescent lamp (CFL), bringing it near the
secondary should cause it to light up,
again due to the EM field.

Operation
I have found my Tesla Coil to have rel-
atively stable performance. I am driv-
ing my Coil from a dedicated 48V 5A
Mean Well switchmode power supply.

Practical Electronics | February | 2023 21


A front view of
the mounting
arrangement of
the Coil’s main
circuit board
gives a better
perspective of
how snug a fit it
is in the heatsink.

The coupling arrangement for the two


inductors (L2 and L3) as viewed from
the top of the Coil.

It is possible to run the Coil at References


higher voltages and power levels, up to n F
or more reading about Tesla coils,
60V/8A. I recommend you experiment see: https://w.wiki/4Mt6
with care as it’s pretty easy to blow it n
JavaTC is excellent and free software
up at high power levels. used in Tesla Coil Design. Download
a copy from: www.classictesla.com/
Experimentation java/javatc/javatc.html
One interesting experiment you can per- n
The theory of tuning a Tesla coil is
form is to place a tiny amount of elemen- covered at: www.hvtesla.com/tuning.
tal salt on the electrode. This will cause html (more so for classic coils, but still
the flame to burn with vivid colours. relevant for measuring secondary res-
I found that the best salt is simply a onant frequency in this design).
tiny amount of common sodium bicar- n M
y website: www.nightlase.com.au
bonate (baking powder). This generates n T
his project: www.nightlase.com.au/
a very aggressive flame that is very yel- ?pg=hfsstc
low (Sodium-D lines). n A
video of my Tesla Coil working can
Finally, I would like to thank the be downloaded at: www.nightlase.
engineers at Coast Electric Industries com.au/?pg=hfsstc#HFSSTC-Videos
(http://coastelectrical.com.au) and Ill-
awarra Transformers in Wollongong. Reproduced by arrangement with
Adding some sodium bicarbonate They have helped me immensely with SILICON CHIP magazine 2023.
makes an especially interesting-
this and other related projects. www.siliconchip.com.au
looking flame.

minimises the loading on the Coil,


which can cause the arc to go out.
I was able to get a ‘flame’ just over
5cm long by supplying 32V DC at 3A
(96W). If you have an oscilloscope,
you can carefully probe the gate of the
MOSFET to check the oscillation fre-
quency. It should be around 7MHz.
Scope 1 shows what you can expect to
see when probing the MOSFET gate (in
this case, during discharge).
Note the waveform is not a square
wave or a sinewave. You might expect
it to be a square wave, but there are all
sorts of resonances plus parasitic capac-
itances and inductances in the system
that conspire to make it look a bit messy.
At this sort of frequency, MOSFET
switch-on/off waveforms generally
have edges that look like ramps with Scope 1: the waveform measured at the gate of MOSFET Q1 relative to ground.
a step in them due to capacitive feed- This is during discharge, and you can see the resonant frequency in this
back within the MOSFET. So, a wave- condition is 7.37MHz. The gate waveform is roughly trapezoidal; parasitic circuit
form like that shown in Scope 1 is not capacitances (and especially those within MOSFET Q1) are pretty significant at
unusual for high-frequency switching. this sort of frequency, so you can’t expect a clean-looking waveform.

22 Practical Electronics | February | 2023


EE
FR -ROM
GET T
LATES HE
T COP
Order direct from CD
ELECTRONICS
£8.99

TEACH-IN 9
FROM THE PUBLISHERS OF

Y
OF
TEACH OUR
-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

AVAIL
• Multimeters and a multimeter checker
• Oscilloscopes plus a scope calibrator

AB
• AC Millivoltmeters with a range extender

NOW! LE PRICE £8.99


• 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) PIC n’ Mix


Including Practical Digital Signal Processing

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!


Files for:
PIC n’ Mix
Three Microchip
PICkit 4 Debugger PLUS
Guides 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
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 Mi-
crocontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit Debug-
ger 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 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 Circuit Surgery
Make it with Micromite Audio Out KickStart Circuit Surgery
Make it with Micromite Audio Out Cool Beans Make it with Micromite
Circuit Surgery 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: Exploring op amp
Using and interfacing the 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
2007 Jun, Jul, Aug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
Issues from Jan 1999 are available on CD-ROM / DVD-ROM Card Security Code . . . . . . . . . . (Last three digits on or under the signature strip)

If we do not have a a paper version of a particular SEND TO: Practical Electronics, Electron Publishing Limited
issue, then a PDF can be supplied for the same price. 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU
Your email address must be included on your order. Tel: 01202 880299 Email: [email protected] 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’.
commencing any project from a back-dated issue. All items normally posted within seven days of receipt of order. Copy this form if you do not wish to cut your issue.
Cooling Fan
Controller &
Loudspeaker
Protector
By
John Clarke

This board controls up to three cooling fans, switching them on at


a preset temperature and ramping their speed up as it increases,
preventing overheating while minimising noise. It can also protect
loudspeakers from damage while also preventing power switch-on and
switch-off thumps. It isn’t just useful for amplifiers; this board is ideal for
any device that needs cooling fans.

M
any devices need forced- to prevent the annoyance of constant amplifier back to a lower temperature.
air cooling when working hard fan noise (and dust collection). If the temperature continues to rise, the
but do not need fans to be run- One simple method to provide cool- fan will run at a progressively faster
ning (or perhaps only running slowly) ing fans is to have a thermostat con- rate, up to full speed.
when they are idle or under light load nected to the heatsink that switches By choosing the right fans, they will
conditions. This includes large power on the fan(s) whenever the temperature be extremely quiet at slow speeds, and
supplies, audio amplifiers, motor speed exceeds a certain threshold. But, when the temperature can usually be con-
controllers – just about anything that switched on, the fan(s) run at full speed trolled without making noise. Here,
gets hot under load. and make considerable noise. That is we’re using PWM-controlled com-
Even devices for which passive con- especially bad for an audio amplifier puter fans with brushless motors.
vection cooling is adequate can have as it can ruin the listening experience. They are readily available at a range of
their lifespans extended if they are A less obtrusive method is to adjust prices, start at just a few pounds each,
fitted with fans that switch on once the speed of the fan(s) so that there is and generally are silent at low speeds.
things start heating up. Those fans a gradual rise in speed as temperature Some can still move a lot of air at full
might only need to run during summer, rises. Once the heatsink passes a cer- speed, though.
when ambient temperatures are high. tain temperature, the fan(s) run slowly As this board is especially suitable
Ideally, the fans stop or spin slowly to start with; this usually provides for power amplifiers, we’ve added
when only a bit of cooling is required, sufficient air movement to bring the several extra features to it. Power

SPECIFICATIONS
DC offset reaction time: 75ms Temperature setting range: 0-100°C (273-373K)
Fan PWM control frequency: 25kHz Over-temperature hysteresis: 4°C (4K)
Amplifier DC offset detection: < –2V or > +2V AC loss detection threshold: 9V AC
Relay power-up delay: typically 6s after fans are detected
Fan disconnect/failure audible alarm: 264ms burst of 3.875kHz at 1Hz
Trimpot voltage/temperature conversion: 10mV/K (2.73V = 273K = 0°C)
Over-temperature or DC fault audible alarm: 264ms burst of 3.875kHz at 0.5Hz
NTC thermistor range: 0-100°C (responds to highest temperature when two are used)
Trimpot adjustments: three – fan switch-on threshold, fan speed range and over-temperature alarm

24 Practical Electronics | February | 2023


amplifiers should include loudspeaker At low duty cycles, the fan runs amplifier power rating; it will need a
protection to disconnect the speakers slowly and increases in speed as the high current rating for use with high-
if the amplifier fails. Power amplifier duty is increased. Our Controller can power amplifiers (100W or more). This
failures can destroy the speakers and drive up to three fans. PWM fans have is discussed in a section below titled
even start a fire, especially if it’s a high- four connections: two for power (+12V Relay choices. Any relay that is used
power amplifier. and 0V), one for speed adjustment and must have a double-throw contact (ie,
That’s because one common failure one for speed feedback (RPM sensing). SPDT or DPDT). We will describe why
mode involves one or more of the out- These are labelled as the Control and that is necessary a bit later.
put transistors failing short-circuit, pos- Sense terminals. The Controller is presented as a bare
sibly resulting in the entire supply rail The sense terminal produces two board and is designed to be housed
DC voltage (up to perhaps 80V) being pulses per fan revolution when the ter- within the amplifier enclosure. It runs
applied to the speaker. Given their minal has a pull-up resistor connected from a 12V DC supply, with a current
low DC resistance, any loudspeaker to a 5V supply. These pulses provide draw possibly approaching 750mA
connected will be quickly destroyed information about the speed of the fan, depending on the type of fan and how
by this. and in particular, whether the fan is many are used. While this 12V could
At best, the loudspeaker coil will running. If the pull-up resistor is not be derived from an existing amplifier
burn out without any further dam- included, the fan will always run at full supply, a separate supply is probably
age. But a worse scenario is that the speed when power is applied. warranted, especially when more than
speaker cone could catch fire, burning The fourth pin is the Control termi- one fan is used.
the speaker box and anything else that’s nal and is for the PWM signal to set the Note that you can use the Control-
in the vicinity. fan speed. The applied PWM signal ler without using all the features. You
The built-in Loudspeaker Protector only needs to supply a small amount of can leave one thermistor disconnected
Controller averts speaker damage by current as it does not directly drive the if you don’t need both, or both can be
disconnecting the loudspeaker from the fan motor. Internally, each fan includes disconnected if you are only using the
amplifier should the amplifier exhibit a motor driver circuit that operates loudspeaker protection and dethump-
this type of fault. based on the PWM signal applied. ing features.
Since there is the ability to discon- Scope 1 shows the 25kHz PWM sig- If you don’t want to connect the AC
nect the loudspeaker from the ampli- nal that is applied to the fan. The top detection input for dethumping, it can
fier, we can provide de-thumping fea- yellow trace is a low duty cycle (16.7%) be connected instead to the 12V DC
tures. At power-up, an amplifier can waveform, and when this is applied, input. If you aren’t using the loud-
generate a brief, uncontrolled voltage the fan runs slowly. The lower white speaker protection features or only
excursion until its power supply stabi- trace shows the PWM waveform when have a single channel to protect, con-
lises. This will produce a thump sound the duty cycle is increased to around nect the unused sense inputs to the
from the loudspeaker(s). We eliminated 70%. With this higher duty cycle, 0V terminal.
it by adding a delay from power-up the fan runs faster but still not at full Finally, if you want to use the
before connecting the loudspeaker. speed. That requires a continuously speaker protection/dethumping fea-
A similar thump can occur at switch- high signal. tures but not the fan control, use a
off. Therefore, we disconnect the loud- You can find more details on this jumper shunt to bridge pins 3 and 4
speaker as soon as the AC supply is lost, style of PWM fan control in the PDF of one of the fan connectors. That pre-
before any voltage excursions from the at: https://bit.ly/pe-feb23-pwm vents the Controller from showing a ‘fan
amplifier can cause a thump sound. disconnection/failure’ error that would
Features otherwise prevent operation.
PWM fan control As we wrote earlier, this board is appli-
Our Controller works with 4-pin PWM cable to a wide range of situations, but Circuit details
fans. These fans have internal pulse- as it’s ideal for audio amplifiers, the The entire circuit of the Controller
width modulation (PWM) speed con- following description will concentrate is shown in Fig.1; it is based around
trol, where the duty cycle of the wave- on that usage. microcontroller IC1. It monitors sev-
form at a control pin is adjusted to The Controller can be used with eral inputs, including two NTC therm-
change the fan speed. a mono or stereo amplifier with one istors for temperature measurement,
or two heatsinks. The loudspeaker two amplifier output voltages and an
switching relay is selected to suit the AC input from a power transformer.

FEATURES
Suits mono and stereo audio amplifiers, or any other device which
needs thermal fan control
Onboard loudspeaker protector controller with de-thumping at switch
on and switch off
Loudspeakers are disconnected with over-temperature fault
One or two thermistors for temperature sensing
PWM control for one to three cooling fans
Over-temperature and fan-failure alarms
Temperature control range of 0-100°C
Fan detect and relay-on LED indicators

Practical Electronics | February | 2023 25


The AC input is used to sense when pre-calculated table of values from 0 50] ÷ 100) at TP1, TP2 or TP3.
the amplifier is switched on or off. to 100°C within the memory of micro- VR1 adjusts the threshold setting,
It also has three analogue inputs controller IC1 – one calculator is at: which is the lowest temperature where
connected to the wipers of trimpots https://bit.ly/pe-feb23-beta the fans start running. Test point TP1
to set the temperature control param- IC1 converts the voltages to 8-bit digi- can be used to check this setting. The
eters, plus three frequency-sensing tal values using its internal analogue-to- voltage at pin 9 of IC1 is converted to a
digital inputs for monitoring the fan digital converter (ADC) and then uses 10-bit digital value and then to a tem-
speeds (RPMs). the lookup table to convert them to tem- perature value in °C.
IC1 produces output signals for peratures. Temperatures below 0°C are VR2 sets the temperature range over
driving the alarm piezo, LED indica- treated as 0°C and similarly, tempera- which the fans run from minimum
tors for each fan and a relay driver/ tures over 100°C are treated as 100°C. through to maximum duty cycle.
LED indicator. Under normal circum- When two thermistors are connected, For example, if you set a threshold of
stances, the relay will switch on after the highest temperature of either therm- 50°C and a range of 10°C (VR2 adjusted
about six seconds from power-up. istor is used. That way, for a stereo for 2.83V at TP2), the fans will start to
This connects the amplifier output(s) amplifier with two heatsinks, the fan run at the minimum duty cycle when
to the loudspeaker(s). speed and other aspects will be deter- the thermistor temperature reaches
In more detail, the NTC thermistor mined by whichever is hotter. 50°C. The duty cycle will increase lin-
inputs are at CON5. Thermistor TH1 If only one thermistor is used, the early as temperature increases, up to
connects to the analogue input at unused input is left open, and the and above 60°C, where they will be
pin 7 of IC1 and pin 8 for TH2. Each pull-up resistor holds the input at 5V. running at full speed.
thermistor connects between ground That ensures that the unused input As VR2 sets a temperature range,
(the 0V rail) and the input pin with will have a lower temperature reading. you don’t need to readjust VR2 if you
a 10kW pull-up resistor to the +5V change the threshold temperature set-
supply. As the name suggests, neg- Trimpot adjustments ting with VR1.
ative temperature coefficient (NTC) Trimpots VR1, VR2 and VR3 are for VR3 sets the over-temperature alarm
thermistors decrease in resistance setting how you want the fans to be threshold, and you can monitor this
with increasing temperature. controlled. The voltage setting at the setting at TP3. Whenever the measured
For the thermistors used, the resis- wiper of each trimpot is directly related temperature is above this setting, it
tance at 25°C is 10kW, so in conjunction to temperature in kelvin (K). A differ- will set off the piezo alarm and switch
with the 10kW pull-up resistor, they ence in 1K is equivalent to 1°C, but 0°C off the relay(s) that connect the loud-
give 2.5V DC at 25°C. As temperature = 273.15K. So to convert °C to K, sim- speaker(s). The speaker disconnection
rises, this voltage falls. The resistance ply add 273.15 and to convert K to °C, allows the amplifier to cool off as it is
and hence voltage-versus-temperature you subtract that same value. no longer loaded.
is not linear; it follows an exponential The conversion from voltage to tem- When this alarm goes off, the fans are
curve. The thermistor beta value is perature in our circuit is 10mV/K. So a set at maximum speed (if they aren’t
3970, which allows us to calculate the voltage setting of 2.73V sets a tempera- already) to cool down the amplifier,
expected resistance and thus voltage at ture of 273K, which is 0°C. For other and regular operation does not resume
various temperatures. temperatures, add the °C value required until the temperature drops by 4°C.
You can use an online calculator to 273, divide by 100, then adjust for Typically, this over-temperature set-
to calculate the expected values at that voltage. For example, for a 50°C set- ting would be set at least as high as
any temperature. We have stored a ting, you need to achieve 3.23V ([273 + the threshold temperature plus the
speed range.

Amplifier connections
The Controller monitors the AC side of
the amplifier power supply as well as
amplifier output offset voltage. These
are wired to CON4; the AC supply volt-
age goes to IC1’s AN4 analogue input
at pin 16, while the amplifier outputs
go to AN5 (pin 15) and AN6 (pin 14).
AC detection is done by half-wave
rectifying the voltage from the trans-
former’s secondary. Diode D5 rectifies
the AC, and the resulting voltage is fed
through a low-pass filter comprising a
47kW resistor and 2.2μF capacitor.
Without any AC voltage, the AN4
analogue input at pin 16 of IC1 is held
at 0V via the 47kW pull-down resis-
tor. When at least 9V AC is applied,
the voltage at pin 16 will exceed 2.5V.
This voltage is limited to 4.7V by zener
diode ZD3.
The time constant for the filtering has
been chosen to ensure sufficient ripple
Scope 1: two PWM fan control waveforms, with a low duty cycle at the top voltage is removed from the rectified
in yellow (so the fan runs slowly) and a high duty cycle below in white, for a AC while minimising the detection
higher fan RPM, but short of full speed. period for loss of AC.

26 Practical Electronics | February | 2023


The amplifier outputs are monitored micro inputs. The AC voltage level is switch off the relay whenever the AC
via pairs of 47kW resistors which limit also dependent on the amplifier out- signal exceeds the limits. To circum-
the current fed into the circuit. They put level, so at low frequencies close vent this, the filtering would need to
also act to level-shift the output sig- to 20Hz, it can exceed the offset detec- be increased by using a capacitor larger
nals from the amplifier to an average tion threshold, especially with a high- than 10μF.
DC level of 2.5V. Two 10μF capacitors, power amplifier. However, increasing the filter capac-
in combination with these resistors, fil- This is shown in Scope 2. The top itor will also increase the delay from
ter out the AC signal from the amplifier, yellow trace is the output from a 500W the initial detection of offset from the
leaving only the DC level. amplifier at 20Hz, with an RMS volt- amplifier and the relay switching off.
We have set the speaker output age of about 49.1V and 142V peak- This is not ideal, as the speakers need to
over-voltage detection threshold to to-peak. The lower blue trace is the be disconnected by the relay as quickly
be 2V on either side of 0V. Since the waveform as presented to the AN5 as possible if there is a fault.
pairs of 47kW resistors divide the sig- input of IC1. The AC voltage is 2.36V Instead, we use software logic to
nal level by two and add 2.5V, the nor- peak-to-peak, riding on a half-supply determine whether there is a DC fault
mal range of voltages at pins 14 and DC level of 2.56V. or just a high-level AC voltage. The
15 of IC1 is between 1.5V and 3.5V. The horizontal lines represent the waveform is sampled about 1000
Anything outside this indicates a DC 1.5V and 3.5V thresholds. This shows times per second, and whenever the
fault in the amplifier. that at low frequencies and high ampli- offset voltage threshold is exceeded, a
Note that the 10μF capacitors are fier output levels, the waveform can 75ms timer is started. If the detected
only truly effective at removing the exceed the offset threshold limits at offset voltage drops to within the
AC for signal frequencies above about the waveform peaks. offset voltage threshold boundaries
100Hz. Below that, more and more of Any standard offset detector circuit during this period, there is no DC off-
the AC voltage will be present at the using transistors to detect the offset will set, so the relay is not switched off.

Cooling Fan & Loudspeaker Protection Controller


Fig.1: there isn’t a great deal to the Controller circuit since most of the functions are handled by the firmware (software)
loaded into microcontroller IC1. At upper right there is signal conditioning so the amplifier output signals can be fed into
the micro’s ADC, with the relay driving circuitry below. The components at lower right are for the PWM fan interface
while the thermistor inputs, adjustment trimpots and indicator LEDs at left.

Practical Electronics | February | 2023 27


A genuine DC offset would continue IC1 (pin 11) via a 220W resistor. This speaker output from the amplifier has
being detected as exceeding the offset resistor is part of a low-pass filter to a high positive or negative DC voltage.
threshold. If DC offset is still seen at the reduce the harshness and volume to a Because of the high DC voltage, try-
end of the timeout period, it will switch less piercing level. ing to break the speaker connection by
the relay off and the alarm will sound. The filtering utilises the capaci- opening the contacts can cause an arc to
Zener diodes ZD1 and ZD2 limit the tance of the transducer to filter out develop, and current continues to flow
voltages across the possibly 16V-rated some of the harmonics from the square through the speaker. This is where the
capacitors. This can happen if the cir- wave. The driving frequency is around NC contact comes into play.
cuit is connected to an amplifier when 3.9kHz and is produced in bursts of This contact closes to short out the
IC1 is not inserted into its socket. When 264ms every two seconds for both the speaker, typically breaking any arc. If
IC1 is in-circuit, the internal protec- over temperature and amplifier offset the arc remains and current continues
tion diodes will limit the voltage at the alarms. The fan fault alarm rate is 1Hz. to flow through the relay, the amplifier
input to 0.3V above the 5V supply and DC supply fuse will blow.
0.3V below 0V. Relays
ZD1 and ZD2 provide extra protec- There is the option to connect two Fan control
tion by limiting the voltages across the relays, RLY1 and RLY2. These are There is considerable logic involved
capacitors to a maximum of 15V and driven in parallel and via transistor in driving the fans. This is because
–0.6V. The 2.2kW series resistors fur- Q1. A high level from the RB7 output many PWM fans require a minimum
ther limit the current to the protection of IC1 applied to the base of this tran- duty cycle to be applied before they
diodes within IC1. sistor switches on the relay or relays. spin. Specifications for these fans give
We are using a 15V zener rather than Diode D6 prevents high-voltage back- a minimum figure of 20% duty cycle,
4.7V despite the supply being 5V due to EMF excursion when the relay coil although most will run at lower duty
the leakage current. A 15V zener diode switches off, thus preventing damage cycles than that. In fact, the fans we
with up to 5V applied will only con- to the transistor. used to test our prototype run at a slow
duct about 0.05μA compared to 100μA The amplifier’s positive speaker 540rpm when the duty cycle is 0%.
or more for a 4.7V zener diode at only output connects to the normally open We believe this is a feature to
1V. That leakage current would drasti- (NO) relay contact of the relay while improve the LED backlighting on the
cally affect the half-supply voltage set the plus side of the speaker connects fan blades, so they become a blended
by the pairs of 47kW resistors that only to the relay wiper or common (COM) wall of light as the blades spin. Non-
cause a 53μA current flow under qui- with the normally closed (NC) contact LED-lit fans are likely to stop at 0%
escent conditions. connecting to the negative speaker out- duty cycle. (We didn’t look specifically
Note that if one of these two inputs put (usually earth) on the amplifier – for the LED lighting feature, it was just
is not connected to an amplifier (eg, see Fig.3. When the relay switches on, ‘part of the package’ for these low-cost
your amplifier has a single channel), the amplifier output is connected to the but otherwise good fans.)
that input must be tied to 0V or else it speaker’s positive terminal. The fan(s) connect to CON1-CON3,
will be detected as a DC fault. If the amplifier is working correctly, and at least one fan needs to be con-
the contacts will disconnect the speaker nected for the circuit to work. However,
Piezo alarm without any problems when the relay is the circuit can be tricked into believ-
The external piezo transducer for the switched off. However, it is not so easy ing a fan is connected with a bridging
alarm is driven via the RB6 output of when there is an amplifier fault and the shunt between the Control and Sense
terminals (pins 3 and 4).
Power for each fan is supplied from
the 12V supply via a Schottky diode
(D1, D2 or D3), and their 12V rails are
bypassed with 100nF capacitors. The
diodes are for reverse-supply polarity
protection. The common PWM output
from pin 5 of IC1 is applied to each fan’s
Control input via a 10W resistor.
Pull-up resistors are provided for
the Sense pin on each fan, and these
pins connect to the RA3, RA0 and RA1
inputs on IC1 so it can check if each
fan is running.
Indicator LEDs driven via the RC4,
RA4 and RA5 digital outputs of IC1
via 1kW resistors show which fan is
connected and they flash if no fans
are connected.
The micro determines the minimum
duty cycle for the PWM signal that will
cause all connected fans to run the first
time the circuit is powered up. Once
found, this minimum duty and the
Scope 2: the yellow trace shows a high-level 20Hz signal from a 500W amplifier number and positions of connected
and the cyan trace below shows the signal at pin 14 of IC1. While this is an fans are stored in Fash memory, so the
extreme case, it demonstrates how the signal can go outside the 2V detection Controller starts up faster subsequently.
window (dashed lines) even without a DC fault. Therefore, the software has been The stored settings are used, pro-
designed to detect and ignore this case and only respond to genuine DC faults. vided the fans run at the stored

28 Practical Electronics | February | 2023


minimum duty cycle on each pow-
er-up. A check to find the minimum Parts List – Fan and Loudspeaker Protector
duty where all the fans will run is only 1 double-sided plated-through PCB coded 01102221, 95 x 74mm from the
done again if the number of fans con- PE PCB Service
nected changes, the connection posi- 1-3 4-pin PWM fans to suit heatsink dissipation requirements●
tion for the fans changes or if one of 1-2 lug-mount NTC thermistors, 10kW at 25°C, beta 3970 (TH1, TH2)
the fans does not run when the stored [Altronics R4112] OR
minimum duty cycle is applied. 1-2 dipped NTC thermistors with separate securing clamps (TH1, TH2)
The setup procedure first applies [Jaycar RN3440]
PWM signals at about 80% duty cycle 1-2 high-current 12V SPDT or DPDT relays (see text)
to the fans for 10 seconds, then checks 1 piezo transducer (PIEZO1) [Jaycar AB3442, Altronics S6109]
which fans register as spinning. At this 3 4-way polarised PWM fan headers, 2.54mm pitch (CON1-CON3)
stage, all fan LEDs will flash at 1Hz. If [SC6071, Digi-Key WM4330-ND, Mouser 538-47053-1000] OR
no fans are detected, an error is indi- 3 4-way polarised headers, 2.54mm pitch, modified (CON1-CON3; see text)
cated by all fan LEDs flashing and the [Jaycar HM3414, Altronics P5494]
piezo alarm sounds. The relay(s) stay 4 3-way screw terminals, 5.08mm pitch (CON4)
off until a working fan is connected. 2 2-way screw terminals, 5.08mm pitch (CON5)
If fans are found, it determines the 4 6mm-long M3-tapped spacers
minimum duty cycle that will cause all 5 M3 x 6mm panhead machine screws
fans to spin. After that, the LEDs asso- 1 M3 hex nut
ciated with any connected fans are lit. 4 PCB stakes/pins (optional)
The number of fans, their positions and 1 20-pin DIL IC socket (optional; for IC1)
the minimum duty cycle are stored in ● We used EZDIY 120mm PWM fans purchased from Amazon for our
memory, and this is indicated by all the prototype (search for B07X25CJT5). These are inexpensive (we paid £15
lit fan LEDs briefly blinking off. for three) and quiet, although they are not the most powerful we’ve tested.
The program then continues with Try Corsair ‘maglev’, Noctua or BeQuiet 4-pin PWM fans for applications
the usual six-second delay before that require faster air movement or higher pressure. All computer stores
switching the relay(s) on, but only if should sell suitable fans.
the checks for temperature, amplifier
offset and AC power all pass. Semiconductors
Subsequently, when the circuit is 1 PIC16F1459-I/P programmed with 0110222A.HEX, DIP-20 (IC1)
powered up, it will start the six-second 1 7805 5V 1A linear regulator, TO-220 (REG1)
delay almost immediately, provided 1 BC337 500mA NPN transistor, TO-92 (Q1)
the fan connections have not changed. 4 3mm high brightness red LEDs (LED1-LED4)
The connected fan or fans are usually 3 1N5819 40V 1A schottky diodes (D1-D3)
detected within one second. 3 1N4004 400V 1A diodes (D4-D6)
2 15V 1W zener diodes (ZD1,ZD2)
Power supply 1 4.7V 1W zener diode (ZD3)
The circuit requires a 12V DC supply, Capacitors
which is applied to the fans via reverse 2 100μF 16V PC electrolytic 2 10uF 16V PC electrolytic
polarity protection diodes D1-D3. The 1 2.2μF 16V PC electrolytic 6 100nF MKT polyester
supply also goes to 5V for IC1 by reg- Resistors (all 1% 0.5W axial metal film)
ulator REG1 via diode D4, also for 6 47kW 5 10kW 3 2.2kW 3 1kW
reverse polarity protection. The 5V sup- 1 470W 1 220W 3 10W
ply also functions as a 5V reference for 3 10kW top adjust multi-turn trimpots (VR1-VR3)
the trimpots.
before soldering. Next, insert the capac- that you can insert the fan plugs. This
Construction itors, taking care with the electrolytic involves cutting the polarising backing
The Controller is built on a double- types that must be positioned with the tab to remove the section behind pins
sided, plated-through PCB coded longer leads towards the + symbols. 3 and 4. We used side cutters to snip
01102221 that measures 95 x 74mm Follow assembly with the trimpots. the plastic out.
and which is available from the PE These are all multi-turn types and When mounting CON1-CON3, be
PCB Service. Fig.2 shows the assem- should be oriented with the screw sure to orient these headers correctly,
bly details. adjuster positioned as shown. Then with the polarising tab piece away from
Begin by fitting the resistors. By all install transistor Q1. the PCB edge.
means use resistor colour codes, but The four 3-way screw terminal The LEDs can now be fitted, with the
you should always check each lot using blocks making up CON4 need to be longer leads inserted into the anode (A)
a digital multimeter (DMM) before joined first by fitting each side-by- holes. Mount them such that the tops
installation, as the colour bands can side by sliding the dovetail mouldings are about the same level as the adjacent
be misleading. together. Make sure the wire entry side header for LED1-LED3, and the screw
With these parts in place, mount is toward the nearest edge of the PCB terminal for LED4.
the diodes, taking care to orient these before soldering. Similarly, the two You can now install PCB stakes/pins
as shown in Fig.2. D1, D2 and D3 are 2-way screw terminals for CON5 must at test points TP1-TP3 and TP GND,
1N5819 schottky types, while D4, D5 be connected and mounted with the or simply leave them off and use the
and D6 are standard 1N4004 diodes. wire entry to the edge. multimeter probes directly to the PCB
Zener diodes ZD1-ZD2 are 15V 1W If you are using standard 4-way pads. We used a PCB pin at the GND
types, while ZD3 is 4.7V, 1W. polarised headers to connect the fans, test point but left them off TP1-TP3.
You can fit the optional socket for rather than the special Molex parts Regulator REG1 is mounted hori-
IC1 now; be sure it is oriented correctly listed, they need to be modified so zontally on the board. First, bend its

Practical Electronics | February | 2023 29


output pin is close to 5V. Typically,
these regulators are well within 100mV
of 5V. If the voltage is incorrect, check
that the input voltage at the left lead of
REG1 is at least 6V.
You now need to program a blank
PIC. First, download the HEX file
(0110222A.HEX) from the PE website
at: https://bit.ly/pe-downloads and then
load it into the chip using a PIC pro-
grammer. Now switch off power and
mount or plug in IC1, after checking
its orientation.

Setting up
With power applied, adjust VR1, VR2
and VR3 for suitable temperature set-
tings while monitoring the voltages
TP1, TP2 and TP3 respectively. We rec-
ommend starting by adjusting VR1 to
Fig.2: assembly of the Controller is straightforward; fit the components as get 3.03V at TP1, giving a 30°C (303K)
shown here, starting with the lower-profile axial parts and working your fan starting temperature. Then set VR2
way up to the taller devices. Watch the orientations of IC1, the diodes (Range) for 2.83V at TP2, providing a
(including LEDs), trimpots and electrolytic capacitors. 10°C ramp range. That way, the fans
will be at full speed by 40°C.
You can initially set the over-tem-
perature setting for VR3 to 50°C. That’s
323K, so adjust VR3 for 3.23V at TP3.
These settings may need adjusting to
optimise the way the fan speed varies
with temperature. Consider that with
a starting temperature of 30°C, the fans
will start to run as soon as you power
the device up on a hot day if the device
is not in an air-conditioned room. On a
sweltering day where it reaches 40°C,
the fans will run at full speed all the
time (which might be necessary!).
It depends on the device you are
cooling and how sensitive it is to tem-
perature. Keep in mind that, as it’s an
external device, the thermistor will be
measuring a lower temperature than
the semiconductor junctions that are
presumably generating the heat.
You could raise the switch-on thresh-
old temperature considerably if the
device adequately cools via convec-
tion when it isn’t running at maximum
power; the fans would then only need
to run at higher loads and temperatures.
When adjusting the range, we don’t
suggest you go too much lower than
10°C as the fans will appear to operate
in an on/off manner, particularly with
a range setting below 2°C.
Fig.3: here’s a guide on how to connect one of the speaker protection relays. If the temperature cannot be con-
If you have two amplifier channels, you can use a DPDT relay, in which case trolled using these settings, or if the fans
the wiring is similar but you duplicate the speaker and amp wiring for the run at full speed most of the time, you
second set of relay contacts, and connect the second SPEAKER + terminal to might need more fans (up to three max-
the other AMP1/AMP2 terminal. For two separate SPST relays, do the same imum for this Controller), larger fans or
but connect the second relay coil back to the other pair of relay terminals on fans that run at a higher speed at 100%
the controller board. duty cycle. Keep in mind that there are
flow-optimised fans and pressure-opti-
leads to pass through their mounting Before installing IC1, check the reg- mised fans (with different blade shapes).
holes, then secure its tab to the PCB ulator output voltage by applying 12V
using the M3 x 6mm machine screw across CON4’s +12V and 0V terminals. Accuracy
and nut, after which the leads can Check that the voltage between the Note that temperature setting accu-
be soldered. regulator metal tab and the right-hand racy is dependent on the 5V supply

30 Practical Electronics | February | 2023


The most common size for PWM
fans is 120 x 120mm, although they are
also available in smaller sizes like 80 x
80mm or 92 x 92mm, as well as larger
sizes like 140 x 140mm.
If your device requires lots of cool-
ing, use the largest fans that will fit into
its case and check their air movement
specification in litres per minute (L/
min) or CFM (cubic feet per minute).
Make sure there are ventilation holes in
the case so that the air movement is not
restricted going past the heatsink fins.
Note that if you are not using the fan
control section of the Controller, pins 3
and 4 of either CON1, CON2 or CON3
must be bridged with a shorting block.
Only one such shunt is required.
A single Protector board can control up to three fans.
Finishing up
rail being close to 5.00V. If it is only a A good alternative is to use a sepa- Mount the board in a suitable spot in
few tens of millivolts different, the set- rate enclosed switchmode supply such your amplifier case using threaded
ting accuracy will not be affected too as the Jaycar MP3296 (or Altronics standoffs and machine screws (we’ve
much. If you need precise temperature M8728), rated at 12V and 1.3A (shown specified 6mm spacers to keep it com-
settings, you can multiply the required above). This is mains-powered, and it pact, but you could use other lengths).
temperature voltage (ie, the 10mV/K should be switched on and off with Wire up the power supply, including
value) by the actual supply voltage, the same power switch as the amplifier the AC sense line from the transformer
then divide by 5. Then adjust the trim- itself. Keep it away from sensitive ana- secondary, or short the AC input to
pot to get that calculated voltage. logue electronics like amplifier input +12V if you are not using that feature.
For example, if the supply is 4.95V, stages and preamps, as it may radiate Next, wire up the thermistor(s) to
multiply the required temperature volt- some EMI (although it shouldn’t be too CON5 (they are not polarised so can
age by 4.95 and divide by 5 (or multi- bad as it is shielded). be wired either way around) and the
ply by 0.99 [4.95 ÷ 5]). For example, if relay(s), piezo transducer and ampli-
you want to set the threshold to 330K Fan choices fier outputs (if present) to CON4. Plug
(57°C) but the supply voltage is 4.95V, There are many 4-pin PWM fans avail- the fans in, power up the board and
set it to 3.267V (330 × 0.99) instead to able (mainly designed for cooling com- check that it behaves as expected. You
get it spot-on. puters), and you can choose to use can heat a thermistor with a hot air
up to three with our Controller, even gun and verify that the fans start, spin
Relay choices mixing different types if desired. Typ- faster, then slow down and stop some-
The choice of relay depends on the ically, larger diameter fans move more time after you stop heating it.
amplifier power and whether you are air with less noise, as do multiple fans
using the circuit with a mono or stereo when compared to a single fan. See the Reproduced by arrangement with
amplifier. In all cases, the relay must be parts list for some suggestions. These SILICON CHIP magazine 2023.
a double-throw type. That means hav- fans are often available in multi-packs. www.siliconchip.com.au
ing a normally open and a normally
closed contact for each pole.
For stereo amplifiers up to 200W,
you could use the Altronics S4310 12V
coil, 10A DPDT contacts cradle relay
with their S4318A base, or the Jaycar
SY4065 12V coil 10A DPDT contacts
cradle relay and SY4064 base.
For a mono amplifier up to 200W,
you could still use the DPDT relay but
parallel the contacts or just use one set.
For higher power amplifiers, up to about
600W, you can use the Altronics S4211
12V 30A SPDT relay for a mono ampli-
fier, or use two for a stereo amplifier (you
can also use the Altronics S4335A).

Power supply choices


If your amplifier supply already has a
12V DC rail, you could consider pow-
ering this board from it. You need to
test how much current it draws with Fig.4: if you only need the fan speed control, you can leave off some
the fan(s) at maximum speed and ver- components as shown. The insulated red wire link is needed so that the AC
ify that the amplifier supply can safely detection circuitry will allow normal operation whenever power is applied.
deliver that much current.

Practical Electronics | February | 2023 31


Driveway Gate
Remote Control
for sliding and swinging electric Gates
By Dr Hugo Holden

Sliding/swinging gate controllers inevitably fail after some years of


service. The more poorly made models will die after just a few years, so
you will end up repairing or replacing them frequently. The solution is
to replace the controller with this much more robust design, and as you
build it yourself, it’s easy to fix if it does go wrong.

W
hen I moved into my After repeated episodes of the sys- drive unit and are mechanically acti-
current home some 20 years tem failing, I was getting fed up. I vated at each end of the gate travel,
ago, I enjoyed the fact that took one of the original boards and via a spring arm, when the gate is fully
the front fence had a sliding electric replaced the relays, to good effect. I closed or fully open.
driveway gate. However, after about a also replaced some aged electrolytic A swinging gate is likely to have a
year, the gate started to malfunction, capacitors, but the writing was on similar arrangement, so my controller
initially with intermittent behaviour the wall. could be suitable for that type of gate.
and then total failure. Fortunately, the radio receiver board However, I have not tested it as such.
I inspected the gate control module, (a generic third-party product) had You would have to check how your
which was based around a control- always been very reliable, so I kept gate system works before deciding to
ler CPU. The motor switching relays that and decided to design a new con- use my controller.
looked somewhat small for the task, troller board to connect to it. The controller logic needs to take
and I could see significant contact burn- account of the states of these limit
ing through their transparent covers. My solution switches during the use of the gate.
I called the manufacturers for a sche- I decided to throw the original con- It must then control the motor direc-
matic, but they did not want to provide troller PCB in the bin and design my tion appropriately when the gate starts
any assistance. Instead, they directed own from scratch. Looking around at from a fully closed or fully open, or
me to their local repair agents. A fellow the parts in my workshop, I had a good perhaps intermediate position.
at the company seemed quite sympa- supply of 74-series vintage TTL logic It also needs to detect the motor cur-
thetic, but it was apparent he ‘wasn’t ICs. These are rugged and reliable, also rent in case the gate strikes an obsta-
allowed’ to help a customer to effect highly resistant to damage from elec- cle, to stop the gate motor.
their own repairs. trostatic discharge (ESD). The gate is controlled by a hand-
As is often the case, the repair agents The task of an electric driveway gate held remote via a radio receiver board,
were unable to make PCB-level repairs appears simple on its face. But like its output being a momentary closed
and could only replace the whole con- many automation systems, the devil contact from a small relay on the radio
trol board for hundreds of dollars. Ini- is in the detail. receiver board. But it could also be
tially, I accepted this. My sliding gate is powered by a controlled by a manual pushbutton.
It failed again a year later, and again, 24V DC bidirectional brush motor. Finally, the control logic requires a
I had to buy a new PCB. Further fail- It has two standard micro-switches very effective reset function to ensure
ures appeared after lightning storms as motion limit switches. These are that the gate remains in its stopped
on two occasions. mounted close together in the motor position with any kind of rapid, slow,

32 Practical Electronics | February | 2023


Easy to service; no software and all through-hole parts The stopped states are applied on
the leading edge of the control pulse to
Triggered by a single remote or local button (or both)
ensure that, whatever state the control-
High long-term reliability and EMI tolerance ler was in before, the motor stops before
Stops the gate if it hits an obstacle it starts moving. This way, the gate
always starts in the correct direction
Safe power-on reset and doesn’t attempt to run itself past
the stops set by the two limit switches.

Circuit details
The circuit is shown in Fig.3. Either
power-cycling or gate over-current is
designed to set the gate into the ‘stop
before reverse’ condition. This does
not cause a problem even if the gate is
power cycled in the fully reversed con-
dition, as with the next activation of
the remote control, the state machine
is forced into the correct condition (ie,
‘stop before forward’) before the gate
starts its motion.
One important feature of the
design is that the limit switches
are debounced. The cross-coupled
inverter gates (IC1a, IC1b, IC1e and
IC1f) very effectively debounce a
changeover switch, unlike other meth-
ods using RC networks, Schmitt trig-
Power input: 24V AC gers, delay timers etc.
Motor current limit: adjustable from 0A to 8.33A This method is mainly time-domain
independent, and the 7404 logic ICs
Power for remote control board: 5V DC or 24V DC are not harmed because their outputs
Motor drive: 24V DC or rectified AC at up to 8.33A (200W) are only forced low for the very brief
propagation time of the inverter gate.
74-series ICs, while good at sinking
or variable mains power cycling. Oth- the state machine is in the correct current, only weakly source it.
erwise, a brownout, blackout or other condition according to the now-static One interesting consideration
event could trigger the gate’s motion switch data. On the trailing edge of is whether to regard the two limit
and maybe open up the gate when you the pulse, the state machine is then switches as independent items, or two
are not home. clocked to the ‘forward’ state, and the items acting together.
gate begins to close. The two limit switches are entirely
The state machine The closed switch is triggered when isolated from the mechanical perspec-
Considering these requirements, there it is shut, and the machine is set to the tive, and it is essentially impossible to
are four fundamental modes of opera- ‘stop before reverse’ state. If the button activate them simultaneously. After
tion, cycled through by a button press. is pressed again, the state machine is all, the gate cannot physically be in
Initially ignoring the two limit reset to this condition on the leading two places at once (open and closed),
switches, the remote control needs to edge of the pulse, then clocked to the and the spring arm that activates the
cycle the gate through four operational ‘reverse’ state on the trailing edge, and switch can only be pushed in one
states, shown in Fig.1. the gate starts to open. direction at a time.
Therefore, a two-bit counter is
needed, giving four logic states. I
achieved that using a 7474 dual D-type
Fig.1: the gate is controlled using a
flip-flop IC. These flip flops can be ‘state machine’ with four states: fully open,
preset or cleared, which is required to fully closed, opening or closing. The
take account of the gate limit switch remote button cycles to the next state in
conditions. the loop, while the limit switches on
Fig.2 shows how the state machine the gate force the machine into one
is controlled by a combination of the of the stopped states.
limit switches and the remote control.
For example, when the gate is open-
ing and it reaches the limit switch, a
100ms pulse is gated via the OR gate
and the lower AND gate, the state
machine changes to the ‘stop before
forward’ state, and the gate motor stops.
If the control button is then pressed
on the remote, upon the button ini-
tially being pressed, the ‘stop before
forward’ state is reset to be 100% sure

Practical Electronics | February | 2023 33


However, the switches are mounted
quite close together, and the cables
to them are in one bunch. So very
heavy RFI (eg, from a nearby light-
ning strike) could possibly fool the
electronics that both switches are
activated at once.
Therefore, I concluded it was best
to XOR the signals from the two gate This is the
microswitches using gate IC2d as a type of universal
form of ‘digital common-mode noise motor typically
pulse immunity’ because an XOR used to drive a sliding
or swinging gate.
only responds if its inputs are com- They are typically
plimentary. In other words, if both powered from 24-48V
switches are seen as closed at once, it DC or rectified AC,
is treated as if neither is closed. although some run
The debounced and XORed limit from as little as 12V.
switch outputs are then strobed into
the state machine’s clear and preset
terminals, with approx 100ms pulses
from 555 timers IC7 and IC8. These
are triggered by a command from the signals, forward and reverse by another If the gate collides with an obsta-
remote control (or pushbutton) or a XOR gate (IC2a) and a pair of NAND cle, the output voltage of the filter
state change when a limit switch has gates (IC4c and IC4d). These signals increases and this forward-biases the
been activated. are inverted by two 7404 gates (IC1c base-emitter junction of transistor Q4,
This arrangement ensures that the and IC1d) and used to drive two BC639 generating the OVR signal.
limit switch states set the correct state transistors (Q1 and Q2) that switch the This stops the gate and sets the state
machine state (via the CLR and preset two 24V relays, driving the gate motor machine to ‘stop before reverse’.
inputs of the two 7474 flip flops, IC6a forward or in reverse. However, when the gate starts up
and IC6b), while the remote control Current-sensing resistor (R1), in and accelerates from a stopped posi-
can also cycle through the sequence series with the motor, develops a volt- tion, there is a motor current surge.
by clocking the first flip-flop, which in age proportional to the motor current. To ensure the current detector is
turn clocks the second flip-flop. The commutator noise is filtered out deactivated when the motor starts in
The outputs of the state machine by an RC-low pass filter comprising a either the forward or reverse direc-
(labelled A and B) are uniquely 1kW series resistor and a 100μF capac- tion, timer IC9 generates a pulse of
decoded into two simple control itor to ground. around 1.3s duration, which causes

Fig.2: more detail on how the state machine is implemented using digital logic chips. When either the remote button
is pressed or a limit switch is activated, a pulse is generated. These pulses are ORed to create a pulse that advances
the state machine to the next state. The pulses are also ANDed with the limit switch signals to force the machine into
either the fully closed or fully opened states when needed.

34 Practical Electronics | February | 2023


Q3 to inhibit the charging of the
100μF filter capacitor. Parts List – Remote Gate Controller
The motor can be powered by half-
1 double-sided PCB coded 11009121, 209.5 x 134.5mm, from the PE PCB Service
wave pulsed DC using just the power
1 sealed ABS enclosure, 222 x 146 x 75mm [Jaycar HB6132 ➊]
rectifier, but you can speed it up with
1 24V AC power supply (plugpack or mains transformer, sufficient to handle
the addition of the 4700μF capacitor.
the full motor current)
I used an IXYS 30A rectifier to ensure
1 radio receiver board with relay output, plus one or more matching keyfobs
that it would not fail.
2 3-way terminal blocks (CON1, CON2)
1 2-way terminal block (CON3)
Pull-up resistors
1 6-way PCB-mount barrier terminal (CON4) [Altronics P2106]
One subtlety of the design that isn’t
1 3-way pin header with jumper shunt (JP1)
immediately obvious is the need
2 24V DC coil 24V/30A SPDT relays (RLY1, RLY2) [Jaycar SY4047]
for the 1.5kW pull-up resistor at the
2 M205 PCB fuse clips (F1)
output of IC5a. The 74xx TTL logic
1 M205 4A slow-blow fuse (F1)
device outputs only go up to about
1 5kW mini horizontal trimpot (VR1)
+3V when high, despite running
2 6073B-type 19x19mm TO-220 mini flag heatsinks (for REG1 and D8)
from a 5V supply. That isn’t a prob-
[Jaycar HH8502, Altronics H0630]
lem when they feed the inputs of
4 M3 x 8-10mm panhead machine screws
other 74xx devices, as the inputs are
4 M3 flat washers
designed to handle this.
4 M3 star washers
Note that 3V is above the ~1.7V
4 M3 hex nuts
trigger threshold of a 555 with a 5V
4 M3 x 6mm self-tapping screws
supply. But given the weak pull-up
1 or more cable glands (to suit installation)
current from a 74xx device (around
0.4mA), it’s much better to have an ➊ it will fit in Altronics H0312A or H0313 boxes, but the mounting holes will
external pull-up resistor so that the not line up with the plastic posts in the base
555 is reliably triggered, especially Semiconductors
since the trigger signal is capaci- 1 7404 or 74LS04 hex inverter, DIP-14 (IC1)
tively coupled. 1 7486 or 74LS86 quad 2-input XOR gate, DIP-14 (IC2)
1 7408 or 74LS08 quad 2-input AND gate, DIP-14 (IC3)
Construction 1 7400 or 74LS00 quad 2-input NAND gate, DIP-14 (IC4)
The Gate Controller is built on a dou- 1 7402 or 74LS02 quad 2-input NOR gate, DIP-14 (IC5)
ble-sided PCB coded 11009121, which 1 7474 or 74LS74 dual D-type flip-flop (IC6)
measures 209.5 x 134.5mm and is 3 555 timer ICs, DIP-8 (IC7-9)
available from the PE PCB Service. 1 7805 5V 1A linear regulator (REG1)
Refer to the PCB overlay diagram, 2 BC639 60V 1A NPN transistors (Q1, Q2)
Fig.4, as a guide during construction. 2 BC548 30V 100mA NPN transistors (Q3, Q4)
There is nothing particularly diffi- 1 BS270 P-channel small signal MOSFET (Q5) [Digi-Key, Mouser element14]
cult about assembling this board, so 3 1N4148 signal diodes (D1-D3)
the usual technique of starting with the 4 1N4004 400V 1A diodes (D4-D6, D8)
lowest profile components and working 1 30A rectifier diode, TO-220-2 (D7) [eg, SDUR30Q60 or STTH30R04W]
your way up should work well. Begin Capacitors
with the small resistors, checking the 1 4700μF 63V snap-in radial electrolytic (optional)
value of each lot with a DMM before 1 1000μF 63V radial electrolytic 2 100μF 50V radial electrolytic
fitting them. Then mount the diodes, 4 10μF 50V radial electrolytic 1 2.2μF 50V multi-layer ceramic
ensuring that the striped cathode ends 15 100nF 63V MKT 5 10nF 63V MKT
are oriented as shown in Fig.4.
Resistors (all 1/4W 1% metal film unless otherwise stated)
Next, install the ICs, taking care that
1 1MW 1 120kW 3 47kW 2 9.1kW
their pin 1 ends are located as shown.
1 4.7kW 6 1.5kW 1 1kW 2 620W
I don’t recommend using sockets as
2 430W 2 100W 3 68W 5W 10% wirewound
they are a potential failure point, and
1 0.68W 50W 10% wirewound [element14 Cat 2478215 or 2946343]
as mentioned earlier, all the ICs used
in this design are very reliable. We
only fitted them to the board shown
for development reasons. Follow with tab holes located over the matching centre of the PCB to the 50W resistor
the sole trimpot. mounting holes on the PCB. Slip the lead, then solder it in place.
Then fit the smaller transistors, heatsinks between the PCB and the The tabs of the relays should drop
being careful not to get the differ- device’s tabs, then attach the tabs right into the slots provided on the
ent types mixed up, followed by the securely using M3 machine screws, PCB. Make sure they’re pressed all
smaller MKT and ceramic capacitors, nuts and washers on either side. the way down, and use a generous
which are not polarised. Next, mount Ensure they are secure and the bodies amount of solder on each pin to hold
the larger resistors, spacing them off and heatsinks are straight before sol- them securely to the PCB.
the PCB by a few millimetres to allow dering and trimming the leads. Now mount the terminal blocks
cooling air to circulate. Follow with The large 50W resistor is held to the (wire entries towards the outer edge of
the fuse clips, ensuring the retaining board using two M3 screws, nuts and the PCB), barrier terminal strip and the
tabs are towards the outside so you washers on either side. Once you’ve larger electrolytic capacitors, ensuring
can insert the fuse later. mounted it in place, bend a lead off- the latter are oriented with the longer
Bend the leads of REG1 and D8 to fit cut from one of the 5W resistors so that positive leads to the pads marked +
their respective pads, with the device it reaches from the pad towards the on the PCB.

Practical Electronics | February | 2023 35


Driveway Gate Controller

Next, bend another off-cut to go wires need to enter the box and where motor and five or six wires going to the
from the other lead to the AC termi- the best place is for them to enter. limit switches. Ideally, use cables with
nal as shown in Fig.4 and the photo, The wire entry will need to be water- a round profile and run each through
then solder it to the other end of the proof if the unit will live outside, its own cable gland.
resistor and clamp it down in the which can be done either using one You could use a four-core screened
screw terminal. or more cable glands (as mentioned cable for the limit switches and two-
in the parts list) or seal the holes with core round cable for the others, mean-
Wiring it up neutral cure silicone sealant after run- ing you need three glands and thus
Before mounting the PCB in the case, ning the wires through. three holes in the case.
you will need to figure out where the Most likely, you will have ten wires If you can’t fit the radio receiver in
radio receiver module will be mounted to run in two twin leads and two multi- the case, you will need to run some
(it might be possible to fit it to the core cables: two for the low-voltage AC additional wires to the outside. These
inside of the enclosure lid), which power input, two wires going to the are two wires to power the receiver

36 Practical Electronics | February | 2023


Fig.3: the full circuit for the Gate Controller is somewhat complex but you can compare it to Fig.2 to get an idea of
which section does what. The three timers, IC7-IC9, each act as pulse stretchers to ensure that brief events such as a
short button press are not missed.

board (assuming you aren’t supply- We won’t give any instructions on you will be better off finding a suit-
ing it with power externally) and two how to do this, except to say that you able plugpack instead.
which run from the receiver’s relay need to use correctly coloured mains- Drill holes for these glands (or the
contacts to input connector CON3. rated wire where appropriate (live bare wires, if using silicone) near
They could be run together using = brown, neutral = blue and earth = where the relevant connectors will be
three- or four-core screened cable. green/yellow striped). You will also once the PCB is mounted in the case.
Note that, as there is no room in the need to ensure that all exposed mains Mount the glands securely, then install
box for a mains transformer, you will conductors are insulated (eg, with the PCB, insert the wires, attach them
either need to use an AC plugpack or heatshrink tubing) and tied up neatly to the relevant terminals (as shown in
(more likely) mount a mains trans- with cable ties so they can’t float Fig.4), pull out most of the slack and
former, mains input socket (or captive around in the box if they break loose. tighten the gland nuts.
cord), fuseholder and wiring in a sep- If you aren’t experienced with If you have room to fit the receiver
arate insulated box. building mains-powered equipment, in the box, you could attach it to the

Practical Electronics | February | 2023 37


The finished Driveway
Gate Controller is
located in a plastic
enclosure near my
gate with a liberal
amount of waterproof
tape applied (shown
on the lead image).
This means I can still
open it up to access
the board (however
unlikely that is now)
while still keeping the
water out. I certainly
wouldn’t want
water getting in and
corroding away all my
hard work!

inside of the lid using neutral cure Testing, setup and use should get a reading close to 5V. Next,
silicone sealant – make sure it isn’t There isn’t much to go wrong, but check the voltage at the 68W 5W resis-
going to foul any components on the since the motor will not be running tor leads right near the edge of the PCB
main PCB when the cover is in place. initially, you could connect a safety relative to the tab of REG1.
Another option is to use tapped spac- resistor (say 10W 5W) in series with This reading should be between
ers and screws (assuming it has mount- the AC supply the first time you set it about 22V and 28V if a radio receiver
ing holes), but if you do that, make sure up. Check the AC voltage across that board is connected, but it could be
you seal the screw holes through the resistor; it should be well under 1V. somewhat higher than that (up to about
lid so moisture can’t get in. If it’s more, switch off and check the 35V) if there is no radio receiver board
If mounting it on the lid, that also board and wiring for faults. drawing power from the unit.
allows you to run the receiver antenna Assuming it’s OK, measure the volt- If that all checks out, remove
around the inside of the lid, assuming age between pins 1 and 14 of IC6 (or the safety resistor and connect the
it is using a length of wire as a whip. just about any of the 74xx ICs). You low-voltage AC supply directly to the

The electrolytic capacitor


sandwiched between Q3 and
VR1 should be 100μF, as shown
in the circuit and overlay, not
10μF as shown in silkscreen
of the photos. Our first batch
of PCB that we are selling
have this listed incorrectly,
so keep an eye out when
assembling! Subsequent
PCB batches will have this
problem fixed.

38 Practical Electronics | February | 2023


board. Now is also a good time
to fit the onboard fuse, which
protects the motor.
The remainder of testing
assumes you have the unit
wired up to your gate. Dou-
ble-check that the connections
to the limit switches and motor
are correct before proceeding.
We’ll assume the gate is ini-
tially closed, although it would
be best if you could manually
open it slightly.
It is ideal if you are near the
gate and can manually activate
the limit switches easily.
Set VR1 to its midpoint, then
power the controller up. It
should reset in a state where it’s
ready to open. Press the button
on the remote or short the termi-
nals of CON3. The gate should
start to open.
If it tries to close instead,
remove the power and swap the
wires to the motor terminals. If
it simply doesn’t budge, or move
a tiny amount then stops, you
might need to wind VR1 up to
allow more motor current.
Assuming it starts to open,
actuate the fully open limit
switch and verify that it stops.
Then press the remote button
again and check that it starts to
close. Actuate the fully closed
limit switch and verify that it
stops, and that if you press the
button again, it begins to open.
Assuming it does that, check
that it opens and closes all the
way. If it stops partway, turn
VR1 slightly clockwise and
try again.
If it opens and closes all the
way the first time, try winding
VR1 anti-clockwise a bit and
repeat. Continue until it stops
working reliably, then turn VR1
clockwise slightly and verify
that it works reliably again.
The idea is to set VR1 just far
enough clockwise that it opens
and closes every time, but not too
much further than the minimum
setting to achieve this. That way, it Fig.4: assembling the PCB is straightforward. Fit the parts in the locations and
will stop quickly if something gets orientations shown here. Note how the large resistor is attached to the PCB
in its way. using machine screws, then two wires are soldered to its exposed terminals. One
goes straight down to a pad on the PCB, while the other end connects to one of
All that’s left is to seal it up and tuck the low-voltage AC input terminals on CON4.
it away. Your Gate Controller should
work reliably for many years to come!
will not release their firmware or Mine has been running for over 15
Conclusion schematics; even if they did, it would years now and has proven to be very
One great advantage of this Gate Con- require the specific programming reliable and trouble-free.
troller is that it uses standard garden- hardware and utilities to re-program
variety 74 or 74LS series TTL digital a new microcontroller if needed. On
logic ICs. These are rugged and gen- the other hand, this design can be Reproduced by arrangement with
erally very reliable. Many commer- repaired easily and at minimal cost SILICON CHIP magazine 2023.
cial Gate Controller manufacturers if it goes wrong. www.siliconchip.com.au

Practical Electronics | February | 2023 39


Using Cheap Asian Electronic Modules By Jim Rowe

Geekcreit’s LTDZ V5.0


Spectrum Analyser

This compact unit is low in cost but can perform spectral analysis from
35MHz to 4.4GHz. It also includes a tracking generator for frequency-
domain analysis of filters, RF amplifiers and similar items. It needs to be
controlled from a PC via a USB cable (which also provides its 5V DC power
supply), using a very impressive free application.

A
bout a year ago, I bought £48 (free one-week shipping to UK). I The ADF4351 is quite a complex
an earlier version of the Geek- also downloaded Mr Augusto’s VMA device, but we had a pretty detailed
creit LTDZ spectrum analyser, SSA software. description of how it works in the
which came as a ‘naked PCB’ module. As you can see from the photos, the May 2019 issue of PE, specifically my
The idea was to check it out and write LTDZ V5.0 is quite compact at 62 x 55 review of the 35MHz-4.4GHz Digitally
a review, but I wasn’t too impressed x 19mm, not counting the two SMA Controlled Oscillator module.
when I tried it out. connectors extending from the input/ So please read that article if you
The software needed to control it was output end. want to know more about how this chip
both difficult to find and rather flaky, It also weighs only 83 grams. It comes works. You can also find the data sheet
and the unit itself had poor sensitivity complete with a 950mm-long USB2.0 for it at: https://bit.ly/pe-dec22-ad1
combined with a relatively high noise cable, with a Type-A plug at one end By the way, the LTDZ draws about
floor. There wasn’t much I could say and a micro Type-B connector at the 100mA from the PC in standby mode,
about it that was positive, so I decided other end, to connect it to a PC. rising to roughly 350mA when it’s
to give it a pass. The LTDZ V5.0 is quite well made, scanning with the tracking generator
But earlier this year, I found that an although the panels at each end of the also running.
improved version of the analyser had case in the unit I received had holes
become available (the LTDZ V5.0), com- for the countersink-head mounting How the analyser works
ing inside an extruded aluminium case screws which were not countersunk. I have prepared a block diagram
and not costing all that much more than This made it look unfinished until I (Fig.1) that shows how the LTDZ 5.0
the original ‘naked’ version. removed the panels and countersunk works. The ADF4351 chip at the bot-
I also discovered that although Geek- their holes to complete the job. tom of this diagram forms the heart
creit was still recommending the same This also gave me the opportunity of the analyser section, while the one
control software that I had found so to examine the PCB inside and take at upper right provides the tracking
problematic, a much better program its photo. All of the components in generator function.
had appeared – one that you can down- the LTDZ V5.0 are mounted directly The STM32F103 MCU (microcon-
load for free. on this PCB. troller) handles the operation of both
It’s called VMA Simple Spectrum Like the Geekcreit VHF-UHF sig- sections, directed by the software
Analyser (VMA SSA), written by Vitor nal generator module I reviewed last running in the PC. The two USB sig-
Martins Augusto, who lives in Portugal, month (PE, January 2023), the LTDZ nal lines (D– & D+) from the LTDZ’s
and it can be downloaded from his site: V5.0 uses the Analog Devices ADF4351 micro-USB connector at upper left pass
https://bit.ly/pe-feb23-vma digital PLL synthesiser chip. In fact, it through a CH340G USART chip before
So I went ahead and ordered an uses two of them: one in the analyser reaching the MCU. The micro has an
LTDZ V5.0 from the Banggood web- section, and one in the tracking gener- 8MHz clock crystal, while the CH340G
site (https://bit.ly/pe-feb23-ltdz), paying ator (TG) section. has a 12MHz crystal.

40 Practical Electronics | February | 2023


Fig.1: block diagram of the
LTDZ 5.0 module. The most
important sections are the two
ADF4351 synthesisers and the
STM32 ARM microcontroller.

(Block Diagram) section, at a relatively constant level of


approximately 0dBm (224mV).
Geekcreit LTDZ Spectrum Analyser The tracking generator can be
switched on or off using pushbutton
Both ADF4351 synthesiser chips are level at each point back to the soft- switch S1, so it can be turned on only
supplied with their master reference ware running in the PC. The software when needed.
clock from the 25MHz crystal oscil- can then take these measurements and There are four indicator LEDs shown
lator at centre right. But they are con- present them as a graph, plotted against in Fig.1. LED1 indicates when the track-
trolled by the MCU via two separate frequency. That’s how this type of spec- ing generator is enabled, LED3 when
SPI (serial program interface) ports. The trum analyser works. the LTDZ has power applied, LED4
analyser ADF4351 is controlled via the This is the same basic system used in when the analyser section is working,
MCU’s SPI1 port (SPI_SCK, SPI_MOSI many spectrum analysers (while some and LED2 when both ADF4351s are
and SPI_NSS), while the tracking gen- instead use very fast sampling and a locked to the designated frequency.
erator ADF4351 is controlled via the digital Fourier transform). But in place
SPI2 port. of the simple low-pass filter between The VMA SSA application
The spectrum analyser section of the the mixer and the log detector, high- As mentioned earlier, Mr Augusto’s
LTDZ involves the devices and signal end models have several selectable VMA SSA software can be downloaded
paths shown at lower left in Fig.1. bandpass filters which offer a choice of for free (https://bit.ly/pe-feb23-vma).
This spectrum analyser operates resolution bandwidth (RBW) settings. You can also download a 54-page PDF
similarly to a ‘superheterodyne’ Most higher-end units also have a User Guide from the same page.
radio receiver, where incoming sig- wideband amplifier between the RF However, after downloading and
nals at a relatively high frequency are input connector and the mixer’s input, installing the app, you have to contact
shifted down to a much lower fixed increasing the analyser’s input sensi- him by email to obtain an activation
IF (intermediate frequency) before tivity. This is so that they can analyse code before you can run it. This acti-
being detected. lower level signals, like those from vation code will only function for up
In this case, the ADF4351 at lower many antennas. to three months, after which you will
centre corresponds to the local oscilla- The tracking generator is really just have to request another code. Or, if
tor (LO). Its output is fed to one input the second ADF4351 chip, which the you wish, you can make a small dona-
of the IAM-81008 double-balanced MCU can program to provide an out- tion via PayPal of around US$10, after
mixer while the Analyser’s input sig- put signal of the same frequency that is which you will be sent a ‘permanent’
nal goes to the other input. So its out- currently being sensed by the analyser activation code.
put will be the heterodyne products of
the two signals.
The mixer’s output signal then goes
through a low-pass filter to remove any
‘sum’ heterodyne components, leaving
only the difference, which is the IF sig-
nal we want.
This is then fed to an AD8307 loga-
rithmic amplifier and detector, which
generates a DC output voltage propor-
tional to the IF signal level. This, in
turn, goes to an analogue-to-digital
input (ADC123) of the MCU.
As a result of all this, the MCU can
measure the input signal level corre-
sponding to the current frequency of
the ADF4351’ local oscillator’.
As the MCU changes the LO fre-
quency over the selected range, it can
send measurements of the input signal The internals of the Geekcreit LTDZ spectrum analyser.

Practical Electronics | February | 2023 41


but when you unzip it, you will get
the main EXE file plus several aux-
iliary files.
All you have to do is copy it to a
suitable folder and then launch the
executable. But don’t install it to ‘C:\
Program Files’ or ‘C:\Program Files
(X86)’ because Windows 10 limits
access to files in those folders, which
can cause problems.

Trying it out
All I had to do initially was plug the
LTDZ into my computer using the sup-
plied cable and launch the VMA SSA
software. Next, I clicked on its Setup
menu, to tell it the virtual COM port
number which the LTDZ has been
Screen 1: the VMA SSA software output when the LTDZ input is terminated assigned (in my case, COM3) and the
with a 50W resistor over its frequency range of 35-4400MHz. particular Analyser model.
The VMA SSA application can work
with five different units, with the LTDZ
V5.0 listed as ‘SMA Simple Spectrum
Analyser Version 2 – 35MHz-4.4GHz
– ADF4351’.
You then need to select the ‘Spec-
trum’ option at the top left of the
screen. This gives you the main screen
for spectrum analysis, as shown in the
screen grabs.
Most of the screen is occupied by the
centre plotting graticule, with a nar-
rower graticule below it that can show
a ‘waterfall’ display (although the two
can be swapped, if you wish). On the
right are most of the control setting
controls, with a large START/STOP
button at the top.
Click on any of the small Frequency
Screen 2: the LTDZ input was now connected to an external VHF/UHF discone setting boxes on the right opens a ‘key-
antenna with a plot over 200-208MHz. The average signal level was –49dBm board’ dialog box that makes it easy
over that range. to enter a new frequency. This also
applies if you click on any of the other
small boxes; for example, the ‘Samples’
box, the ‘Wait (us)’ box or the ‘Marker1’
or ‘Marker2’ boxes.
Screen 1 shows what was displayed
when I fitted a 50W termination to the
LTDZ input, set VMA SSA for the full
span of 35-4400MHz and clicked the
START button. This is the ‘noise floor’
of the LTDZ, which I found to be almost
constant at –76.9dBm over the whole
frequency range.
Screen 2 shows what was displayed
when I connected the input of the
LTDZ to an external VHF/UHF discone
antenna, and set the VMA SSA soft-
ware to scan from 200MHz to 208MHz
(the frequency range used by Sydney’s
Screen 3: a Gratten GA1484B VHF-UHF signal generator was used to provide DAB+ transponders). The full range of
the LTDZ with an unmodulated 2.5GHz output at 0dBm. The software was then transponder signals is shown, with an
set to scan over 2.4-2.6GHz. average level of about –49dBm. Note
those five sharp ‘notches’ though; more
After using VMA SSA for a short better and much easier to use than the about this shortly.
time, I was so impressed that I sent Mr NWT4.11.09 software that Geekcreit The next step was to power up my
Augusto a donation of $25 and received still recommends. Gratten GA1484B VHF-UHF signal gen-
a permanent activation code. There is Incidentally, the file you download erator and set it to produce an unmod-
no doubt in my mind that it’s massively from Mr Augusto’s site is zipped, ulated output of 2500MHz (2.5GHz) at

42 Practical Electronics | February | 2023


0dBm. I then connected its output to the
LTDZ input via a 2m-long SMA-SMA
cable, and set the VMA SSA software
to scan from 2400MHz to 2600MHz (a
span of 200MHz).
This resulted in the display shown in
Screen 3, where you can see the main
signal spike at 2500.00MHz accompa-
nied by a pair of smaller spikes (about
–66dBm) about 25MHz on either side.
There are also a couple of much smaller
spikes of –73/-74dBm, about 75MHz
on either side.
I’m sure those extra spikes are not
coming from my signal generator,
because they don’t show up when
I check it with my Signal Hound
USB-SA44 spectrum analyser.
They are probably the result of the
LTDZ’s fixed and relatively wideband
RBW. The other thing to note about The ‘front’ of the LTDZ module houses the SMA sockets for the RF input
this display is that the amplitude of and output connections. There are two status LEDs which show the current
the main signal in the centre is about operating mode.
–13dBm, quite a bit lower than the gen-
erator’s 0dBm output.
This is considerably lower than
you’d expect, even allowing for losses
in the 2m long SMA-SMA cable (about
2.5-3.0dB).

Notch artefact
The next step was to leave the signal
generator set to 2500MHz with 0dBm
output and connected to the LTDZ
input, but to change the VMA SSA
app’s frequency settings to give a much
smaller spectrum span of 10MHz (ie,
5MHz either side of 2.5GHz). This gave
the display shown in Screen 4.
The spike at 2500MHz has now
expanded into a pair of ‘twin peaks’,
with a fairly deep notch between them.
The twin peaks reach an amplitude of The ‘rear’ of the module houses a micro Type-B USB socket for connecting to a
about –2.5dBm, much closer to the cor- computer, plus two more status LEDs to indicate STM32 operation and power,
rect value. But the notch in the centre and a pushbutton labelled ‘KEY’ which controls the tracking generator.
reaches down to about –31dBm, which
is a bit disconcerting. as he admits; crunching the scanning perform a couple of spectrum scans of
It turns out that this kind of notch is data to truly remove the notching circuitry connected between the track-
basically due to the fixed and relatively would be pretty complicated. ing generator output and the Spectrum
wide RBW of the LTDZ and similar In another post dated 4 February Analyser input.
low-cost analysers. As Vitor Augusto 2022 year (https://bit.ly/pe-feb23- The first item I scanned was a Flight-
explains in his blog post dated 13 Octo- vma3), Mr Augusto announced that Aware ADSB bandpass filter. This was
ber 2017 (https://bit.ly/pe-feb23-vma2), a colleague of his named Dominico connected via a 150mm-long SMA-
the fixed and wide RBW causes them to had put much work into improving SMA cable. Then after pressing the
have a ‘blind spot’ in the centre of their the performance of LTDZ analysers. ‘Key’ button (S1) on the rear of the
‘scanning slot’ as the Analyser moves This is both in terms of improving the LTDZ’s case to turn on the tracking gen-
the input signals past it. hardware (presumably concentrated erator, it was simply a matter of setting
It’s this blind spot that causes a notch around the low-pass filter) and revising VMA SSA to scan between 800MHz
in the centre of signals with a narrow the firmware in the STM32F108 MCU. and 1300MHz, and clicking on the
bandwidth. That’s why professional In his February post, Mr Augusto START button.
(and much higher-cost) spectrum anal- provided a link to a beta version of The filter’s bandpass curve was then
ysers give you a choice of RBW settings, Dominico’s revised firmware. However, displayed, as shown in Screen 5. The
as low as 10kHz he didn’t give any details of Dominico’s filter has a flat response from 1000MHz
Mr Augusto has included a notch changes to the LTDZ’s hardware. to 1150MHz, with an insertion loss of
function into his VMA SSA app, about 4dB, falling away quite steeply
which, when selected, can fill in this More details on the current product at either end. Just the shot for receiv-
kind of notch by replacing it with a Getting back to my review of the prod- ing ADSB signals centred on 1090MHz!
straight line between the twin peaks. uct as it stands today, I decided to try Finally, I ran a series of tests using
But this is just a cosmetic workaround, using the LTDZ’s tracking generator to SMA-SMA fixed attenuators, again

Practical Electronics | February | 2023 43


you can see, it’s reasonably smooth
over the full range, apart from a small
bump in the centre and a couple of
dips at about 3700MHz and 4100MHz.
Overall, it just curves slowly upward
from –30dBm at 35MHz to –25dBm at
2400MHz, then slowly downward to
–30dBm at about 3400MHz and further
down to about –40dBm at 4400MHz.
The result when checking the
150mm cable by itself was somewhat
flatter, varying from about –5dBm at
35MHz to –3dBm at 470MHz and then
curving down and up by less than
2dB right up to 4400MHz. But it also
had dips at 3700MHz and 4100MHz,
which might be due to reflections in
the cable.
Screen 4: a ‘close-up’ of the output from Screen 3, this time with a range of
2495-2505MHz, which shows the singular peak from before was actually a pair. My verdict
The Geekcreit LTDZ V5.0 spectrum
analyser is a low-cost unit that must
be used in conjunction with a PC,
and operates over a wide frequency
range, from 35MHz to 4400MHz. It
also boasts a tracking generator cov-
ering the same frequency range, with
an output level of around 0dBm.
Used together with Mr Augusto’s
VMA SSA application, it’s capable
of performing a surprising number of
spectrum analysis jobs.
But it does have a few shortcom-
ings, of which the most irritating
is probably those ‘notches’ which
appear in the centre of narrow-band
signal peaks. These are caused by
the fixed and wide bandwidth of
the low-pass filter between the IAM-
Screen 5: the bandpass curve over 800-1300MHz of a FlightAware ADSB filter. 81008 double-balanced mixer and the
Note the flat response between 1000-1150MHz that falls away at both ends. AD8307 log amplifier/detector.
The LTDZ does have another short-
coming: its relatively low sensitivity.
Its noise floor is about –76dBm, which
corresponds to 35μV. That means it
will be effectively ‘blind’ for signals
below 50μV or so.
Presumably, this low sensitivity is
because there is no amplifier between
the LTDZ’s RF input connector and
the input of the IAM-81008 mixer.
So it might be possible to improve
the sensitivity by connecting a low-
noise wideband amplifier ahead of
its RF input.
There are a few of these currently
available, some even have the ampli-
fier circuitry inside a shield – either
on the PCB, or by fitting the complete
amplifier inside a small metal case.
Screen 6: the plot of a Mini-Circuits –30dB attenuator over the full 35-4400MHz I have ordered a couple of these
range is fairly smooth until it starts dipping past 3.7GHz. amplifier modules to try them out
with the LTDZ, and if the results are
connected between the TG output attenuators behaved over the entire satisfactory, I will cover them in a
and the analyser’s RF input using range. I also checked the span with future article.
a 150mm-long SMA-SMA cable. the 150mm long cable by itself, for
For these tests, the VMA SSA app reference. Reproduced by arrangement with
was set for a full scan from 35MHz Screen 6 shows the result for a SILICON CHIP magazine 2023.
to 4400MHz, to show how the Mini-Circuits –30dB attenuator. As www.siliconchip.com.au

44 Practical Electronics | February | 2023


ETI BUNDLE (1) Teach-In 3, 4 and 5 – all on CD-ROM – only £18.95
ELECTRONICS TEACH-IN 3 – CD-ROM ELECTRONICS TEACH-IN 5 – CD-ROM
ELECTRONICS
EE M EE M
FR -RO FR -RO

ELECTRONICS
£8.99
CD
Mike & Richard Tooley CD
JUMP START
TEACH-IN 3
£7.99

The three sections of the Teach-In 3 CD-ROM cover a Mike & Richard Tooley
TEACH-IN 5
FROM THE PUBLISHERS OF

FROM THE PUBLISHERS OF

huge range of subjects that will interest everyone involved 15 design and build circuit projects for newcomers or
CIRCUIT SURGERY JuMP START
in electronics – from newcomers to the hobby and i The how and why of circuit design those following courses in school and colleges. 15 design and build circuit projects
dedicated to newcomers or those

PRACTICALLY SPEAKING
following courses in schools and

students to experienced constructors and professionals. The projects are: n Moisture Detector n Quiz
colleges
i The techniques of electronic
project construction PRACTICALLY SPEAKING
The first section (80 pages) is dedicated to Circuit INGENUITY UNLIMITED
i Over 40 different circuit ideas
Machine n Battery Voltage Checker n Solar- The techniques of project construction

Surgery, EPE/PE’s regular clinic dealing with readers’ Powered Charger n Versatile Theft Alarm n Spooky
PIC ‘N MIx
Starting out with PIC microcontrollers

nics
Teach-
In FREE Circuits n Frost Alarm n Mini Christmas Lights n
queries on circuit design problems – from voltage ro
FREE M
TEACH-IN 1 CD-ROM bo
rne
Publishing Ltd 201
0 CD-RO

iPod Speaker n Logic Probe n DC Motor Controller


im

regulation to using SPICE circuit simulation software.


TEACH-IN 2

t
W

1
TWO TEACH-INs FOR

Elec
©
TWO TEACH-INs FOR
THE PRICE OF ONE!
n Egg Timer n Signal Injector Probe n Simple Radio
THE PRICE OF ONE !

The second section – Practically Speaking –


i The free CD-ROM provides cal
Plus:
MikroElektro
nika,

a broad-based introduction The free CD-ROM provides a


a practi
Provides to PIC Microchip pe
introduction llers L-Tek PoSco
to electronics microcontro
for Windo
ws software practical introduction to PIC

Receiver n Temperature Alarm.


CD ROM
n Program i A complete stand-alone should
start
microcontrollers
covers hands-on aspects of electronics construction.
This CD
Simulatio
y, if not
Circuit d version)
automaticallindex.html
8 TINA (Limite ramming tutorial in 11 parts plus free double-click
In 2 Plus MikroElektronika,
PIC Prog n) Teach-
8 FLOW
CODE V3 d versio software nicsorne Publishing
Ltd
Microchip and L-Tek PoScope
Software Quizzes to Test
(Limite Ele©ctro
2013 Wimb
PIC and
dsPIC are
rated
MPLAB, logy Incorpo ogy
active
Again, a whole range of subjects, from soldering to
and logo,

8 Inter ledge The Microch


Techno
ip name of Microchip
Technol
s. © 2013
Microch
ip
.09 software
Your Know
arks 016-02
ed tradem countrie 1. MCCD1
register and other d. Issue
in the USAAll rights reserve
Inc.

avoiding problems with static electricity and identifying PLUS 29/07/201


3 09:59:25

components is covered. Finally, our collection of PIC’n’ Mix – starting out with the popular range of PIC
Ingenuity Unlimited circuits provides over 40 circuit designs submitted by readers. microcontrollers and Practically Speaking – tips and techniques for project construction.
The CD-ROM also contains the complete Electronics Teach-In 1 book, which
provides a broad-based introduction to electronics in PDF form, plus interactive The CD-ROM also contains:
quizzes to test your knowledge and TINA circuit simulation software (a limited n Complete Teach-In 2 book, a practical introduction to PIC microprocessors
version – plus a specially written TINA Tutorial). n MikroElektronika, Microchip and L-Tek PoScope software.
The Teach-In 1 series covers everything from electric current through to
microprocessors and microcontrollers, and each part includes demonstration circuits
to build on breadboards or to simulate on your PC.

ELECTRONICS TEACH-IN 4 – CD-ROM EE M


Three Teach-ins for the great price of
FR -RO

ELECTRONICS
£8.99
CD
A BROAD-BASED INTRODUCTION TO
ELECTRONICS
TEACH-IN 4
FROM THE PUBLISHERS OF £18.95
Mike & Richard Tooley FREE
CD-RO

PLUS you also get the contents of the


M
WORT
A BROAD-BASED
The Teach-In 4 CD-ROM covers three of the most
H
£29.9
5
INTRODuCTION TO ELECTRONICS
i An eleven part tutorial
important electronics units that are currently studied in
many schools and colleges. These include, Edexcel
i uses inexpensive circuit
simulation software free CD-ROM from each issue...
BTEC level 2 awards and the electronics units of the
... so that’s another TWO Teach-Ins and
FREE M
CD-RO

Diploma in Engineering, Level 2. THE MODERN ELECTRONICS MANuAL


The essential reference

The CD-ROM also contains the full Modern work for everyone

The Full Modern Electronics Manual!


studying electronics

Electronics Manual, worth £29.95. The Manual i Over 800 PDF pages

contains over 800 pages of electronics theory,


i In-depth theory
autorun,
should
This software in Windows
i Extensive data tables

What a Bargain!!
if not, open double-click
and
Explorer f
index.pd

This CD-ROM
Adobe®
requires
Reader™
from
and web links
UAL
projects, data, assembly instructions and web links.
dable Free
Downloa be.com

MAN.co.u
www.ado

BA SE .epe mag
k
2011
www ne Publishi
ng Ltd.

A package of exceptional value that will appeal


© Wimbor

to anyone interested in learning about electronics –


Teach In 4 Cover.indd 1 14/11/2011 20:33:21

hobbyists, students or professionals.

ETI BUNDLE (2) Teach-In 6, 7 and 8 – all on CD-ROM – only £18.95


ELECTRONICS TEACH-IN 6 – CD-ROM ELECTRONICS TEACH-IN 7 – CD-ROM ELECTRONICS TEACH-IN 8 – CD-ROM
A COMPREHENSIVE GUIDE TO RASPBERRY Pi DISCRETE LINEAR CIRCUIT DESIGN INTRODUCING THE ARDUINO
Mike & Richard Tooley Mike & Richard Tooley Mike & Richard Tooley
Teach-In 6 contains an exciting series of articles that Teach-In 7 is a complete introduction to the design of Hardware: learn about components and circuits
provides a complete introduction to the Raspberry analogue electronic circuits. It is ideal for everyone Programming: powerful integrated development system
Pi, the low cost computer that has taken the educa- interested in electronics as a hobby and for those Microcontrollers: understand control operations
tion and computing world by storm. studying technology at schools and colleges. The Communications: connect to PCs and other Arduinos.
This latest book in our Teach-In series will appeal CD-ROM also contains all the circuit software for Teach-In 8 is an exciting series designed for
to electronics enthusiasts and computer buffs who the course, plus demo CAD software for use with the electronics enthusiasts who want to get to grips with
want to get to grips with the Raspberry Pi. Teach-In series. the inexpensive, popular Arduino microcontroller, as
n Discrete Linear Circuit Design well as coding enthusiasts who want to explore
Teach-In 6 is for anyone searching for ideas to use n Understand linear circuit design
their Pi, or who has an idea for a project but doesn’t n Learn with ‘TINA’ – modern CAD software
hardware and interfacing. It will provide a one-stop
know how to turn it into reality. This book will prove source of ideas and practical information.
n Design simple, but elegant circuits
invaluable for anyone fascinated by the revolutionary n Five projects to build: The Arduino offers a truly effective platform for
Pi. It covers: i) Pre-amp developing a huge variety of projects; from operating
n Pi programming ii) Headphone Amp a set of Christmas tree lights to remotely controlling a
n Pi hardware iii) Tone Control robotic vehicle through wireless or the Internet.
n Pi communications iv) VU-meter Teach-In 8 is based around a series of practical
n Pi Projects v) High Performance Audio Power Amp. projects with plenty of information for customisation.
n Pi Class
n Python Quickstart This book also includes PIC n’ Mix: ‘PICs and the
PLUS PICkit 3 – A Beginners
n Pi World
guide’ by Mike O’Keefe
EE OM EE M EE M
FR -RO
n ...and much more! FR -R FR RO

ELECTRONICS Audio Out – an


£8.99 £8.99 £8.99
D CD -
DV
ELECTRONI CS and Circuit Surgery
CD
ELECTRONI CS
The Teach-In 6 CD- analogue expert’s take
TEACH-IN 6
FROM THE PUBLISHERS OF

by Ian Bell – ‘State


FROM THE PUBLISHERS OF
FREE

ROM also contains all on specialist circuits


TEACH-I N 7 TEACH-I N 8 CD-ROM SOFTWARE

Machines part 1 and 2’.


FOR
THE TEACH-
IN 8
FROM THE PUBLISHERS OF SERIES

RASPBERRY Pi ®
DISCRETE LINEAR CIRCUIT DESIGN
the necessary software A COMPREHENSIVE GUIDE TO RASPBERRY Pi
Practically Speaking – • Understand linear circuit design INTRODUCING THE ARDUINO
• Pi PROJECT – SOMETHING TO BUILD • Design simple, but elegant circuits
The CD-ROM includes
• Hardware – learn about components and circuits
• Pi CLASS – SPECIFIC LEARNING AIMS
for the series, so that • PYTHON QUICKSTART – SPECIFIC PROGRAMMING TOPICS
the techniques of
• Learn with ‘TINA’ – modern CAD software
• Five projects to build: Pre-amp, Headphone Amp,
• Programming – powerful integrated development system
• Microcontrollers – understand control operations
• Pi WORLD – ACCESSORIES, BOOKS ETC
the files for:
Tone Control, VU-meter, High Performance Audio Power Amp • Communications – connect to PCs and other Arduinos
• HOME BAKING – FOLLOW-UP ACTIVITIES
readers and circuit project building.
FREE
designers can get DVD-R
OM
ALL THE
SOFTWA
TEACH-I
RE
N6
FREE M
-RO
CD CIRCUIT
n Teach-In 8
FOR THE RRY Pi

started quickly and RASPBE ALL THE

n Microchip MPLAB
RE FOR
SERIES SOFTWA 7
CH-IN
THE TEA
SERIES

easily with the projects


IDE XC8 8-bit compiler
and ideas covered. PLUS
PLUS...
n PICkit 3 User Guide
Pi B+ UPDATE
INTERFACE – a series of AUDIO OUT
ten Pi related features An analogue expert’s take
on specialist circuits
PLUS...
n Lab-Nation
REVIEWS – Optically PIC n’MIX
isolated ADC and I/O PRACTICALLY SPEAKING PICs and the PICkit 3 - A beginners
interface boards The techniques of project guide. The why and how to build

Smartscope software.
building PIC-based projects

ORDER YOUR BUNDLE TODAY!


JUST CALL 01202 880299 – OR VISIT www.electronpublishing.com
KickStart by Mike Tooley

Part 11: Sensing the environment – introducing the BME280 sensor


Our occasional KickStart series aims to enough information to be able to adapt
show readers how to use readily available and extend them for their own use.
low-cost components and devices to This eleventh instalment introduces
solve a wide range of common problems the latest in a series of low-cost
in the shortest possible time. Each of the environmental sensors from component
examples and projects can be completed manufacturer Bosch. This powerful
in no more than a couple of hours using device will allow you to accurately
‘off-the-shelf’ parts. As well as briefly sense temperature, pressure, and
explaining the underlying principles and humidity. Its I 2C connectivity solves
technology used, the series will provide the problem of connection to a host
you with a variety of representative such as an Arduino microcontroller or
solutions and examples, along with just Raspberry Pi computer.

I
recently became the proud pressure generally indicates that the
owner of an antique ‘weather station’ weather is set to worsen, with storms and
– a barometer incorporating a winds likely. A rapid drop in pressure
thermometer and hygrometer and wanted usually signifies that a storm can be
to have a means of checking its accuracy expected in the next few hours.
when making measurements of pressure, Antique mercury barometers are
temperature and humidity. The solution to invariably shipped in safe transportation
this problem proved to be very simple and mode and thus arrive unset. The in-built
straightforward. It first involved finding safety mechanism locks the needle and
a suitable sensor, interfacing it with an pulleys, preventing damage in transit.
Arduino Uno microcontroller, and adding On arrival, the barometer needs to be
a low-cost 20x4-character LCD module on assembled, positioned, and then the
which to display the results. The entire user can manually set the instrument
task (including software development to the current ambient pressure. The
and testing) was accomplished in less process usually involves an adjustment
than a couple of hours. that sets the indicating pointer to the
My recently acquired antique instrument required position. Once the barometer is
(see Fig.11.1) uses a column of mercury set, it is ready for use. Modern electronic
contained in a glass tube with one end barometric instruments, with their tiny
open and the other end sealed. The open sensors, microcontrollers and digital
bottom of the tube is placed in a reservoir displays avoid this process completely.
filled with mercury with the upper surface
of the mercury in the reservoir open to
atmospheric pressure (for more details,
see: https://bit.ly/pe-jan23-hg).
When raised into position, the mercury
level in the glass tube descends, creating a
vacuum at the top. The weight of mercury
in the glass tube is then balanced against
the atmospheric pressure acting on the
reservoir. By this means the height of
mercury in the column is an indicator
of the current atmospheric pressure.
Increasing pressure indicates good
weather, with the chance of it being
cold during winter months. Decreasing
Fig.11.1. (left) The author’s late-Regency
mahogany-cased mercury barometer
incorporates a large circular silvered-
dial, mercury-in-glass thermometer (long
rectangular display), hygrometer (top Fig.11.2. Sensor module incorporating
circular dial), and at the bottom, a (red- a BME280 sensor with I2C interface
alcohol) spirit level. circuitry on the reverse side.

46 Practical Electronics | February | 2023


Introducing the BME280 sensor In forced mode, a single measurement is performed in
The Bosch Sensortec BME280 is a combined humidity, pressure accordance with the selected measurement and filter options.
and temperature sensor housed in a tiny metal LGA package. When the measurement is finished, the sensor returns to sleep
Small dimensions (the package measures a mere 2.5 x 2.5 x mode and the measurement results can be obtained from the
0.93 mm) coupled with minimal power requirements make data registers. For the next measurement, forced mode needs
this sensor ‘chip’ ideal for use in a wide variety of portable to be selected. This mode is recommended for applications
and hand-held devices. that require relatively low sampling rates or those that rely
The BME280 combines sensors for humidity, pressure and on host-based synchronisation.
temperature for use in a wide range of applications including Normal mode involves continuous cycling between an active
environmental control, measurement, automation, logistics measurement period and an inactive standby period. The
and navigation. The humidity sensor provides an extremely measurements are performed in accordance with the selected
fast response time for rapid context awareness applications measurement and filter options. The standby time can be set
and high overall accuracy over a wide temperature range. The to between 0.5 and 1000ms.
pressure sensor is an absolute barometric pressure sensor with The BME280 uses an infinite impulse response (IIR) filter
extremely high accuracy and resolution (and for those familiar to cope with short-term disturbances (eg, blowing air into the
with its predecessor, the BMP180, significantly less noise). The sensor) the output of which is computed using the current
integrated temperature sensor is optimised for low noise and and previous input value together with the previous output
high resolution, and its output is available for temperature value. Note that normal mode is recommended whenever the
compensation of the pressure and humidity sensors. It can also IIR filter is used.
be used to provide an estimate of the ambient temperature. Pressure units may be set in pascal (Pa), hectopascal (hPa),
The BME280 provides both SPI and I2C interfaces and requires inches of mercury, (in-Hg), relative to standard atmosphere
a supply voltage in the range 1.71V to 3.6V for the sensor supply (atm), bar (metric unit of pressure equal to 100 kPa), torr
and 1.2V to 3.6V for the interface supply. Measurements can (1/760 of a standard atmosphere or 133.32 Pa) or pounds per
be triggered by a host microcontroller or performed at pre-set square inch (psi). Temperature units can be set to Celsius
intervals. When the sensor is disabled, current consumption
drops to a mere 0.1µA. Current consumption ranges from
around 350µA when measuring humidity and temperature to
a little over 700µA when measuring pressure. Standby current
(when operating but not actually making a measurement) is
less than 0.5µA.
To tailor data rate, noise, response time and current
consumption to the requirements of a particular application,
a variety of oversampling modes, filter modes and data rates
can be selected. All of this is achieved as part of the sensor’s
software configuration.

BME280 sensor operating modes


The three BME280 operating modes offers three sensor modes:
n Sleep – (no operation, all registers accessible, lowest power,
initiated at start-up)
n Forced – (perform one measurement, store results and then
return to sleep mode)
n Normal – (perpetual cycle of measurement and inactive periods).

Sleep mode is entered by default after power on reset. In sleep


mode, no measurements are performed, and power consumption
remains at a minimum. All internal registers are accessible and
internal parameters can be read. There are no special restrictions Fig.11.3. Complete circuit schematic for the BME280
on interface timings. environmental monitor.

Table 11.1 Recommended settings for representative BME280 applications

Field of application
Parameter
Weather monitoring Humidity sensing Navigation Gaming
Mode Forced Forced Normal Normal
Sample rate 1 per minute 1 per second n/a n/a
Standby time n/a n/a 0.5ms 0.5ms
Pressure ×1 ×0 ×16 ×4
Temperature ×1 ×1 ×2 ×1
Humidity ×1 ×1 ×1 ×0
Filter Off Off ×16 ×16
Current consumption 0.16µA 2.9µA 633µA 581µA
RMS noise 3.3Pa/30cm, 0.07% RH 0.07% RH 0.2Pa/1.7 cm 0.3Pa/2.5 cm
Data output rate 1/60Hz 1Hz 25Hz 1.75Hz

Practical Electronics | February | 2023 47


(°C) or Fahrenheit (°F). The
BME280’s operating mode may Listing 11.1. BME280 Arduino code for an electronic weather station
be set to either sleep, forced or
normal, as required by a particular /*
application (see Table 11.1). Electronic barometer using an Arduino and BME280 sensor
Standby time can be set between Requires the BME280 library by Tyler Glenn and the
50µs and 1s in discrete steps, while LiquidCrystal_I2C library
the IIR filter can be configured for */
four values, again depending on
the application concerned (see #include <BME280I2C.h> // BME280 I2C library
Table 11.1). Further information #include <Wire.h>
can be found in the BME280’s #include <LiquidCrystal_I2C.h> // LCD I2C library
header file (BME280.h – see Going LiquidCrystal_I2C lcd(0x27,16,4); // set the LCD parameters
Further for download details). BME280I2C bme;

BME280 electronic void setup()


barometer {
Thanks to its ability to measure lcd.init(); // initialize the display
p r e s s u r e , h u m i d i t y, a n d lcd.backlight();
temperature within the same Serial.begin(9600); // serial debugging if needed
sensor, the BME280 was an ideal Serial.println("Waiting....");
candidate for use as the basis of my while(!Serial) {} // Wait
electronic barometer. To simplify Wire.begin();
the task, the BME280 is supplied Serial.println("Starting!");
ready-mounted on a small circuit while(!bme.begin())
board (see Fig.11.2). The pre- {
built module also contains the Serial.println("Could not find BME280 sensor!");
necessary interfacing and power delay(1000);
conditioning circuitry (see Going }
Further for a source). All that is
then required is an I2C connection switch(bme.chipModel())
to the host microcontroller (an {
Arduino Uno) and the I2C 20x4 case BME280::ChipModel_BME280:
LCD module on which to display Serial.println("Found BME280 sensor! Success");
the currently measured values. break;
The complete circuit schematic case BME280::ChipModel_BMP280:
for the BME280 electronic Serial.println("Found BMP280 sensor! Humidity unavailable");
barometer is shown in Fig.11.3. break;
The four connections to the default:
BME280 sensor module shown Serial.println("Found UNKNOWN sensor! Error!");
earlier in Fig.11.2, are: }
n SDA I2C serial data }
n SCL I2C serial clock
n VIN DC supply input (+3.3V) void loop()
n GND common ground (0V). {
float temp, hum, pres, mb;
While the electronic barometer can BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
be quickly and easily assembled BME280::PresUnit presUnit(BME280::PresUnit_Pa);
using short wire links and bme.read(pres, temp, hum, tempUnit, presUnit);
coloured jumper leads, a low- mb = pres/100;
cost prototyping shield will help lcd.clear();
simplify interconnection of the lcd.setCursor(0,0);
three main components: BME280 lcd.print(" BME280 SENSOR DATA");
sensor module, Arduino Uno, and lcd.setCursor(0,1);
the 20x4 LCD, as shown in Fig.11.4. lcd.print("Temp: ");
The DC supply for the electronic lcd.print(temp);
barometer can be obtained via the lcd.print(" C");
Arduino’s USB port during testing. lcd.setCursor(0,2);
However, once programming has lcd.print("Pressure: ");
been completed, the whole system lcd.print(mb);
can be powered from an external lcd.print(" mb");
DC source of between +7V and lcd.setCursor(0,3);
+12V applied to the Arduino’s lcd.print("Humidity: ");
unregulated DC power jack. lcd.print(hum);
lcd.print(" %");
Coding the electronic delay(10000);
barometer }
Using readily available libraries
(see the Going Further section

48 Practical Electronics | February | 2023


Fig.11.4. Prototype BME280 environmental monitor uses a low- Fig.11.5. BME280 sensor data displayed on the 20x4-character
cost Arduino prototyping shield with integral mini breadboard. I2C LCD display.

below), coding for the electronic barometer is made BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);


extremely straightforward. We recommend the BME280 BME280::PresUnit presUnit(BME280::PresUnit_Pa);
library produced by Tyler Glenn used together with the Alternative measurement units (for example, temperature in
standard I2C LCD library. In this application we have Fahrenheit and pressure in psi) can be selected by modifying
used the default settings from the library module; ie, the these two lines. Now we are ready to read the data from the
forced mode with a standby time of one second and a filter sensor and display the results on the LCD. Note that we have
setting of ×16. Note that the BME280 has a hexadecimal chosen to display pressure in millibar (mbar) so the returned
I2C address of 76. pressure data (in pascal) is divided by 100 in order to obtain
The code (see Listing 11.1) starts by including the required the required indication (ie, 100Pa = 1mbar = 0.001 bar). Fig.11.5
library files, after which the setup code initialises the LCD shows a typical set of data displayed on the LCD.
and selects the display’s backlight. The serial interface is Mounting the finished project in a small enclosure should
then started so that data for debugging is sent to the host present little difficulty and readers will be able to readily adapt
computer. For example, if the BME280 sensor is not found the code to provide indications in different units, as required.
an error message will be sent via the serial link. Having Finally, the electronic barometer makes a great project for
ascertained that a sensor is connected, the next block of anyone interested in measuring and displaying basic weather
code verifies the sensor type and generates a further serial data or, as in my case, simply checking the readings obtained
port message confirming the type of sensor detected. Note from a beloved antique instrument!
that if a BMP280 (ie, not BME) sensor is used, then humidity
data will not be available. Having completed checking and Going Further
reporting the sensor type, the code is ready to enter and This section details a variety of sources that will help you locate
continuously execute the main loop. parts and further information that will allow you to get the best
The units used for temperature and pressure data (Celsius and out of BME280 sensor modules. It also provides links to relevant
pascal) are configured using the following two lines of code: underpinning knowledge and manufacturers’ data sheets.

Table 11.2. Going Further with the BME280 pressure, temperature and humidity sensor module.

Topic Source Notes

The BME280 datasheet can be downloaded from:


https://bit.ly/pe-jan23-bme280 A useful tutorial on using the BME280 with an Arduino Uno
BME280
BME280 sensor modules are available in various forms from can be found at: https://bit.ly/pe-jan23-uno
several suppliers; eg, AZ-Delivery: https://bit.ly/pe-jan23-az
Electronics Teach-In 8: Introducing the Arduino (available
The official Arduino website (www.arduino.cc) provides a variety of at: https://bit.ly/pe-jan23-eti8) provides a one-stop
resources to support the Uno. source of ideas and practical information.
Arduino Uno
The Arduino’s integrated development environment (IDE) can be
downloaded from: www.arduino.cc/en/Main/Software The Arduino Uno and 20x4 I2C LCD are available from
numerous suppliers.

The official Arduino website provides the library for reading and
BME280 I2C The code for this project can be downloaded from the
interpreting BME280 environmental sensor data (using either I2C or SPI).
library February 2023 page of the PE website.
You can visit the library by going to: https://bit.ly/pe-jan23-uno280

You will find a useful introduction to the I2C bus at the Texas KickStart 7 (PE, February 2022) provides a useful
I2C bus
Instruments website. Just go to: https://bit.ly/pe-jan23-ti introduction to the I2C interface.

Practical Electronics | February | 2023 49


Make it with Micromite

Phil Boyce – hands on with the mighty PIC-powered, BASIC microcontroller

Part 44: A PicoMite Fingerprint Reader – Part 2

A
couple of months ago we recent postal strikes impacted the delivery made simple thanks to MMBASIC’s ability
explored Part 1 of an exciting of these units – what else could possibly to easily send and receive serial data. In
biometric project: a PicoMite go wrong! Well, the good news is that the Part 1 we looked at the structure of any
Fingerprint Reader. If you followed the replacement parts did arrive, so now we message that is sent to (or returned from)
article (Make it with Micromite, Part can continue our project. But before we do, the fingerprint module; and this is once
42, December 2022), then hopefully there is one word of caution that I really again summarised in Fig.3.
you were successful in connecting and wish to emphasise: please be careful not To demonstrate communications between
communicating with the low-cost R503 to bend or stress any of the six thin wires the PicoMite and the R503 (and to also
fingerprint module. However, due to a that protrude from the rear of the R503 – check correct connection), we provided
few unforeseen issues, the progress of you have been warned! a demonstration program in Part 1 for
this project was delayed, and hence last Due to the units having only recently download (FP_MessageDemo1.txt). When
month we were unable to go to print with arrived, we will now be extending this the program was RUN, it simply turned
Part 2. Admittedly, I was the cause of the project to three parts. This month, we will on the blue ring-LED surrounding the
first issue, in that I got a bit too carried cover the topics of fingerprint enrolment, fingerprint sensor – nothing too exciting, but
away with the output voltage on my PSU. and fingerprint searching, so that you it confirmed that the hardware was working
This resulted in the R503 intermittently understand what commands need to be and that the PicoMite could successfully
sending random data values (on its serial sent to the R503 to perform these tasks, communicate with the R503.
Tx pin) to the PicoMite – yes, I had and in turn, how to interpret the responses
inadvertently destroyed the module. back to the PicoMite. Then, in Part 3, we FP_MessageDemo2
A replacement R503 was quickly ordered will assemble a unit with a built-in display We will begin this month by using an
and arrived in good time. However, this to act as a standalone fingerprint reader. updated version of the FP_MessageDemo1
replacement module also started behaving program. This allows us to better
strangely (even though I was now using a Recap demonstrate the steps involved in
dedicated 5V USB PSU). Doubtless, you The R503 fingerprint module that we are enrolment, and searching. Download the
have all found that it can be extremely using is inexpensive (£20), can operate from aptly named file FP_MessageDemo2.txt
difficult to track down the cause of random just 3.3V and uses a serial UART connection from the February 2023 page of the PE
behaviour in an electronics project. Indeed, to communicate with the outside world. website (https://bit.ly/pe-downloads) and
I lost many hours carefully checking wiring Internally, it deals with all the complex install the program into the PicoMite.
(albeit only six connections) and checking algorithms that capture and then convert When you RUN the program, you should
the program code for what I then assumed an image of a fingerprint into a digital see the blue ring-LED light up (assuming
must contain one, or more, bugs. Matters template (which is essentially a long list
were not made any easier by the poorly of data values). This module is perfect
written (not to mention, incomplete) for linking to a PicoMite so that we can
datasheet for the R503 fingerprint module. assemble a complete fingerprint reader.
Eventually, I made the decision to order The circuit diagram from Part 1 is reshown
yet another replacement R503; in fact, two here in Fig.1. Assembly is made easier if
replacements were ordered. However, the you use a Pico Expander board, and six
appropriate DuPont
Red 3V3 leads (see Fig.2).
3V3
Black GND However, to make
0V
Yellow Tx the R503 do anything
GP1
Green Rx
useful, commands
GP0 need to be sent from
Bue Finger detect
GP2 the PicoMite to the Fig.2. Using a Pico Expander board
White Induction power
3V3 R503 in a certain like the one shown here (along with six
order (and observing appropriate DuPont leads) makes it
Fig.1. All six wires coming from the back of the R503 fingerprint s o m e s p e c i f i c very easy to attach the R503 fingerprint
module need to be connected to the PicoMite as shown above. timings). This is all module to the PicoMite.

50 Practical Electronics | February | 2023


Length = Quantity of bytes in PACKAGE DATA and CHECKSUM
byte, RxPacket(1), which represents the
Confirmation Code, as referred to in the R503
HEADER [2] ADDRESS [4] IDENTIFIER [1] LENGTH [2] PACKAGE DATA [PD_Qty] CHECKSUM [2] datasheet. For the AuraLEDConfig command
MFB(x) 1 2 3 4 5 6 7 8 9 PD(1) PD(PD_Qty) 10 11 shown in Fig.4, there is just a single Packet
Data byte, and a value of zero means that the
command sent to the R503 was successfully
EF 01 FF FF FF FF 01 Command
(Fixed) (Default) dealt with (in this case, the blue LED is on).
02 Data
Other values indicate the command sent to
07 Acknowledge
the R503 was not successful in some way,
08 End of data and for convenience, a description will be
shown to the right of the byte value. All
Sum of byte values = Checksum value
possible Confirmation Code values (and their
meaning) are shown in the R503 datasheet;
Fig.3. The structure of the message contains six elements, as shown here. See Part 1 and in our program code, they are stored in
(December 2022) for details as to how the contents are calculated and interpreted. the array RxACK$() (see lines 30-53).
Note that all byte values are shown as a hexadecimal number. After the last RxPacket() has been
you have an R503 correctly connected) giving the same result as when received, just two more bytes are received, RxMFB(10-
you ran the demo from Part 1. However, when you take a closer look at 11). These represent the Checksum value (see Fig.3)
the terminal screen you will see all the individual command bytes (in hex) and if correct, you’ll see a VALID RESPONSE message
sent to the R503, and also the bytes sent in response back to the PicoMite. appear. Essentially, this means the data bytes received are
Fig.4 shows a screenshot of this communication, and if you refer to not corrupted in any way. If for any reason the data was
Part 1, you will see these exact same hex values in the text (on page 61). corrupted (eg, a loose wire), then the message ERROR:
The five Package Data bytes highlighted in the COMMAND section – ie, Response INVALID will be shown.
TxPD(1-5) – represent the AuraLEDConfig command (&h35), along
with the four parameters that determines how the LED should behave. How to use FP_MessageDemo2
Note that for a Command Message, the byte value of TxPD(1) will always If you take look at the program listing for FP_MessageDemo2.
represent the command number (or ‘Instruction Code’, as it is referred txt, it will appear rather long and complex. Thankfully,
to in the R503 datasheet, which is available for download along with we will not need to worry about how it all works; instead,
this month’s code). we’ll just use it as a tool for communicating with the R503.
In the RESPONSE section, the MessageFrameBytes received are Essentially, you just need to define the command bytes
shown as RxMFB(1-9) and RxMFB(10-11). Note that RxMFB(7) is the that you wish to send, and then observe the formatted
Identifier byte, which represents the type of message. Here, the value of response on the terminal screen; an example being the
&h07 represents an ACKNOWLEDGE message (as conveniently shown). screenshot shown in Fig.4.
Following RxMFB(9) are the Packet Data bytes which represent More specifically, the variable PD_Qty needs to be set
the response from the R503 module. There will always be at least one with the number of Package Data bytes to be sent, and then
the value of these bytes are defined in the array TxPD().
Then the subroutine TxCmdPkt is called, and the program
will go off and do its magic.
To see this in action, let’s again use AuraLEDConfig as
the command we want to send to the R503. Assuming you
haven’t edited the code in any way, scroll down to lines
156-7 (see Fig.5 to confirm the correct two lines).
You will see the first line sets PD_Qty to a value of 5,
which in turn means that the array TxPD(1-5) should
be set with the values of the five bytes to be sent. The
first byte in TxPD(1)=&h35 defines the AuraLEDConfig
command, with the four required parameters following in
TxPD(2-5). Now change the value of TxPD(4) from &h02
to &h01 and RUN the program again. If all is well, the red
LED should now be lit. Hopefully, this all makes sense,
and we recommend you try changing the LED’s behaviour
even further by adjusting the values in TxPD(2-5), as
defined in the R503 datasheet.

Remember to comment!
We will shortly be working through the enrolment process
of fingerprints, and then the subsequent searching. This
will involve sending a specific sequence of commands to
the R503, and observing the responses. To avoid having
to continually alter the value of PD_Qty depending on the
command being sent, and then also having to set up the
relevant number of Package bytes with the appropriate
byte values, we have pre-coded (and numbered) all the
necessary steps that we are going to be using. There are six
Fig.4. A screenshot of what the FP_MessageDemo2.txt program steps for enrolling, and three steps for searching.
outputs to the terminal screen. Here it shows the bytes communicated Scroll up to line 118, and you will see step 1 defined
when sending the command to turn on the blue ring-LED (also refer to with PD_Qty=1 : TxPD(1)=&h01 which is the GenImg
text from Part 1, page 61). command (more on this shortly). However, note that

Practical Electronics | February | 2023 51


Fig.5. Here, lines 156-7 in the
FP_MessageDemo2.txt program
code are not commented out.
These specific values define the
AuraLEDConfig command (and
associated parameters) meaning
this command is sent to the
R503 when the program is RUN.
currently the line is commented
out (with a ‘ character at the start
of the line).
Simply uncomment this line
(by removing ‘) to ensure that
when the program is RUN this is
the command that is sent. However, you must also comment out the
previous command used, in this case the AuraLEDConfig command
on lines 156-7 (by adding ‘ to the start of both lines). Note that the
exact position of the ‘ is irrelevant provided it’s before PD_Qty=.
Note also, for step 9 and AuraLEDConfig there are two lines that
need commenting (or uncommenting).
In summary, to correctly use FP_MessageDemo2.txt, uncomment
the one (or two) lines associated with the single command you wish to
send to the R503, and ensure all other commands are commented out.
Then RUN the program and observe the result on the terminal screen.

Enrolment
To register a new fingerprint, follow the six-step enrolment process:
1. Take an image of the finger (GenImg command)
2. Convert the image into a temporary Template and store it in
CharBuffer1 (Img2Tz command)
3. Taking a second image of the same finger (GenImg command)
4. Convert the second image into a second temporary Template and
store it in CharBuffer2 (Img2Tz command)
5. Generate a final Template based on averaging the two temporary
templates (RegModel command)
6. Store the final Template in one of 200 Template slots
(Store command)

To begin the enrolment of a finger, uncomment step 1 in the program


Fig.6. If no finger is placed on the sensor when the GenImg code (line 118 if program unaltered) remembering to comment out
command is sent, then an appropriate Confirmation Code the AuraLEDConfig command (lines 156-7). RUN the code, and this
is shown. The GenImg command is defined by setting will send the GenImg command. You will probably see the output
TxPD(1)=&h01. shown in Fig.6. Note that although it was a VALID RESPONSE (no
corrupt data), the Confirmation Code, i.e. RxPacket(1),
shows as ‘No finger detected’.
Now, gently place the end of any finger over the R503’s
sensor and RUN the program again (keeping your finger on
the sensor!). This time, you should see the output as shown
in Fig.7. If not, reposition the finger and try again. It may
take several attempts while you get used to how hard to
press, and what position is best. What you are looking for
is the Confirmation Code to show Command execution
complete (ie, RxPacket(1) has a value of zero). When you
see this, you may take your finger off the sensor.
On successfully completing step 1 of the enrolment
process (take a fingerprint image) we can move onto step 2.
Uncomment the necessary line of code for step 2, remembering
to ensure that you comment out step 1. Then RUN the program
again. This should result in the screen shown in Fig.8. Because
the Img2Tz command in step 2 is simply moving the image
into internal memory (CharBuffer1), the chances are it will
complete successfully. However, if the fingerprint image is
too poor, then an appropriate message will be shown. Note
that the Img2Tz command (defined by TxPD(1)=&h02)

Fig.7. When the GenImg command detects a finger, the


Confirmation Code will show as Command execution
complete (RxPacket(1) will have a value of zero).

52 Practical Electronics | February | 2023


requires a single parameter. This parameter defines which
CharBuffer is used (1 or 2). Referring to Fig.8, you will see
that CharBuffer1 is being used because TxPD(2)=&h01.
Now continue to steps 3 and 4, which is effectively a
repeat of steps 1 and 2, but this time the fingerprint image is
stored in CharBuffer2 (defined with the value being sent by
RxPD(2) in step 4). Be sure to use the same finger as before!
Next, step 5 will combine CharBuffer1 and CharBuffer2
into a single fingerprint template, and hold it internally in a
buffer. This action is initiated with the RegModel command
defined by setting TxPD(1)=&h05. Uncomment the relevant
line of code, ensuring that the Confirmation Code returns
as Command execution complete.
If you have reached this point, then all is good with the
fingerprint captured. The only remaining task is to store
it in one of the R503’s 200 slots. Now uncomment step 6.
The value of TxPD(4) defines which slot is to be used. You
will see it has a hex value of &h22 (34 in decimal). RUN
the program and ensure the Confirmation Code returns as
Command execution complete. If so, this confirms that
the enrolment process has successfully completed; however,
any other message will guide as to what is wrong. If you do
run into an issue, the best thing is to start again at step 1.
Remember that this manual process of going through the six
steps for enrolment is just to explain what specific messages
need to be sent, and what each response should look like.
Fig.8. The Img2Tz command requires a single parameter which is why
Enrol a different finger two Package bytes (highlighted) are sent.
Now that you have successfully enrolled a finger, it’s time to
enrol a different finger. So repeat steps 1-6, but at step 6, be sure automatically work through to determine which slots are free,
to change the value of TxPD(4) to a different slot value. This can and which are not. More on this next month.
be set to any value between &h00 for slot 0, up to &hC7 for slot
199 (but avoid using &h22 again, otherwise it will overwrite the Searching – theory
previously stored fingerprint template). We recommend you enrol Searching is the action of comparing the current fingerprint image
several fingers but do keep a note of which finger is associated with the templates that are stored in the template library (slots
with which slot number! 0-199). The R503 will then respond back to the PicoMite as to
whether (or not) a match was found. If a match was found, then
Checking Template slots the slot number is returned, along with a MatchScore value
To check the number of slots currently in use in the R503 (ie, (something that is not documented in the datasheet!).
how many slots contain a fingerprint template), you can use the To perform a search, follow three simple steps (we continue
TempleteNum command (as spelt in the datasheet!). You can numbering these steps from the six enrolment steps above):
uncomment line 160 in the code to activate this command, which 7. Take an image of the finger (GenImg command)
essentially sets PD_Qty=1 and TxPD(1)=&h1D; the answer (as a 8. Convert the image into a temporary Template and store it in
hex number) is returned in RxPacket(3). CharBuffer1 (Img2Tz command)
However, this is just the quantity of slots used, it doesn’t state 9. Search the template library (slots 0 to 199) for the temporary
which slot numbers they are (and hence which are free to use). Template just put into CharBuffer1 (Search command)
To find out the used slots, there is the ReadIndexTable
command. This command is identified by setting TxPD(1)= Before proceeding, ensure you have commented all commands
&h1F; it also has one parameter which we need to set to &h00. apart from step 7 (line 140). Then perform step 7 with one of
This will return a list of 32 byte values into RxPacket(2-33), your enrolled fingers placed on the sensor. If you see a Command
as can be seen in Fig.9. The first byte value (ie, the contents of execution complete status, then move onto step 8 (and remove
RxPacket(2)) represents the first 8 slots (ie, slot numbers 0-7). your finger from the sensor). Once again, you may need to try
If any bit in RxPacket(2) is set (=1), then that slot number is several times to complete step 7 (just reposition very slightly
occupied (the least-significant-bit (lsb) represents slot 0, and the until the finger is detected). You are already familiar with step
most-significant-bit (msb) represents slot 7). Therefore, because 8; it is exactly the same as step 2, as performed in the enrolment
RxPacket(2) has a byte-value of &h00, it means that none of process where the image is stored as a temporary Template in
the slots between 0 and 7 are occupied. Likewise, RxPacket(3) CharBuffer1. When completed successfully, move onto step 9.
represents slots 8-15, RxPacket(4) for slots 16-23, RxPacket(5) This will perform the Search command, and requires five
for slots 24-31, and RxPacket(6) for slots 32-39. additional parameter bytes to be sent. These are poorly documented
However, as can be seen in Fig.9, RxPacket(6)=&h04, which in the datasheet, but essentially comprise the following:
as an eight-bit binary value translates into: 0000 0100. Here, slot n TxPD(2) = the CharBuffer holding the temporary Template
32 status is represented by the lsb (which is zero), slot 33 status is (in this case, CharBuffer1)
the next bit (also zero), but the next bit is set to 1 which represents n TxPD(3-4) = the StartPage (both need to be set to &h00 and
the status for slot 34. And if you now recall step 6 when you is effectively the starting slot number)
registered the first finger, it was assigned to slot &h22, which in n TxPD(5-6)= the PageNum (seems to represent how many slots
decimal equates to the value 34. to search through). Setting it to 200 (ie, search all
If you did not follow the above in all its detail, don’t panic. slots) equates to the hex value &hC8. So, TxPD(5)
It is just to explain the steps that our final code will be made to needs to be set to &h00, and TxPD(6) is set to &hC8

Practical Electronics | February | 2023 53


Fig.10 shows a typical output from the Search command
(when an enrolled finger is detected, and is found). There
are two important values in the response that we concern
ourselves with:
n
RxPacket(1)This needs a value of &h00 (ie, Command
execution complete). If no match
is found, then an appropriate message
is displayed.
n
RxPacket(3)This is the slot number that matches – in
Fig.10, this is slot &h22

Note that the MatchScore value is returned in RxPacket(5),


but I have been unable to find any information about it to
make it worth using. The only possible clue after many
hours searching online is that the higher the value, the
more confident the R503 is of the match.

Detecting different fingers


Now that you have seen the output of a search, repeat steps
7-9, but for different fingers that you have enrolled. You
should observe that on performing step 9, the response
value returned in RxPacket(3) represents the slot ID for
the finger that was enrolled into the slot (not forgetting
you must perform steps 7 and 8 first).
In use, I found it worked with 100% accuracy, but
I did find that sometimes it would not detect a finger
even when I was clearly placing a finger on the sensor. I
did discover though that when my finger was a little bit
damp, the finger was detected every time without fail (and
correctly identified). Perhaps, during the development
Fig.9. The ReadIndexTable command shows which of the 200 of this project, sitting for hours continually placing
fingerprint Template slots are occupied. Here, RxPacket(6) is the only different fingers on the sensor, I was making it too greasy,
non-zero value. See text for understanding how this relates to the slot (or wearing out my fingerprints!).
numbers that are currently in use. It could even be an earthing issue somewhere; running
from a laptop power supply, while holding the metallic
body of the R503 in one hand, and sensing a finger on the
other hand. I will look into this further to see if the cause
can be identified, and hence eliminated in the standalone
fingerprint reader that we’ll be building.

Summary
I really hope that you’ll be able to get the project up and
running to this point. It is a fantastic example of how
software is used to control hardware. Remember that there
are just six cables between the PicoMite and the R503, so
there isn’t much that can go wrong with the build. And with
correctly written software, a really complex process can be
performed – in this case, a biometric sensor capturing an
image of a finger, and converting it into a digital template
for cross referencing. As always, if you run into any issues,
then please do get in touch!

Next Time
In Part 3, we will put all the steps performed manually
above for the enrolment process into an easy-to-use program,
along with the ability to store a description (ie, a person’s
name) against each fingerprint template. Likewise, use
the search functionality so that it is possible to detect
and read a fingerprint, and then search for it against all
stored fingerprint templates. Once this is done, we can
then create a standalone fingerprint reader, complete with
its own touchscreen display.
Until then, stay safe, and have FUN!

Fig.10. The Search command will look for a match between the current
temporary Template (here in CharBuffer1) with all those stored in Questions? Please email Phil at:
the template library. Any match found will be shown with a Command [email protected]
execution complete; along with the slot ID in RxPacket(3).

54 Practical Electronics | February | 2023


Teach-In 8 CD-ROM CD
EE M
FR RO
-

ELECTRONI CS
£8.99

Exploring the Arduino TEACH-I N 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
• Programming – powerful integrated development system
has been designed for electronics enthusiasts who want to get to • Microcontrollers – understand control operations
• Communications – connect to PCs and other Arduinos

grips 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
guide. The why and how to build
Teach-In 8 is based around a series of practical projects with plenty of 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

ESR Electronic Components Ltd

All of our stock is RoHS compliant and CE


approved. Visit our well stocked shop for
all of your requirements or order on-line.
Your best bet since MAPLIN
Chock-a-Block with Stock
We can help and advise with your enquiry, Visit: www.cricklewoodelectronics.com
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
Cullercoats Visit our Shop, Call or Buy online at:
North Shields
Tyne & Wear
www.cricklewoodelectronics.com
NE30 4PQ Visit our shop at:

Tel: 0191 2514363 [email protected] www.esr.co.uk 020 8452 0161 40-42 Cricklewood Broadway
London NW2 3ET

Practical Electronics | February | 2023 55


Circuit Surgery
Regular clinic by Ian Bell

Electronically controlled resistance – Part 6

T
his month, we continue our Fig.1. This model is convenient to use for limit(x,y,z) function, to limit the
series on electronically controlled exploring general circuit behaviour rather minimum resistance to some very small
resistance by looking at the use of than attempting to simulate specific devices value (eg, 1mΩ) and the maximum to
digipots in circuits such as variable gain – for example, the input is just a control the RAB value (Rdigipot). An LTspice
amplifiers. As discussed in the last couple voltage, not a digital code, but this makes schematic using this approach is shown
of articles, digipots are either potentiome- the schematic smaller and simulations easier in Fig.2 – this is not a full simulation
ters or simple variable resistors (rheostats) to set up (only one control signal is needed, schematic – refer to last month for an
whose value (wiper position or resistor rather than multiple digital bits). The model example. The behavioural voltage source
value respectively) can be controlled by uses a behavioural voltage source and (B1) is used to create a stepped waveform
a digital control input. They can replace behavioural resistances, where the voltage on node N, starting at 0V at time 0 and
mechanical potentiometers and trimmers of a source (BV element), or resistance of a stepping every step-time (stept parameter)
in many applications. Most commonly, resistor (R element, as in a standard resistor) by 1/(number of steps) (nsteps parameter)
the digital control is via a standard micro- can be set by a mathematical expression. until a maximum of 1 is reached. This
processor interface, such as SPI, but other In general, a digipot can be modelled as takes the digipot through its full range if
simpler interfaces are available, for example two resistors RA and RB such that the total the simulation is run for an appropriate
to facilitate use of up/down pushbuttons. resistance RA + RB = RAB, where RAB is the time (nsteps × stept or longer).
Two months ago, we introduced ‘digipots’, resistance between the terminals A and B,
describing the basics of their operation, the specified resistance of the digipot (see Potentiometer formulae
structure and key characteristics, and Fig.1). The relative values Electronically
of RA and R controlled
Fig.3 resistance
shows the – Part 6
digipot from Fig.1 used
B
illustrating this with some example devices. depend on the wiperElectronically controlled resistance – Part 6
position. If we define as a grounded potentiometer. Using the
A digipot circuit is typically a resistor the wiper position as a value N, where N potential divider formula for vout we get:
ladder (series chain of resistors) connected = 0 with the wiper at B and N = 1 with the 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$
to an array of switches, one on each ‘tap’ wiper at A then we can write RA = (1 – N) 𝑣𝑣!"# = 𝑣𝑣&' = 𝑣𝑣&'
𝑅𝑅 + 𝑅𝑅 (1
𝑁𝑁𝑅𝑅%$ %$ + 𝑁𝑁𝑅𝑅%$
− 𝑁𝑁)𝑅𝑅
on the resistor chain. One switch is on to RAB and RB = NRAB. For a digipot with𝑣𝑣S = 𝑅𝑅$ 𝑣𝑣 = % $
𝑣𝑣
!"# &'
set the wiper position of the potentiometer, (strictly S + 1) wiper settings, we control 𝑅𝑅% +R𝑅𝑅
The AB
(1 − 𝑁𝑁)𝑅𝑅
$ terms cancel %$ +
in the 𝑁𝑁𝑅𝑅%$ &'leaving
division,
or variable resistor value. Last month, we N by applying a digital word D which can the two instances of N to cancel in the
focused on approaches to simulating generic range from 0 to S, thus N = S/D. denominator, so we𝑁𝑁get a simple expression:
digipots in LTspice, and discussed non-ideal Last month, we introduced an LTspice 𝑣𝑣!"# = 𝑣𝑣&' = 𝑁𝑁𝑣𝑣&'
𝑁𝑁(1 − 𝑁𝑁) + 𝑁𝑁
characteristics, particularly wiper resistance model for a digipot based on Fig.1 and 𝑣𝑣!"# = 𝑣𝑣 = 𝑁𝑁𝑣𝑣&'
(1 − 𝑁𝑁) + 𝑁𝑁 &'
and resistance variation (tolerance). using a voltage node (V(N)), which can
vary from 0 to 1V to represent N. We used This is important because the output does
Digipot model two behavioural resistors with values set by not depend (1 − 𝑁𝑁)𝑅𝑅
𝑅𝑅%on RAB. As discussed last
%$ month,
𝑣𝑣!"# = 𝑣𝑣$ = 𝑣𝑣$
We will use one of these simulation expressions based on RA = (1 – N)RAB and the 𝑅𝑅
total
𝑅𝑅% % + 𝑅𝑅
resistance
$ 𝑁𝑁𝑅𝑅
of + (1
digipots
(1 − 𝑁𝑁)𝑅𝑅
%$ − 𝑁𝑁)𝑅𝑅
can%$vary
%$
models again this month in the context RB = NRAB to implement a potentiometer. 𝑣𝑣!"# =significantly 𝑣𝑣 = between individual devices 𝑣𝑣 (eg,
𝑅𝑅% + 𝑅𝑅$ $ 𝑁𝑁𝑅𝑅%$ + (1 − 𝑁𝑁)𝑅𝑅%$ $
of variable-gain amplifier circuits using However, because the behavioural resistor 20% in some cases), but the resistors in the
digipots – specifically, the abstract model value must not be set to zero, and ideally ladder are much more accurately matched
based on a simple potentiometer shown in not become negative, we can use the LTspice to one another. 𝑁𝑁𝑣𝑣% + (1 − circuits
𝑣𝑣!"# = Therefore, 𝑁𝑁)𝑣𝑣$ which
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣% + (1 − 𝑁𝑁)𝑣𝑣$
A

𝑣𝑣!"# 𝑅𝑅(
RA (1 – N)RAB =−
𝑣𝑣!"# 𝑣𝑣&'𝑅𝑅 𝑅𝑅)
(
W Wiper =−
𝑣𝑣&' 𝑅𝑅)
RB NRAB
𝑣𝑣!"# 𝑅𝑅(
B =1+
𝑣𝑣!"# 𝑣𝑣&' 𝑅𝑅 𝑅𝑅*
(
=1+
Fig.1. Basic digipot 𝑣𝑣&' 𝑅𝑅*
model. N is wiper
position from N = 0 at B 𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝑁𝑁
to N = 1 at A. =− =− =−
𝑣𝑣!"# 𝑣𝑣&'𝑅𝑅 𝑅𝑅% 𝑁𝑁𝑅𝑅 (1 − 𝑁𝑁)𝑅𝑅%$ 𝑁𝑁 (1 − 𝑁𝑁)
$ %$
=− =− =−
(1 − 𝑁𝑁)𝑅𝑅%$
Fig.2. Using LTspice behavioural resistors to model a digipot.𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)

56 𝑣𝑣!"#
Practical Electronics | 𝐷𝐷February | 2023
=−
𝑣𝑣!"# 𝑣𝑣&' 𝐷𝐷 (𝑆𝑆 − 𝐷𝐷)
=−
Electronically controlled resistance – Part 6
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣% + (1 − 𝑁𝑁)𝑣𝑣$ 𝑣𝑣!"# = 𝑁𝑁𝑣𝑣% + (1 − 𝑁𝑁)𝑣𝑣$

Electronically controlled resistance𝑣𝑣–!"# 6 % + (1 − 𝑁𝑁)𝑣𝑣$


= 𝑁𝑁𝑣𝑣
Part
𝑅𝑅$ 𝑁𝑁𝑅𝑅%$
𝑣𝑣!"# = 𝑣𝑣!"# 𝑣𝑣𝑅𝑅 = 𝑣𝑣 𝑣𝑣!"# 𝑅𝑅(
Vin A 𝑅𝑅% +=𝑅𝑅$− &'( (1 − 𝑁𝑁)𝑅𝑅%$ + 𝑁𝑁𝑅𝑅%$ &' =−
VA A 𝑣𝑣&' 𝑅𝑅) 𝑣𝑣&' +𝑅𝑅)
Vin
RA (1 – N)RAB
RA (1 –𝑅𝑅N)R 𝑣𝑣!"# is 𝑁𝑁𝑅𝑅
where 𝑅𝑅(%$
R is the feedback resistor Vout
𝑣𝑣 =𝑣𝑣 = − 𝑅𝑅F
$ AB –
𝑣𝑣!"# = 𝑣𝑣&'
𝑅𝑅% + 𝑅𝑅$ &' and (1 −I is
&'R 𝑁𝑁)𝑅𝑅 + 𝑁𝑁𝑅𝑅resistor
) input
the%$ %$ (see Fig.5).
W Vout
W Vout 𝑁𝑁 RF
𝑣𝑣!"#
𝑣𝑣For = non-inverting
!"# the 𝑅𝑅( 𝑣𝑣&' =amplifier,
𝑁𝑁𝑣𝑣&' the 𝑣𝑣!"# 𝑅𝑅(
= 1(1 + − 𝑁𝑁) + 𝑁𝑁 =1+
RB NRAB
RB NR 𝑣𝑣
gain
&' is 𝑅𝑅
given* by: 𝑣𝑣&' 𝑅𝑅*
AB

B 𝑣𝑣𝑁𝑁!"# 𝑅𝑅( RG
VB B
𝑣𝑣!"# = = 1𝑣𝑣&'+ = 𝑁𝑁𝑣𝑣&'
(1 − 𝑁𝑁) 𝑣𝑣&'+ 𝑁𝑁 𝑅𝑅*
𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$
𝑣𝑣
Fig.4. Non-grounded 𝑣𝑣
𝑅𝑅
!"# = Here, 𝑁𝑁𝑅𝑅
R 𝑣𝑣
is = feedback
$ the 𝑁𝑁 resistor and 𝑣𝑣 𝑣𝑣 𝑅𝑅 𝑁𝑁𝑅𝑅%$ 𝑁𝑁
!"#
=−
$
=− 𝑅𝑅% + 𝑅𝑅$ F%$
𝑁𝑁𝑅𝑅−%$ + (1 −
= 𝑁𝑁)𝑅𝑅%$ $ !"# = − $ = − =−
Fig.3. Grounded potential potential divider𝑣𝑣&' using% 𝑅𝑅 R G
(1
is −
the𝑁𝑁)𝑅𝑅
grounded
%$ (1 − 𝑁𝑁)
resistor (see 𝑣𝑣
Fig.6). &' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅 %$ (1 − 𝑁𝑁)
Fig.6. Op amp non-inverting amplifier.
divider using a digipot. a digipot. 𝑣𝑣!"# 𝑅𝑅 𝑅𝑅$ From 𝑁𝑁𝑅𝑅 Fig.5 and Fig.6𝑁𝑁 we see that
(1 − %$𝑁𝑁)𝑅𝑅%$
𝑣𝑣!"# =𝑣𝑣 = − 𝑅𝑅𝑣𝑣$=for =− both circuits= − gain
%
(1 − 𝑁𝑁)𝑅𝑅 the (1 𝑣𝑣−$ 𝑁𝑁)
is set by two have a value of a few picofarads. It is only
𝑅𝑅 + 𝑅𝑅$
&' % (1
𝑁𝑁𝑅𝑅%$ + − 𝑁𝑁)𝑅𝑅%$
%$
depend only on functions related to the% resistors 𝑣𝑣connected
!"# = 𝑁𝑁𝑣𝑣% + in(1series
− 𝑁𝑁)𝑣𝑣and$ that the shown here, but may be required in any
𝑣𝑣 𝐷𝐷
ratio RA to RB, and not directly on RAB, suffer gain !"#is set= by− the ratio of the resistor values. of the𝑣𝑣circuits
!"# 𝐷𝐷
= − discussed in this article.
much less due to variation of individual 𝑣𝑣&'
The resistor (𝑆𝑆 − 𝐷𝐷)
configuration matches that of 𝑣𝑣 (𝑆𝑆
If we&'switch the − 𝐷𝐷) digipot A and B
digipots. As we will discuss later, this is 𝑣𝑣 a = 𝑣𝑣!"# + (1
digipot,
𝑁𝑁𝑣𝑣 and the 𝐷𝐷 ratio-based formulae terminals around (for the circuit in Fig.7)
!"# % = − −𝑣𝑣𝑁𝑁)𝑣𝑣$ 𝑅𝑅(a digipot without
relevant to how digipots are used in circuits indicate 𝑣𝑣&' that we (𝑆𝑆 − 𝐷𝐷)
could
!"#
=− use we get a different formula for gain:
such as variable gain amplifiers, particularly the gain being 𝑣𝑣&'
dependent 𝑅𝑅) on the absolute
𝑣𝑣!"# (1 − 𝑁𝑁) (𝑆𝑆 − 𝐷𝐷) 𝑣𝑣!"# (1 − 𝑁𝑁) (𝑆𝑆 − 𝐷𝐷)
if reasonable accuracy is required without = − of the R=
value AB− resistance. =− =−
𝑣𝑣&' 𝑁𝑁 𝐷𝐷 𝑣𝑣&' 𝑁𝑁 𝐷𝐷
the need for software calibration. 𝑣𝑣!"# 𝑅𝑅(
Fig.4 shows a non-grounded potentiometer !"# 𝑣𝑣 Inverting =
(1 −− 𝑁𝑁)
amplifier (𝑆𝑆 − 𝐷𝐷)
using a However, this does not change the basic
=𝑣𝑣&'
− 𝑅𝑅 )𝑣𝑣 = −
!"# 𝑅𝑅(
with voltages applied at both ends (vA and 𝑣𝑣&' single digipot 𝑁𝑁 = 1 𝐷𝐷+ behaviour of the circuit – it just reverses
vB). This is more complex to deal with than Comparing Fig.5 𝑣𝑣&' and Fig.7 𝑅𝑅* we see R = R the order of the D-to-gain relationship.
F B
the grounded case. We use the circuit theory and RI = RA so the gain for the inverting The circuit produces exactly the same
cally controlled resistance
principle – Part 6
of superposition. This states that 𝑣𝑣!"#
amplifier using𝑅𝑅( the digipot is: set of possible gain values, but with D
=1+
for a linear circuit we can set all sources 𝑣𝑣&' 𝑅𝑅* less than S/2 amplifying, and D greater
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝑁𝑁
except for one to zero, calculate the output =− =− =− than S/2 attenuating. At D = S/2 the gain
olled resistance – Part 6 one source, then repeat for 𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁)
for just that is –1, and at D = 1 the gain is –(S – 1).
each source 𝑅𝑅$ in turn, and finally 𝑁𝑁𝑅𝑅%$add up the which confirms that the gain does not
𝑣𝑣!"# = 𝑣𝑣&' = 𝑣𝑣&' 𝑅𝑅
𝑣𝑣circuit 𝑁𝑁𝑅𝑅 𝑁𝑁
individual 𝑅𝑅% + 𝑅𝑅 contributions.(1 − 𝑁𝑁)𝑅𝑅 For + 𝑁𝑁𝑅𝑅
%$ the !"#
%$ = − $depend on%$RAB.=We Non-inverting amplifier using a
$ =− − can also write this
in Fig.4, if we set = 0 we have the 𝑣𝑣 &'
same 𝑅𝑅 (1 −
%formula in terms 𝑁𝑁)𝑅𝑅 %$ of (1
the − 𝑁𝑁)
number of wiper single digipot
𝑅𝑅$ v
𝑁𝑁𝑅𝑅
B
%$
𝑣𝑣!"# 𝐷𝐷
𝑣𝑣!"# = situation 𝑣𝑣&' =as in Fig.3 with vin 𝑣𝑣=&'vA, so the steps (S) and = − input value (D) using
digital Comparing Fig.6 and Fig.8 we see RF = RB
𝑅𝑅% + 𝑅𝑅$ (1 − 𝑁𝑁)𝑅𝑅%$ + 𝑁𝑁𝑅𝑅%$ 𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
contribution to vout is NvA. For vA = 0 we wiper position N = S/D: and RG = RA, so the gain for the inverting
𝑁𝑁
effectively 𝑣𝑣!"# = have the circuit 𝑣𝑣&' in
= 𝑁𝑁𝑣𝑣
Fig.3
&' with 𝑣𝑣!"# 𝐷𝐷
amplifier using the digipot is:
(1 − 𝑁𝑁) + 𝑁𝑁
the A and B digipot terminals switched =− 𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 1
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷) =1+ =1+ =
round (A𝑁𝑁is grounded, B is the input), so 𝑣𝑣!"# (1 − 𝑁𝑁) (𝑆𝑆 − 𝐷𝐷) (1
𝑣𝑣!"#the = potential divider 𝑣𝑣 = 𝑁𝑁𝑣𝑣&' =− =− 𝑣𝑣!"# 𝑅𝑅 𝑣𝑣 &' 𝑅𝑅
𝑁𝑁𝑅𝑅%$
% −1 𝑁𝑁)𝑅𝑅 %$ (1 − 𝑁𝑁)
(1 − 𝑁𝑁) + 𝑁𝑁 &' formula becomes: As the𝑣𝑣wiper &' moves 𝑁𝑁 from B (N 𝐷𝐷 = 0, D==10)+ $ = 1 + =
𝑣𝑣&' 𝑅𝑅 (1 − 𝑁𝑁)𝑅𝑅 (1 − 𝑁𝑁)
𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ to A (N = 1, D = S) the gain (according to % This also confirms %$ that the gain does not
𝑣𝑣!"# = 𝑣𝑣$ = 𝑣𝑣$𝑣𝑣 the(1 formula)
− 𝑁𝑁) changes
(𝑆𝑆 − 𝐷𝐷) from zero to minus depend on R . Just like above, we can
𝑅𝑅% + 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ + (1 − 𝑁𝑁)𝑅𝑅%$ !"# AB
=infinity,
− =−
although the effective value of also write this𝑣𝑣 formula 𝑆𝑆 using S and D:
𝑣𝑣&' 𝑁𝑁 𝐷𝐷 !"#
=
𝑅𝑅% simplifies
This (1 in− 𝑁𝑁)𝑅𝑅
a similar
%$ way to the RA will never be exactly zero (to give 𝑣𝑣!"# 𝑆𝑆 𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
𝑣𝑣!"# = 𝑣𝑣 = 𝑣𝑣$ =
+ 𝑅𝑅$ $ formula
𝑅𝑅%previous 𝑁𝑁𝑅𝑅%$ + to (1 give
− 𝑁𝑁)𝑅𝑅 %$ = (1 – N)vB.
vout infinite gain) due to the resistance of 𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
Adding the 𝑣𝑣!"#two
= 𝑁𝑁𝑣𝑣 contributions
% + (1 − 𝑁𝑁)𝑣𝑣$
gives the digipot A terminal. Similarly, the gain
output voltage for the circuit in Fig.4 as: with D = 0 will be non-zero, but there As the wiper moves from B (N = 0, D = 0)
will be significant attenuation. In practice, to A (N = 1, D𝑣𝑣=!"#S)=the 1 gain
=
𝑆𝑆 (according to
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣% + (1 − 𝑁𝑁)𝑣𝑣$ very large gains are likely to cause the op 𝑣𝑣!"# 1 𝑆𝑆 &'
the formulae) 𝑣𝑣
changes 𝑁𝑁 𝐷𝐷
from 1 to infinity
𝑣𝑣!"# 𝑅𝑅( = =
amp output to saturate near the supply (the
𝑣𝑣&' op-amp
𝑁𝑁 𝐷𝐷 will saturate at very large
=−
Again, note that𝑣𝑣&' this does 𝑅𝑅) not depend on voltage (signal clipping). gains). Like the inverting circuit, the
the digipot RAB, only on the wiper position With D = S – 1 we get a gain of –(S – relationship between D and the gain is
𝑣𝑣 𝑅𝑅 𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝐷𝐷𝑅𝑅%$
(N). We!"# will=− use(this formula later. 1) (substitute D = S – 1 in the formula non-linear, = the=form of=the relationship
but
𝑣𝑣&' 𝑅𝑅) 𝑣𝑣!"# is𝑅𝑅different 𝑣𝑣%$
𝑁𝑁𝑅𝑅 &' 𝑅𝑅) %$ 𝑅𝑅)
𝐷𝐷𝑅𝑅 𝑆𝑆𝑅𝑅)
above), which may be very large for =
$
= –
= it is not simply a positive-
Op amp amplifiers 𝑣𝑣!"# 𝑅𝑅( digipots with a large numbers of steps𝑣𝑣&' gain 𝑅𝑅) version 𝑅𝑅) of the 𝑆𝑆𝑅𝑅)same behaviour. Unlike
=1+
Fig.5 and Fig.6 𝑣𝑣&'show the 𝑅𝑅* schematics of (eg, S = 1024). With D = S/2 (at N = 0.5)
the well-known
𝑣𝑣!"# 𝑅𝑅(basic op amp amplifier we get unity inverting gain (–1). For D D (wiper position input)
𝑣𝑣+ = −𝐺𝐺𝑣𝑣&'
circuits –=the1 +inverting (Fig.5) and non- less than S/2 the circuit attenuates, and
𝑣𝑣&' 𝑅𝑅* 𝑣𝑣+ = −𝐺𝐺𝑣𝑣&'
Digipot
inverting (Fig.6) configurations. The gain for D greater than S/2 it amplifies. The
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝑁𝑁 RA
W
RB
of the=inverting − = −amplifier is given = − by: variation of gain with D is nonlinear – we Vin
𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁) A B
will discuss this in more detail later. The 𝑣𝑣!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&'
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝑁𝑁 rapid increase in gain at larger D values 𝑣𝑣!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&'
=− =− = − RF means that the choice of specific gain
𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁) CC
𝑣𝑣!"#
RI 𝐷𝐷 values is limited in this part of the range. –
=− – The capacitor CC shown in Fig.7 is 𝑣𝑣!"# 𝐷𝐷 Vout
Vin 𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷) = 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺+= (𝐺𝐺 + 1) − 𝐺𝐺
Vout a compensation capacitor across 𝑣𝑣!"#the 𝑣𝑣&' 𝐷𝐷 𝑆𝑆
𝑣𝑣!"# 𝐷𝐷 + = 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = (𝐺𝐺 + 1) − 𝐺𝐺
feedback resistance that may be required 𝑣𝑣&' 𝑆𝑆
=−
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷) to overcome instability caused by the
(1 − 𝑁𝑁) effect of the capacitance of the digipot Fig.7. Inverting op amp amplifier with
𝑣𝑣!"# (𝑆𝑆 − 𝐷𝐷) 𝑣𝑣!"#control. 2𝐷𝐷
Fig.5. Inverting = − op amp = −
amplifier. inputs on the op amp. Typically, it will digipot gain = 2𝑁𝑁 − 1 = −1
𝑣𝑣&' 𝑁𝑁 𝐷𝐷 𝑣𝑣&' 2𝐷𝐷 𝑆𝑆
𝑣𝑣!"#
= 2𝑁𝑁 − 1 = −1
𝑣𝑣!"# (1 − 𝑁𝑁)
Practical (𝑆𝑆 −
| 𝐷𝐷) 𝑣𝑣&' 𝑆𝑆
= − Electronics
=− February | 2023 57
𝑣𝑣&' 𝑁𝑁 𝐷𝐷
+
Vin
Vout

Digipot

RA RB

A W B

D (wiper position input)

Fig.8. Op amp non-inverting amplifier with


digipot control.
the inverting version, the non-inverting
version does not attenuate for any D values
– the minimum gain setting is unity (one).
!"# 𝑅𝑅$ At D = S/2 𝑁𝑁𝑅𝑅the
%$ gain is 12. The number of
=1+ =1+ =
&' 𝑅𝑅% possible (1 − 𝑁𝑁)𝑅𝑅%$ (1gain
amplifying − 𝑁𝑁)values is twice
that of the inverting circuit, giving finer
amplification control for a given number
of wiper steps, provided attenuation is
𝑣𝑣!"# 𝑆𝑆
not needed.
=
𝑣𝑣&'
If we(𝑆𝑆 switch
− 𝐷𝐷) the digipot A and B
terminals around (for the circuit in Fig.8),
and rework the formula we get:
𝑣𝑣!"# 1 𝑆𝑆
= =
𝑣𝑣&' 𝑁𝑁 𝐷𝐷

As before, this reverses the order of the


D-to-gain relationship and produces
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅the
exactly 𝐷𝐷𝑅𝑅%$ set of possible gain
%$ same
= = =
𝑣𝑣&' values.
𝑅𝑅) At
𝑅𝑅) D = S the
𝑆𝑆𝑅𝑅)
gain is 1, at D = S/2
the gain is 2 and at D = 1 the gain is S.
Fig.10. Simulation results for the circuit in Fig.9.
LTspice simulations
𝑣𝑣+ = shows
Fig.9 −𝐺𝐺𝑣𝑣&' an LTspice schematic for the digipot resistance as specified by the simulation setup is the same as for the
simulating the inverting amplifier with Rdigipot parameter in the simulation. inverting amplifier (Fig.9). Plots of N
digipot gain setting, with the digipot The lower pane shows the gain, which and the RA and RB resistor values are the
modelled using the approach shown in varies from 0 to –31, as indicated by same as in Fig.10. The gain plot is shown
𝑣𝑣!"# =Fig.2. − (1 digipot
𝑁𝑁𝑣𝑣&' The − 𝑁𝑁)𝐺𝐺𝑣𝑣&'
is configured to have 33 the formula given above for N = 0 to in Fig.12. The gain varies from 1 to 32,
wiper settings (S = 32) and the simulation 31/32. The gain is 1 for N = 0.5 (D = 16, as indicated by the formula given above,
is run for 32ms with N stepped every at 16ms), again confirming the formula. for N ranging from 0 to 31/32. The gain
𝑣𝑣!"# 1ms from N𝐷𝐷= 0 to N = 31/32 = 0.96875, As discussed earlier, the variation of is 2 for N = 0.5 (D = 16, at 16ms). As for
= 𝑁𝑁(𝐺𝐺 avoiding
+ 1) − 𝐺𝐺 =the (𝐺𝐺 + 1) −gain
infinite 𝐺𝐺 case for N = 1. gain is not linear with N, which may be the inverting amplifier, the gain does not
𝑣𝑣&' 𝑆𝑆
The input is 0.1V DC, so that it is easy to useful in some applications but makes vary linearly with N.
plot the gain as: V(out)/V(in). the circuit unsuitable for many other
The simulation results are shown in applications. The non-linearity is not Alternative circuits
𝑣𝑣!"# Fig.10. The upper
2𝐷𝐷 pane shows N, the wiper strictly logarithmic, so the gain steps are As noted, the non-linear D-to-gain
= 2𝑁𝑁 − 1 = −1
𝑣𝑣&' position control.𝑆𝑆 The middle pane shows not in a fixed number of decibels, as might relationship for the circuits discussed
the two resistor values (RA and RB) – it can be required in applications such as audio. above may make them unsuitable in
be seen than these vary between 0 and Similar to Fig.9, Fig.11 shows an LTspice some applications. One possibility is
10kΩ in opposite directions as N varies schematic for simulating the non-inverting to add fixed resistors to both ends of
(the total RA + RB is always 10kΩ which is amplifier with digipot gain setting. The the digipot; for example, see Fig.13.
The arrangement
was discussed last
month for a basic
potentiometer. It
reduces the control
range, increasing
resolution within
that range (so it
is more likely
that a wiper step
can provide the
required value).
The D-to-gain
relationship is
Fig.9. LTspice schematic for inverting op amp amplifier with digipot gain control. more linear within

58 Practical Electronics | February | 2023


Analog Devices provide
some digipots, such as the
AD5124, with a ‘linear
gain mode’ designed
to overcome this issue.
These devices allow
individual control of
the R A and R B resistor
values in a single digipot,
so it can be used in a
similar way to the circuit
in Fig.14 (one resistor
effectively fixed, the other
varied to set the gain).

𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 1


Linear gain in
=1+ =1+ =
potentiometer mode
𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁)
The circuit in Fig.15 is
Fig.11. LTspice schematic for non-inverting op amp amplifier with digipot gain control.
an inverting amplifier
with fixed gain resistors RF and RI, as in
𝑣𝑣Fig.5,
!"#
so𝑆𝑆 the gain from vin to vx is –RF/
= digipot is connected between v
𝑣𝑣R&'I. A (𝑆𝑆 − 𝐷𝐷) in
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅 1
= 1and + vx=forming a potential
%$
1+ = divider whose
𝑣𝑣&' output 𝑅𝑅% (v (1 − 𝑁𝑁)𝑅𝑅
) is buffered
%$ (1by
− 𝑁𝑁)
the1unity-
𝑣𝑣!"# 𝑅𝑅$out 𝑁𝑁𝑅𝑅%$
gain = 1op + amp = 1amplifier
+ (A2)= to prevent
𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁)
𝑣𝑣loading
!"# 1 of 𝑆𝑆 the digipot and reduce the
= =
𝑣𝑣&'
effect 𝑁𝑁 𝐷𝐷
of wiper resistance. This circuit is
𝑣𝑣!"# 𝑆𝑆
based on a=design by Alan Li published
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
in Analog 𝑣𝑣Devices’ !"# 𝑆𝑆 technical journal
Analog Dialogue = (35-3 (2001)).
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
𝑣𝑣!"# 𝑅𝑅$Op𝑁𝑁𝑅𝑅 %$ 𝐷𝐷𝑅𝑅%$
= = amp =A1 amplifies vin by the gain
𝑣𝑣&' 𝑅𝑅) by 𝑅𝑅 𝑆𝑆𝑅𝑅
set ) fixed
𝑣𝑣!"# 1 )resistors
the 𝑆𝑆 RF and RI with
gain –R𝑣𝑣F/RI (as = =in Fig.5). If we define G =
Fig.12. Simulation results for the circuit in Fig.11. &' 𝑁𝑁 𝐷𝐷
RF/RI we can𝑣𝑣write !"# 1 output
the 𝑆𝑆 of A1 (vx) as:
= =
𝑣𝑣&' 𝑁𝑁 𝐷𝐷
𝑣𝑣+ = −𝐺𝐺𝑣𝑣&'
the reduced range, but, as was discussed The gain is linearly dependent on N (or
last month, there is some dependence on D) but is also dependent on RAB, so it 𝑣𝑣!"# digipot
The 𝑅𝑅$ 𝑁𝑁𝑅𝑅 %$ as𝐷𝐷𝑅𝑅
acts a %$
potential divider
= = =
the RAB resistance with this arrangement, will be subject to the tolerance variations 𝑣𝑣&'
connected 𝑅𝑅) 𝑅𝑅)
between 𝑆𝑆𝑅𝑅v) in and v x – it is
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 1 𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝐷𝐷𝑅𝑅%$
= 1so
+ potentially
=1+ a reduction
= in accuracy of the digipot resistance, reducing the a non-grounded
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣 &' −𝑣𝑣(1 − =𝑁𝑁)𝐺𝐺𝑣𝑣 = potential = divider as
𝑣𝑣&' 𝑅𝑅% (1 − 𝑁𝑁)𝑅𝑅%$ (1 − 𝑁𝑁) &' 𝑅𝑅) &' 𝑅𝑅 ) 𝑆𝑆𝑅𝑅) which v
and not all possible values can be set accuracy of gain setting. discussed above (Fig.4) for A
with all devices. A similar effect can be This problem can be overcome by using = vin and vB = vx = –Gvin. Substituting
achieved with a resistor in parallel with two digipots to control both gain-setting these values 𝑣𝑣+ = −𝐺𝐺𝑣𝑣into
&' the formula for the

the digipot, or𝑆𝑆a combination of series resistors using an IC with more 𝑣𝑣!"#than non-grounded 𝐷𝐷 potential divider given
𝑣𝑣!"# = 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = (𝐺𝐺 𝑣𝑣+ +
= 1)−𝐺𝐺𝑣𝑣
− &'
𝐺𝐺
and parallel = resistors. 𝑣𝑣&'
one digipot on chip. Digipot resistors above we 𝑆𝑆get:
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
Another solution to the linearity issue on the same chip are well matched, so
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&'
is to use the digipot for one of the gain although the device-to-device variation
setting resistors, with a fixed resistor for may be large, the ratio of two rheostat- From𝑣𝑣which we obtain the following
!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&'
𝑣𝑣!"# formula 2𝐷𝐷gain in terms of N, or D and
𝑣𝑣!"#An1example
the other. 𝑆𝑆 is shown in Fig.14 mode digipots on the same chip will = 2𝑁𝑁 − 1 = for −1
= = 𝑣𝑣&' S (using N 𝑆𝑆= D/S):
𝑣𝑣&' the𝑁𝑁digipot
– this uses 𝐷𝐷 in rheostat mode as be accurate (for example, typically less 𝑣𝑣!"# 𝐷𝐷
the RF resistor in an inverting amplifier, than 1% error). The disadvantage of this𝑣𝑣 = 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = 𝑆𝑆 (𝐺𝐺 + 1) − 𝐺𝐺
&'
with a fixed RI resistor. The gain is: approach is that it requires two digipots 𝑣𝑣!"# 𝐷𝐷
= 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = (𝐺𝐺 + 1) − 𝐺𝐺
to control one amplifier, increasing cost 𝑣𝑣&' 𝑆𝑆
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝐷𝐷𝑅𝑅%$ and complexity.
= = =
𝑣𝑣&' 𝑅𝑅) 𝑅𝑅) 𝑆𝑆𝑅𝑅) 𝑣𝑣!"# From 2𝐷𝐷 this we see the gain
= 2𝑁𝑁 − 1 = −1
𝑣𝑣&' 𝑆𝑆
is linearly dependent on N
D (wiper position input) 𝑣𝑣!"# 2𝐷𝐷
(or D)
= 2𝑁𝑁 − 1 = and does
− 1not depend
D (wiper position input)
Digipot 𝑣𝑣&' on the digipot 𝑆𝑆 R resistance,
AB
𝑣𝑣+ = −𝐺𝐺𝑣𝑣 &'
Digipot
RI RA RB so this circuit can provide
W
R2 RA
W
RB R1 Vin accurate linear gain control.
A B
Vin Unlike the previous circuits
A B

𝑣𝑣!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&' which only feature one



– polarity of gain, the gain can
Vout
Vout be set to be either positive
+
+
(non-inverting) or negative
𝑣𝑣!"# 𝐷𝐷 (inverting), ranging from –G
= 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = (𝐺𝐺 + 1) − 𝐺𝐺
𝑣𝑣&' 𝑆𝑆 at N = 0 (D = 0) to +1 at N =
Fig.13. Adding series resistors to the digipot Fig.14. Linear gain control using a digipot in 1 (D = S). There are also no
increases linearity and resolution. rheostat mode. ‘infinite gain’ cases.

𝑣𝑣!"#
Practical 2𝐷𝐷 | February | 2023
Electronics 59
= 2𝑁𝑁 − 1 = −1
𝑣𝑣&' 𝑆𝑆
𝑣𝑣!"# 𝑆𝑆
=
𝑣𝑣&' (𝑆𝑆 − 𝐷𝐷)
This arrangement provides the most
symmetrical control of inverting and non-
– inverting gains with a range of –1 to +1. By
𝑣𝑣!"# 1 𝑆𝑆 A2 Voutb using a standard non-inverting amplifier,
= =
𝑣𝑣&' 𝑁𝑁 𝐷𝐷 + with gain A, in place of the buffer (A2
Vout
Digipot
in Fig.15) the gain of the circuit can be
RA RB controlled over any reasonable range of –A
A W B
to +A. On the other hand, RF and RI do not
𝑣𝑣!"# 𝑅𝑅$ 𝑁𝑁𝑅𝑅%$ 𝐷𝐷𝑅𝑅%$ have to be fixed resistors – another digipot
= = =
𝑣𝑣&' 𝑅𝑅) D (wiper
𝑅𝑅) 𝑆𝑆𝑅𝑅) could be used here (as in Fig.7) to provide www. poscope. com/ epe
position input) RF
a wider range of possible gain settings.
RI Fig.16 shows an LTspice schematic
Vin – based on the circuit in Fig.15. The buffer
𝑣𝑣+ = −𝐺𝐺𝑣𝑣&' A1 VX
is not included as we are just measuring
+
the output and there is no loading or
wiper resistance present in this model.
𝑣𝑣!"# = 𝑁𝑁𝑣𝑣&' − (1 − 𝑁𝑁)𝐺𝐺𝑣𝑣&' The results are shown in Fig.17 and
confirm the linear variation of gain from
Fig.15. Linear gain control using a digipot –1 to +1 as N ranges from 0 to 1.
in potentiometer mode.
𝑣𝑣!"# 𝐷𝐷
= 𝑁𝑁(𝐺𝐺 + 1) − 𝐺𝐺 = (𝐺𝐺 + 1) − 𝐺𝐺 Simulation files
𝑣𝑣&' If we use equal 𝑆𝑆resistors for RF and RI
then G = 1, so the gain formulae for Fig.15 Most, but not every month, LTSpice
simplifies to: is used to support descriptions and
analysis in Circuit Surgery.
𝑣𝑣!"# 2𝐷𝐷 The examples and files are available
= 2𝑁𝑁 − 1 = −1
𝑣𝑣&' 𝑆𝑆 for download from the PE website.

- USB - PWM
- Ethernet - Encoders
- Web server - LCD
- Modbus - Analog inputs
- CNC (Mach3/ 4) - Compact PLC
- IO

- up to 256 - up to 32
microsteps microsteps
Fig.16. LTspice simulation schematic for circuit in Fig.15. - 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
decoder, Signal generator
Fig.17. Simulation results for the circuit in Fig.16.

60 Practical Electronics | February | 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 [email protected]
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 | February | 2023 61


Max’s Cool Beans
By Max the Magnificent

Arduino Bootcamp – Part 2

I
don’t know about you, but I’m an exhaustive list. You should use your illuminate), its anode (a) terminal must
really excited to be writing this series logbook to keep track of anything that be at a higher (more positive) potential
of Arduino Bootcamp columns. The might conceivably be of use in the future. than its cathode (k) terminal. (In the
only problem is that I have so many For example, algorithms, equations and case of an individually packaged LED,
thoughts bouncing around in my poor formulas (eg, calculating the value of an the cathode terminal is the shorter lead
old noggin that I don’t know where to LED’s current-limiting resistor), suppliers located on the flat side of the package.)
start. I’ll tell you what, let’s kick off by and part numbers (and prices) of com- By comparison, resistors are non-polar-
lighting up some more LEDs because ponents, experiments you may wish to ised, which means we can happily con-
doing so rarely fails to delight, but first... perform and projects you may want to nect them either way round.
build in the future… the list goes on. In my previous column (PE, Janu-
Captain’s log ary 2023), when we came to set up our
I meant to make mention of this before, Is it ‘a LED’ or ‘an LED’? breadboard, we located our current-lim-
but I was so excited by the thought of a When I pen my columns, I usually say iting resistor between the LED’s anode
flashing LED that it went clean out of my ‘a LED.’ Later, however, when I come to and the 5V rail (Fig.1a). Had we wished,
mind. Engineers (the good ones) always check the final laid-out piece, I find that however, we could have placed this re-
keep a logbook in which they record PE’s editor and publisher, the nefarious sistor between the LED’s cathode and
items like ideas, decisions, settings and illustrious Matt Pulzer, has replaced these the GND (0V) rail (Fig.1b). Either way,
results, to name but a few. instances with ‘an LED.’ the LED would turn on and light up. (If
In the case of decisions, for example, Which of us is in the right? Well, as your LED is too bright, you can increase
if you can think of three ways to do fate would have it, both styles are cor- the value of your current-limiting resis-
something, make brief notes describ- rect. It all depends on whether the writer tor, which will decrease the current and
ing those techniques (or just list them (or speaker) is thinking ‘LED’ to rhyme dim the LED.)
if they are well known to you). Also, in with ‘bed,’ in which case ‘a LED’ is the You may wonder why I’m taking the
addition to recording the approach you appropriate usage, or if we are thinking of time to waffle on about this here. All will
decided to use and why you opted for it as being spelled out as ‘L-E-D’ (which become clear in the fullness of time when
this choice, note your reasons for not sounds like ‘ell-ee-dee’), in which case we start to talk about ‘common-anode’
using the other options. ‘an LED’ is the way to go. and ‘common-cathode’ devices contain-
With respect to settings, one example ing multiple LEDs.
is my laser cutter and engraver. When Who’s on top?
I’m experimenting with new materi- Are you, like me, thinking of the classic 7-segment displays
als and different head speeds and laser ‘Who’s on first?’ comedy routine made The first light-emitting diodes (LEDs) to
power values, I note down what works famous by American comedy duo Abbott display in the visible spectrum appeared
(and what doesn’t) for future reference. and Costello? Well, this is nothing to do on the scene in 1962. At that time, you
When it comes to experiments, in ad- with that. could have any colour you wanted, just
dition to documenting the test setup (a Remember that LEDs are polarised so long as that colour was red. For the
few sketches and/or photographs never components, which means the way in first few years these devices were horren-
hurts), don’t record only the results which they are connected is important. dously expensive, depleting one’s bank
you were expecting (hoping) to see, For an LED to turn on and conduct (and account by around $200 apiece (Eeek!).
but also keep track
of anything that went
awry. Sometimes,
years later, you’ll 5V 5V
learn something a
new and think, ‘Just
k
a moment, I wonder a
if…’ As Isaac Asimov
k
famously said, ‘The
GND GND
most exciting phrase
to hear in science, the
one that heralds new
From GND From GND
discoveries, is not Arduino 5V Arduino 5V
Eureka! (I found it!)
(a) Resistor on LED’s anode (b) Resistor on LED’s cathode
but, ‘That’s funny…’
The points I just
mentioned don’t form Fig.1. It doesn’t matter ‘who’s on top.’ Fig.2. 7-segment display.

62 Practical Electronics | February | 2023


By the early 1970s, however, the price The segments are
GND
had fallen in the US to around five cents referred to by the let- G F A B
each, which was much more affordable. ters A to G. An op-
These days, of course, you can pick them tional decimal point 10 9 8 7 6 Multiple anodes
up for just a couple of cents in the US (an ‘eighth segment’, A
(or pennies in the UK), which makes referred to as ‘DP’) is 7 6 4 2 1 9 10 5
F B
me very happy indeed (as I always say, used for the display of A B C D E F G DP

‘Show me an LED flashing and I’ll show non-integer numbers. G


you a man drooling’). Each segment has its
A 7-segment display is a form of elec- own LED. E C GND

tronic device whose primary purpose The reason we call 3,8


D DP
is to display the decimal numerals 0 this a ‘single-digit dis- Common cathode
1 2 3 4 5
through 9. Each segment has its own play’ is that it can dis-
source of illumination. As early as 1910, play only a solitary E D C DP
a 7-segment display illuminated by in- numeral (it’s possi- GND
candescent bulbs was used on a signal ble to get displays
panel in the boiler room of a power- boasting two, four, Fig.3. Segment names and pin numbers for our 7-segment display.
plant. LED-based 7-segment displays or more characters).
started to appear on the scene circa the The reason we employ the ‘common- only option is to use a separate current-
early 1970s. Almost immediately, they cathode’ nomenclature is that all the limiting resistor for each LED.
began to pop up in things like pieces of LED cathodes are connected together Make sure your Arduino is powered
test equipment, 4-function calculators, inside the device. In the case of our com- down (ie, not connected to your com-
and wrist watches (anyone brandishing ponent, the common cathode is brought puter via its USB cable). Also, make sure
such a watch was deemed to be a king, out on two pins (3 and 8), either or both that the green LED on the breadboard is
or queen, of cool). of which can be connected to GND (0V). wired up as shown in Fig.1a or Fig.1b.
These displays come in all sorts of Now plug your 7-segment display into
shapes, sizes and configurations. In the Testing the segments by hand your breadboard (Fig.5). Next, use two
case of single-digit displays, for example, Before we connect this display to our black jumper wires to connect pin 3 of
some have their pins positioned down Arduino Uno, let’s make sure that (a) the display to the lower GND rail and
the sides, while others – like the ones this is indeed a common-cathode dis- pin 8 to the upper GND rail. Why con-
we’ll be using – have their pins located play, (b) all of the segments work, and nect both these pins since they are al-
at the bottom and the top (Fig.2). (c) we’ve assigned the correct pin num- ready connected inside? Why not? The
In Part 1 of this series, I mentioned bers to the segments. advantage of connecting both is that it
that I found a pack of 10 single-dig- The first point to note is that we’re provides us with some redundancy. If one
it common-cathode 7-segment dis- going to need a separate current-limiting of our black jumper leads is bad (broken
plays for £7.49 on Amazon in the UK resistor for each LED (Fig.4). If you cast inside), for example, then the other will
(https://amzn.to/3Afm8yu). I’m using your mind back to our earlier discussions suffice. Do we really need both in this
something similar that I found on Amazon where we stated, ‘It doesn’t matter who’s case? No. But if I were creating a safety-
in the US, which is where I currently on top,’ you may be wondering why we critical or mission-critical system and I
hang my hat (https://amzn.to/3GgxJAT). can’t use just one resistor on the cath- had the opportunity to use two connec-
How do we determine which pins are ode. In fact, we could if all of the LEDs tions, I would do so, ‘just in case’ (this
connected to what? That’s a good ques- are identical (which they are) and if we is a good mindset to adopt).
tion; I’m glad you asked. Sad to relate, wished to light only a single segment at The Amazon webpage associated with
the entries for these components on a time (which we don’t). the 7-segment displays I’m using notes
Amazon don’t have any useful infor- Let’s play a thought experiment. Let’s that each LED’s forward voltage (VF) is
mation to impart on this topic. Printed consider what would happen if we were to 2V and its forward current (IF) is 20mA
on the bottom of my own devices I see connect a single current-limiting resistor (0.02A). This is typical for red LEDs of
the legend ‘CL5611AH.’ I had a quick to our common cathode. Each LED that’s this type, so we’re reasonably safe to
Google (it’s alright, no one was looking) active will draw current. One active LED assume that it also applies to your display.
searching for ‘CL5611AH Datasheet’ will draw a certain amount of current, two We discussed the equation we use to
and found one (https://bit.ly/3hKOpq2) active LEDs will draw more current, and calculate the value of our current-limiting
that contained almost everything one so on (I’m simplifying a bit here). The volt- resistor in our first column. Since we are
might wish to know… apart from the age dropped across a resistor is a function working with a 5V supply, the current-
pin assignments. Next, I searched for of the current passing through that resis- limited resistors we need to use here are
‘CL5611AH Pinout,’ which led me to tor. Since the value of our resistor is fixed,
a bunch of useful diagrams, allowing from Ohm’s law (V = I × R) we know that 5V
me to create my own representation increasing current will increase the volt-
(Fig.3). (This is the sort of thing you age being dropped across the resistor. In
might want to document in your engi- turn, this will result in less voltage being
neer’s logbook.) available for the LEDs, which will result 7 6 4 2 1 9 10 5

As we see, the segments are arranged in dimmer segments. The result is that the A B C D E F G DP
as a rectangle formed from two vertical brightness of the characters will depend
segments on each side accompanied by on the number of segments used to form
GND
one horizontal segment on the top, in the them. The number 1 (which is formed by
middle and at the bottom. In the physical lighting two segments), for example, will 3,8

device, this rectangle is often presented be brighter than the number 8 (which GND

in an oblique (slanted) fashion, which is requires all seven segments). Since we


aesthetically pleasing and aids readabil- really want all our characters to be dis- Fig.4. Each LED requires its own current-
ity. Think of it as slightly ‘italic’. played with the same brightness, our limiting resistor.

Practical Electronics | February | 2023 63


Jumper wire
wrong, we wired things up incorrectly,
we used a common-anode display by
F A
mistake…) or is there something skew-
whiff with our software?
G B
This is the same problem profession-
F A al engineers face when designing real-
G B
world systems. The solution is to (as E DP
far as possible) divide the problem into
smaller ‘chunks’ and to take things one D C
step at a time.
E DP
D C In our case, except for the flying lead,
we would have wired things up as shown
in Fig.5 anyway. Performing the hand test-
From GND
Arduino
ing literally added no more than a minute
5V
to the overall process, but – in addition

AREF
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
TX-1
RX-0
GND
to being fun in its own right – the result DIGITAL IN/OUT (PWM ~)
Fig.5. Wiring up the breadboard.
of this testing means we now have a high
calculated as (5V – 2V) / 0.02A = 150Ω. level of confidence that our hardware works
This value of resistor will have brown- as expected. In turn, this means we can Fig.6. Connecting the Arduino.
green-brown colour bands. devote our full attention to the software. and 0 on the Uno circuit board; TX =
Add eight of these resistors to the eight Transmit and RX = Receive.) When we
pins on the display that are connected Preparing to use the Arduino upload programs from our host computer
to the A through G and DP segments, Unplug the USB cable from your Ar- to the Arduino, for example, the system
as illustrated in Fig.5. Earlier, we noted duino, remove the flying lead from the uses these pins to do the job.
that resistors are non-polarised, which breadboard and add eight jumper wires Now, plug your USB cable back into
means we can happily connect them to connect the display to the Uno, as il- your Uno. As you may recall, our final
either way round, so why have I shown lustrated in Fig.6. I’ve shown these jump- program in Part 1 of this series flashed
them all connected in the same way in ers as all being orange in this diagram an LED connected to digital I/O pin 6. If
this figure (and why do I do the same on for simplicity. In the real world, with my this program is still loaded in your Uno,
my breadboard in the real world)? One own setup, I used two groups of purple, you should see segment D flashing on
reason is that I find this to be aestheti- orange, yellow and blue wires because your 7-segment display.
cally pleasing. (Also, like many engi- this makes it a lot easier to check what’s I’m sorry, I need a moment… flashing
neers, I have a hint of a sniff of a whiff connected to what (and what isn’t) if LED… man drooling… and I’m back.
of the obsessive-compulsive about me!) things don’t work as expected. In our very first program in Part 1, we
We’re almost there, plug one end of a The reason we are using digital I/O explicitly specified the number of the
red jumper wire into the 5V power rail pins 2 to 9 on the Uno (as opposed to digital I/O pin we wanted to use when
and leave the other end as a flying lead, pins 0 through 7) is that, even though we called the pinMode() and digi-
as shown in Fig.5. Now power up your we always say this microcontroller has talWrite() functions. Later, we used
Arduino and make sure the green LED 14 digital pins numbered from 0 to 13, a #define preprocessor directive to as-
on your breadboard is lit, thereby inform- in practice we typically reserve pins 0 sociate a constant label we called PIN_
ing us that power is still making its way and 1 to perform any serial communica- LED with the number 6 (Line 1 in Listing
to the board. Plug the loose end of the tions with our host computer. (Observe 1a). Another technique is to declare the
flying red lead into the hole marked ‘A’ the annotations associated with pins 1 pin we wish to use as being a variable
in Fig.5, and make sure that the A
segment lights up (any hole in this
column will suffice). Repeat this for
all the other segments to confirm
our display is tickety-boo. Now
we’re really ready to rock n’ roll!

Divide and conquer


In the preceding section we tested
our display’s segments by hand. In
the following sections we’re going
to drive them using our Arduino
Uno. So, why did we bother with
the hand-testing?
Well, suppose we had omitted
the hand testing and proceeded
directly to Arduino control. Now,
suppose we created a program to
drive the display, ran it, and…
nothing happened. Here we sit
with a display that’s doing nothing
furiously. What’s our next move?
The issue we have now is that we
don’t know where the problem is (a) PIN_LED as a constant (b) PinLed as an integer variable
– perhaps there’s something wrong
with our hardware (we got the pins Listing 1. Alternative ways of defining the pin we wish to use.

64 Practical Electronics | February | 2023


of type int (inte-
Name Name Associated segments
A B C D E F G DP
ger) and assign it
PinLed 6 PinsSegs 2 3 5 6 7 9 8 4 a value of 6. Let’s
Index 0 1 2 3 4 5 6 7 call this variable
(a) Single integer (b) Array of eight integers PinLed (Line 4 in
Listing 1b). Remem-
Fig.7. Single-integer variable vs. array of integers. ber that we need to
use a semicolon ‘;’ character to terminate this statement (we don’t
need semicolons with #define directives).
In the case of the #define approach, before the nitty-gritty com-
pilation commences, the preprocessor will replace any instances
of PIN_LED it sees in the body of the program with the number 6.
By comparison, in the case of our new technique, when we com-
pile and run the program, wherever we reference PinLed, the
program will use whatever value is currently assigned to PinLed
(the number 6, in this example).
It’s best that you enter this new version of our program by hand
(you need the practice) into your Arduino integrated development
environment (IDE), then upload it into your Uno and ensure that
segment D on your display is still flashing. Should you run into
any problems, you can download my version of Listing 1b (file
CB-Feb23- 01.txt) from the February 2023 page of the PE website:
https://bit.ly/pe-downloads

Being conventional
Any of our own names and labels that we declare in a C/C++ pro-
gram can contain any mixture of uppercase and lowercase alpha
characters (‘a’ to ‘z’ and ‘A’ to ‘Z’), numeric characters (‘0’ to ‘9’),
and underscore ‘_’ characters (no spaces or other symbols). Also,
they must start with an alphabet character or an underscore char-
acter, not with a number. Listing 2. Using an array of pins.
You will find that your life is a lot easier if you adopt a naming Although simple to understand, this would quickly become
convention and stick to it. This will greatly facilitate your reading a pain because we would be obliged to capture the rest of
and the understanding of your code in the future. If you end up our code in a verbose style. Try writing a program to turn
writing programs for a company, they will detail the convention each segment on and off using these individual variable
they wish you to use. In the case of your own programs, you can declarations and you’ll soon see what I mean. In fact, just
define your own rules. You don’t have to follow my convention, but for giggles and grins, I’ve written this program for you. It
I will say that I’ve evolved it over many years (and many mistakes). came in at 66 lines of code (file CB-Feb23-02.txt).
First, in the case of #define constant labels like PIN_LED, There’s a better way. What we are going to do is create
based on what I’ve seen from my professional programmer friends, an array of integers called PinsSegs[] in which we can
I use only uppercase alpha characters along with numbers and store the numbers of all the pins associated with the seg-
underscores. By comparison, in the case of variable names like ments. Since we know that our display has eight segments
PinLed, I use a typographical convention known as ‘camel case’ (including the decimal point), we could employ the fol-
(sometimes stylised as ‘camelCase’ or ‘CamelCase’), in which lowing declaration:
words are separated by a single capitalised letter, such as Good-
GollyMissMolly, for example. int PinsSegs[8] = {2,3,5,6,7,9,8,4};
Furthermore, I use what’s called ‘upper camel case’ (a.k.a. ‘Pascal
case’ or ‘bumpy case’) with an initial uppercase letter for global However, using a raw numeric literal like 8 in this way with-
variables (like PinLed) that can be seen throughout the program. out any explanation as to its origin and meaning is not a good
By comparison, although this isn’t something we’ve done yet, I idea. Programmers call this sort of thing a ‘magic number’
use ‘lower camel case’ with an initial lowercase letter for local because it’s appeared from nowhere. In addition to making
variables (like myLed) that are declared inside a function and can programs less readable, using magic numbers (other than 0
only be seen within that function. or 1) also makes them more difficult to update and main-
tain. A better solution is shown in Listing 2, in which we
Driving each segment in turn use a #define to declare a constant called NUM_SEGS that
If we return to Fig.6, we see that our display segments are con- we associate with the number 8 (Line 3). We then use this
nected to our Arduino pins as follows: A = 2, B = 3, C = 5, D = definition as part of our integer array declaration (Line 5).
6, E = 7, F = 9, G = 8 and DP = 4. These connections fell out this We will consider this program in a little more detail in a
way because we wanted to make our diagram look pretty, but it’s moment. First, use the Arduino’s IDE to capture this code
resulted in an out-of-order sequence. Happily, this isn’t a prob- and upload it into your Arduino Uno, then sit back and
lem because we can easily resolve things in our code. bask in the joy of watching your display’s segments flash
One thing we could do would be to declare the pins driving on and off in turn following the sequence A, B, C, D, E, F,
each of our segments as individual integer variables, for example: G, DP (file CB-Feb23-03.txt).

int PinSegA = 2; An array of possibilities


int PinSegB = 3; Arrays can be a little bit tricky to wrap your brain around
int PinSegC = 5; the first time you see them, so let’s take a moment to ensure
: we’re all stomping our feet to the same drumbeat. Con-
etc sider our earlier program in which we declared an integer

Practical Electronics | February | 2023 65


Components (from Part 1)
LEDs (assorted colours) https://amzn.to/3E7VAQE
Resistors (assorted values) https://amzn.to/3O4RvBt
Solderless breadboard https://amzn.to/3O2L3e8
Multicore jumper wires (male-male) https://amzn.to/3O4hnxk
Components (from Part 2)
7-segment display(s) https://amzn.to/3Afm8yu

for (initialize; test; update)


{
// Body of the loop
}

The header comprises three semicolon-separated fields that we


might call initialise, test and update. We commence by per-
forming any initialisation. This step is performed only once
when the loop is first called. In our case, we declare an inte-
ger variable called iSeg and initialise it to 0.
As an aside, a lot of people use single-letter variables like i
and j to control these loops. This is certainly more concise,
but experience has taught me that its usually better to use a
minimum of three letters because this makes the code more
meaningful and reduces errors.
The test is used to evaluate a condition. In our case, this in-
volves testing that the current value of iSeg is less than NUM_
SEGS, which we defined as being 8. This test is performed at
the start of each iteration of the loop. If the test fails (ie, re-
Listing 3. Introducing the random() function. turns a ‘false’ value, where I’ll explain what we mean by ‘true’
and ‘false’ in a future column), then the loop terminates – oth-
variable PinLed and assigned it a value of 6. One way to vi- erwise, any statements in the body of the loop are executed.
sualise this is as a box containing an integer (the number 6 in After the body of the loop has been executed, the update por-
this example) as shown in Fig.7a. tion of the header is… well… updated. In our case, our update
By comparison, when we declare an array of integers like expression is iSeg++ (which is the same as saying iSeg =
our PinsSegs[], we can envisage this as comprising a collec- iSeg + 1). As soon as the update has been performed, the
tion of boxes sharing a common name. Since we’ve declared loop returns to re-evaluate its condition, and off we go again.
our array as being of size 8, these boxes are numbered 0 to
7, as illustrated in Fig.7b. If we wish to access any of these Feeling random
elements, we can do so using a combination of the variable As one final experiment for this column, let’s modify our pro-
name and an index into the array. For example, if we wanted gram to randomly turn the display segments on and off (Listing
to change the number of the pin associated with our DP seg- 3, file CB-Feb23-04.txt). As
ment from 4 to 11, we could do so using: we see, all this involves is
Online resources
us replacing the for() loop
For the purposes of this series,
PinsSegs[7] = 11; in the loop() function with
I’m going to assume that you
an integer variable called
are already familiar with fun-
Using arrays in conjunction with control constructs like for() iSeg – to which we assign
damental concepts like volt-
loops is incredibly powerful and facilitates the writing of concise a random value.
age, current and resistance. If
code. For example, the latest iteration of our program that cycles The random values are
not, you might want to start
through all the display segments requires only 27 lines of code. provided by another of the
by perusing and pondering
Arduino IDE’s suite of pre-
a short series of articles I
What’s that for? defined functions, which
penned on these very topics
As we see in Listing 2, we are using two for() loops – one is, not surprisingly, called
– see: https://bit.ly/3EguiJh
in our setup() function to define all of the pins in our array random(). This function
Similarly, I’ll assume you
to be of type OUTPUT, and the other in our loop() function accepts two ‘arguments’ (for
are no stranger to solderless
to turn each segment on and off in turn. the moment you may think
breadboards. Having said
Let’s consider these in a little more detail, starting with the of these as parameters) that
this, even if you’ve used these
fact that a for() loop is a flow control statement that allows specify minimum and maxi-
little scamps before, there are
a block of code to be executed iteratively (repeatedly). This mum values for the random
some aspects to them that can
statement has two parts: a header that specifies and controls number to be generated. (If
trap the unwary, so may I sug-
the iteration, and a body that is executed once per iteration. only one argument is speci-
gest you feast your orbs on a
The general form of a for() loop is as follows: fied, this is taken to be the
column I wrote just for you
– see: https://bit.ly/3NZ70uF
Last, but not least, you will
Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he
find a treasure trove of resourc-
surveys at CliveMaxfield.com – the go-to site for the latest and greatest
es at the Arduino.cc website,
in technological geekdom.
including example programs
Comments or questions? Email Max at: [email protected] and reference documentation.

66 Practical Electronics | February | 2023


maximum value and the minimum value will default to 0.)
It’s important to note that the minimum value is inclusive
(ie, it will be included in the set of possible values) while the
maximum value is exclusive (ie, it will be excluded from the
set of possible values).
What does this mean in practice? Well, on Line 18 in Listing 3
we call random(0, NUM_SEGS). Remembering that we’ve de-
fined NUM_SEGS as being 8, this means we are effectively call-
ing random(0, 8), which will generate random numbers in
the range 0 to 7. Since our PinsSegs[] array has eight elements
numbered 0 to 7, everything works out just the way we want (and
that’s not something you tend to hear as often as you might wish).
Use the Arduino’s IDE to capture this latest incarnation of
our code and upload it into your Arduino Uno. Now, feast
your orbs on the display’s segments randomly turning on and JTAG Connector Plugs Directly into PCB!!
off. Observe that the display sometimes pauses on a particu-
lar segment. Do you have any idea why this is happening? In
No Header! No Brainer!
fact, this occurs when the newly generated random number
is the same as the old one because we haven’t (yet) included
a test to ensure this circumstance doesn’t occur.

What? Homework?
There’s so much more I wanted to talk about in this column,
but I think there’s more than enough here to keep you busy
for a while. What would be useful while we wait for Part 3 is
Our patented range of Plug-of-Nails™ spring-pin cables plug directly
for you to think about what segments we need to activate to into a tiny footprint of pads and locating holes in your PCB, eliminating
represent the digits 0 through 9 (we could create a 1 by light- the need for a mating header. Save Cost & Space on Every PCB!!
ing segments B and C, for example). Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
Perhaps you could create a table of digits and correspond- Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
ing segments. I’m sure I need not mention this (of course, I
will anyway), but this table would be something you could www.PlugOfNails.com
record in your logbook. Until next time, as always, I welcome Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
your insightful comments, perspicacious questions and saga-
cious suggestions.

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

Practical Electronics | February | 2023 67


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
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
PIC Programming Helper for 8-pin PICs only .................... 24106211 7.95 £11.95
PIC Programming Helper for 8, 14 or 20-pin PICs ........... 24106212 10.95
Advanced GPS Computer ................................................. 05102211 9.95 JUNE 2021
Roadies’ Test Signal Generator (surface-mount version) .. 01005201 £8.95
MAY 2022 Roadies’ Test Signal Generator (through-hole version) ..... 01005202 £9.95
Bus board PCB for Analogue Vocoder .............................. AO1-MAY22 10.95 Touchscreen Wide-range RCL Box (Resistor module) ...... 04104201
£18.95
Complete set of 14 PCBs for Analogue Vocoder ............... AO2-MAY22 97.95 Touchscreen Wide-range RCL Box (Ind/Cap module) ...... 04104202
Programmed EEPROM for Digital FX Unit ........................ FX1-MAY22 10.95 KickStart Part 3 – Gyrator-based Audio Filter.................... KS3-2021 £7.95
Programmed PIC for Digital FX Unit using potentiometer....FX2-MAY22 8.95
MAY 2021
APRIL 2022 7-Band Equaliser (Mono)................................................... 01104201 £8.95
64-key MIDI Matrix shield .................................................. 23101211 8.95 7-Band Equaliser (Stereo) ................................................. 01104202 £10.95
64-key MIDI Matrix switch board ....................................... 23101212 11.95 Car Altimeter ...................................................................... 05105201 £7.95
High-current Battery Balancer .......................................... 14102211 10.95
Digital FX Unit – using potentiometer ................................ 01102211 9.95
Digital FX Unit – using BCD switch ................................... 01102212 9.95
Universal Audio PSU ......................................................... AO1-APR22 11.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 | February | 2023


Double-sided | plated-through holes | solder mask

PROJECT CODE PRICE PROJECT CODE PRICE


APRIL 2021 MAY 2020
Reflow Oven – DSP Active Crossover (CPU).................... 01106193 Ultra-low-distortion Preamplifier Input Selector ......................... 01111112
£11.25
Reflow Oven – DSP Active Crossover (Front panel) ......... 01106195 £19.95 Ultra-low-distortion Preamplifier pushbutton Input Selector ..... 01111113
Reflow Oven – DSP Active Crossover (LCD) .................... 01106196 Universal Regulator .................................................................... 18103111 £7.95
Frequency Reference Signal Distributor.................................... CSE200103 £8.95 433MHz Wireless Data Repeater .............................................. 15004191 £8.50
Bridge-mode Adaptor for Amplifier ............................................. 01105191 £7.95
iCEstick VGA Terminal ................................................................ 02103191 £5.95
Analogue noise with tilt control ................................................... AO-0520-01 £7.95
Audio Spectrum Analyser ........................................................... PM-0520-01 £8.95
MARCH 2021
Nutube Guitar Effects Pedal .............................................. 01102201 £12.95
Programmable Thermal Regulator (Peltier Interface)........ 21109181 APRIL 2020
£18.95
Programmable Thermal Regulator (Peltier Driver) ............ 21109182 Flip-dot Display black coil board................................................. 19111181
Tunable HF Preamp .......................................................... CSE190502 £8.95 Flip-dot Display black pixels ....................................................... 19111182
£14.95
Flip-dot Display black frame ....................................................... 19111183
FEBRUARY 2021 Flip-dot Display green driver board ............................................ 19111184
4G Remote Monitoring ...................................................... 27111191 £9.95
MARCH 2020
JANUARY 2021 Diode Curve Plotter ........................................................... 04112181 £10.95
Nutube Valve Preamplifier ................................................. 01112191 £12.95 Steam Train Whistle / Diesel Horn Sound Generator ............... 09106181 £8.50
Arduino DCC Controller ..................................................... 09207181 £10.95 Universal Passive Crossover (one off) ...................................... UPC0320 £12.50

DECEMBER 2020
Pseudo-Random Sequence Generator ............................. 16106191 £7.95
Clever Charger .................................................................. 14107191 £11.95
PE Theremin Amplifier ....................................................... AO-1220-01 £8.95 For the many pre-2016 PCBs that we stock please see the
NOVEMBER 2020 PE website: www.electronpublishing.com
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
PE/EPE PCB SERVICE
LED Christmas Tree (20 off) .............................................. 16107181-4 £34.95 Order Code Project Quantity Price
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 .........................................................

OCTOBER 2020 .........................................................


Digital Audio Millivoltmeter................................................. 04108191 £9.95
Precision Signal Amplifier .................................................. 04107191 £7.95 .........................................................

SEPTEMBER 2020 .........................................................


PE Theremin PSU ............................................................. AO-0920-01 £5.95
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95
Micromite Explore-28......................................................... 07108191 £6.95 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ultrabrite LED Driver ......................................................... 16109191 £6.95
Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AUGUST 2020 .........................................................
Micromite LCD BackPack V3 ............................................ 07106191 £9.95
Steering Wheel Audio Button to Infrared Adaptor .............. 05105191 £7.95 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JULY 2020 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AM/FM/CW Scanning HF/VHF RF Signal Generator ........ 04106191 £13.95 I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
Speech Synthesiser with the Raspberry Pi Zero ............... 01106191 £5.95
PE Mini-organ PCB ........................................................... AO-0720-01 £14.95 payable to: Practical Electronics
PE Mini-organ selected parts ............................................ AO-0720-02 £8.95
High-current Solid-state 12V Battery Isolator – control ..... 05106191 £6.95 Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
High-current Solid-state 12V Battery Isolator FET (2oz) ... 05106192 £9.95
Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
JUNE 2020
Arduino breakout board – 3.5-inch LCD Display ............... 24111181 £6.95 Card Security No . . . . . . . . . .
Six-input Audio Selector main board ................................. 01110191
£10.95
Six-input Audio Selector switch panel board ..................... 01110192 You can also order PCBs by phone, email or via the shop
on our website: www.electronpublishing.com

No need to cut your issue – a copy of this form is just as good!

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: [email protected]
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 | February | 2023 69


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
FEBRUARY 2020 OCTOBER 2018
Motion-Sensing 12V Power Switch ................................... 05102191 £5.95 6GHz+ Touchscreen Frequency Counter .......................... 04110171 £12.95
USB Keyboard / Mouse Adaptor........................................ 24311181 £8.50 Two 230VAC MainsTimers ................................................ 10108161 £11.95
DSP Active Crossover (ADC) ............................................ 01106191 10108162
DSP Active Crossover (DAC) ×2 ...................................... 01106192 SEPTEMBER 2018
DSP Active Crossover (CPU) ............................................ 01106193 £29.95 3-Way Active Crossover .................................................... 01108171 £17.95
DSP Active Crossover (Power/routing).............................. 01106194 Ultra-low-voltage Mini LED Flasher ................................... 16110161 £5.95
DSP Active Crossover (Front panel).................................. 01106195
DSP Active Crossover (LCD)............................................. 01106196 AUGUST 2018
Universal Temperature Alarm ............................................ 03105161 £7.95
JANUARY 2020 Power Supply For Battery-Operated Valve Radios ........... 18108171
Isolated Serial Link ............................................................ 24107181 £8.50 18108172 £24.95
18108173
18108174
DECEMBER 2019 JULY 2018
Extremely Sensitive Magnetometer ................................... 04101011 £16.75 Touchscreen Appliance Energy Meter – Part 1 ................. 04116061 £14.95
Four-channel High-current DC Fan and Pump Controller ... 05108181 £8.75 Automotive Sensor Modifier .............................................. 05111161 £12.95
Useless Box ....................................................................... 08111181 £11.50
JUNE 2018
NOVEMBER 2019 High Performance 10-Octave Stereo Graphic Equaliser ... 01105171 £14.95
Tinnitus & Insomnia Killer (Jaycar case – see text) ........... 01110181 £9.95
Tinnitus & Insomnia Killer (Altronics case – see text) ........ 01110182 £9.95 MAY 2018
High Performance RF Prescaler........................................ 04112162 £10.45
OCTOBER 2019 Micromite BackPack V2..................................................... 07104171 £8.45
Programmable GPS-synced Frequency Reference .......... 04107181 £11.50 Microbridge ........................................................................ 24104171 £5.95
Digital Command Control Programmer for Decoders ........ 09107181 £9.95
Opto-isolated Mains Relay (main board) ........................... 10107181 £11.50 APRIL 2018
Opto-isolated Mains Relay (2 × terminal extension board)...10107182 Spring Reverberation Unit ................................................. 01104171 £13.95
DDS Sig Gen Lid ............................................................... Black £5.95
AUGUST 2019 DDS Sig Gen Lid ............................................................... Blue £5.95
Brainwave Monitor ............................................................. 25108181 £12.90 DDS Sig Gen Lid ............................................................... Clear £5.95
Super Digital Sound Effects Module .................................. 01107181 £6.95
Watchdog Alarm ................................................................ 03107181 £8.00 MARCH 2018
PE Theremin (three boards: pitch, volume, VCA) ............. PETX0819 £19.50 Stationmaster Main Board ................................................. 09103171 £17.75
PE Theremin component pack (see p.56, August 2019) ... PETY0819 £15.00 + Controller Board .............................................. 09103172
SC200 Amplifier Module – Power Supply .......................... 01109111 £16.45
JULY 2019
Full-wave 10A Universal Motor Speed Controller .............. 10102181 £12.90
Recurring Event Reminder ................................................ 19107181 £8.00 FEBRUARY 2018
Temperature Switch Mk2 ................................................... 05105181 £10.45 GPS-Synchronised Analogue Clock Driver ....................... 04202171 £11.95
High-Power DC Motor Speed Controller – Part 2
JUNE 2019 + Control Board ................................................... 11112161 £11.95
Arduino-based LC Meter ................................................... 04106181 £8.00 + Power Board .................................................... 11112162 £15.30
USB Flexitimer................................................................... 19106181 £10.45
JANUARY 2018
MAY 2019 High-Power DC Motor Speed Controller – Part 1 .............. 11112161 £15.30
2× 12V Battery Balancer ................................................... 14106181 £5.95 Build the SC200 Amplifier Module ..................................... 01108161 £13.95
Deluxe Frequency Switch .................................................. 05104181 £10.45
USB Port Protector ............................................................ 07105181 £5.95 DECEMBER 2017
Precision Voltage and Current Reference – Part 2............ 04110161 £14.95
APRIL 2019
Heater Controller ............................................................... 10104181 £14.00 NOVEMBER 2017
50A Battery Charger Controller ......................................... 11111161 £12.95
Micropower LED Flasher (45 × 47mm) ......................... 16109161 £7.95
MARCH 2019 (36 × 13mm) ......................... 16109162 £5.95
10-LED Bargraph Main Board ........................................... 04101181 £11.25 Phono Input Converter ...................................................... 01111161 £7.9
+Processing Board ............................................. 04101182 £8.60
SEPTEMBER 2017
FEBRUARY 2019 Compact 8-Digit Frequency Meter..................................... 04105161 £12.95
1.5kW Induction Motor Speed Controller........................... 10105122 £24.95
AUGUST 2017
NOVEMBER 2018 Micromite-Based Touch-screen Boat Computer GPS ....... 07102122 £10.45
Super-7 AM Radio Receiver .............................................. 06111171 £15.95 Fridge/Freezer Alarm ......................................................... 03104161 £7.95

JULY 2017
Micromite-Based Super Clock ........................................... 07102122 £10.45
Brownout Protector for Induction Motors ........................... 10107161 £12.90

70 Practical Electronics | February | 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: [email protected] 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

VALVES AND ALLIED COMPONENTS? www.electricalcharity.org EPO UKIPO USPTO


Circuits Electric Machinery Mechatronics
For free stock list and/or advice, please
Web: www.akennypatentm.com
contact me: [email protected] Email: [email protected]
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Advertisement offices
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 55 Matt Pulzer
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 55
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Electron Publishing Ltd
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1 Buckingham Road
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii)
Brighton
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . Cover (iv) East Sussex BN1 3RA
POLABS D.O.O.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Tel 07973 518682
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Email [email protected]
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Web www.electronpublishing.com
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 For editorial contact details see page 7.

Practical Electronics | February | 2023 71


Next Month – in the March issue
Amplifier Clipping Indicator
Driving amplifiers into clipping can cause unpleasant sounds and damage
expensive speakers. This easy-to-build Amplifier Clipping Indicator is ideal
for showing clipping – its LED catches even the briefest of clipping events.

Capacitor Discharge Welder


Make your own thermocouples or battery packs! If you’re skilled enough, you
might even be able to weld studs to sheet metal. This project lets you build a
safe low-voltage mini spot welder.

Semaphore Signal
This realistic-looking OO Gauge Semaphore has been modelled on a
real British semaphore. It has a red/white ‘flag’ that tilts down by 45°
and lights a green LED to signal an oncoming train to continue, or is
horizontal with a red light, indicating it should stop.

Raspberry Pi Pico BackPack


The Pico microcontroller board is a versatile and powerful ARM-
based microcontroller on a small board for less than a fiver.
There’s quite a lot you can do with it on its own, but it’s even more
interesting when connected to an LCD touchscreen.

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 2 February 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: [email protected]
T: 01246 211 202
E: [email protected] 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: [email protected]. 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 | February | 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
op amp amplifiers
Kick Start
BME280 humidity, pressureCir
nics
c
Make

and temperature sensor Sim uitReader


in LTsp
Su
’s itpwith

ulating rgery
d
remie
coding
igipots
Micromite
r electr
PicoMite Fingerprint

Audio
onics a
nd com
puting
ice O u t maker
Driveway Gate Cooling Fan Controller Furt&er
h magaz
Univers circuits for th Ma
ine
Remote Control Loudspeaker Protector a l op am e
p boa
rd
ke it
Multip with Micro
le
for a P displays
mite
WIN! WIN! icoMite
Micro
Microchip
PIC32C chip Remo
Curiosity
t
Range e Control
Development and W X-BZ2
B
Board Curi Z451
Develoosity
WIN! pment Exten
Board der

Fingerprint
ClReader
assi
Metro c LED
LTDZ V5.0 nome
s
budget
Spectrum 35 M H z
Analyser Signa -4.4GHz
Tesla Coil l Gene
rator
Solid-State
M u l ti - Flame
Speak ChanDischarge
n
er Pro el
PLUS!
P tectoFeb
r 2023 £5.99
Techno Talk – Mushroom magic LUS! 02
Te
Cool Beans – Arduino Bootcamp chno Talk –
Cool B Raudiv
Net Work – Alexa update, plus spaceeand
ans energy
– Intro newse voic9 772632 573030
Net W es revis
ducing it
www.electronpublishing.com
ork – S the Ard ed
mart li practicalelectronics
@practicalelec
www.e ght bu uino B
lbs and ootc Jan 20
Alexa’s amp
lectro 23 £5.49
npubli
shing skills
.com 01
@prac 9 772
632 5
ticalele 73023
c
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