0% found this document useful (0 votes)
589 views76 pages

Pe 11 2022

Uploaded by

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

Pe 11 2022

Uploaded by

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

Practical

Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out Electronic Make it with Micromite
Using JFETs limiters Using audio Building Blocks Adding a PS/2 keyboard and
and compressors transformers Using actuators TFT display to a PicoMite

WIN!
Microchip
AVR-IoT
Cellular Mini
WIN!

Build a
USB Cable Tester PicoMite
computer

Pocket Weather Station

Self-Contained 6GHz
Digital Attenuator
PLUS!
Nov 2022 £5.49
Techno Talk – Hidden hazards 11
Cool Beans – Investigating rotary encoders
9 772632 573023
Net Work – Technology and the Queen
www.electronpublishing.com @practicalelec practicalelectronics
Put the “Smart” in Smart Home
Easy Design with the PIC16F18076 Family of MCUs
No matter what you’re building, the PIC16F18076 family of MCUs can help you create faster, more feature-
rich smart home technology. Now, you can easily add capacitive touch buttons, control motors, integrate
IoT connectivity and monitor system health using the family’s on-chip smart peripherals. And, these cost-
effective MCUs integrate seamlessly with our latest GUI-based code configuration tools for a refreshingly
simple development experience. Start building your next smart home appliance today using Curiosity Nano
rapid prototyping hardware.

Key Features
• 8 to 44-pin packages
• 3.5 KB to 28 KB of internal memory
• CPU Speed up to 32 MHz
• 10-bit Analog-to-Digital Converter with Computation (ADCC)
• Automated Capacitive Voltage Divider (CVD)
• 8-bit Digital-to-Analog Converter (DAC) module

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.
microchip.com/PIC16F180 MEC2423A-UK-05-22
Practical
Volume 51. No. 11
November 2022
ISSN 2632 573X

Electronics Contents
Projects and Circuits
USB Cable Tester – Part 1 by Tim Blythman 16
Here is an easy way to test all manner of USB cables; this USB Cable Tester is
so handy e thin you ill find it indis ensa le
Pocket Weather Station by Aarav Garg 26
his is an e cellent eginners ro ect that uses five odules to a e so ething
use ul a ini eather station you can carry every here ith you.
Model Railway Carriage Lights by Les Kerr 30
hese odel train carriage lights designed or gauge are attery o ered
and can e s itched on and o ith an e ternal agnet.
Self-Contained 6GHz Digital Attenuator by Jim Rowe 34
his rogra a le odule attenuates signals ro to y to
. d in . d ste s. ontrol is via five s all s itches and a tiny .

Series, Features and Columns


Techno Talk by Mark Nelson 8
idden ha ards
The Fox Report by Barry Fox 10
Be careful what (new tech) you wish for
Net Work by Alan Winstanley 12
round u o to ical technological issues and trends ro the and around the
orld ro the ueen s first e ail to nuclear o er.
Make it with Micromite by Phil Boyce 37
art el contained ico ite co uter
Audio Out by Jake Rothman 42
Transformers in audio – Part 4
Circuit Surgery by Ian Bell 51
lectronically controlled resistance art
Electronic Building Blocks by Julian Edgar 57
electing and sing ctuators art
a s Cool eans y ax The agnificent 62
lashing s and other engineering te tations art

Regulars and Services


Wireless for the Warrior 2
Subscribe to Practical Electronics and save money 4
NEW! Practical Electronics back issues DOWNLOADS – 2021 now available! 6
Reader services – Editorial and Advertising Departments 7
Editorial 7
a les issing ages s
Exclusive Microchip reader offer 9
in a icrochi o ellular ini
PE Teach-In 9 24
PE Teach-In 8 33
Teach-In bundle – what a bargain! 56
Made in the UK.
Practical Electronics PCB Service 68
Written in Britain, Australia, s or ractical lectronics ro ects
the US and Ireland. Classified ads and Advertiser inde
Read everywhere. Next month! – highlights of our next issue of Practical Electronics 72
© Electron Publishing Limited 2022
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 December 2022 issue of Practical Electronics will be
published on Thursday, 3 November 2022 – see page 72.

Practical Electronics | November | 2022 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

NEW! Retro Air Balloon Kit Digitally Controlled FM Radio Kit


Get off to a flying start with this Build your
educational flashing LED sol- own mod-
dering kit from the new ‘Jules ern, high
Verne’ inspired series by quality FM
Whadda. 6 LEDs. Lovely red receiver
and white PCB. CR2032 bat- project with
tery powered (not included). excellent
Order Code: WSAK221 - 19.98 sensitivity
powered
LED Electronic Dice Kit by a simple
Still popular! A must-build 9V PP3
soldering kit for all beginners. battery (not included. Auto-seeking button. 4
Dice slowly rolls to stop on a station presets. Volume control. Excellent
Great Brands - Official Main Dealer random number when the learning project for schools and colleges.
push button is released. 9V Order Code: WSAH194 - £20.39
battery (not included). Ideal
Electronic Kits & Modules for educational courses. Wide Audio Analyser Display Kit
We have a massive selection of self- selection of component types.
assembly electronic kits and pre- Order Code: MK109 - £7.08
assembled modules. Please see the full
range on our website or call for details. 3 Channel RGB LED Light Organ Kit

LED Buddy / LED Tester Kit


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

SUBSCRIBE NOW!
Simulating distortion
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using transformers in
Make it with Micromite
Installing MMBASIC on a Using distortion and
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery KickStart
Exploring DACs and
Make it with Micromite
MMBASIC + RPi Pico + display Mastering electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
Make it with Micromite
Small displays and using
Circuit Surgery
JFETs as electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
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

01202 087631
and distortion circuits audio electronics Raspberry Pi Pico distortion circuits microcontrollers = PicoMite Backpack! controlled resistance transformers infrared to synchronise time controlled resistors transformers op amps PicoMite systems and compressors transformers Using actuators TFT display to a PicoMite

WIN! WIN!
Microchip WIN! WIN!
Microchip Microchip Microchip WIN!
SAM C21 SAM V71
Xplained Ultra PIC32CM LS60 MPLAB Snap Microchip
Xplained Pro Curiosity Pro In-Circuit
Evaluation Kit Multi-purpose Battery Evaluation Kit
WIN!
Evaluation Kit Debugger AVR-IoT
WIN! WIN! WIN! Cellular Mini
Manager WIN!
Retro gaming
with Nano Pong!
20A DC Motor Speed Controller Build a
Single-Chip Silicon SMD Test PicoMite
Labs FM/AM/SW Adding small Tweezers USB Cable Tester
Intercom using retro computer
Digital Radio Receiver Controlling a displays to
Flowcode the PicoMite analogue phones!
linear actuator Digital Clock Micromite to Pocket Weather Station
Simple Flowcode Design Smartphone
MIDI
C
Bluetooth Link
Toot toot! void interrupt(void)
{ if (intcon & 4)
{
clear_bit(intcon, 2); Assembly

Model Railway Level Music Build a GPS


FCM_INTERRUPT_TMR 7
o(); bsf STATUS, RP0
bcf STATUS, RP1
movwf _adcon1
Hex
2

Preamplifier
:040000008A01122837

Crossing with moving Keyboard tracker with


movwf _option_reg :08000800F000F00S030

Preamplifier
EF10000
:10001000040EF2000A0
EF300BA110A122928352
86C

barriers, flashing with Digital Touchscreen the PicoMite


:2000200D928FE28073

with Digital Touchscreen Self-Contained 6GHz


lights and bell! Advanced GPS Computer: Tone / Volume Controls Tone / Volume Controls Digital Attenuator
construction and use
PLUS! PLUS! PLUS! PLUS! PLUS!
Jul 2022 £5.49 Aug 2022 £5.49 Sep 2022 £5.49 Oct 2022 £5.49 Nov 2022 £5.49
Techno Talk – Mixed Menu 07
Techno Talk – Time for a total rethink? 08 Techno Talk – What’s in a name? 09 Techno Talk – Solar flares – time to panic? 10 Techno Talk – Hidden hazards 11
Cool Beans – Choosing servos and a little competition Cool Beans – Touch-sensitive robots and using servos Cool Beans – Mechanical control with a servo Cool Beans – Lixie displays and magnetic core memory Cool Beans – Investigating rotary encoders
9 772632 573023 9 772632 573023
Net Work – NFC and the rise of mobile payments Net Work – The irresistible rise of automotive electronics Net Work – Li-ion battery fires, Win 11 and What3Words 9 772632 573023
Net Work – Whole-home mesh wireless systems 9 772632 573023
Net Work – Technology and the Queen 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

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 £29.99, Europe £33.99 (Airmail),

Electronics
Rest of the World £41.99 (Airmail)
1 Year: UK £54.99, Europe £63.99 (Airmail),
Rest of the World £77.99 (Airmail)
2 Years: UK £104.99, Europe £119.99 (Airmail),
SUBSCRIPTION PRICES Rest of the World £149.99 (Airmail)
Subscriptions for delivery direct to any address in: To: Practical Electronics Subscriptions
PO Box 6337
UK: 6-months £29.99, 12-months £54.99, 24-months £104.99 Bournemouth BH1 9EH
Europe Airmail: 6-months £33.99, 12-months £63.99, United Kingdom
24-months £119.99 Tel: 01202 087631
Email: [email protected]
Rest Of The World Airmail: 6-months £41.99, 12-months
£77.99, 24-months £149.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 £24.99 for 12 months, Email ............................................................................................
more details at: www.electronpublishing.com Subscriptions start with the next available issue.

4 Practical Electronics | November | 2022


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


S C is one of the best DIY electronics magazines in the Published in
world. Each month is lled with a variety of pro ects 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 ustralian dollars ( U ) 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 51. No. 11
November 2022
ISSN 2632 573X

Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619 Cables
Electron Publishing Limited Mob 07973 518682 Some of our projects are just for fun or to support another
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected]
hobby, some projects help you enjoy superb audio quality
East Sussex BN1 3RA Web www.electronpublishing.com which might otherwise be too expensive to access, and some
of our projects are ingenious devices that help you keep your
Advertisement offices electronics show on the road. Our main project this month is
Practical Electronics Adverts Tel 01273 777619
1 Buckingham Road Mob 07973 518682
very much in the latter category.
Brighton Email [email protected]
East Sussex BN1 3RA You can picture the scene; a useful piece of equipment has
Editor Matt Pulzer
failed and resists all efforts to recover. We’ve all been there,
General Manager Louisa Pulzer and sooner or later we start to wonder if the problem is with
Digital subscriptions Stewart Kearn Tel 01202 880299 the actual equipment or just the cable it’s connected to. Perhaps
Online Editor Alan Winstanley there is a replacement in the ever-growing box of cables kept for
Web Systems Kris Thain
Publisher Matt Pulzer just this occasion. But is the old cable any good? Perhaps not…
so what to do? Well, now you can quickly and easily test the
Print subscriptions most common types of cable – the various incarnations of the
Practical Electronics Subscriptions
ubiquitous Universal Serial Bus cable, more commonly known
PO Box 6337
Bournemouth BH1 9EH Tel 01202 087631 as just a ‘USB cable’.
United Kingdom Email [email protected]
So, step forward the USB Cable Tester. It will check just about
Technical enquiries any USB cable: USB-A (2.0/3.2), USB-B (2.0/3.2), USB-C (3.2),
We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase, Micro-B (2.0/3.2) and Mini-B (2.0). It will even report short
re air or odification o co ercial e ui ent or the incor oration circuits, open circuits and other faults.
or odification o designs u lished in the aga ine. e cannot
provide data or answer queries on articles or projects that are
ore than five years old. In electronics, few things can be more frustrating than
troubleshooting, so anything that reduces the pain is truly
Questions about articles or projects should be sent to the editor welcome. This handy device will quickly and efficiently help
by email: [email protected]
you eliminate a common source of problems – thoroughly
Projects and circuits recommended!
All reasonable precautions are taken to ensure that the advice and
data given to readers is reliable. We cannot, however, guarantee Missing pages
it and we cannot accept legal responsibility for it.
We had a production problem last month and a few issues went
A number of projects and circuits published in Practical Electronics out with missing pages. We think we caught most of them before
employ voltages that can be lethal. You should not build, test, distribution, but if one slipped through and you received it then
modify or renovate any item of mains-powered equipment unless
you fully understand the safety aspects involved and you use an
do please let us know and we will of course replace it.
RCD (GFCI) adaptor.
PCBs
Component supplies We’ve had some PCB shortages recently but have now restocked,
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We and the online shop is fully up to date, especially with recent
advise readers to check that all parts are still available before boards. So, as the nights draw in, now is the perfect opportunity
commencing any project in a back-dated issue. to start planning some autumn and winter projects.
Advertisements
Although the proprietors and staff of Practical Electronics take Matt Pulzer
reasonable precautions to protect the interests of readers by Publisher
ensuring as ar as ractica le that advertise ents are ona fide
the magazine and its publishers cannot give any undertakings
in respect of statements or claims made by advertisers, whether
these advertisements are printed as part of the magazine, or in
inserts. The Publishers regret that under no circumstances will
the magazine accept liability for non-receipt of goods ordered, or
for late delivery, or for faults in manufacture.

Transmitters/bugs/telephone equipment
We advise readers that certain items of radio transmitting and
telephone equipment which may be advertised in our pages
cannot be legally used in the UK. Readers should check the law
e ore uying any trans itting or tele hone e ui ent as a fine
confiscation o e ui ent and or i rison ent can result ro
illegal use or ownership. The laws vary from country to country;
readers should check local laws.

Practical Electronics | November | 2022 7


Hidden hazards Techno Talk
Mark Nelson

A number of the substances (mainly fluids) that we use in our workshop for constructing new projects,
or refurbishing old test equipment and other appliances, are dangerous – in fact, potentially toxic or
even carcinogenic. Harmful either to ourselves or to the equipment. Carry on reading if you want to
know the risks you may be taking.

E
lectricity is not the only buy a cheap bench-top extractor fan on- sense whenever using WD-40 Company
hazard that lurks in the work- line that disperses the fumes to the far products.’ Too jolly well right!
shop. It’s funny (but only in an side of the room. But is soldering really WD-40 is a product to use with great
ironic kind of way) how many of the so harmful? It can be, yes. Soldering care. The version sold in aerosol cans
things we used to do are now consid- with lead (which many of us still do) is 90% flammable liquids and gas plus
ered highly dangerous. When I was a can produce dust and fumes that are 10% of a proprietary corrosion inhibi-
student, ‘Trike’ (trichloroethylene) had hazardous. In addition, using flux con- tor. Its original purpose was only as a
only just replaced good old ‘Carbon taining resin or colophony produces water-displacing compound (that’s what
Tet’ (carbon tetrachloride) as the go-to solder fumes that, if inhaled, can re- the ‘WD’ in the name stands for). The
solvent that would get the muck out of sult in occupational asthma or worsen kerosene in it gives it a low surface ten-
everything. Now it’s taboo. It was only existing asthmatic conditions; as well sion, which allows it to penetrate small
recently that DIY shop paint and var- as causing eye and upper respiratory cracks and crevices. Once this kerosene
nish removers contained methylene tract irritation. has evaporated, the oil is left with a
dichloride (alias dichloromethane or Another commonplace irritant is little corrosion inhibitor. Although the
DCM), which is now listed as a Class the liquid solvent used for chemi- oil has some limited lubricating prop-
Three carcinogen ‘with the possible cally ‘welding’ acrylic sheet to make erties, it also acts as an insulator and
risk of irreversible side effects’. As well cases for test gear and other projects. does nothing to clean oxidised switch
as leading to nausea and drowsiness, Plasweld is one of the brand names contacts. WD-40 does indeed protect a
it is a powerful skin irritant, meaning and it goes also by the name of methyl surface from corrosion and oxidation,
that you had to wear rubber gloves ethyl ketone (MEK) and butanone. It but it achieves this by physically cov-
and ensure good air ventilation when works like a treat, which is why it is ering it. And like all paraffinic oils, it
using these stripper products. Unlike also used to weld PVC electrical con- reacts slowly with oxygen in the air to
cats, we get only one life, so we have duit pipes. Industrial uses include cross-link and polymerise, producing
to use safer methods these days. degreasing oils and lubricants, also the well-known ‘gummy mess’.
to clean up certain adhesives, lacquer It is important to be aware that WD-
Cleaning materials and polishes and latex paints. You must, however, 40 is not plastic-friendly. Until recently,
Some household products are more provide good ventilation. As well as the company’s own website warned
harmful to our treasured equipment being a fire risk (highly flammable), that it attacks polycarbonate and clear
than to us human beings! For exam- MEK irritates the skin, causes dizziness, polystyrene plastic, but now gives only
ple, combined cleaning and polishing light-headedness, headache, nausea, a short list of plastics on which WD-
liquids containing silicone or solvents blurred vision, and may cause you to 40 is safe to use. On the Web there are
can be hazardous to certain plastics. pass out. Repeated high exposure can many reports of it causing other plas-
They can cause ‘stress corrosion crack- damage the nervous system and may tic materials to crack or crumble. As
ing’ in some thermoplastic materials. affect the brain. It’s not just us that it the action is not immediate, the effects
Armor-All (sold at Halfords and Wilko attacks – MEK will also degrade and are seen not seen until the damage has
for instance) is a form of silicone oil discolour most plastics, especially if already been done.
dissolved in a mixture of solvents. It exposed for a long period of time.
is fine for use on polyvinyl chloride PCBs warning
(PVC) but can cause problems with More traps for the unwary No, not ‘printed circuit boards’ but
ABS (acrylonitrile butadiene styrene, Many people swear by WD-40, ad- polychlorinated biphenyls, which are
a common thermoplastic polymer) vertised as ‘the can with thousands highly carcinogenic chemical com-
used in some radios, test gear and of uses: a penetrating oil, lubricant, pounds formerly used in industrial
telephones. For refreshing clear plas- cleaner, degreaser or solution to pro- and consumer products. You are very
tic dials and meter faces you are safer tect against or remove rust’. But read unlikely to encounter them nowadays
using something much milder to clean the small print on the website and unless you repair elderly television
them, but if strong solvents are essen- you will also see: ‘Many of the uses receivers and video monitors. They
tial, then use these carefully and rinse of WD-40 products described on our have a nasty tendency to seep out
off as quickly as possible. company websites were provided to of high-voltage capacitor cans and
WD-40 Company by end-users of the cover the device’s whole outer sur-
Noxious fumes and common sense products, and do not constitute rec- face. If you are unwise enough to
I confess I rather like the smell of hot ommendations or suggestions for use wipe away the greasy film with paper
resin-cored solder (rosin-cored sodder by WD-40 Company. These uses have towels, you will find that it has re-
if you are American) as it smokes and not been tested by WD-40 Company. turned a week later. Stay safe and have
sizzles, but I really shouldn’t. Better to Consumers should exercise common nothing to do with PCB capacitors.

8 Practical Electronics | November | 2022


Exclusive offer

Win a Microchip
AVR-IoT Cellular Mini
Practical Electronics is offering its readers the chance to win a configured to most major cloud service providers through
Microchip AVR-IoT Cellular Mini (EV70N78A) – and even if you Microchip’s IoT Provisioning Tool.
don’t win, receive a 15%-off voucher, plus free shipping for one
of these products. The AVR-IoT Cellular Mini comes pre-configured to send data
from on-board light and temperature sensors to the cloud,
The AVR-IoT Cellular Mini is a development board viewable using Microchip’s sandbox portal. The
based on the AVR128DB48 8-bit microcontroller sandbox portal provides customers with the ability
(MCU). This solution provides a robust platform to track and monitor their device in real time from
to start building sensor and actuator nodes Worth a remote location.
on 5G narrowband IoT networks. The AVR-
IoT Cellular Mini is a small-form-factor board $60.00 This functionality covers the core requirements
making it an ideal solution for developers who (approx £49.99) of many applications in various industries,
want to connect IoT devices to an available including agriculture, industrial and energy, as
5G network. This is an essential feature for each well as consumer spaces such as transportation
devices on the go or located in remote areas of goods, alarm systems, building automation
with limited availability of Long Range (LoRa) and remote monitoring.
networks or other Low Power Wide Area Network
(LPWAN) solutions. To provide an even easier, more efficient and cost-effective solution
for developers to connect IoT devices to 5G using the AVR128DB48,
Customers can tap into the flexibility and ease of design Microchip partnered with Sequans to include its Monarch 2 GM02S
offered in the latest AVR128DB48 8-bit MCU family, single-chip radio equipped with 5G LTE-M and narrowband IoT.
including security protection with Microchip’s ATECC608 Microchip also partnered with Truphone to provide the SIM card
CryptoAuthentication device. The ATECC608 can easily be for cellular service that offers reliable coverage worldwide.

Free-to-enter competition

Microchip AVR-IoT Microchip


Cellular Mini EV70N78A

How to enter July 2022 winner


For your chance to win a Microchip AVR-IoT Vincenzo Dello Iacovo
Cellular Mini or receive a 15%-off voucher, including
free shipping, enter your details in the online entry
form at:
https://page.microchip.com/PE-Mini.html
He won a
Closing date Microchip SAM C21
The closing date for this offer is 31 October 2022 Xplained Pro Evaluation Kit

Practical Electronics | November | 2022 9


The Fox Report
Barry Fox’s technology column

Be careful what (new tech) you wish for

T
he UK’s identity card products and services by providing
scheme was scrapped in 2011 proof that customers are not below
and fierce campaigning blocked the legal purchasing age.
the introduction of a more modern Although it’s not well publicised,
electronic/biometric system – as there is a version of the young person’s
used in many countries. The argu- ‘old enough to drink’ PASS photo-ID
ments for and against a secure, dedi- card which can be used to prove iden-
cated ID card are many and divisive: tity by older people who are clearly
would it cut crime but infringe on old enough to drink (details can be
civil liberties, interfere with both found here: https://bit.ly/pe-nov22-id) The UK’s PASS proof-of-age ID.
legitimate and illegitimate migration The ‘18+ Citizen Card’ costs £15 (£30
and asylum, save or cost taxpayers if needed quickly) and lasts only three Stores, clubs, pubs and hotels routinely
money? No one can accurately pre- years. It can be a physical photo card, use generic electronic ID readers which
dict, although the history of large, or digital ID phone app. cost a few hundred ponds. They hook up
government-backed IT systems is to The above is not good news for any- with a PC and do not need to go online
say the least patchy – just ask the one who is over 18, but who does not and access any official database. They
NHS or Royal Mail branch managers. drive and does not travel abroad. Try, are used to confirm that the customer
for instance, getting a faulty phone SIM pictured on the card is who they say they
Can you prove who you are? replaced; high street dealers will only are, how old they are and where they
But one thing is now becoming clear; send them to customers who can prove live. Gradually these readers are sliding,
the lack of an all-purpose modern-tech their identity with a driving licence or largely unseen, into more general use.
ID card means that some matters of passport. Other photo ID, such as library Think carefully about this before letting
everyday life in the UK now depend on or travel passes, will not be accepted. a driving licence or passport lapse; it
being able to offer one of three alterna- In North London, Camden Council may be a difficult, lengthy process to get
tives: a valid photo driving licence, recently made news by insisting on a new one, and in the meantime cause
a valid passport or a young person’s sight of a passport or driving licence you real access and retail problems.
PASS (Proof of Age Standards Scheme). before paying energy rebates and cri-
This is an ID card scheme supported sis benefits through Post Offices. It’s Is cash still king?
by the Home Office, the Chartered estimated that 20% of those offered Think carefully, also, about welcoming
Trading Standards Institute (CTSI) and a rebate in April did not collect it, the end of cash, and its replacement
the National Police Chiefs’ Council in many cases because they couldn’t with cards and phone readers – as
(NPCC). Its aim is to support retail- prove their identity. Other councils accelerated by the Covid crisis. I now
ers when supplying alcohol, tobacco, will very likely be pilloried for paying find that often the only way to buy an
knives, fireworks, gambling, access to out to people without solid proof of ice cream or coffee is with a debit/
pubs/clubs and other age-restricted who they are. credit card.

w !
ne
1551V snap-fit vented and plain
miniature plastic enclosures
Learn more: hammfg.com/1551v
More than 5000 standard stocked enclosure designs
[email protected] • 01256 812812

10 Practical Electronics | November | 2022


Card readers rely on a mobile or a GSM/GPRS roaming SIM that locks
Wi-Fi signal, which is no problem in on to the strongest cellphone signal NEW DOWNLOAD!
towns and cities – except in a power available, often worked where newer,
cut of course. But out of town, in a
field, park or the garden of a stately
faster readers which rely on an Internet
Wi-Fi or 4G connection, would not.
5-year collection
home, there will be no Wi-Fi available
and cell phone coverage which is
Cash for cash-back had to be brought 2016-2020
in daily from the nearest towns with
based on a few local residents chat- working ATMs, using a large number All 60 issues from Jan 2016
ting will collapse when an influx of of cards to get round the cards’ daily
show-goers and stalls are all trying to limits. All completely legal, but secu-
to Dec 2020 for just £39.95
move money. rity guards in local supermarkets with files ready or
I spoke recently with one show ATMs started to get very suspicious. i ediate do nload
organiser. The landowner where she So yes, the old adage, ‘cash is king’
was putting on a gardening show had still holds good. Always carry some. Purchase and download at:
asked for tens of thousands of pounds www.electronpublishing.com
to provide Wi-Fi. The cellphone com- Where to store money
panies were not interested in install- Meanwhile, there is talk of a flight from
ing a temporary cell tower, as is now gold as a standard currency, thanks to a fails. But in many countries, such as
routinely done at large music festivals. global shift to cryptocurrency. Set aside China, there are no comparably solid
Cellphone coverage was decidedly iffy. the roller-coaster fortunes of all aspects bank failure compensation schemes.
Thinking ahead she advised all pre- of crypto, a City moneyman recently And in all countries these compensation
registered visitors to bring cash. Those put an alternative real-world view: schemes generally do not cover crypto.
who did not were offered the chance ‘We are fortunate [in the UK] in hav- ‘If you live in China and want to be
to get cash-back on any purchase they ing official government schemes [eg, sure of your savings, where are you going
made from any card readers on the the FSCS, Financial Services Compen- to keep money?’ the moneyman asked
show ground – provided they managed sation Scheme] that guarantee some rhetorically, ‘In a bank, or as crypto, or
to connect. Older, slower readers, with compensation if a conventional bank under the bed as gold bars?’

agreements which let travellers use


tekkiepix pic of the month – Iridium their phones abroad. Roaming was also
becoming normal in the US.
the hand-set could receive and transmit Although Iridium phones could be
even in cities and valleys where there used with a modem and PC to send
is no line of sight to a satellite in geo- data, the standard had been set ten years
stationary orbit over the equator. before when modems were slow. Iridium
The name ‘Iridium’ was chosen as handled data at only 2.4 kilobits/second
it’s the 77th element. Later, Motorola which is one-quarter the speed of a
decided to cut costs by launching only GSM cell phone, which itself seemed
66 satellites with half a dozen working painfully slow compared to 56k PC
spares, but decided not to change the modems which cost next to nothing.
name to ‘dysprosium’. Bob Tomalski, a technical editor for
Motorola built a factory in Arizona What Cell Phone? magazine, managed
to mass produce the satellites and to borrow an Iridium cell phone to try
control them in orbit. After test trans- in Europe. ‘Speech quality is appall-
missions, Iridium announced that it ing’, he reported. ‘It sounds like talking
had, ‘started its commercial phase on underwater through bubbles. At 2.4ki-
November 1st 1998’. Poster adverts lobits, it would take all day and cost a

M
otorola laid plans for a promised international cover. In the fortune to send a picture. It’s Stone Age
satellite phone system way UK, Iridium’s European head office technology trapped in Space.’
back in the early 1990s, in Germany referred all enquiries to Iridium soon went bust and the
when different countries were using cell phone service provider Orange, network was sold for a knockdown
different and incompatible analogue but Orange told enquirers that there price – it now serves people in places,
cell phone technology. In the US, cell- would not be a commercial launch like remote mountains, deserts or ice
phones registered in one state would until the last quarter of 1999. The flows, who will pay a high price for
not work in another. The idea of a handset would cost at least £2,000 any call at all.
global system with one handset work- and there were no call tariffs yet, but More technology stories and images
ing anywhere in the world, sounded calls were expected to cost several at: https://tekkiepix.com/stories
wonderfully attractive. pounds a minute.
Motorola’s original scheme was to The omens were not good. The first Practical Electronics is delighted to be
able to help promote Barry Fox’s project
launch 77 satellites that circled the earth review samples had very limited battery to preserve the visual history of pre-
in a pattern of low orbits, and which life and provided erratic connection. Internet electronics.
were cleverly mapped to ensure that The GSM digital cell phone standard Visit www.tekkiepix.com for fascinating
a handset on the ground could always was by then being used in many coun- stories and a chance to support this
‘see’ at least one satellite overhead. So, tries, and local operators had roaming unique online collection.

Practical Electronics | November | 2022 11


Net Work
Alan Winstanley
This month’s column pays homage to the role of Queen Elizabeth II (1926 – 2022) and how she
embraced some of the new technologies that came to the fore in Britain during her long reign.
We take in some nuclear power history along the way.

T
his has been a tumultuous In the swinging Sixties, the Queen hope to return to in a future column. In-
year for Net Work readers in the would televise her Christmas message in cidentally, it would be another 20 years
United Kingdom. Earlier in 2022 colour for the first time in 1967. It does before the Internet started to catch on
we celebrated our Queen’s Platinum not appear to be archived anywhere, al- with mainstream users, hence my arti-
Jubilee marking 70 years of her reign, though a transcript is available at: www. cle, The Internet: What’s in it for you?,
and then we had a record-breaking royal.uk/christmas-broadcast-1967 published in July 1996, and which
sweltering summer heatwave followed For her televised 2022 Jubilee festivi- which prompted the first ever Net Work
by a change of Prime Minister. Just a ties, the Queen embraced the latest CGI column in the August 1996 edition.)
few days later, Britain and the world with an endearing TV sketch featuring An official Facebook page managed by
witnessed history in the making with the Paddington Bear and marmalade sand- the Royal Family would follow (www.
news of the passing of Queen Elizabeth wiches, which is now immortalised at: facebook.com/TheBritishMonarchy)
II followed by the enthronement of King https://youtu.be/7UfiCa244XE and while visiting London’s Science
Charles III. The same Royal channel on YouTube Museum in October 2014, the Queen
This month’s Net Work column pays is updated regularly in a timely fashion sent her first tweet, which read: ‘It is a
homage to the Queen and her penchant and, for those readers who may be inter- pleasure to open the Information Age
for progress and modernisation. To ested, the first address of King Charles exhibition today at the @ScienceMu-
borrow from a certain German car mak- III went online for a global audience at: seum and I hope people will enjoy
er’s strapline, the late Queen was very https://youtu.be/E_5REdx2Vtk visiting. Elizabeth R.’ In 2019, again at
much in favour of ‘advancement through the Science Museum, the Queen posted
technology’. As a 14-year-old, Princess Royal (e)Mail on The Royal Family’s new Instagram
Elizabeth’s first radio broadcast in war- The Internet arrived in 1970s Britain in account for the first time. One of Queen
time 1940 was a warming Children’s the form of a connection with Ameri- Elizabeth’s last public appearances on
Hour message of hope addressed to chil- ca’s ARPANET, the packet-switching television would turn out to be her
dren around the world evacuated from network that interconnected several poignant message during the Corona-
London and other cities. The broadcast high-end institutes and military es- virus epidemic in April 2020. It evoked
can still be heard on the official Royal tablishments. The Queen sent her first her wartime spirit, and she made refer-
YouTube channel at: https://youtu.be/ email in March 1976 while visiting the ence to that first ever Christmas message
VJI9LPFQth4 with a full transcript at: UK’s Royal Signals and Radar Estab- in 1940, which can be bookmarked at:
www.royal.uk/wartime-broadcast-1940 lishment (RSRE). Photos of the event https://youtu.be/2klmuggOElE
The Queen was always keen to use the celebrated the release of CORAL66, the
latest in communications, so 65 years programming language that originated The Queen goes nuclear
ago she wrote to the BBC to say she felt in the RSRE, and the Queen was pic- The year before her first Christmas
the time was right to televise her annual tured symbolically pressing the Send message was broadcast, the Queen saw
Christmas message for the first time. The button on a terminal to dispatch the how Britain was aspiring to become
BBC agreed, and the resulting grainy first official Royal email. (Britain’s Na- self-sufficient in electricity when, on
monochrome footage of the Queen’s 1957 tional Physical Laboratory (NPL) played 17 October 1956, she officially opened
Christmas broadcast can be viewed at: a definitive role in developing packet the world’s first full-scale nuclear power
https://youtu.be/mBRP-o6Q85s switching and the Internet, something I station at Calder Hall in Cumberland,

The Queen inaugurates the supply of nuclear-generated electricity


The Queen sends the first Royal email when visiting RSRE. to Britain’s National Grid at the world’s first full-scale nuclear power
(Photo: Peter Kirstein) station at Calder Hall in 1956. (Image: YouTube/ British Pathé)

12 Practical Electronics | November | 2022


northern England. It was ostensibly the
first nuclear power station to produce
electricity for domestic consumption.
The northern town of Workington, 15
miles away from Calder Hall, became
the first town in the world to receive
light, heat and power from nuclear
energy, and four hours later, the first
nuclear-powered electricity was reach-
ing London, the BBC reported (see:
https://bbc.in/3qCQfdY).
Again, YouTube is a rich source of
archive footage: a triumphant British
Pathé news report entitled, The Atom
joins the Grid (https://youtu.be/DVBG-
k0R15gA) showed the Queen throwing
a switch at an inauguration ceremony
to ‘turn on’ Calder Hall’s nuclear con-
nection to the Grid for the first time. It
was a major international event, with The first few kilowatt-hours of nuclear-generated electricity clock up on a ceremonial
thousands of spectators watching and meter at Calder Hall. (Image: YouTube / British Pathé)
delegates from nearly 40 countries –
even scientists from Cold War rival the of coal for power stations, oil had to be energy sources. At the time of writing,
USSR were invited to attend. The ‘Grid’ imported and natural gas was ‘non-exist- the country is using 35.2GW, of which
in question was (and still is) the National ent’, the country was pinning its hopes 4.2GW is nuclear baseload and 5.7GW
Grid, the UK’s power network designed on nuclear energy instead: Britain was is wind. Interestingly, the interconnect
to interconnect all forms of available going to ‘build fifteen new atomic power (IC) dials show how power is either
generation and distribute it around the stations within the next ten years’ and imported (+ve) or exported (–ve meter
country, see: www.nationalgrid.com would be ‘self-sufficient in power by reading) using overseas sinks/sources
The Calder Hall site operated for 1975 or sooner’, he said. As things such as those in France.
47 years before closing in 2003, be- turned out, UK coal extraction was al-
coming the oldest Magnox power ready in decline and the Middle East ‘Britain’s own Chernobyl’
station in the world. There’s more oil crisis struck in 1973, but, thanks to Historically, Britain’s nuclear power
about Calder Hall on the UK’s Insti- the discovery of North Sea gas in the programme nearly went into a liter-
tute of Civil Engineers (ICE) website at: 1960s, by the early 1980s Britain had al meltdown when, a year after the
https://bit.ly/pe-nov22-chall become a net exporter of oil, and by the ceremonial switch-on at Calder Hall,
mid 1990s an exporter of gas as well, the country was shaken by an event
Too cheap to meter according to Aberdeen University’s De- that has been described as ‘Britain’s
Nuclear power promised boundless partment of History. own Chernobyl’. In October 1957, at
supplies of energy and would ‘give us Today, with global energy supplies the neighbouring Windscale nuclear
all the electricity we need, without the in peril, the UK is racing to develop plant, some magnesium fuel cartridg-
use of coal or oil’, the Pathé voiceover more nuclear, solar and wind power, es jammed in a nuclear reactor pile,
trumpeted at the time. A contemporary while boosting gas exploration and causing a huge temperature surge and
American documentary about Calder fracking. The useful Gridwatch web- risking a radiation leak into the envi-
Hall by PeriscopeFilms.com is also site (gridwatch.co.uk) gives a good ronment. The resultant fire was barely
worth watching (see: https://youtu.be/ approximation of current UK power kept under control, and it brought the
t8UJerSxlIo). The film presenter reck- consumption with bar charts and dials nuclear plant to the brink of disaster.
oned that, as Britain was running out showing the split between different The fire took many days to extinguish,

The UK Gridwatch website is a very informative guide to energy consumption from all UK energy sources as well as foreign interconnects.

Practical Electronics | November | 2022 13


and this was only achieved by starv-
ing the 1,000°C inferno of oxygen as
a last resort.
It seems that both the Calder Hall
and Windscale plants were built pri-
marily to fuel the H-bomb programme
rather than for powering domestic
homes. A report on the incident 65
years ago was suppressed by the Gov-
ernment to preserve Britain’s supposed
nuclear prowess in the eyes of her
allies. A useful BBC exposé laid bare
the Windscale incident, summarised
at: https://bbc.in/3DsWqJk – there is
plenty more on YouTube, including:
https://youtu.be/pxYz3lJ-iiQ
The catastrophe seems to be long Workers at the Windscale nuclear power station tackle the fire in 1957. The plant
forgotten in the nation’s psyche, no was subsequently rebranded as Sellafield. (Image: ‘Windscale: The Story of Britain’s
doubt due to Windscale being rebrand- Chernobyl’ / Fascinating Horror / YouTube)
ed as Sellafield, a location commonly Other potential fuel sources described electricity and became fully opera-
known for nuclear waste reprocess- by Terry 30 years ago included hydro- tional this year. The huge Dogger Bank
ing and power generation. Its atomic gen. Germany’s BMW, a car maker that offshore wind farm, midway between
weaponry roots are at least mentioned originally assembled Austin Sevens England and Denmark, will eclipse it
in the PR ‘Welcome to Sellafield’ at: licensed from England, had been re- and offer 3.6GW when it’s completed.
https://youtu.be/Fm2hpD8C4ks searching hydrogen as an automotive It will use the newest GE Haliade-X
This major nuclear accident, followed fuel since the 1980s, grappling with wind turbines which are three times
by America’s Three Mile Island fire in the non-trivial problem of avoiding larger than the earliest Orkney-based
1979 and Chernobyl in 1986, doubtless cars exploding while storing liquid hy- blades and can generate nearly five
dented confidence in the nuclear power drogen at –253°C. BMW hoped to open times more electricity, 14MW or
industry for decades. Britain has now the world’s first hydrogen car test fa- more. The Haliade-X blades will be
re-vitalised its ambition to underpin cility in 1989. (Good to know that one made in Britain (see Net Work, June
the always-on ‘baseload’ supply with of BMW’s ideas to prevent hydrogen 2021). More details can be found at:
nuclear power; Sizewell B nuclear build-up in the passenger compartment https://doggerbank.com
power station finally opened in 1995 was to install sensors to automatical-
but funding for Sizewell C has only re- ly open the sliding sunroof, windows Smart solutions
cently been finalised and completion is and boot/trunk to let the gas escape!) The electricity generation sector is
at least a decade away. Many hopes are While hydrogen-powered cars could still learning to address the problem
being pinned on new Small Modular be a viable alternative to petrol, ‘the of balancing supply with demand,
Reactors (SMRs) taking up the slack, quantity of [hydrogen] gas is not sat- especially when wind conditions are
as described previously in Net Work, isfactory to provide a sufficient range’, sub-optimal. As readers know, the elec-
but they are also 8-10 years away, tes- Terry wrote. They had ‘range anxiety’ tricity and gas utilities are very keen
timony to the country’s early nuclear even then. The possibility of using to install smart meters in our homes,
energy ambitions having faltered for fuel cells got just a one-line mention. a topic well aired in previous col-
half a century since the Queen first Wind power received a look-in too – umns (Net Work, December 2019 and
threw the switch at Calder Hall. one of the largest wind turbines in the January 2020). As a matter of course,
world in 1992 was a 3MW 60m-diame- I think smart meters will become in-
Looking forward to ter machine erected a few years earlier strumental in ‘encouraging’ consumers
alternative energy in 1987 on the Orkney Islands, off the to reduce their demand at peak times
Still in a retrospective frame of mind, Scottish coast. It powered 2,000 homes, when supplies are restricted. The Na-
while sifting through our archives I but these large turbines were considered tional Grid must also maintain a safe
found that Everyday with Practical ‘much too expensive for general use’. operating margin or surplus ‘headroom’
Electronics had published a series on In the US, however, a ‘wind farm’ in to meet unexpected peaks in demand
alternative energy exactly 30 years ago California hosting 18,000 wind turbines or outages in the network. The need
this month. A four-part series written in generating 80kW each provided a total to shape consumer demand is known
1992 by popular EPE contributor Terry of 1.4MW. It had ‘provided European as ‘demand-side response’ (DSR) and
de Vaux Balbirnie described ambitions researchers with much valuable infor- can be invoked in several ways: con-
and developments using renewable mation.’ It was early days, but several sumers can be bribed to switch off or
energy sources, including plans for har- European countries had already set use energy at off-peak times instead
nessing tidal power on the River Severn, targets for generating electricity using – eg, to charge an EV or use a wash-
Britain’s longest river. The Severn tidal wind turbines. Denmark topped the ing machine overnight, by charging a
energy barrage sounded like an ideal list, having built 36-times more wind lower price. Alternatively, they can be
candidate for generating ‘green’ energy, generating capacity (360MW) than the penalised by being charged more for
replacing up to five nuclear power sta- UK (10MW) by then. peak-time consumption.
tions, it was said. However, the idea was Today, the UK is becoming a major Much of the usage data for this is al-
deemed unaffordable and was quietly manufacturer of wind turbines and now ready available at a granular level, and
dropped in 2010. It may re-emerge in operates the world’s largest offshore I predict that it will only be a matter
the future if enough private investment wind farm, Hornsea 2 in the North of time before imaginative new tariffs
can be raised. Sea. It can produce up to 1.32GW of arrive that force users to pay more / use

14 Practical Electronics | November | 2022


less depending on the ‘spot’ availability Mercusys Halo S12 AC1200 hubs dotted
of renewable energy, seasonal weather around the house, which were easy to
conditions and time of day, with smart install alongside my router’s existing
meters providing the necessary raw Wi-Fi (retained for a network printer)
usage data. Digital In-Home Displays and a Devolo system that runs a smart
(IHDs) are also expected to start ‘nagging’ TV and PVR, an IP camera and one of
customers to switch things off, or cus- my favourite bits of network kit, a Syn-
tomers might get a text message instead. ology NAS drive.
Using a new Smart Meter Home Area A couple of months later and the
Network (SMHAN), new appliances like Mercusys system has been completely
washing machines, dishwashers or EV problem-free. In fact, I’ve been pleas-
chargers will eventually be able com- antly surprised by the performance
municate with them and will ‘know’ the of this low-priced system, as it has a
optimum time to operate at the lowest decent working range even when I’m
cost, automatically. outdoors. Despite its basic 1200 Mbps
Demand can also be reduced by bandwidth, I had no issues streaming
switching to more energy-efficient TV to a laptop some 40m away out in
A new kit from Swytch converts almost
appliances, as well as improving the the garden or making WhatsApp video
any ordinary bicycle into an electrically
insulation in our homes. This applies calls on a phone, though there might assisted one. The removable 36V battery
particularly to Britain’s draughty, badly be the odd blip or freeze when, say, mounts on the handlebars and a brushless
insulated post-war housing stock, an email arrived. I could also stream motor powers a custom-made wheel.
built in the era of coal and gas-fired radio via my smartphone and listen on
power stations when energy supplies a pair of Bluetooth earbuds. The Halo ‘Travel Assist’ package, ‘designed to
were less of a problem. LED lighting is S12 has proved very workable so far, make light work of long journeys.’ It’s
now universal too, and – credit where and it’s a cheap, easy and effective way based on a capacitive steering wheel
credit’s due – it’s sometimes hard to of adding whole-home mesh Wi-Fi to which can detect if drivers physically
believe that a whole home can now a home network. Higher-spec models have their hands on the wheel. (Perhaps,
be lit using the LED equivalent of a are available, including a triple-pack the car horn honks to wake you up?)
single 100W incandescent light bulb. Halo 50G AC1900 version (with gigabit British start-up Swytch has just
There is no doubt that smart meters Ethernet ports), costing about £75 when launched a new conversion kit that
can help many consumers to track and last checked on Amazon. This would turns an ordinary bike into an elec-
manage their energy consumption, offer greater flexibility for streaming trically propelled one by replacing
and I know several people that swear 4K video, driving IP cameras and IoT a wheel with a new high-tech motor
by them (when they work properly). devices, and seems like a good choice wheel that is custom-built to the correct
However, a number of energy-sav- for more demanding users. size that fits your bike. It has a 250W
ing gadgets are also available to help Britain’s Competition and Markets three phase brushless motor and a de-
consumers to monitor and control in- Authority (CMA) has finally approved mountable ‘Swytch kit’ 36V battery
dividual appliances. In next month’s a £6bn merger between anti-virus soft- that fits on the handlebars. It will fit
issue I’ll review a typical Smart Wi-Fi ware vendors NortonLifeLock Inc and almost any type of bicycle – more in-
mains socket that arrived on my desk Avast plc. NortonLifeLock was previ- formation is at: www.swytchbike.com
recently and which has a number of ously taken to court by the CMA over That’s all for this month’s Net Work.
useful power-saving features. its refusal to cooperate with the CMA Remember that this article’s web links
over their anti-virus auto-renewals will be ready-made for you to click
And finally policies. A no-fault undertaking was on in the Net Work blog available at:
Last month, I suggested an entry-lev- then agreed by Norton and ‘transpar- www.electronpublishing.com
el whole-home wireless mesh system ency’ has been improved.
from Mercusys that was available at a As mentioned in previous Net Work
rock-bottom price – a twin unit costs columns, Volkswagen’s forthcoming The author can be reached at:
only £20. My trials saw four low-cost
[email protected]
new Polo is launching with an optional

Practical Electronics | November | 2022 15


Part 1: by Tim Blythman

U
S Cable
B Tester
It’s frustrating when a USB device doesn’t work, and you don’t know if it’s
a problem with the device itself or the cable. This is a huge problem if,
like us, you have a drawer full of USB cables and don’t know which ones
are good or provide power only. Bad cables can also cause intermittent
problems. Now there is an easy way to test all manner of USB cables; this
USB Cable Tester is so handy, we think you will find it indispensable!

F
ew things are as frustrating This device is compact and auto- Devices such as portable hard
as an intermittent fault when it matic. Simply plug a cable into the drives, which often require signifi-
comes to checking and diagnos- appropriate sockets, and it immedi- cant current, are especially prone to
ing faulty gear. It’s even worse if it is ately gives you an assessment. You this problem.
due to a dodgy cable because you can will know straight away if the cable None of these tests characterise the
never be completely confident that is suitable for your purpose. high-speed data performance of the
you have ruled out other problems. cable; much more specialised equip-
So for this reason it’s crucial to be Testing ment is needed to do this. Still, these
able to test cables. The USB Cable Tester performs two tests are performed very quickly and
These days, a lot of gear connects primary tests. Initially, the various can be used to give a very fast ‘go/
with USB cables and not just when conductors in each cable are tested no-go’ assessment on a cable.
it’s attached to a computer. Prac- for continuity at low current. With the rise of the ‘Right to Repair’
tically all mobile phones use USB This test can pick up whether, for movement, we think that the USB
for charging, and they’ve also found example, a given lead has the appro- Cable Tester will become indispens-
many niche uses due to their ubiq- priate internal data connections for able in places like Repair Cafés. We
uity, even for devices like shavers USB 2.0 or USB 3.2, or whether it shudder to think how much good gear
and toothbrushes. can carry power only. It can also has been discarded due to having a
So we’ve designed a USB Cable detect internal short circuits which faulty USB cable.
Tester that can check practically all can interfere with normal operation.
standard USB cables. If you’re like The USB Cable Tester can also per- Power and USB 3
us, you probably have a mix of the form a high-current test on the VBUS USB power delivery is a relatively
latest cables (such as USB-C) and a and GND leads to establish how much recent addition to the USB stan-
good number of older types (such as current the cable can handle without dards and is not something our unit
mini- and micro-USB). dropping excessive voltage. tests; these power delivery features
The USB Cable Tester will test any Checking the ability of the cable to are usually built into devices rather
cable with either a USB-C or USB-A carry current is arguably the most use- than cables.
(2.0 or 3.2) plug on one end and ful test, as it allows detection of the Note that in this description of the
any USB-C or USB-B plugs (such as most subtle and intermittent faults. USB Cable Tester we use ‘USB 3.2’ to
2.0, 3.2, micro or mini) on the other These are the faults where the device refer to any cables that you might know
end. With some basic adaptors, you seems to operate normally but fails as USB 3.0 or USB 3.1, since the USB
can also test common variants such when a burst of current is needed. 3.2 standard replaced (and is back-
as OTG (‘on-the-go’) cables and The device resets due to its supply wards compatible with) both USB 3.0
non-standard cables, such as those dropping out and might even imme- and USB 3.1. This is a similar situation
with USB-A plugs at both ends. diately start working again. to the way that USB 2.0 encompassed

16 Practical Electronics | November | 2022


The front panel gives access to the six USB sockets: two
downstream-facing ports (DFPs) at left and four upstream-facing ports
(UFPs) at right. To test a cable, you plug one end into either of the DFPs and the other end into
one of the UFPs. It does the rest automatically.

and replaced USB 1.0 and USB 1.1; it’s USB Cable Tester can be used by even 4.5V nominal supply voltage means
now common to refer to devices com- those with no electronics experience. that no regulator is needed; another
patible with these as ‘USB 2.0’. The low-power features of this part (and more money) saved.
new microcontroller mean that a The device is housed in a compact
Design power switch is not needed and 140mm x 110mm x 35mm instrument
Before delving too deeply into the can be omitted. This may seem like case, about the smallest that would
circuit details, we’ll mention some a small saving, but it’s one less part fit everything. This means that it is
of the design considerations that we to consider during design and con- sturdy and looks the part, too.
made along the way. We designed the struction and shaves a little off the Some parts we could not skimp
USB Cable Tester to be economical to cost. The USB Cable Tester simply on. The USB Cable Tester uses robust
build, easy to use and robust enough sleeps between uses, sipping a tiny USB sockets, which cost a bit more
for regular use. 30μA from the battery. but are paramount to the longevity of
While it certainly would be pos- It runs from three AA cells which such a tool. We doubt that any other
sible to do this job without a micro- will last for many years with the USB device will have USB leads plugged
controller, that would entail a com- Cable Tester sitting on the shelf. The and unplugged so frequently.
plicated design.
Add in the fact that the nature of
the test results are often more than a
simple numeric result or basic binary Features and specifications for the USB Cable Tester
go/no go, and a microcontroller is an
inevitable part of the circuit. 1. Test just about any USB cable
With that in mind, we’ve used
a 40-pin PIC microcontroller. Any 2. Current pulse tests at 100mA, 500mA and 1A
fewer pins would require a multi- 3. Downstream-facing ports can accept USB-A (2.0/3.2) or
plexer or switch, adding complexity USB-C (3.2)
and cost. Rather than fall back on one 4. Upstream-facing ports can accept USB-B (2.0/3.2), USB-C (3.2),
of the old-fashioned 40-pin micros Micro-B (2.0/3.2) or Mini-B (2.0)
like the PIC16F877, we’ve decided to 5. Reports faults with individual cable ends (eg, plug with bare wires
get with the times and use its modern or detect OTG cables)
descendant, the PIC16F18877.
6. Can differentiate between power-only, USB 2.0 and USB 3.2 cables
The microcontroller displays the
test results on a 20x4 character LCD, 7. Will report short circuits, open circuits and other faults
allowing simple ‘human-readable’ 8. Reports voltage drop and cable resistance at usable currents
assessments to be delivered. Thus the

Practical Electronics | November | 2022 17


Fig.1: like the PCB, much of the schematic is taken up by the 26 resistors that isolate the microcontroller from the
USB sockets. In the unlikely event of a ‘live’ USB cable being plugged in, they will afford some protection to the
microcontroller and whatever is at the other end.

We have chosen to use through- does contain a handful of SMD parts Circuit details
hole parts to allow the components for various reasons, primarily cer- Refer now to Fig.1 above, the com-
to be easily obtained, and also so that tain types of USB sockets. Many of plete circuit of the USB Cable Tester.
the USB Cable Tester can be easily these sockets are only available in CON3 and CON4 at upper left are
assembled. Nevertheless, this project that form. the downstream-facing ports (DFPs)

18 Practical Electronics | November | 2022


backwards compatible. CON5-CON8
are the upstream-facing ports (UFPs),
analogous to the ‘device’ socket
before USB 3.2. CON7 is USB-B 3.2
and, like CON3, can also accept a
USB-B 2.0 plug; leads with these
plugs are sometimes called ‘printer
leads’ due to printers being one of
the few items large enough to fit
such a port.
CON6 is a USB-C socket and is
accompanied by a USB micro-B
socket, CON8. Like CON7, it can
accept either a USB 2.0 or USB 3.2
plug. Finally, CON5 is a USB mini-B
socket, which is only available in a
USB 2.0 version.
The various pins from CON3-CON8
are connected to one of 26 1kΩ resis-
tors. To reduce the number of pins
that are needed, some pins are joined.
For example, both the GND pins of
CON3 and CON4 are connected to the
same resistor.
That is because these pins perform
similar functions in each connector
and have no reason to be connected by
a cable. They are functionally equiv-
alent as far as the USB Cable Tester
is concerned.
This means that the USB Cable Tes-
ter does not know whether the cable
is plugged into the USB-A or USB-C
socket, but that isn’t necessary for
checking cables.
As we noted earlier, a 40-pin micro-
controller does much of the work.
IC1 is a PIC16F18877 8-bit enhanced
midrange microcontroller. It’s one of
the cheapest 40-pin microcontrollers
available at the moment. There is a
slightly more inexpensive version
with less Flash memory, but given
the ongoing chip shortages, we’ve
decided to standardise on the part
with more Flash.
26 of IC1’s pins are connected to
those 26 1kΩ resistors, and these pins
are used to probe the connectivity of
the cable which is being tested. Note
that for the most part, IC1’s GPIO
(general purpose input/output) pins
are interchangeable.
However, we use one feature that is
not present on all the available pins,
and that is the interrupt on change
(IOC) feature. The ports that do have
this feature have been wired into the
downstream-facing ports.
Without using IOC, we would have
to wake up the microcontroller peri-
USB Cable Tester odically to test whether a cable is
connected. This feature automatically
wakes it up as soon as any connection
– you can equate these to the ‘host’ CON3 is a USB-A 3.2 capable is made between the downstream and
ports from before USB-C. But since socket, while CON4 is a USB-C socket upstream ports.
USB-C cables are end-to-end sym- (which by nature supports USB 3.2). This made laying out the PCB
metrical, a new distinction needs CON3 will also accept older USB-A slightly more complicated but allows
to be made. 2.0 cables since it is designed to be IC1 to use the deepest sleep mode

Practical Electronics | November | 2022 19


available, thus saving the most power
when the unit is idle.
This circuitry is used to probe
any pin combination between the
upstream-facing port and the down-
stream-facing port. We’ll explain how
that works in more detail in the soft-
ware section below.

Current affairs
The cable current-carrying capabil-
ity is tested by sending a brief burst
of power through the VBUS (5V) and
GND wires of the cable under test.
Since practically all the GPIO pins
on IC1 can act as analogue inputs for
its internal ADC (analogue-to-digital
converter), we can probe the cable at
several points to see how much volt-
age is dropped between them.
Up to 1A is supplied by a circuit
based around Q3, a P-channel MOS-
FET. Q3, L1, D3 and the 10μF capac-
itor form a fairly standard buck (step-
down) regulator arrangement. The completed USB Cable Tester photographed from the front and rear. This
When Q3 is switched on by a sig- shows that all connections are made from the front of the case. One tactile
nal from the microcontroller via the switch is raised so it can be more easily accessed through a hole in the lid.
220Ω resistor, current flows from the
battery positive through L1, charging
the 10μF capacitor. When Q3 switches
off, the inductor’s magnetic field col-
lapses, causing current to continue
flowing to the capacitor, through the
path provided via D3 and into the
10μF capacitor.
As in any other buck regulator, the
duty cycle at Q3’s gate determines the
voltage that the capacitor charges up to
but with the proviso that Q3 is a P-chan-
nel MOSFET and thus is on when its
gate is pulled low. A 10kΩ resistor
between Q3’s gate and source keeps it
turned off when it is not being driven.
The test voltage is applied to the
cable by three of the contacts of RLY1
and RLY2. One set of contacts con-
nects VBUS of the downstream-fac-
ing port to the positive end of the
storage capacitor. The second set of
contacts connects the GND of the
downstream-facing port to the 220mΩ
shunt resistor returned to circuit mainly to reduce the current flowing Schottky diode D2 feeds from the
ground, used to measure the current. when the relay contacts open, reduc- battery into microcontroller IC1’s sup-
The third set of contacts connects ing relay contact wear. ply, bypassed by 1000μF and 100nF
VBUS and GND at the upstream-fac- Both relays are controlled by capacitors. These also provide power
ing port, which is necessary to com- N-channel MOSFET Q2, which sinks to the LCD. The diode means that the
plete the circuit. Note that current current from the battery through both microcontroller’s supply does not dip
flows in the same direction as it would relay coils when its gate is brought during the brief bursts of current draw
under regular use. high by the microcontroller. A 10kΩ during cable pulse testing.
It’s important to realise that none resistor keeps the MOSFET off when
of the USB GND connections are con- it is not being driven, and 1N4148 Display
nected directly to the circuit ground diode D1 absorbs the back-EMF from LCD1 is a 20x4 character LCD panel
during this test. They are connected to both coils. that has its supply fed directly from
either end of the 220mΩ shunt resis- As we noted, power is derived from pin RD6 of IC1. The signal from RD6
tor, but only when the relay contacts three AA cells, giving a nominal 4.5V. is also connected to the gate of Q1,
are closed. A separate battery holder is wired into which switches the LCD panel back-
The 1kΩ resistor across the 10μF CON1. This feeds the 1000μF bulk light cathode via a 100Ω resistor. A
capacitor discharges it when the bypassing capacitor, Q3 and powers 10kΩ resistor also holds Q1 off when
buck regulator is not running. This is the buck regulator and relay coils. the micro is not driving the pin.

20 Practical Electronics | November | 2022


Thus, when RD6 is low, LCD1 and
its backlight are both off. When RD6 is Parts List – USB Cable Tester
taken high, LCD1’s internal controller is
activated and its backlight is switched 1 double-sided PCB coded 04108211, 130mm x 102mm
on. This means that the USB Cable 1 double-sided PCB coded 04108212, 134mm x 30mm (front panel)
Tester can completely shut off power 1 laser-cut acrylic bezel to suit LCD, coded SC5970 (optional)
to the LCD when IC1 is in sleep mode. Both PCBs and the bezel are available from the PE PCB Service
Six more of IC1’s pins are con- 1 140mm x 110mm x 35mm plastic instrument case
nected to LCD1 to control it in four- [Jaycar HB5970, Altronics H0472]
bit mode. This makes the best use of 1 3xAA battery holder with leads (CON1)
the available pins without needing a 1 5-way pin header (CON2; optional, for ICSP)
separate I/O expander chip. 1 USB-A 3.2 socket (CON3) [Würth Elektronik 63.2213.200]
CON2 is an optional in-circuit serial 2 USB-C sockets (CON4 and CON6) [Würth Elektronik 632723.20011]
programming (ICSP) header for pro- 1 Mini-USB socket (CON5)
gramming microcontroller IC1. The 1 USB-B 3.2 socket (CON7) [Würth Elektronik 69222103.200]
PGD and PGC pins are also used for 1 Micro-USB 3.2 socket (CON8) [Würth Elektronik 69262203.200]
USB cable sensing, so a USB cable must 1 2-way pin header (CON9; optional, for calibration ➊)
not be connected during programming. 2 2-way pin headers and jumper shunts
The PGD pin is also connected to (JP1 and JP2; optional, for calibration ➊)
CON9, a two-pin header, via a 1kΩ 1 20x4 LCD module (LCD1) [eg, Jaycar QP5522]
resistor. CON9’s other connection is 1 16-pin header, 2.54mm pitch (for LCD)
circuit ground. This interface is used 2 1A telecom relays, 5V DC coil (RLY1, RLY2) [eg, EA2-5NU, Cat SC4158]
to connect to the transmit pin of a 2 6mm tactile switches (S1 and S2; optional, for calibration ➊)
TTL-serial interface such as a USB- 1 100uH 12x12mm SMD inductor (L1) [eg, Bourns SRR1280-101MCT]
serial adaptor which can be used to 4 M3 x 15mm machine screws
enter a dedicated software interface 8 M3 hex nuts
for calibration. 8 No.4 x 6mm self tapping screws or M3 x 6mm machine screws
No receive pin is provided. Instead, 2 6-way stackable headers (for mounting LCD)
two-way communication is achieved Semiconductors
by displaying data on the LCD screen 1 PIC16F18877-I/P ➋ microcontroller, ashed with 0410821A.HEX (IC1)
during the calibration process. 2 2N7000 N-channel MOSFETs, TO-92 ( 1, 2)
Note that test points TP1, TP2 1 S P53P06 or IPP80P03P4 P-channel logic-level MOSFET, TO-220 ( 3)
and TP3 are provided for calibra- 1 1N4148 signal diode (D1)
tion. These points connect to circuit 2 1N5819 1A schottky diodes (D2, D3)
ground, the positive microcontroller Capacitors
supply and the positive end of the 2 1000μF 6.3V electrolytic
220mΩ shunt, respectively. 1 10μF 16V electrolytic
JP1 and JP2 are also used only 1 100nF 63V M T or 50V ceramic
for calibration. When bridged, JP1
connects the upstream and down- Resistors (all 1/4W axial 1% metal film except as noted)
stream-facing VBUS lines. Simi- 1 10kΩ mini horizontal trimpot
larly, JP2 connects the upstream and 4 10kΩ 28 1kΩ 1 220Ω 1 100Ω
downstream-facing GND lines. 1 220mΩ 1% 2W M6432/2512 SMD
When fitted, they leave only the ➊ The USB Cable Tester will work fine without calibration, so these parts are
relay contacts and shunt resistance optional. Still, see the text next month for information about how S1 can be
in the current test circuit. Thus, the used during regular operation.
resistance of the relay contacts can ➋ IC1 can also be a PIC16F18875 programmed with 0410821B.HEX. Either
be measured and entered into the the I/P or E/P variants will work.
calibration settings. This value is
then subtracted from cable readings using several of its internal peripherals calibration is started and a menu is
to give a true value. to provide the features needed. displayed on the LCD. The calibration
S2 is also intended for calibration. The software loaded into the chip runs until either the microcontroller
It is connected to the microcontroller’s starts by initialising several of its inter- is reset or a Ctrl-C code is received
reset line (which is usually pulled up nal peripherals. This includes setting on the UART.
by a 10kΩ resistor) and circuit ground. most of the I/O pins as inputs with Otherwise, the UART is disabled
Since the calibration menu is only dis- internal pull-ups, used to sense cable after seven seconds, and the main
played just after a reset, pushing S2 is connectivity. It also sets up the UART ‘idle’ screen is displayed. A subrou-
a simple way to reset the microcontrol- (serial) receiver and PWM output for tine is called after 10 seconds of the
ler and enter calibration mode. the buck converter, plus the seven I/O idle screen to put the USB Cable Tes-
S1 is connected between PGD and pins associated with the LCD. ter into low-power sleep mode.
circuit ground. When it is pressed, it Timer (T0) is configured to fire an This involves shutting down the
can trigger the IOC interrupt noted interrupt every 262ms (approximately peripherals mentioned earlier and set-
earlier and can thus be used to wake four times per second). This is a reason- ting low all the pins associated with
up the USB Cable Tester without able rate for quick screen updates while the LCD. This reduces the quiescent
plugging in a USB cable. still allowing the display to be legible. current as it avoids leakage from any
The timer is used to display a floating input pins.
Software startup screen for around seven sec- The upstream-facing ports are
The PIC16F18877 is a reasonably well- onds. During this time, if an ESCAPE pulled to a low level, and the down-
equipped microcontroller, and we’re character is received on the UART, the stream-facing ports remain as inputs

Practical Electronics | November | 2022 21


This main screen
is shown when the USB
Cable Tester is idle and doesn’t
have a cable plugged in. The battery
voltage and a countdown timer (until the unit
sleeps) are shown.

with pull-ups. Thus, any cable result in other pins being detected Any other connection within an
plugged in will pull one or more of as being low. upstream or downstream port likely
the downstream-facing port pins low. The tests are done in three phases. indicates a cable fault. So if one end
The IOC flags are set to allow a One phase simply checks for con- of a cable is plugged in, any of these
pin change to wake up the micro. nections between the pins associ- sorts of problems that are detected are
Just before engaging sleep mode, the ated with the downstream-facing displayed on the LCD screen.
pins are checked one more time; if a port. A second phase checks the The third test phase is a complete
cable is detected, sleep is bypassed. upstream-facing port. ‘matrix’ analysis of every combina-
While unlikely to occur with so many For the most part, these should tion of downstream-facing port pin
pins, it is possible for a pin change to show no connections, except perhaps and upstream-facing port pin. This
be missed, hence the reason for the for the cable shield and USB-ID pin. is turned into a cable-specific signa-
double-check. USB-ID is grounded on USB OTG ture that is compared with a list of
When a pin change is detected cables to indicate that the equipment signatures corresponding to known
(which could include a press on S1), connected to what would normally be cable types.
the micro wakes up and initialises all a ‘device’ needs to behave as a ‘host’. Some cable types have multiple sig-
the peripherals again before returning Depending on how the cable is natures. For example, the reversible
to the main idle screen. wired, there might also be a connection nature of USB-C means that there are
Whenever the micro is awake, it between the cable shield and ground. two equally valid signatures for a USB
uses the timer to perform tests about
four times per second. The results of
the test dictate what is displayed. The
idle screen is shown if no connection
is detected; this also displays the bat-
tery voltage and a countdown timer
until sleep occurs.
The tests work simply. Each pin
is typically set as an input with a
pull-up. One at a time – in turn –
each pin is pulled low and the states
of the other pins are tested. The wires The Tester automatically runs tests as soon as a cable is plugged in. This
in the USB cable connecting pins in known-good cable is identified as USB 2.0 compatible with no problems and a
downstream and upstream sockets voltage drop of 116mV at 1A.

22 Practical Electronics | November | 2022


GND VBUS DP DM TXP1 TXM1 RXP1 RXM1 TXP2 TXM2 RXP2 RXM2
GND 1
VBUS 1
DP 2
DM 2
TXP1 3 4
TXM1 3 4
RXP1 3 4
RXM1 3 4
TXP2 5 6
TXM2 5 6
RXP2 5 6
RXM2 5 6
Table 1: this data is stored in the microcontroller as arrays of 18 bytes, making up 144 bits (18 × 8). These correspond to
the connection combinations that might be detected. It is compared with the data gathered during cable testing.

3.2 cable. Table 1 shows what connec- that a USB 2.0 cable is detected, but • USB 2.0 cable: the red and mauve
tions are expected for each cable type. with the D+ line open; such a cable may points are detected.
An exact signature match means be suitable for a power-only application • USB 3.2 cable (Gen 2x1): as for
that the cable is a known type and but will be no good for data transfer. USB 2.0, plus any one of the four
displayed as such. An inexact match A simplified version of the decod- remaining groups of connections.
is shown as the nearest match and the ing would work as follows. • USB 3.2 cable (Gen 2x2): as for
differences are detected. • Power-only cable: just the red USB 2.0, plus either all the green
For example, the LCD might indicate points in Table 1 detected. points or all the orange points.

How we decided on which USB sockets to use


We have spent a great deal of pitch through-hole and SMD parts mini-USB socket. They both only
effort to make sure that the sock- that we have used in any project. have a single row of pins.
ets we are using for the USB Cable You’ll need to have the correct gear The good news is that you can
Tester are both durable and func- (including a magni er and a syringe use the circuit itself to test that
tional, as well as being hand-sol- of ux paste). the sockets are soldered correctly.
derable. The latter is actually quite Therefore, soldering these parts We’ll go into more detail during
a tricky problem, especially for the is the trickiest part of constructing the construction, but brie y, we
USB-C parts. the USB Cable Tester, despite our can use the existing hardware and
USB-C packs a lot of pins into a best efforts. Fortunately, the full- logic to probe for any shorts in the
small connector. Since there are size USB-A and USB-B parts are socket soldering.
two rows of pins in the connector, simple through-hole devices. A short in the socket soldering
breaking them out into two rows at We looked at utilising pre-built will appear to the USB Cable Tes-
the PCB makes sense. USB breakout boards, but they ter like a fault in the cable, even
But having two rows of PCB pins would have substantially increased if it only occurs at one end. Thus,
will mean that the ‘bottom’ row can- the size of the nal unit and cost we will advise an unusual order of
not be surface-mounted, as there quite a bit more too. construction, so that the USB Cable
would be no way to access them The mini-USB socket, CON5, is a Tester’s microcontroller can run
from above. They’d be covered by part we’ve used many times before. its tests during construction, well
the ‘top’ row of pins. Since there is no USB 3.2 variant of before it is complete.
Since one row of pins goes this connector, a standard USB 2.0 That way, you can take your time
through holes on the board, sol- part is adequate. and check your work both visually and
dering them will be slightly easier. The micro-USB part is small too, electrically to ensure that you end up
But we think these are the nest but not much different from the with a functioning USB Cable Tester.
A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12

GND RX2+ 2 VBUS SBU1 D+ CC1 VBUS TX1+ GND GND TX1+ 7;ï VBUS CC1 D+ 'ï SBU1 VBUS 5;ï RX2+ GND

GND TX2+ 2 VBUS VCONN SBU2 VBUS RX1+ GND GND RX1+ 5;ï VBUS SBU2 'ï D+ CC2 VBUS 7;ï TX2+ GND

B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1

The two rows of closely spaced pins used in USB-C type plugs and sockets demand a tight pin pattern on the PCB. The
part we have chosen will be the most challenging part of this project to solder, and we doubt there is anything easier
to hand-solder available.

Practical Electronics | November | 2022 23


the batteries. With a fixed 1A out-
put, there is actually a greater load
on the batteries when a high resis-
tance cable is tested; this part of the
circuit behaves much like a current
source. In any case, a cable dropping
anywhere near 1V is not going to be
of much use.
The USB Cable Tester then displays
the results from the highest test read-
A faulty cable is quickly identified; in this case, the GND wire is detected as ing, including voltage drop and cal-
open circuit (1-, Opens:GND) and naturally, it has no useful current-carrying culated cable resistance.
capacity on its power lines. When the cable is unplugged, the
USB Cable Tester returns to the idle
Any additional connections signal to Q3 while monitoring the screen and counts down its timer to
detected beyond these constitute voltages at various points along the enter sleep mode unless another cable
some form of short-circuit fault. VBUS and GND wires of the cables, is plugged in for testing.
When a cable is detected, the current including just above the current mea-
pulse test is also performed once every suring shunt, which allows the test Next month
five seconds. This is only done peri- current to be determined. Next month, we’ll describe the con-
odically to reduce battery drain and The ADC is sampled 16 times at four struction, calibration and use of the
relay wear. The first test is done about points over several PWM cycles to com- USB Cable Tester.
half a second after detection, to allow pensate for the relatively high amount We’ll also describe how the USB
time for the cable to be fully inserted. of ripple in the applied voltage. Cable Tester can check its own con-
For this test, the micro sets all the At 100mA, 500mA and 1A, the volt- struction and assist with finding sol-
pins associated with connectivity ages are stored. If the measured volt- dering faults in the SMD USB sockets
testing as inputs and closes the relays age rises above 1V (at any point in the we are using. See the panel for more
to complete the power circuit. The ref- cable) at any time, the test is cut short. information about the sockets and
erence for the ADC is set to the 1.024V The 1.024V reference used for these why such a feature will be handy.
FVR (fixed voltage reference). Being measurements puts an upper limit on
a 10-bit ADC, each digital step then what can be meaningfully measured. Reproduced by arrangement with
corresponds neatly to 1mV. Another reason for cutting the test SILICON CHIP magazine 2022.
The micro ramps up the PWM short is that it avoids a high load on www.siliconchip.com.au

EE
FR -ROM

Order direct from Electron Publishing ELECTRONICS


£8.99
CD

TEACH-IN 9
FROM THE PUBLISHERS OF

GET TESTING! FREE


CD-ROM
Electronic test equipment and measuring TWO TEACH
-INs
techniques, plus eight projects to build FOR THE PRICE
OF ONE

PRICE £8.99 • Multimeters and a multimeter checker


• Oscilloscopes plus a scope calibrator
• AC Millivoltmeters with a range extender
• Digital measurements plus a logic probe
• Frequency measurements and a signal generator
(includes P&P to UK if ordered direct from us) • Component measurements plus a semiconductor
junction tester

PIC n’ Mix
Including Practical Digital Signal Processing

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

Teach-In 9 – Get Testing!


COMPUTER

Teach-In 9
Get Testing
Files for:
PIC n’ Mix

This series of articles provides a broad-based introduction to choosing and using a wide range Three Microchip
PICkit 4 Debugger
Guides
PLUS
Teach-In 2 -Using
PIC Microcontrollers.
In PDF format

of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints © 2018 Wimborne Publishing Ltd.
www.epemag.com

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.
Teach In 9 Cover.indd 1 01/08/2018 19:56

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

FREE COVER-MOUNTED CD-ROM


On the free cover-mounted CD-ROM you will find the software for the PIC n’ Mix series of articles. Plus the full Teach-In
2 book – Using PIC Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB
ICD 4 In-Circuit Debugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4
Debugger User’s Guide.

ORDER YOUR COPY TODAY JUST CALL


01202 880299 OR VISIT www.electronpublishing.com

24 Practical Electronics | November | 2022


POCKET

WEATHER STATION

By Aarav Garg
We’re often describing how you can buy and use very low-cost electronic
modules. They’re great because they save you a lot of assembly time and
soldering work, and they often cost less than buying the individual parts
you would need to build them. Here is an excellent beginners’ project that
uses five such modules to make something useful – a mini weather station
you can carry everywhere with you.

I
s it hot in here, or just me? First steps a tube of neutral-cure silicone sealant
That’s a question you don’t have The first thing to do when begin- and a caulking gun) and, if you’re going
to ask anymore with this Pocket ning with any project is gathering the to make the optional case, access to a
Weather Station. required components. The required 3D printer.
It is a compact device, powered by devices and modules are listed in the
an Arduino Nano board that you can Parts List. They are mostly available Preparation
carry anywhere, right in your pocket. from online marketplaces like eBay, Now we need to plan the position of
It displays the current temperature and AliExpress and Amazon. all the components inside the enclo-
humidity on its OLED screen. Sure, you While they are inexpensive, chances sure. I wanted to keep the device as
may have the local weather report on are they will come from overseas, so thin as possible, so it is actually con-
your phone, but it’s amazing how much allow a few weeks (or even months) venient to carry in a pocket. Thus, I
local temperatures can vary from those for delivery. spread all the components out and did
recorded elsewhere in your area. By the way, the DHT11 is a smaller, not go with a layered structure. That
Plus, knowing the indoor tempera- less accurate version of the DHT22 tem- would decrease the width and height,
ture and humidity can be pretty helpful, perature/humidity sensor that we have but increase the thickness.
as how hot or cold it ‘feels’ is strongly used in the past and described in the Fig.1 shows how I stacked the com-
affected by humidity, not just tempera- April 2018 issue of PE. Its small size is ponents inside my Pocket Weather Sta-
ture. Even with moderate temperatures, useful in a pocket device. tion. I used an Arduino Nano board
high humidity can make you sweat Since it incorporates both tempera- because of its size, which is perfect for
more than a more intense dry heat! ture and humidity readings, we only this project. You could also come up
One reason it’s so portable is beacuse need the one sensor. The other parts with your own method of stacking the
of its integrated, rechargeable 160mAh are the Arduino board to query it, the components in ways that reduce the
LiPo battery. display to show the readings and the size of the device even further.
It is an excellent project for learning charger to keep the battery topped up. After you have planned your pre-
and is also really fun to make. It even You need a few basic tools to build ferred arrangement, refer to Fig.2, the
comes in handy sometimes! Sound the Pocket Weather Station: a solder- wiring diagram. This shows how all
interesting? Then let’s dive right in! ing iron, hot glue gun (or even better, the modules need to be connected. It’s

26 Practical Electronics | November | 2022


Fig.1: this is how I laid out the


components so that they would fit
inside a custom-made case.


Fig.2: this diagram serves as both the wiring diagram and a form of circuit diagram; it shows all the connections
necessary to turn the separate modules into a Weather Station. You don’t need to use the same colour coding as we did,
but we strongly advise that you stick to the red/black colours for the power wires, and make sure that black only goes to
ground or negative pads, and red to positive pads. Take note that different DHT11 modules may have different pin-outs.

relatively simple, as there are just a Also, try to solder everything accu-
few modules, and none of them need rately to prevent any short circuit. Putting it all together
to be modified. It might be a tedious process, but Now, we need to place the whole circuit
believe me, later on it will feel worth inside the enclosure that we designed
Wiring it up the effort. After you have finished sol- earlier and 3D printed. It is vital that
Before you start building the dering all the components (excluding all the parts go in their respective cut-
Pocket Weather Station, you might the switch), it should look something outs for a neat and tidy look. It is also
like to watch my YouTube video like Fig.3. important that all the components are
showing how I assembled it, at: Obviously, we can’t carry it around firmly fixed in their place and cannot
https://youtu.be/ZhOhBuKC80M as just a collection of connected mod- move inside the enclosure to ensure
There are two types of connections ules, so we need an enclosure for our
to be made: power (red/black wires) Pocket Weather Station – and to give
and signal (green/orange/yellow wires). it a professional look. The best option
The charger board connects to the bat- we have is 3D printing.
tery as well as all the other modules,
to power them. The enclosure
The only other connections required I designed the enclosure in Tinker-
are for the I2C serial bus between the cad, which is a fantastic CAD software
Arduino Nano and the display, and package. It supports all skill levels, so
one signal wire from the DHT11 to the even if you are a beginner, you can still
Nano, so it can get readings. use it. You can download my 3D files
Start by connecting the battery to (.stl format) from the November 2022
the battery charging module. We aren’t page of the PE website.
connecting any wires to the switch yet, I don’t have a 3D printer, so I used an
because that has to be done once every- online 3D printing service based locally
thing is installed in the case. You can (to me) in India (www.iamrapid.com).
connect the power supply wiring of the I uploaded my .stl files to get an instant
Arduino, OLED and DHT11 modules to quote and ordered the parts right away.
each other, and the ground back to the The enclosure they delivered to me has
charger module; leave the wires for the great build quality.
switch loose for now. Chances are you will find a simi-
Try to keep the wire lengths just long lar local service. Do a web search for
enough to prevent a mess of wires later. ‘3D printing service’. Even better, you
For all the power supply connections, might also find a nearby maker space,
make sure you get the polarity correct, see: https://bit.ly/pe-nov22-ukms and
with black wires to the GND pins only www.hackspace.org.uk
and red wires to the positive pins. If you Fortunately, all the cutouts that I had
connect them the wrong way around, made in the design were in the exact Fig.3: once you have finished wiring
chances are good that some of the mod- spots I needed them, so I didn’t have to nearly all the components together, it
ules will be damaged. get a second prototype made. should look like this.

Practical Electronics | November | 2022 27


The 3D-printed case for the cover is securely in place so it looks
Pocket Weather Station. There professional and is convenient to carry.
are 3D printing services which I have put my logo on the lid design to
can process the supplied give it a nice customised look.
STL file for you. After closing it up, all that’s left is to
program the Arduino.

Programming
We need to upload some code to our
Pocket Weather Station. Without code
in the Arduino, our device is just a plas-
tic box with no functionality.
First, download my Arduino sketch
from the November 2022 page of the
PE website. It is a zipped directory con-
taining a file with a .ino file extension.
Unzip the package, install the latest
Arduino IDE (integrated development
environment) and open the .ino file.
longterm, reliable operation earlier because it If you wish to, you can of course-
of the Pocket Weather Station
Station. needs to be inserted into write the code yourself, but if you’re
I used hot melt glue to fix the enclosure from the outside. a beginner (or even if you aren’t), it’s
the parts inside the enclosure. After putting the switch into its slot, best to start with my version since we
However, while this is convenient, it use two small self-tapping screws or a know it works. You can always mod-
can fail if exposed to enough heat (eg, pair of bolts and nuts to fix it in place. ify it once you get it working. See the
if it’s left exposed in direct sunlight Then connect its two wires: one from panel opposite if you are interested in
inside a car). For this reason, you could the VCC pad of the Arduino board and how the code operates; that informa-
use neutral cure silicone sealant, which one wire from the positive output of tion could come in handy if you plan
offers a more reliable solution. It takes the battery charging module. to make changes to it.
longer to cure, but it’s not going to fall If the switch has three terminals, Once you have the code open in the
apart if it gets hot. make sure to connect those wires to two Arduino IDE, plug the Arduino Nano
As you fix the components in the adjacent terminals. That way, the cir- into your computer’s USB port (don’t
case, make sure the two USB sockets cuit will be completed with the switch plug into the USB charger port as it
line up with their access holes around slid to the wired end. does not pass data to the Arduino).
the edges, as you will need to connect Next, we need to complete the enclo- Then press CTRL+U (or select Sketch ĺ
to both of them later. sure. I used self-tapping screws to fix Upload) to compile the code and load
Now it’s time to add the project’s the lid in place. I had already made it into the Arduino.
slide switch into its dedicated slot. screw holes in the enclosure design, so Check the output at the bottom
Note that we did not connect the switch that was easy. Just make sure that the of the window for error messages.

At left is
the (nearly) Reproduced by arrangement with
completed SILICON CHIP magazine 2022.
project, it just www.siliconchip.com.au
needs the wires
soldered to the
switch at lower
right. Hot melt
glue was used to
make sure the
components were
secure. Note that
this glue can fail
if exposed to
enough heat.

28 Practical Electronics | November | 2022


Parts List – Pocket Weather Station
1 Arduino Nano or equivalent board
1 USB cable, to suit the Nano
1 DHT11 temperature sensor module
1 0.96-inch OLED screen with I2C interface and SSD1306 controller
1 TP4056 li-ion battery charging module
1 small 1S LiPo cell (eg, 160mAh)
1 slide switch
1 set of 3D printed case pieces (optional) www. poscope. com/ epe
6 small self-tapping screws (two for mounting the switch, four for the lid)
various lengths of light-duty hookup wire

How the software works


The software for this project is relatively simple. Don’t be daunted by the length
of the code; half of it is simply the bitmap graphics for the splash screen!
The rst few lines include all the libraries we will need the graphics librar-
ies, humidity/temperature sensor interface library, fonts and so on. It then cre-
ates the object to communicate with the DHT temperature sensor using pin
D4 and another object to drive the screen with a resolution of 128x64 pixels.
Following this is the logo bitmap, then below that the main body of the code,
which comprises three functions setup() (for initialisation), loop() (the part
which runs continuously after setup) and testdrawbitmap(), which draws the
logo on the screen.
The setup() function starts the serial port and DHT temperature sensor
communications, then initialises the display, draws the logo and pauses for
one second. Once the setup() routine has nished (ie, after that one-second
delay with the logo on the screen), the loop() function is repeatedly called as
- USB - PWM
long as the unit has power. - Ethernet - Encoders
Each time the loop() function runs, it starts by acquiring temperature and - Web server - LCD
humidity readings from the DHT11 sensor, then prints that data to the serial - Modbus - Analog inputs
console. It follows by clearing the screen, then printing the same information - CNC (Mach3/ 4) - Compact PLC
- IO
on that screen, including what the temperature ‘feels like’ based on the com-
bination of temperature and humidity. It then pauses for two seconds before
the process repeats.
This code is relatively straightforward, so you should be able to modify it
– for example, change the way the readings are displayed on the screen – if
you wish to do so.

Compilation takes a few seconds, and There might be an error in your code
if it finds a problem with your code, (perhaps you’ve forgotten to initialise
- up to 256 - up to 32
it will tell you there. Otherwise, you the display). Try using my code first as microsteps microsteps
should get an ‘Upload successful’ mes- you know it works, then modify it from - 50 V / 6 A - 30 V / 2. 5 A
sage, and your Pocket Weather Station there once you have it working. - USB configuration
- Isolated
will be fully operational.
Don’t forget to charge the cell (via the 2. All readings are ‘NA’
other USB port) so it is ready for use. This will happen if it can’t communi- PoScope Mega1+
The cell charge lasts quite a long time, cate with the temperature sensor. You
so you will rarely need to charge it. might have a problem with the connec- PoScope Mega50
Now, you can proudly carry the device tion between the temperature sensor to
wherever you go and show your cre- the Arduino board. Just re-check the
ation to friends (or maybe actually use connections. If they are correct, you
it as a weather station!). might have a problem with the sensor
itself – try replacing it.
Troubleshooting
If you are here, that probably means 3. It works when the USB cable is
that you have built the project, but it plugged in, but not from the battery
doesn’t work yet. Don’t worry, you will If this happens, there is a problem with
get it working and you will learn a lot your battery or perhaps the connec-
from troubleshooting it: tions between the battery and the rest
of the circuit.
- up to 50MS/ s
1. The OLED screen is blank - resolution up to 12bit
You might have damaged your OLED Links - Lowest power consumption
display due to an incorrect connec- This project on the Instructables web- - Smallest and lightest
tion, but more likely, you haven’t con- site: https://bit.ly/pe-nov22-pws1 - 7 in 1: Oscilloscope, FFT, X/ Y,
Recorder, Logic Analyzer, Protocol
nected the signal wires properly, so This project on the HackSpace web- decoder, Signal generator
re-check them. site: https://bit.ly/pe-nov22-pws2

Practical Electronics | November | 2022 29


Model Railway
Carriage Lights
BY LES KERR

It’s nice to have carriage lights in a model train – they add a pleasing
realism to you layout. These model train carriage lights (designed for
OO-gauge) are battery-powered and can be switched on and off with
an external magnet.

I
t might seem trivial to add lights carriage needed to have metal wheels the reed switch under the roof so that
to a model railway carriage, but there with some form of voltage pickup you can manually switch the lights on
are a few considerations that make attached to them, and they had to be and off by waving a magnet across it.
it a bit more difficult than you might insulated from each other.
initially expect. One important factor Today, most carriage wheels are Circuit description
is that the battery must be small, so the made of plastic, so they need substan- Fig.1 shows the full circuit diagram.
circuit must avoid discharging it when tial modification to pick up power The LT1932 IC2 constant-current
the lights are off. Also, you need a way from the track. Also, it isn’t that easy DC-to-DC LED driver provides a fixed
of switching the lights on or off easily. to make a reliable pick up. current that drives the series LED lights
This little circuit powers five white Now that efficient white LEDs are from the battery. It is about 70% effi-
LEDs and only draws a couple of available, it is practical to power them cient and will work down to a battery
microamps when off, and just 8mA from a small battery inside the car- voltage of 2V. It has a shutdown input
when on. The low off-current puts riage. The problem then becomes how that, when taken low, switches off the
a negligible load on the battery. The to switch the lights on and off. LEDs and reduces its current draw to
low 8mA operating current means that My simple solution is to mount a less than 1μA.
you can use two AAA batteries (cells, normally-open reed switch inside the I have specified high-intensity white
really) in series, giving 3V, which carriage, either under the roof or on the LEDs which give adequate light when
will power the circuit for about 100 floor. When a magnet is placed near driven with 1mA. The 70% efficiency
hours. If you lack the space for that the reed switch, its contacts close, sig- figure given above is for a 10mA LED
setup, you can use a single 3.7V Li-ion nalling the circuit to toggle the lights current. To reduce this to the 1mA
800mAh battery (for example, the Jay- on or off. required without unduly affecting the
car SB2300). You can see a video of the proto- efficiency, the shutdown pin is fed
The carriage size determines which type’s operation at: siliconchip.com. with a 10% duty cycle (1-to-9 mark-
batteries can be used. The circuit au/Videos/Carriage+Lights space ratio) PWM waveform.
stops working when the battery falls With this arrangement, you can The driver oscillates at 1.2MHz and
below 2V. add a magnet on the tracks just out- uses inductor L1, schottky diode D1
Until recently, lights in model rail- side a tunnel so that when the train and a 1μF ceramic capacitor to step
way carriages were powered from the approaches, it switches the lights on. up the battery voltage to the 15V or so
track. This is because small incandes- Another magnet placed near the tunnel needed by the LED string. To protect
cent lamps required a relatively large exit switches off the lights when the IC2 in case the LEDs are accidentally
current, so they couldn’t be battery train leaves the tunnel. If you want to disconnected, 24V zener diode ZD1
powered. To obtain the power, the use the train at night, you can mount clamps the maximum output voltage.

30 Practical Electronics | November | 2022


Model Railway Carriage Lights
Fig.1: the Carriage Lights circuit is based on a 6-pin LT1932 (IC2) constant-current switchmode (boost) LED driver and an
8-bit, 8-pin microcontroller (IC1). The role of IC1 is twofold: it monitors the contact closure of reed switch S1 to switch the
lights on and off, and when the lights are on, it drives the SHDN pin of IC2 with a 10% duty cycle square wave, reducing
the LED current consumption without impacting the efficiency of the driver circuit.

The peak current through the LEDs is Here is an example of how you can ►
set to about 10mA by the 2.2kΩ resistor mount the project into a carriage. Note
from IC2’s RSET pin to ground. the clear plastic insulation under the
An inexpensive PIC12F617 8-bit battery and PCB.
microcontroller is used to generate
the PWM waveform to drive the pin Construction
5 SHDN input of IC2. When reed There are components on both sides
switch S1 closes, it takes the GP2 of the PCB, so there are two overlay
digital input (pin 5) of IC1 high. diagrams: Fig.2 and Fig.3. The Car-
The 10kΩ pull-down resistor and riage Lights Controller is built on a 28
100nF capacitor help to debounce x 16mm PCB coded 09109211, which
the switch contacts. is available from the PE PCB Service.
This signals the microcontroller to It has been deliberately kept small to
come out of sleep mode and provide fit inside a typical OO-gauge carriage.
the switching waveform to IC2, turning I etched mine myself as a sin-
on the lights. If S1 is operated again, gle-sided design, but you can get the
IC1 goes back into sleep mode, and its double-sided version from the PE PCB
GP0 output at pin 7 goes low, switch- Service, which avoids the need to fit a
ing off the lights. In sleep mode, IC1 wire link. To keep the PCB small, most
draws about 1μA from the battery. parts are SMDs, so it’s a good project
If you add to this the <1μA of IC2 in if you’re interested in improving your
shutdown mode, you get a total cur- SMD soldering skills since it has a few
rent drain of less than 2μA, which is different types and sizes of SMD parts
a negligible load on the battery. – but nothing especially difficult.

Programming IC1 in-circuit


To program the micro in-circuit, you will need to solder wires to the +3V and
GND battery pads (see Fig.3), as well as the PCB pads provided to connect to
the PCLK pad (pin 6 of IC1), PDAT pad (pin 7 of IC1; the pad is also used for
the wire link) and the MCLR pad (pin 4 of IC1).
As IC1 is mounted over the PCL pad, solder this wire rst and use as little
solder as possible. Cut the part of the wire that projects from the solder joint
as short as possible so that when you solder IC1, it isn’t lifted above its pads.
With those wires in place and IC1 soldered to the board correctly, connect
the soldered wires to your programmer. For the PICkit series, the triangle indi-
cates pin 1, and the connections are MCLR to pin 1, +3V to pin 2, GND to pin
3, PDAT to pin 4 and PCLK to pin 5.
With those connections made, load up the programming software, open the
HEX le, carriage lights (0910921A).HEX and upload it to the chip.
If you are using a pre-programmed PIC12F617, it isn’t necessary to solder
these extra wires to the board.

Practical Electronics | November | 2022 31


Parts List – Carriage Lights
1 single-sided or double-sided PCB coded 09109211, 28 x 16mm available from
the PE PCB Service
1 6.8μH 200mA inductor, SMD 2.0x1.6mm up to 2.5x2.0mm, 200mA+ <0.5Ω
DCR [RS Cat 879-0742 or Taiyo Yuden LB2016T6R8M]
1 miniature single-pole normally-open (SP-NO) reed switch (S1)
[RS Cat 3622518 or Jaycar SM1002]
1 magnet suitable for use with a reed switch [RS Cat 118-7108]
1 3V battery pack [eg, 2 x AAA pack or 1 x 3.7V 800mAh Li-ion, Jaycar SB2300]
various lengths and colours of light-duty hookup wire
Semiconductors
1 PIC12F617-I/SN or PIC12F617T-I/SN 8-bit microcontroller programmed with
0910921A.HEX (IC1) – code from the November 2022 page of the PE website
1 LT1932ES6#TRMPBF LED driver, SOT-23-6 (IC2) [RS Cat 7618504]
Figs.2 and 3: the top and bottom 1 1N4749 24V 1W zener diode, through-hole (ZD1) [Jaycar ZR1424]
side PCB overlay diagrams (shown 1 SS14 40V 1A schottky diode, DO-214AC (D1) [RS Cat 6387915]
enlarged). To save space and allow
5 high-intensity 3mm or 5mm white LEDs (LED1-LED5)
the board to use single-sided copper,
all the SMDs are on one side and the Capacitors
through-hole parts on the other. The 1 100μF 6.3V radial electrolytic capacitor [RS Cat 390176]
orange wire link does not need to be 1 1μF 50V multi-layer ceramic through-hole capacitor [Jaycar RC5499]
installed if a double-sided PCB is used 2 100nF 50V X7R SMD ceramic capacitor, M2012/0805 size [RS Cat 135-9033]
(eg, from our Online Shop). Watch Resistors (all SMD 1% 1/8W M2012/0805 size)
the orientations of the ICs, diodes and 2 10kΩ 1 2.2kΩ
electrolytic capacitor during assembly.
Perhaps unsurprisingly, the sur- you can drag-solder the three pins on The inductor only has solder pads
face-mount components go on the the opposite side and then the three on the underside at each end, so it’s
copper side of the board, while the pins on the other side. Still, it’s also harder to solder it in place compared
through-hole components are inserted acceptable to just solder them indi- to the other components. To enable
from the opposite side. vidually without worrying too much you to do this, I made the PCB lands
The SOIC-package PIC12F617 micro about creating bridges. After all, it’s for the inductor larger than the com-
will need to be programmed at some pretty easy to remove any bridges that ponent body, which means there is
point (it is possible to program it in-cir- have formed with solder wick, as long enough room to get your soldering iron
cuit; see the panel below if you plan as you add a bit of flux to make the tip in to heat them.
to do it that way). process go smoothly, and avoid heat- Coat both the lands and inductor
ing the wick any more than necessary pads with flux and lightly tin the pads
Soldering to prevent damage to the PCB. with solder. Place the inductor on the
Use a flux pen or syringe of flux paste Once again, clean the flux residue PCB and apply heat from your solder-
to coat IC1’s leads and its associated away from IC2 and scrutinise its solder ing iron to the land on one side until
pads. Hold IC1 in place (eg, using twee- joints, then go back and fix any that do you see the solder melt. Do the same
zers) with the correct orientation and not appear to have formed correctly, for the other side.
use your soldering iron to tack solder or are still bridged. Depending on how much solder you
one lead into place, then check that it Now use a similar procedure to fit applied to the pads initially, you might
is positioned correctly (it’s also a good all the remaining SMDs, except for want to feed a bit of extra solder into
idea to re-check its orientation). If so, the 6.8μH inductor. The only remain- the sides while heating them.
solder the remaining leads. ing SMD where polarity is import- Now make a final check of the SMD
Clean off the flux residue and inspect ant is schottky diode D1; its cathode components to verify there are no sol-
the leads under magnification to ensure stripe should be visible on the top of der bridges or shorts, and if there are,
that all the solder joints have formed the body, and this must be located as fix them up with a bit of flux paste and
correctly. If you are not sure about any shown in Fig.2. the solder wick.
of them, add more flux and apply heat
(and possibly more solder) to reflow
the joint. If you have bridged any pins,
use more flux and some solder wick to
remove the excess solder.
Now that you’ve done that success-
fully, move on to IC2, which is slightly
trickier as its pins are smaller and
closer together. Since its body is also
quite small, you might have trouble
seeing the pin 1 indicator. You will
need to make sure you’ve found that
(eg, using a magnifier) as it must be
placed with the correct orientation.
Use the same basic procedure to Fig.4: there are just three items to wire to the board; the power supply (in this
solder it as IC1, but keep in mind that case, a 3V battery pack using two AAA cells), the reed switch and the string
it’s very difficult to avoid bridging the of white LEDs. You can use just about any type of white LED as long as the
pins with solder. If you have flux paste, voltage required to power the string is in the range of about 5-20V. Various LED
once the part has been tacked down, mounting arrangements are possible, too – whatever suits your carriage(s).

32 Practical Electronics | November | 2022


Here are both In my case, I glued the LEDs and the
sides of the reed switch to the underside of the car-
finished project riage roof and taped the battery and PCB
shown greatly
to the floor of the carriage. If you have
enlarged
for clarity. a smaller carriage, you might prefer to
While you can use 3mm LEDs. Another solution for
definitely etch the LED mounting is to solder them to
the single-sided a thin strip of Veroboard which can be
board yourself attached to the underside of the roof.
given the right If the floor of your carriage is black
supplies, we (like mine) you can improve the radi-
will be selling ated light by covering it with aluminium
a double-sided foil to reflect the light back up. If you do
version for
this, insulate the PCB with tape so that
convenience.
none of the tracks short out on the foil.
Once you have decided on the lay-
out, cut the wires to length and solder
them to the PCB.

Testing
Connect up the reed switch and LEDs,
and before connecting the battery,
have a last look at the board for faults
or dry joints. Ensure you connect the
battery the right way around – the cir-
cuit will be destroyed if you don’t.
Now place the magnet parallel to the
Turn the board over and solder in the Wiring it up reed switch a few millimetres away;
wire link (if you are using a single-sided While Fig.3 shows the basic external the LEDs should light. Remove the
board), zener diode, 1μF ceramic capac- wiring connections, there are more magnet, then put it back where you had
itor and the 100μF electrolytic, making details shown in the wiring diagram it, and the LEDs should extinguish.
sure the diode and electrolytic capac- (Fig.4). So that you can work out the
itor are the right way around. These length of the board connecting wires, Reproduced by arrangement with
components are all shown in the under- you need to decide how and where SILICON CHIP magazine 2022.
side overlay diagram (Fig.3). the components fit into the carriage. www.siliconchip.com.au

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

ELECTRONICS
£8.99

Exploring the Arduino TEACH-IN 8


FROM THE PUBLISHERS OF
FREE
CD-ROM
SOFTWARE

SERIES
FOR
THE TEACH-IN
8

This CD-ROM version of the exciting and popular Teach-In 8 series INTRODUCING THE ARDUINO
• Hardware – learn about components and circuits
• 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 at: www.electronpublishing.com

Practical Electronics | November | 2022 33


Using Cheap Asian Electronic Modules By Jim Rowe

Self-Contained 6GHz
Digital Attenuator
This new digitally programmable module
can attenuate signals from 1MHz to 6GHz by
0 to 31.75dB in 0.25dB steps. You control it using five small pushbutton
switches, while a tiny OLED screen shows the current setting.

I
recently reviewed a new and setting. Presumably, the rest of the capacitors. Apart from various bypass
small digitally-programmed UHF controller circuitry is mounted on the capacitors, that makes up all of the
step attenuator module that could underside of this PCB. actual attenuator section.
attenuate signals from 1MHz to The UHF attenuator chip is proba- Below is the control section, based
3.8GHz by 0-31dB in 1dB steps (Octo- bly the Analog Devices HMC1119, a on a microcontroller (possibly an STM-
ber 2022). It has an inbuilt microcon- ‘big brother’ to the HMC472 used in 32F103C8T6, like the one used in the
troller, and the attenuation is set using the aforementioned 3.8GHz attenuator. 3.8GHz attenuator).
four small pushbutton switches. According to the Analog Devices
The results were quite respectable data sheet, the HMC1119 has a range Operation
overall, although there seemed to be of 100MHz to 6.0GHz and seven con- The microcontroller (MCU) controls the
a bit of contact bounce with the push- trol bits, giving a setting range of 0 to attenuation settings of the HMC1119
button switches and the RF output 31.75dB in 0.25dB steps. It has a spec- via the seven programming lines, while
and power input connectors were too ified insertion loss of 1.3dB at 2.0GHz, the user determines the attenuation set-
close together. drooping to around 1.5dB at 3.5GHz ting using the five small pushbutton
As I finished writing that review, and a whisker below 2.0dB at 6GHz. – switches S1-S5. To make this easy, the
I became aware that a slightly larger all in all pretty impressive! MCU displays the current attenuation
digital attenuator had become avail- As with the 3.8GHz attenuator, I setting on the OLED screen, controlled
able, with a broader frequency range couldn’t find a full circuit for the new using a standard I2C serial interface.
and 0.25dB attenuation steps rather module, so I could only work out a basic When power is first applied, the
than 1dB. block diagram for it, shown in Fig.1. MCU sets the attenuation to 00.00dB. To
The RF1 input and RF2 output pins change this, you first press S3 (the OK
New module of the HMC1119 chip are coupled to the button) and then press S1 (<) or S5 (>)
The new module is likely available SMA input and output connectors via until the display is flashing the setting
from several suppliers on the web, but
I ordered the one shown in the photos
from Banggood, catalog code 1648810.
Currently, it’s priced at around £25
with free shipping to the UK. Like the
earlier 3.8GHz module, it’s almost cer-
tainly made in China.
The new module measures 56 x 40 x
16mm overall, not counting the SMA
connectors at each end for RF input
and output.
The digital attenuator section is on
a small PCB fitted down inside a 56
x 40 x 10mm CNC machined alumin-
ium block which forms the module’s
‘case’. The rest of the module’s cir-
cuitry is mounted on a second PCB
measuring 56 x 40mm, which forms
the top of the case.
The OLED panel is mounted on the
top of this PCB in the centre, along
with the micro-USB power socket, the
mini slider power switch and a tiny
SMD power LED. Then along the PCB
front are the five small pushbutton Fig.1: no full circuit diagram of the 6GHz attenuator available – this simplified
switches used to select the attenuation version is what we expect the block diagram look like.

34 Practical Electronics | November | 2022


digit you want to change. Then you can The 6GHz
press either S2 (+) or S4 (-) to change digital
the value of this digit. To change other attenuator
digits, use either S1 or S5 to move to from Banggood
them, then use S2 or S4 to change their has an OLED
screen and
value. Then if you press S3 again, this
weighs about
will be the new setting. 57g.
It’s pretty straightforward, and
although the tiny pushbuttons used for
S1-S5 seem to be the same as those used
on the 3.8GHz module, the additional
two buttons seem to allow the setting
to be changed more reliably. Perhaps
the firmware in the MCU has also been I first used this setup to check the For frequencies above about 1.75GHz,
improved to make it less susceptible to module’s performance at an attenua- the higher attenuation plots (−20dB and
contact bounce. tion setting of 00.00dB to see its inser- greater) develop an increasing num-
I have also shown a USB-serial inter- tion loss. This is shown in Fig.2; the ber of bumps and dips. These are very
face chip in Fig.1. This chip may or may measured insertion loss is less than apparent in, for example, the red −25dB
not be in the 6GHz module; I’ve shown −2.5dB up to about 1.3GHz, then droops plot, the purple −28.25dB plot, the red
it purely because it was present in the down to about −6.0dB at 2.5GHz, then −30dB plot and the blue −31.75dB plot.
3.8GHz module. It’s possible that, in improves to about −2.5dB at 3.0GHz. All of these four plots show an
this case, the data lines from the micro- It then droops to about −4.5dB at increasing tendency to have a signifi-
USB connector go directly to two pins of 4.0GHz, before moving up again to cant dip between 2.5GHz and 3.1GHz.
the MCU, but they certainly are routed reach −4.0dB at 4.4GHz, which looks I suspect that this may be due to small
somewhere on the PCB. promising for its insertion loss at fre- resonances inside the HMC1119 chip
Either way, it would allow the atten- quencies up to 6GHz. and/or its surrounding tracks on the
uation setting to be programmed from After this, I did response tests at attenuator section’s PCB. There might
an external PC, as well as from its own ‘major’ attenuation steps: −5dB, −10dB, also be standing waves inside the atten-
‘keyboard’. So the micro-USB socket is −15dB,−20dB, −25dB and −30dB. uator box at specific frequencies.
not just to feed power to the module, These settings were chosen to give a These plots tell us that the attenua-
but also for external control. good idea of the module’s overall per- tor’s performance is quite respectable,
As with the 3.8GHz attenuator, there’s formance. After examining the results I at least for frequencies up to about
virtually no information provided on then checked the response at a number 2.2GHz and for settings up to about
doing this external control, but I found a of ‘fine detail’ settings: −1dB, −1.5dB, −20dB. But the errors do increase for
very cryptic suggestion in the ‘Customer −2dB, −3dB, −4dB, −7.5dB, −10.75dB, frequencies above 2.2GHz and with
Q&As’ section of the Banggood info on −14dB, −19dB, −28.25dB and −31.75dB. settings above −20dB.
the module: ‘Go to github.com/emp- During each of these tests, I saved an Of course, the attenuator would still
temp/att6000_control for Python code.’ image of Spike’s plot of the test results. have many practical uses at frequencies
I’m not familiar with the Python Then, knowing that there wouldn’t be above 2.2GHz and with settings above
programming language, so I sought enough space to reproduce all 18 of the −20dB, especially if you were to use
help from colleagues who do use it. plots separately, I combined all of the Fig.3 to correct for likely errors.
They advised me that all the att6000 plots into a single composite plot, to Armed with the information men-
Python code seemed to do was send allow for easier evaluation – see Fig.3. tioned earlier on how to control the
serial text commands in the format The upper plots in Fig.3 (down to device over a serial connection, it didn’t
wv0XXYY<LF>, where the XXYY char- about −20dB) have a shape almost take me long at all to test sending new
acters indicate the desired attenuation identical to that of the top 00.00dB attenuation settings from my Windows
setting XX.YY. plot, just separated from it by the cho- 10 PC, using the TeraTerm serial termi-
In other words, sending the com- sen attenuation setting. nal application.
mand wv02375<LF> should change the
attenuator’s setting to −23.75dB.
They also informed me that the com- Fig.2: using Signal
mand should be sent at 115,200 baud, Hound’s Spike software
not the 9600 baud that seemed to be the 6GHz module
used previously. I did try this out, and could be checked at
the results are described below. an attenuation setting
of 0dB to measure its
Performance insertion loss. Note
I measured the performance of the that the setup used
new attenuator module using my Sig- for testing can only
measure up to 4.4GHz,
nal Hound USB-SA44B HF-UHF spec-
so not the full quoted
trum analyser and its matching USB- range of the attenuator.
TG44A tracking generator. Both were
controlled by Signal Hound’s Spike
software (V3.5.15) in its SNA (scalar
network analysis) mode.
Since the SA44B and TG44A com-
bination will only work up to 4.4GHz,
I could only check the module over
this range.

Practical Electronics | November | 2022 35


assigned. Then I started up Tera-Term and set it up to com-
municate with that port at 115,200 baud, with the 8N1 data
format and with only an LF (line feed) at the end of each line.
I was then able to change the attenuator’s setting at any time
simply by typing in a command like wv01575 and pressing
the Enter key. No problem! The attenuator’s OLED immedi-
ately showed the new setting (for example: ‘−15.75dB’) and
also sent back an ‘OK’ message, to confirm that the command
Your best bet since MAPLIN
had been received and acted upon. Chock-a-Block with Stock
I should perhaps note that there does seem to be provision
on the top of the attenuator (just to the left of the OLED) for Visit: www.cricklewoodelectronics.com
connecting a separate serial interface, as you can see in the Or phone our friendly kn owledgeable st aff on 020 8452 0161
photos. But there’s no information on doing this. I guess that Components • Audio • Video • Connectors • Cables
the command interface is the same, but I haven’t tried it, so Arduino • Test Equipment etc, etc
I can’t say for sure.

Conclusions
Overall this new attenuator module seems reasonably good
value for money when you consider its relatively wide fre-
quency range and low price. I also like its ability to be pro-
grammed using the built-in MCU, control buttons and tiny
OLED screen, or from a PC via the USB port (and presumably
from a separate microcontroller, via the serial port header).
My only real gripe is that when I tried to unplug the USB
cable from the micro-USB socket after testing it, the socket
lifted straight off the PCB. It seemed to have been poorly sol-
dered, and as a result, I had to spend quite a bit of time sol-
dering it back on (under a microscope). I’d have preferred a
mini-USB socket, as these seem to be a bit more rugged and Visit our Shop, Call or Buy online at:
also attach more securely to the PCB.
www.cricklewoodelectronics.com
Reproduced by arrangement with Visit our shop at:
SILICON CHIP magazine 2022.
www.siliconchip.com.au
020 8452 0161 40-42 Cricklewood Broadway
London NW2 3ET

Fig.3: a graph showing the combined result from a variety of response tests on the attenuator at various settings.

36 Practical Electronics | November | 2022


Make it with Micromite

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

Part 41: Self-contained PicoMite computer

T
his month, we will show
how easy it is to attach a TFT
display and a PS/2 keyboard to
a PicoMite, resulting in a standalone
computer that can be compared to
the popular MaxiMite Computer. Two
versions of the MaxiMite have been
featured in PE (November 2019, and
October 2021) and it must be stressed
that this PicoMite version is by no means
a replacement for either of them. So
why create it? Well, there are two main
reasons; the cost of parts used is much
lower than those required for either
MaxiMite version, but more importantly,
the PicoMite computer uses parts that
are readily available (yes, the main
chips for the MaxiMite are still pretty
much unavailable due to ongoing global
supply chain issues).
Just six modules are required to build
the PicoMite computer:
1. PicoMite
2. SSD1963 TFT module
3. PS/2 keyboard
4. Level shifter (so the 5V keyboard
doesn’t damage the 3.3V PicoMite) An easy-to-build PicoMite computer.
5. PS/2 breakout board (to connect the
keyboard to the level shifter) An important detail worth noting at this The PicoMite
6. 5V USB power supply (to power all point is that SSD1963 display modules To see an overview of how all the
the computer parts). typically have an onboard micro-SD card different elements are connected, please
socket. This means, with an refer to Fig.1. The PicoMite module is
appropriately sized SD card, it the heart of the computer. If you are
Keyboard
Touch SD can be used as the storage drive following this series (at least for the
panel socket
for our PicoMite computer. last few articles), you are likely to have
TFT module Also, these displays can a PicoMite module already. If not, then
optionally be purchased with a grab one, or ideally several; they cost
PS/2 resistive touch panel. Depending under £4 each and are readily available
breakout board on your requirements, a large from many online stockists.
touchscreen can make a nice No special firmware is used for this
user interface. computer, simply ensure that you
PicoMite
So, with the above six load the latest version of the PicoMite
Level shifter 5V USB PSU
module modules, we can easily build firmware which is available for free
a low-cost, modern-day version download from: geoffg.net/picomite.html
of an 80s home computer with At the time of writing this article, the
Fig.1. Overview of how the six modules connect an impressive 800x480, full- file available was PicoMiteV5.07.04.
together in the PicoMite computer. colour display. uf2. For details of how to install the

Practical Electronics | November | 2022 37


possibly with a 0ȍ resistor (see
Fig.3). This short needs to be
removed, and the ‘1963-PWM’
(or equivalent) option shorted
ins tead. T his m odi f i cat i on
allows the PicoMite to control
the backlight brightness via the
BACKLIGHT command.

Connecting the TFT module


Once a suitable screen arrives,
and you’ve made the backlight
control modification, the TFT
module can now be connected
to the PicoMite. To get things
up and running quickly, we
simply used 30cm female-to-
Fig.2. Mounting the PicoMite onto a Pico Expansion Board will make it easier to connect the
female DuPont leads between
other modules. To implement these connections, we use female-to-female DuPont leads.
the TFT module’s pin-header
and the Pico expansion board.
Note that stripboard can be used for
fi rmware fi le, please refer to Make it you want to use. They are available a more permanent setup, but we have
with Micromite, Part 37 – PE, July 2022, in 4.3-inch, 5-inch, 7-inch, 8-inch, not done that here due to the various
p.42-44, or the PicoMite User Manual and 9-inch variants. Unsurprisingly, pin outs that exist across the different
(also available at: geoffg.net). The whole the bigger the screen, the higher the SSD1963 modules.
process takes just a couple of minutes cost (around £25 for the 4.3-inch, The required connections are listed in
to complete. up to around £60 for the 9-inch). We a table in the PicoMite User Manual –
Note that we will be connecting the recommend getting the biggest screen however, we have recreated those details
PicoMite to the other modules with possible as it makes it a much more in Fig.4. Now make the connections
DuPont leads. To make this whole pleasant experience when writing shown in black, being careful not to
process easier, we recommend inserting program code. Essentially, the bigger dislodge any of the previously attached
the PicoMite into a Pico Expansion the screen, the bigger the characters on DuPont leads. Depending on the exact
board (see Fig.2 and refer to Make it with the screen and thus the easier it is to screen used, there are around 15
Micromite, Part 38 – PE, August 2022). read and check code. For this article, connections to make (not forgetting
we have used the 9-inch screen, which power too). Please ensure you visually
Choosing an SSD1963 TFT module results in a ‘laptop-like’ experience. The check everything as you proceed to
If you perform an online search for link to the exact 9-inch display I used is: eliminate any errors.
‘ssd1963 touch tft module’, you will https://bit.ly/pe-nov22-9in
see that there are many different types So, having searched for a suitably Testing the display
available. Our preferred supplier is sized SSD1963 TFT module, you will To test that the display is connected
buydisplay.com (no affiliation) – they likely see some options available when correctly to the PicoMite, use a USB cable
always have a good range of products proceeding to purchase it. In summary, to connect the PicoMite to your laptop/PC,
available at sensible prices, although you need to take account of the following: and launch your preferred Terminal app
shipping from China must be added to n The module should have a parallel (I like to use TeraTerm). At the command
the cost of the screen. 8080 Interface (rather than 6800) prompt, begin by resetting all options by
A word of caution here is that you n Check that a pin header is included typing OPTION RESET. Then, depending
need a complete TFT module rather (rather than FFC) on the size of the screen (see User Manual),
than just the glass-panel display. Simply n Module uses a 3.3V power supply, as type the following commands:
check that the display you are choosing opposed to 5V
includes a PCB of identical size to the n If you want to have the touch option
screen – the screen attaches to this PCB, then select ‘resistive touch’ (rather
which in turn provides connections to than ‘capacitive touch’)
the outside world, as well as containing n You may see an option for a ‘Font
the onboard SD socket. If all you see chip’ – there is no need to select this
is a glass panel with a flexible ribbon- as it isn’t used
cable, then this is not the required item. n There may be an option for the SD-
Another word of caution concerns the socket connector – select ‘pin header’
pinout of the main connector which (not FFC).
the PicoMite connects to. There is
no ‘standard’ pinout, however, they Backlight control
all have the necessary pins required, When the screen arrives, there is one
albeit potentially with slight variations modification that is likely to be required;
in naming convention. Again, please this concerns the backlight. Depending
refer to the PicoMite User Manual for on the screen size, typically there are Fig.3. On some SSD1963 tft modules,
more information. soldered jumpers on the back of the you may need to modify the backlight
There are various points to consider display module that select how the control. If applicable, remove the ‘LED-A’
when choosing an SSD1963 TFT module. backlight is controlled. By default, the short, and ensure the ‘1963-PWM’ link is
The first thing is the size of the display ‘LED-A’ option is typically shorted, shorted instead.

38 Practical Electronics | November | 2022


DB0 GP0 1 40 VBUS 5V 5V
DB1 GP1 2 39 VSYS
GND GND 3 38 GND GND
DB2 GP2 4 37 3V3EN
DB3 GP3 5 36 3V3 3.3V
DB4 GP4 6 35 ADC REF
DB5 GP5 7 34 GP28
CS GND 8 33 GND
DB6 GP6 9 32 GP27
DB7 GP7 10 31 GP26
GP8 GP8 11 30 RUN
GP9 GP9 12 29 GP22 SD_CS
GND 13 28 GND
SD_CLK T_CLK GP10 14 27 GP21
SD_DIN T_DIN GP11 15 26 GP20
SD_DOUT T_DOUT GP12 16 25 GP19 T_IRQ
RS or D/C GP13 17 24 GP18 T_CS
GND 18 23 GND
WR GP14 19 22 GP17
RD GP15 20 21 GP16 RESET or RST

Fig.4. The elements of the computer are attached to the PicoMite, as shown here. The Fig.5. Pre-built level shifters are available,
TFT connection are shown in black, the touchscreen in orange, the SD card in blue and but it is also possible to build your own
the keyboard level shifter in purple. very easily – see Fig.6.

OPTION CPUSPEED 252000 Connecting the Touchscreen


OPTION LCDPANEL SSD1963_x,L (replacing x with the The touchscreen is effectively an SPI device and requires five
appropriate parameter from the User Manual) connections, as shown in orange in Fig.4. These comprise
three SPI connections (T_CLK, T_DIN (MOSI), and T_DOUT
Once configured, you can test the screen by typing GUI TEST (MISO)), and two control signals (T_CS, and T_IRQ). Now make
LCDPANEL – this should result in the usual test screen animation these five connections and then configure the touchscreen
(animated coloured circles). If you don’t see the test animation, by typing the following two lines:
then you’ll need to check all the connections thoroughly.
Next, we need to ensure the screen is not upside-down. To do OPTION SYSTEM SPI GP10,GP11,GP12
this we just need to write something to the screen by using the OPTION TOUCH GP18,GP19
TEXT command. At the command prompt, simply type TEXT
400,240,TIME$,CM,2,3 and check if the numbers displayed Calibrating the touchscreen
are the correct way round. If not, type OPTION LCDPANEL Next, the touchscreen will need calibrating by using the
DISABLE followed by OPTION LCDPANEL SSD1963_x,RL command GUI CALIBRATE. Simply follow the onscreen
(replacing x with the appropriate parameter from the User instructions displayed on the TFT (ie, touch the four crosshairs
Manual as we did above). All we are doing here is using the in each corner in turn). If the touchscreen does not respond
‘reverse landscape’ parameter in the OPTION configuration then there will be an error either in the five connections
instead of ‘landscape’. related to the touchscreen, or the parameters have been typed
incorrectly. Use OPTION LIST to see the parameters set and
Testing the Backlight use OPTION TOUCH DISABLE prior to correcting any mis-
After you have successfully completed the above tests, it’s typed parameters.
time to test the backlight. Begin by typing something like
CLS RGB(blue) to see a coloured screen, and then type Testing the touchscreen
BACKLIGHT 50 and check that the display dims a little. If To test the touchscreen, use the command GUI TEST TOUCH
not, then check the jumper that controls the backlight and and use a plastic stylus (or equivalent) to draw on the screen.
modify as highlighted above in the Backlight control section. Pixels should appear at the point of contact; so using a fine
Continue by typing BACKLIGHT 0 which should result in tipped stylus means the accuracy can be better observed.
a totally dark screen, and then BACKLIGHT 100 which will Should the pixels appear offset to the point of contact, simply
set the screen back to full brightness. perform the calibration process again, taking care to touch
After all these tests have been completed successfully the centres of each crosshair.
setting up the touchscreen comes next. (If you don’t have
the touchscreen option installed on the TFT module, then PS/2 keyboard
proceed directly to the PS/2 keyboard section below.) The PicoMite computer uses a PS/2 keyboard due to the
simplicity of the PS/2 protocol (when compared to the
USB protocol). Even though USB keyboards have flooded
Micromite code the market, it is still possible to purchase PS/2 keyboards
online, especially through the likes of eBay. There is also a
There is no project code this month, but where applicable,
chance that you have a spare PS/2 keyboard lying around in
code is available for download from the PE website.
a drawer somewhere.

Practical Electronics | November | 2022 39


If you build your own level shifter, then make the relevant
connections to the PS/2 breakout board and the PicoMite as
Clock shown in Fig.6. However, if you’re using a pre-built level
6 5 shifter, then simply refer to Fig.8 instead.
5V 4 3 0V
0V
2 1 Configuring the Keyboard
2N7000 Once the keyboard circuit is connected, you will need to
Data D S
PS/2 keyboard GP9 configure the keyboard (from your Terminal app) by typing
6-pin mini
DIN socket 10kΩ
10kΩ
the command OPTION KEYBOARD UK
(External Insertion view) G Other keyboard layouts (ie, languages) are also supported
3.3V – you simply replace the UK parameter with a different two-
5V letter parameter. PS/2 Keyboard languages that are currently
10kΩ supported are: French (FR), German (GR), Belgium (BE), Italian
2N7000 (IT), Spanish (SP) and United States (US).
D S
GP8

G
10kΩ Configuring the console
Once the keyboard and display have been connected to the
PicoMite, we can configure it to behave as a standalone
computer. Before disconnecting the PicoMite from the PC/
Fig.6. A simple level shifter for the PicoMite computer can be laptop, we need to enable the TFT to display the output
built with just four 10kΩ resistors and two N-Channel MOSFETs, that is normally sent to the Terminal app – in other words,
as shown here. enable ‘the console’. This is done from your Terminal app
by typing OPTION LCDPANEL CONSOLE 2 (the parameter 2 is
a reference to the default font; this can be changed to 1 (for
One point to highlight here is that PS/2 keyboards are smaller characters) or 3, 4 or 5 (for larger characters)
designed to operate at 5V, and this means the two signals Once the console is enabled, you will see the output that
(Clock and Data) coming out from the keyboard are at a 5V is normally displayed in the terminal app (ie, TeraTerm)
logic level. shown on the TFT screen. Now press some random keys on
However, the Pico module has a maximum rating of 3.6V the PS/2 keyboard and make sure they are displayed on the
on any input pin. If we connect the 5V keyboard directly to TFT (pressing Enter should then result in a ‘Syntax Error’).
the PicoMite then it will result in permanent damage to the However, if there is no response from the keyboard then check
PicoMite’s input pins (GP8 and GP9 in this case). Therefore, the keyboard circuit carefully (and ensure the keyboard is
we must use a level-shifter circuit to bring the 5V signals down configured correctly using OPTION LIST).
to a safe 3.3V, thus avoiding any damage to the PicoMite.
Power supply
Level shifter Once you have a working keyboard and console, you can
You can think of the level shifter as having an input side remove the USB lead that currently connects the PicoMite
operating at 5V (which connects to the PS/2 keyboard), and to your laptop/PC. This will power everything down. Now
an output side operating at 3.3V (which connects to the connect a suitable 5V USB power supply directly to the
PicoMite – pins GP8 and GP9). PicoMite and you should see the MMBASIC welcome message
It is possible to buy a pre-built level-shifter module; two appear on the TFT. From now on, anything you type on the
common examples are shown in Fig.5. Alternatively, you can keyboard will appear on the screen. If not, check that you
build your own on a small piece of stripboard or Veroboard. have not accidentally dislodged a cable. Also, do ensure that
All you need are four 10kΩ resistors, and two N-Channel your USB PSU can supply at least 300mA (most are now a
MOSFETs (2N7000 or equivalent) – see Fig.6 for connection minimum of 1A). If you have got to this point, then you are
details. Either way, you will also need a PS/2 connector almost done – we just need to connect (and configure) the
(effectively a 6-pin mini-DIN socket) into which you insert SD card socket.
the PS/2 keyboard cable plug. The easiest method is to use
a PS/2 breakout board (such as the one shown in Fig.7) SD card
which provides header pins to the four required keyboard An SD card is essentially an SPI device (just like the
connections (5V, GND, Clock, and Data). These header pins touchscreen). Only four connections are required to connect
then connect directly to the level shifter. it to the PicoMite, as shown in blue in Fig.4. These comprise

Fig.7. A PS/2 breakout board like this one makes it easy to connect the PS/2 keyboard to the level-shifter.

40 Practical Electronics | November | 2022


three SPI connections (SD_CLK, SD_DIN (MOSI), and SD_
DOUT (MISO)), and one control signal (SD_CS). Now make
these final four connections, and then configure the SD socket
by typing OPTION SDCARD GP22 on the PS/2 keyboard. Next, Clock
6 5
insert an SD card and type FILES which should display the
5V 0V
contents of the SD card. If it fails to see the SD card, then 4 3
2 1
check the four connections fi rst, then check the OPTION
parameters (with OPTION LIST) and finally check the SD

GND
HV1
HV2
HV
Data
PS/2 keyboard
card. Note that the SD card should ideally be 8GB, 16GB or 6-pin mini
32GB. Other capacities may work, but all brands of these DIN socket

GND
(External Insertion view)

LV1
LV2
LV
sizes tested so far seem to work without exception.

Summary GP8

If you have successfully reached this point in assembling


this project then you should now have a fully functioning 0V GP9 3.3V 5V

standalone PicoMite computer. If so, you can now do lots of


experimenting (either pure programming, and/or controlling Fig.8. If using a pre-built level shifter, then connect it to the
other external hardware) without the need for an attached PicoMite and the PS/2 breakout board as shown here.
laptop or PC.
However, if you have struggled at any point, then just Next time
drop me an email with the relevant details and I will assist By the way, we have not forgotten about the fingerprint
in getting you back on track! reader mentioned last month; we just had a slight mishap
Do please send photos of your PicoMite computer, including after attaching a slightly too higher voltage to it! Hopefully
a brief description as to how you’re using it. It is always nice a replacement will arrive in the coming days, in which case
to hear about your projects and experiences. we will discuss how to use it with the PicoMite.
However, if the world’s mangled supply chains are unable
to deliver a new fingerprint reader then we’ll look at a super
variation to the TFT PicoMite computer – one that we think
Questions? Please email Phil at: you’ll really like – a VGA version of a standalone computer.
[email protected] Until then, stay safe, and do have FUN with your new
PicoMite computer!

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.

We can help and advise with your enquiry,


from design to construction.

JTAG Connector Plugs Directly into PCB!! 3D Printing • Cable • CCTV • Connectors • Components •
Enclosures • Fans • Fuses • Hardware • Lamps • LED’s •
No Header! No Brainer! 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

Our patented range of Plug-of-Nails™ spring-pin cables plug directly


into a tiny footprint of pads and locating holes in your PCB, eliminating
the need for a mating header. Save Cost & Space on Every PCB!!
Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More Station Road
Cullercoats

www.PlugOfNails.com North Shields


Tyne & Wear
Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm) NE30 4PQ
Tel: 0191 2514363 [email protected] www.esr.co.uk

Practical Electronics | November | 2022 41


AUDIO AUDIO OUT

L R

OUT By Jake Rothman

Transformers in audio – Part 4

L
ike many inductive parts, Impedance Zp = N2 × Zs may just refer to one secondary. There
audio transformers are a little is also sometimes confusion over centre
unusual and are often custom So with a ratio of 58:1 taps. An 8000ȍ centre-tapped prima-
wound. So, in this month’s Audio Out ry can also be described as 2000ȍ +
I will provide a comprehensive list of Zp = (58²) × 3 = 3364 × 3 = 10092ȍ 2000ȍ. This is because if two identical
the most common parts that I’ve come windings are connected in series then
across over 40 years, together with their Back to front the DC resistance doubles, but the im-
specifications and application. Note that A transformer can usually be used ‘back- pedance quadruples. If two windings
some companies listed no longer exist wards’ with the secondary and primary are connected in parallel the DC re-
– such as Repanco – and the data is windings swapped. The terms ‘primary’ sistance is halved and the impedance
provided for historical reference and for and ‘secondary’ are merely designations remains the same. This is because the
when you are working on old equipment. and the fundamental transformer equa- number of turns is effectively the same,
However, most of the items in the tables tions work both ways. For example, an but the cross-sectional area of the wire
below are available from the AO shop. LT700 makes an effective step-up trans- is doubled.
Before we go any further, here’s a re- former for a loudspeaker
cap on all-important audio transformer used as a microphone in
function of converting from turns ra- an intercom.
tio (N) to impedance, and vice versa. I’ve noticed on some
data sheets that the
N2 = Zp/Zs or N = ¥(Zp/Zs) turns ratio and imped-
ance don’t agree. This
For example, with a 10kȍ:3ȍ transformer: could be because they
are stating the optimum
N = ¥(10,000/3) = 58 source and load imped-
ances for flat response.
Therefore, the transformer has a ra- Also, where there are
tio of 58:1 dual secondaries, such Fig.39. The Vigortronix/OEP transformer mounting
as in the T/T3, 3.6:1+1, boards. These allow series/parallel linking, Zobel
Going the other way: the quoted impedance networks and the use of Molex connectors.

Fig.37. Studio monitor control unit with Sowter 5069 Fig.38. Custom-wound Jensen output transformers (lower left)
Mumetal/M6 output transformers. The Zobel network is 22nF in the Audio Precision SYS-2712 analyser. This transformer
and 1.5kΩ. This is the same transformer that we discussed in balanced output has the lowest distortion I’ve ever seen. It has
Fig.30 in Part 2. to, since it is the system by which other amplifiers are measured.

42 Practical Electronics | November | 2022


Table 1: Cheap ‘n’ cheerful audio transformers (* – still in production)
Part Number Manufacturer Application Turns ratio Impedance ratio
LT700* Eagle/generic Push-pull output 200mW or class A in Ladybird book radio 20CT:1 1.2kΩ CT to 3Ω
LT44* Eagle/generic Push-pull driver (often used as high-value 5.8H to 9H inductor) 4.5:1CT 20k:1k CT
LT717 Eagle Input for step-up. Bipolar transistor input 12:1 150kΩ:1kΩ
LT722 Eagle Push-pull driver (Deacy amp) 1.4:1 2kΩ:1kΩ CT
LT726 Eagle Jaycar MM-2530 push-pull output 200mW 12.5CT:1 (3.2Ω) 500Ω CT to 3.2Ω or 8Ω
or 7.9CT:1 (8Ω)

LT730 Eagle Push-pull output 500mW 500Ω CT:3.2Ω + 8Ω 12.5CT:1 or 500Ω CT:3.2Ω or 8Ω
7.9CT:1 (8Ω)
T/T1, E187A Repanco/OEP/RS Push-Pull driver 1mA DC in pri 800Ω:800Ω CT 2mW 1:1CT 800Ω:800Ω CT
217-624* Jaycar MM-2532
T/T2 Repanco Push-pull output 200mW low voltage 4.5V/6V OC72 amp 6.6CT:1 130Ω CT : 3Ω
T/T3 or E187B Repanco/OEP/RS Dual-secondary driver 5mW small Ravensbrook amp 3.6:1+1 3kΩ : 250Ω + 250Ω
217-646*
T/T4 Repanco Single-ended speaker output 50mW 20mA DC 9:1 243Ω : 3Ω
T/T6 Repanco Push-pull driver 2.8:1 CT 7.8kΩ: kΩ
T/T7 Repanco Push-pull output 1W 9V 2x OC81 9.2CT:1 250Ω:3Ω
T/T12 Repanco Class A 3W car radio output 2.9:1 400mA DC gapped core. 2.9:1 28Ω:3Ω
T/T23 Repanco 10W push-pull driver OC25 (80mA Ic) 2:1CT
T/T24 Repanco 10W push-pull OC25 output Could possibly replace output 1.35+1.35:1+1 22Ω CT:15Ω sec windings
transformer in Mullard 5W class-A PT1 transformer with in series 3Ω when in
worse bass. (Primary inductance 30mH, not 1H) parallel
X7920 Greenweld Interstage, collector load to base I/P 4.5:1 6kΩ:300Ω
GR51135 Gardeners Balanced low impedance OP 1.35+1.35:1+1 22Ω CT:15Ω sec windings in
series 3Ω when in parallel
PE Vocoder 1:1 150Ω:150Ω 4.5:1 6kΩ:300Ω
output
250P* Triad Magnetics (dis- Tapped push-pull split output (suitable for low power Ra- 2:1+1 1000Ω CT:250Ω+250Ω
tributed by Mouser) vensbourne style Fig.14a)
42TU048-RC* Xicon (via Mouser) 1W push-pull output useful for low-voltage outputs. 2.45:1 (8Ω) 48Ω CT:3.2 or 8Ω
42TU120-RC* Xicon 1W push-pull output (Bush TR130 radio replacement). 3.9:1 (8Ω) 120Ω CT:3.2 or 8Ω
42TU200-RC* Xicon (Mouser) 1W push-pull output (Deacy amp) 5:1 (8Ω) 200Ω CT:3.2 or 8Ω
42TU400-RC* Xicon (Mouser) 1W push-pull output 7.9:1 (8Ω) 500Ω CT:3.2 or 8Ω
42TU003-RC* Xicon (Mouser) 1W push-pull output op amp to speaker output 12.2:1 (8Ω) 1.2kΩ CT:3.2 or 8Ω
42TU400-RC* Xicon (Mouser) 1W push-pull output 7.9:1 (8Ω) 500Ω CT:3.2 or 8Ω
42TU003-RC* Xicon (Mouser) 1W push-pull output op amp to speaker output 12.2:1 (8Ω) 1.2kΩ CT:3.2 or 8Ω

The Audio Out guide to the Vigotronix VTX-101-003, Belclare/ amplifier enthusiast, they are the bee’s
audio transformers OEP A 262 A3E, RS 210-6426 or STC/ knees. One important characteristic
Our first list (Table 1) is for old trans- ESD 66122X, which are all equivalent. of expensive transformers is that they
former designs descended from the The windings should be connected in don’t generally need specialised drive
germanium transistor era (1954 to 1978). series if phantom power (connected to circuitry to give good results.
They were originally used for transis- the junction centre tap) is to be used and In professional audio gear the audio
tor radios and other consumer audio in parallel for moving-coil microphones. transformers are often the most expen-
products. Note that a star (*) indicates (However, for both configurations the sive components, even more expensive
the transformer is still being made. turns ratio remains the same.) Vigortronix than the toroidal mains transformer.
Next, (Table 2) we have medium-priced are the lowest-cost supplier of these com- They are worth it to many users/de-
audio transformers from companies such ponents. Note that Vigortronix also make signers because they sound good, are
as Gardeners, Hammond, Sescom, Triad bespoke ‘special’ inductive components, totally reliable and it’s the only way
and Vigortonix. These are parts suitable including mains toroidal transformers. to get fully effective isolation from ex-
for standard Hi-Fi and studio equipment; Last, but not least, we turn to high-end traneous noise.
with optimised circuitry they can give audio transformers in Table 3. CineMag, They are expensive because they are
excellent results. Audionote, Gardeners, Jensen, Sowter, a hand-made niche component. If you
Belclere, OEP (Oxford Electrical Prod- Partridge, Lundahl, Stevens & Billington look at the CiniMag ‘how it’s made video’
ucts), STC/ESD and Vigortronix make a and the BBC make the best transformers. (https://youtu.be/TqOSfW5tqBA) you will
range of generic audio transformers, all The Audionote transformers even use see lots of people doing skilled manual
with different part numbers for the same silver wire for the ‘cost-no-object Hi- jobs with wires and sticky tape. Even
component (see the VTX-A series in Table Fi designer’; although, from a physics laminations seem to be hand inserted
2). For the Steve Dove circuit in Fig.20 perspective I’m not convinced. How- one by one. It was the same when I
(Part 2) and Fig.25 (Part 3) you can use ever, if you are a single-ended triode visited ICW Capacitors recently, who

Practical Electronics | November | 2022 43


VTX-A series VTX-A series
Series connected Parallel connected

Gnd Centre tap (CT) Gnd Hot


Cold Hot Hot Cold
CT Gnd Cold Gnd
Link Link
series series
C R
Primary Secondary Primary Secondary
3 3
Link
series
Gnd
Cold Not C R Not
Hot 2 2
used used
Gnd pin Gnd Gnd pin

Insert C3, R3 Zobel for series Insert C2, R2 Zobel for parallel
C1, R1 can be used as an alternative position

VTX-A series
Individual windings

VTX-A series top view

Primary Secondary
Gnd 4 Hot (A) side (B) side
A B C R 2 Cold
Hot 3 1 1
Cold 1 4 4 4 4
Gnd
3 3 3 3
Links Links
not not
used used
2 2 2 2

Gnd 1 1 3 Hot 1 1
C R
Cold 2 1 Cold
2 2
Hot 4 Gnd pin Gnd pin
Gnd
Note phase
Primary Secondary Dots – dots = hot

Insert C3, R3 Zobel for series

Fig.40. Variations of the transformer-mounting boards. Note Zobel RC values are for high impedance loading (>20kΩ) and a signal
generator source impedance of 50Ω.
make special capacitors for KEF speak- shown in the studio monitor control unit paper in the October 1987 issue of JAES
er crossovers. in Fig.37.) Indeed, it was Dr GAV Sowter (Journal of the Audio Engineering Soci-
Sowter transformers are the most cost-ef- who did the main research on nickel-based ety) is also well worth reading and this
fective of the top-quality units. (A couple core audio transformers in his 1945 Lon- can be found on the Sowter website:
of Sowters 5069 output transformers are don University PhD thesis. His seminal https://www.sowter.co.uk/pdf/GAVS.pdf

Table 2: Medium-price audio transformers

Part Number Manufacturer Application Turns ratio Impedance ratio


VTX-101-001* Vigortronix Low impedance speaker or headphone output 6.3+6.3:1+1 150Ω+150Ω:3.75Ω+3.75Ω
A262A1E Belclere A series Note in series this would be
88-2100 RS 600Ω CT:15Ω CT
VTX-101-002* Vigortronix OEP/ Interstage 1+1:2+2 150Ω+150Ω:600Ω+600Ω
A262A2E Belclere A series
88-2102 66120D RS ESD
VTX-101-003* Vigortronix OEP/ Microphone input 1+1:6.45+6.45 Series 600Ω CT: 25kΩ
A262A3E/EN6423 Belclere A series Parallel 150Ω: 6.45kΩ
88-2104 RS
VTX-101-006* Vigortronix OEP/ Balanced line output 1+1:1+1 150Ω+150Ω:150Ω+150Ω
A262A6E Belclere A series In series 600 ohm
88-2106 RS
VTX-101-007* Vigortronix OEP/ Higher Z balanced line output 6Vpk-pk at 30Hz 1+1:1+1 600Ω+600Ω:600Ω+600Ω
A262A7E Belclere A series In series 2.4kΩ
88-2108 RS
VTX-101-3001* Vigortronix Balanced line output PE Mic amp 10.6Vpk-pk at 30Hz 1:1 600Ω:600Ω
Z3001 OEP
VTX-101-3002* Vigortronix Balanced line output High level 37Vpk-pk at 30Hz SiFe core 1:1+1 600Ω:600Ω+600Ω
76825D8380MO1 Generic/surplus Mumetal modem transformer 300Hz to 20k used for active 1:1 600Ω:600Ω
crossover tweeter output.
MI-81 Sescom Line out distribution 4 outputs. 1+1:1+1+1+1 600Ω/150Ω

44 Practical Electronics | November | 2022


Primary 2
R1: 2kΩ R1: 1.1kΩ
Gnd VTX-101-3002 top view
C1: 8.2nF Gnd C1: 6.8nF
Hot Cold
Cold R C Hot CT R C PR1
VTX-101-3002
1 1 1 1 18Ω
Link Link for SEC
Primary VTX-102-3001 Secondary series Secondary 30Ω
operation Gnd Gnd
PR2
Cold Cold 18Ω
Hot Gnd Hot
Gnd Hot Gnd
Cold CT
1+1:2 or 1:1 (primaries in series)
Primary 1

Fig.43. Dual-outline PCB for VTX-102-3001 and VTX-101-3002 output transformers. Note: the 6.8nF Zobel value is for a 50Ω source.

Jensen then took this further by or 43Vpk-pk). It should approach Audio Veroboard and other Paxolin boards just
making arguably the best audio trans- Precision levels with the right ampli- aren’t strong enough. Small ‘Lo-Fi’ trans-
formers. I have only seen two in my fier, but how would I test it? Expect formers from Eagle and Xicon are fine
whole career, the output transform- to pay well over £140 for one. Jensen mounted on stripboard. Big audio trans-
ers in the Audio Precision distortion have become so adept at balancing the formers can weigh over 200g and often
analyser shown in Fig.38. In conjunc- capacitances and resistances of their need to be bolted down, especially on
tion with a negative resistance driver transformers that most don’t even need PCBs. Today’s fibre-glass PCBs are much
amplifier, they give a distortion of Zobel networks. The upper response stronger than stripboard, especially if
less than 0.0002% over the full audio roll-off approximates to a Bessel curve they have plated-through holes. For this
bandwidth. Jensen’s JE-11BMCF out- which gives superior group delay, reason, I’ve had a couple of PCBs de-
put transformer is similar and has a thereby benefiting transient response. signed by Mike Grindle to mount some
THD of 0.002% with zero source re- commonly available transformers from
sistance at up to +26dBu (15.46V rms Let’s get building Vigortronix and OEP, which are used in
High-quality audio transformers are the bulk of my designs. These are both
much heavier than most components available from the PE PCB Service – No-
and mounting them requires extra care. vember 2022 section.
The first board is designed for the stan-
dard VTX-A range and has provision
for wiring both the dual primaries and
secondaries in series or parallel using
links. The earthing is via the mounting
holes, with the earth also available on
the Molex connectors for cable screen-
ing. There is also provision for Zobel
networks. There can be two separate
networks on individual secondaries (for
phase splitters) or a single one. This is
used when the two secondaries are com-
Fig.41. VTX-101-003 Microphone bined as one winding, either in series
transformer with screening can showing or parallel on the boards, as shown in
series-connected windings. The Zobel Fig.39. The overlays are shown in Fig.40.
values are 680pF and 15kΩ. The VTX-101- Fig.42. Line-output board with parallel- An assembled microphone input board
007 with secondaries in series is wired the connected VTX-101-007 transformer. The is shown in Fig.41. A line output board
same way with a Zobel of 13nF and 1.8kΩ. Zobel network is 1.3kΩ and 6.8nF. for the VTX-101-007 is shown in Fig.42.
Table 3: High-end and expensive

Part Number Manufacturer Application Turns ratio Impedance ratio


LL/76MPC BBC Mumetal low-level, 6Vpk-pk at 30Hz 1:1 600Ω:600Ω
LL/942PU BBC Mumetal high level +20dBu 1:1 600Ω:600Ω
CMOQ-2 HiNi* CineMag Mumetal high level +22dBu 1:1 600Ω:600Ω
JE-11BMCF* Jensen Mumetal high level +26dBu 1:1 600Ω:600Ω
JE-16A* Jensen Mic to 990 discrete op amp 1:2 150Ω :600Ω
LL 1530* Lundahl Mumetal Mic to 5534 IC 1+1:3.5+3.5 600Ω:7.35kΩ in series
3785* Sowter High level input isolation transformer +26dBu at 50Hz 1:1 10k:10k
5069 Sowter Mumetal/M6 combination core high level +25dBu at 50Hz 1:1 600Ω:600Ω
Neve LO1166 St Ives Windings SiFe M6 core high level gapped core for BA283 amp 85mA 1:1.67 windings in 150:600Ω windings in
Sowter 1717 is Sowter (both now DC +26dBu at 50Hz series series
the replacement* Carnhill)

Note: Sowter and OEP have been taken over by Carnhill Transformers (https://carnhill.co.uk).

Practical Electronics | November | 2022 45


Fig.44. 3001 assembly – the Zobel Fig.45. 3002 version. Here, the primaries
network is 2kΩ and 8.2nF. are connected in series giving a 1:1 ratio.
Fig.48. Hebden Sound condenser
Fig.46. Small condenser microphone microphone. Like most studio microphones
internal pre-amplifier. Note the output it contains small audio transformers.
transformer which uses ‘E’ laminations only.
impedance, low-noise FET buffer fol-
lowed by a modulated-current-source
bipolar emitter follower with a bit of
high-pass filtering to remove wind noise
(Fig.47). Note how the transformer uses
its centre-tap to harvest the phantom
power from the incoming microphone
lead for the electronics. The finished
microphone is shown in Fig.48.

Note the Zobel network has different used in the Vocoder output transformer Dual parallel op amp
values for series and parallel connect- driver (February 2022) the Zobel capac- transformer driver
ed secondaries respectively, 13nF and itor was 33nF because of the negative The circuit in Fig.49 was developed to
1.8kΩ for series, and 6.8nF and 1.3kΩ source impedance drive. drive a VTX-101-007 600Ω balancing
for parallel. transformer while avoiding the addi-
The second board design (shown in Interesting circuits tion of a complex push-pull output
Fig.43) is a dual-outline for both the Finally, here’s a round-up of a few in- stage to provide the necessary current.
VTX102-3001 and the bigger VTX- teresting audio transformer circuits to Two 5534s with paralleled outputs
101-3002 output transformers. Again, whet your appetite / soldering iron. can provide up to 80mA peak. The
provision for Zobel networks is pro- circuit has negative output resistance
vided, since I’m sick of hanging them Hebden Sound/Calrec con- to reduce distortion. The prototype is
on the output of XLR sockets. Fig.44 denser microphone. shown in Fig.50.
shows the assembled board for the I helped the late Keith Ming with this
3001, and Fig.45 for the 3002 with the design many years ago. It shows what’s Push-pull driver
primaries wired in parallel to give a hidden inside many condenser micro- This circuit takes the opposite approach
1:1 ratio. When this transformer was phones (Fig.46). It’s a 500MΩ input to Fig.49 in that the transformer is driven

R10
R1 10MΩ R2 R11
1GΩ 10MΩ 68kΩ

C1 D Male
R6 TR2
1nF 390kΩ BC184LC XLR
G L1 socket
C3 330µH
T1
TR1 10µF 3
1.5:1
S 2N4338 16V
+

Screen BFW11 R7
+ C2
C5
100nF + 120kΩ 1µF
C11 35V 2 1
R4 R8
R13 R9
1GΩ 10µF 1.8kΩ 0V
35V 120kΩ 680Ω
+

C7 C8 C12
100nF 100nF L1 15nF
C4
25mm Mic 330µH
10µF
capsule 16V
TR3
C6 R3 R5 R12 BC214LC
10nF 10MΩ 150kΩ 560kΩ C9 C10
22nF 22nF
0V

Fig.47. Circuit for Hebden Sound/Calrec 1072 condenser microphone. Yes, those resistors are 1000MΩ (1GΩ).

46 Practical Electronics | November | 2022


+12V
68pF
100nF
4.7kΩ
0V
4.7kΩ
2 8
– 10Ω
IC1a 1
3 5532 Maximum output
+ 13.8Vpk-pk at 1kHz unloaded
4.7µF 11.6Vpk-pk at 30Hz unloaded
68pF 9.6Vpk-pk at 30Hz 600Ω load
+

Input 4.7kΩ VTX-101-007 Output


Series connected Fig.50. Photo of parallel op amp drive circuit.
4.7kΩ Hot
6
– 10Ω
IC1b 7
13nF
5 5532
+ 4
–12V

1.8kΩ
100nF

100µF
+

Cold

Zout = 160Ω at 1kHz


2.2kΩ Sense resistor 68Ω

0V

Fig.49. Line output transformer drive circuit. Op amps are in parallel to Fig.52. BTL transformer driver on Veroboard gives
double the output current to 80mA max. 11Vpk-pk at 30Hz from an 007 transformer, which is the
highest output voltage possible without saturation.

+12V sense resistor R9. The built-in interwinding screen now


C3 C7
200pF 100nF
has no effect because one of the secondaries is used as
0V
part of the primary. However, this is less critical on an
R2 output (See the Veroboard circuit is shown in Fig.52.
C1 5.6kΩ
4.7µF R1
NP 5.6kΩ
2
VTX-101-007
Three windings series connected
Neve BA283 output amplifier
– 8
IC1a 1 I have to include this circuit (Fig.53) since it has
Input 3 5532 Output such a massive following among recording engi-
+
neers. This is down to its wonderful harmonic
Zobel Hot
character due to its 1960s single-ended topology
C5
10µF R6 and massive drive capability by virtue of a class-A
C2 R3 NP 150Ω R10 2N3055 running at 85mA. The output transform-
1.5nF 10kΩ
1.8kΩ
er costs almost £100 because it is huge and has a
0V R7
3.3kΩ C6 gapped core. It uses M6 silicon iron, not Mumet-
47nF
al, to get the +34dBu high level and to generate
C4
Cold
the third-harmonic distortion to complement the
47pF R8
3.3kΩ Zout = 51Ω second-harmonic distortion generated by the am-
Output at 25Hz = 11Vpk-pk plifier. The PCB is shown in Fig.54. The full ‘Neve’
R5
5.6kΩ microphone pre-amp I built is shown in Fig.55.
R4 R9 Screen (NC)
5.6kΩ 150Ω
6
– Mid-dip balancer
IC1b 7
5 5532
Here’s a simple circuit I devised for an edgy-sound-
+ 4 ing synthesiser that also had 50Hz buzz from
–12V
power supply leakage. It uses the two tightly
C8 coupled secondaries from a T/T3 phase-splitter
100nF
transformer to provide output isolation and bal-
0V
ancing from the synthesiser output to the XLR
socket shown in Fig.56. The primary, which is
Fig.51. Bridge-tied load (BTL) transformer driver. This avoids distorted loosely magnetically coupled to the secondaries
current going into signal ground. is tuned with a capacitor to remove some energy
from the magnetic circuit in the midrange, there-
by a bridged amplifier output. In this case the voltage swing is doubled and by getting rid of the harshness. The step-up ratio
the output current is only 40mA. This means a step-down transformer is allows a smaller capacitor value to be used.
needed. This is achieved by connecting three of the transformer’s wind-
ings in series, giving a 3:1 ratio, as shown in Fig.51. The advantage of this Bass bumper
circuit is that no dirty current is sunk into the signal ground, it is confined Normally, it is best to directly couple transformers to
to the power rails. Again, negative output resistance is provided, and this amplifier outputs. Occasionally, capacitor coupling
proved to be the trickiest part of the circuit to design. I had to cancel the can be used to advantage to give a ‘bass boosting’ ef-
common-mode signal using R7 and R8, leaving the voltage dropped on the fect, as shown in Fig.57. It’s not real bass boost, it is

Practical Electronics | November | 2022 47


Fig.53. The Neve 12Ω
+24V
Iq = 85 mA
BA238 output driver 1W
Male
circuit. A massive 3 8 XLR
socket
single-ended, class A DCR DCR
6Ω 20Ω 1.5kΩ 3
configuration.
T1 2 7
LO1166
1:1.67 4 6 2 1
68kΩ DCR DCR 0V
10nF
6Ω 20Ω
Negative
feedback 2 5 1000µF
220pF 25V +

+
Output maximum: 54Vpk-pk
10µF 10µF at 1kHz into 600Ω load
25V 2.2kΩ 25V Output maximum: 36Vpk-pk
+

2N3055 at 20Hz into 600Ω load

Input BC184C BC184C

47nF 3.3kΩ
Trim Iq
gain to
x3.8 330pF
Set Iq
1.5kΩ
+4.0V gives Iq = 85mA
4.7kΩ
+ 47Ω
100µF 1.2kΩ 18kΩ 1W
25V

0V 0V
56kΩ

3.6:1+1
Max
In/Out
C DCR
4.7kΩ
22Ω
Log 0V
CW DCR Bidrectional
68Ω
Min dip

1µF DCR In/Out


22Ω
0V

Output T/T3
level

0dB

Max dip
–16dB

20Hz 1.6kHz 40kHz


Frequency

Fig.54. Neve BA238 output driver board. Note the uses of a TO3 output Fig.56. ‘Mid dip’ circuit – provides isolation and a
transistor: bomb-proof, good-sounding over-engineering. ‘smiley curve’ at the same time.

Fig.55. A completed ‘Neve’ microphone pre-amp built for Ed Lewis at Giant Wafer Studios. Note the row of four LO1166 transformers.

48 Practical Electronics | November | 2022


an under-damped high-pass filter with rising distortion below oscillator using the ubiquitous LT700. Here, the output
1kHz (see Fig.58 and Fig.59). This gives the illusion of more bass. transformer doubled as an inductor to make a resonant cir-
I used it on a broadcast microphone to get more gravitas by boost- cuit for a Hartley oscillator –see Fig.62.
ing sub-70Hz signals. People weren’t fooled, I’m still five foot six! That’s enough audio transformers for now! I hope you’ll
agree they are a vital if often overlooked component. We will
Austerity audio inevitably return to them, but not for a good few months!
In these straitened times, sometimes only a cheap stripboard cir-
cuit will do just before the electricity gets cut off and the iron
goes cold. Fig.60 shows the
45mA
simplest class-A amplifier +6V
VTX-101-007 *Alternative transformer
of the type I built when I available form Mouser:
T/T4*
9:1
was a kid. It has standing 42TU200-RC
330nF
243Ω primary
current through the output 22nF
impedance
transformer, so a gapped or 22kΩ 3Ω
40Ω source 100kΩ output
butt-jointed core is needed. impedance load impedance 110mW
The Repanco T/T4 shown in 10µF BC549C 100nF
270Ω

+
Fig.61 fits the bill perfectly. I
BFY50
remember nagging my mum Input
to buy the little yellow box Gnd Connect to case and
pin 1 if XLRs are used
from the local TV shop. Then 8.2kΩ 560Ω 2.7Ω

I found they had marked up 0V 0V


the RS catalogue price 100%. Fig.57. A transformer circuit that
Another application was provides isolation, ‘bass bumping’
to make a a little test tone and a bit of ‘top-end peaking’. Fig.60. An affordable class-A amplifier circuit. Very popular in
magazines like Practical Wireless in the late 1960s. PE did a
germanium transistor version of this in April 1969. However, it
only supplied 50mW output!

Fig.58. The frequency response of the circuit in Fig.57. Call it what


you will, ‘boom ‘n’ tizz’ or my new name, a ‘cats ears’ curve.

Fig.61. Transformer for the little class-A amp in Fig.60. I’ve


had one of these in my junk box, sorry: ‘strategic research
and development inventory’, since 1972.

PSU range: works down to 2.1V, and up to 15V 5 – 15mA


+9V
1.2kΩ CT
3.2Ω secondary
R1 C2 C3
22kΩ 22nF 150nF


+ C1
100µF 1.2Vpk-pk
LT700*
45mW output
into 3 – 8Ω
loudspeaker

TR1
BC337
R2 R3
22kΩ 100Ω
Fig.59. Driving a transformer from a high source impedance raises
distortion. Feeding it through a 330nF capacitor (as in Fig.57) causes 0V
a steep rise in distortion with decreasing frequency. Transformers
already exhibit rising distortion in the bass, so this circuit gives an Fig.62. A cheapie circuit that cheeps – a 1kHz crude sinewave
exaggerated transformer effect. (0dB input, 100kΩ load, 40Ω source) LT700 test-tone oscillator.

Practical Electronics | November | 2022 49


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.

50 Practical Electronics | November | 2022


Circuit Surgery
Regular clinic by Ian Bell

Electronically controlled resistance – Part 3

I
n the previous two issues we Before discussing how to implement might be much louder than others due
discussed electronically controlled re- a compressor or limiter we need to to differences in the signal processing
sistance, focusing on the use of JFETs describe what they do and define their in each case. This could be difficult to
(Junction Field Effect Transistors) as volt- basic characteristics. Having done listen to even if the loudest source did
age-controlled resistors. First, we looked that, we will discuss their operational not cause distortion.
at the basic characteristics of the JFET principles, focusing on the role of the Limiters and compressors can
that make it suitable for this task. Then, JFET variable resistor in these circuits. address these problems by reducing
last month, we covered details of a vari- We will not cover full design details and the dynamic range of the signal to avoid
able attenuator in which a JFET takes the the complexities of different possible distortion and/or provide a safer or more
place of one of the resistors in a potential implementations. Readers interested comfortable listening experience. They
divider. We discussed the impact of the in complete JFET-based compressor can also be used in more specific ways;
JFETs characteristics on the design and circuit designs will be able to find many for example, in manipulating the sound
performance of this circuit, including use examples by searching online. from musical instruments. Compression
of feedback to reduce distortion caused of audio dynamic range can make audio
by the JFETs non-linearity. Finally, we Use of audio limiters sound louder, particularly when there
looked at examples of circuits in which and compressors is a hard limit on the maximum peak
the JFET attenuator is combined with op Audio signals can vary very substantially amplitude. Compression used in this
amps to create a voltage-controlled am- in volume or loudness over time – the way should not cause the maximum
plifier, often known as a ‘VCA’. range of loudness (quietest to loudest) level to be exceeded (that would cause
Such voltage-controlled amplifiers have in an audio signal is called the dynamic distortion) but allows the average level
a number of uses in both audio and radio range, and in some circumstances the to be larger – so with everything else
frequency circuits. In radio they can be dynamic range of the signal source equal (no change of volume control) the
used for AGC (automatic gain control) so is large enough to be problematical. perceived loudness increases. Record
that a radio receiver can adapt to varying Examples include situations where, if companies have increased compression of
signal strengths. In audio, they have a the quietest parts of the audio were at recorded music over the years to increase
number of specific uses, such as noise an acceptable level, then the loudest the perceived loudness of their product
gates and muting circuits, which reduce would be at dangerous levels to listeners (this is known as the ‘loudness wars’).
or modify the gain of an amplifier when or would cause excessive distortion in Unfortunately, this is often detrimental to
no signal is present to prevent noise amplifiers and speakers. Similarly, in the quality of the music, where dynamics
being very audible, or to cut the volume converting signals from analogue to are usually an important part of a good
of background audio (eg, music) when digital the analogue-to-digital converter listening experience. Similarly, the audio
a main signal is present (eg, a spoken will have a fixed dynamic range (from in adverts in many situations is often
announcement). They are used in music the least-significant bit to the maximum highly compressed and therefore sounds
synthesiser envelope shapers, which digital code value), which may be louder than other content.
control how the loudness of a note varies smaller than the
over time after is its played (eg, how dynamic range
long a note takes to fade after a keyboard of the source,
key strike). Another important use of again excessive
voltage-controlled amplifiers in audio distortion can
is in limiters and compressors, and this occur if the
what we will focus on this month because, converter’s
at least historically, this is an important maximum input
use of JFETs as electronically controlled level is exceeded.
resistors. Of course nowadays a lot of Another situation
modern audio processing is done using where audio
digital signal processing (DSP) hardware dynamics can
or software; nevertheless, it is interesting be a problem is
to consider how JFET-based circuits work. when switching
There are numerous ways to implement between different
voltage-controlled amplifiers other than sources (eg,
using JFETs as variable resistors, but here different speakers
we will stick with our current interest in conversation) Fig.1. Relationship between input and output levels for
in the JFET approach. w h e r e s o m e uncompressed, compressed and limited signals.

Practical Electronics | November | 2022 51


To reduce the output level with respect to the uncompressed
output, a compressor must reduce its gain as the input level
increases above the threshold. The gain values for the cases
shown in Fig.1 are shown in Fig.3, with an extended input level
range to better see the shape of the curves. The uncompressed
response has a constant gain for all input levels. The compressed
and limited responses have constant gain below the threshold.
Above the threshold the compressor gain decreases – the shape
of the curve is a reciprocal function (related to one over the
input level) and is asymptotic to 1/R for a compression ratio of
R:1. For example in Fig.3 the 2:1 compressed curve will level
off at 0.5 (=1/2) for very large input levels and the limiter gain
will eventually level off at zero (=1/∞).

Compressor timing – attack and release


Fig.2. Examples of different compression ratios. The ‘level’ values in Fig.1 and Fig.2 are the average level of the
signal over time, not the instantaneous level of each peak in
Compressor characteristics – threshold and ratio the signal waveform. Audio signals such as speech and music
The most common form of audio dynamic range compression have complex waveforms with successive peaks at different
does not affect the quietest signals but reduces the effective gain levels, and if a compressor changed its gain with each peak
for louder signals. Thus, increasing the level of a loud signal the waveform would be badly corrupted. Consider an audio
input by the same relative change as a quiet input signal results input where there was a sudden increase in volume level –
in a smaller relative change in the output level for the loud anything observing the signal would not know during the first
signal. Limiting is an extreme case of compression in which few waveform cycles after this if the signal was just exhibiting
increases in input level of loud signals do not cause any change a few particularly large peaks or if there was a significant
in output level. The different processing of ‘quiet’ and ‘loud’ change in average level. Compressors therefore respond by
signals implies a threshold dividing the two. Fig.1 shows a plot slowly increasing or decreasing their gain for step changes in
of input level against output level for a compressor, limiter and level above threshold.
uncompressed signal (standard amplifier). The levels are in The speed of response may be different for increases and
arbitrary units (eg, could be decibels (dB) or volts) and show decreases in level, so we have two parameters which define
an uncompressed gain of 1, but the output values could be the speed of response. The attack time is the period taken to
scaled to show non-unity gain or attenuation. respond to an increase in average input level and the release
Before we go any further, an important terminology point. time is the time taken to respond to a decrease in average
From the above you can see that the word ‘threshold’ is used input level. These times are typically in the range units to
with two distinct meanings in the context of a JFET-based hundreds of milliseconds and may have a significant effect
compressor. A JFET’s threshold or threshold voltage is the on the perceived audio quality of the output. Different values
minimum gate-to-source voltage (VGS(th) or VT) that is needed may be used depending on the type of audio being processed
to create a conducting path between the source and drain and the context of it use.
terminals. The compressor’s threshold is as described in the Fig.4 shows a typical compressor waveforms for a signal
previous paragraph. In the following, assume unless specifically with a step change in input level. The input starts below the
indicated otherwise that when the word ‘threshold’ is used it threshold but then increases quickly to a level above threshold
is referring to compressor action. (see top trace). The gain of the compressor (gain control signal
The amount of compression is expressed as the compression in Fig.4) will decrease to reduce the gain for the larger input
ratio – this is the ratio between the level above the threshold for signal. It takes the attack time for the change to the lower gain
an uncompressed signal and the level above the threshold for to fully take place. After some time at the larger amplitude,
the compressed signal. The ratio is 1:1 for uncompressed and the input in Fig.4 drops quickly back to the initial lower level.
∞:1 for an ideal limiter. Fig.2 shows some compression ratios The gain therefore increases back to the original level. Again,
between these extremes. Real limiters do not need to have an this does not occur instantaneously, and in this example the
∞:1 ratio – tens to one is sufficient. As a limiter is a special time to return to the higher gain (release time) is longer than
case of a compressor, we will just use the term compressor
from now on.

Fig.3. Gain of compressor against input level. Fig.4. Example compressor attack and release times.

52 Practical Electronics | November | 2022


circuit to obtain a true RMS
Signal D1 R1 Average
Input (root mean square) average
Input Input amplifier 2 value for the audio signal.
amplifier amplifier 1 (if required)
In Fig.6, the attack time R2 C1
Input R1 Output
is controlled by the RC time
constant of R1 and C1. If R2
was not present C1 would
charge up to a value related
Control
voltage to the maximum signal Fig.6. Very basic circuit for
JFET
level and never decrease obtaining average signal level
Control signal circuitry
Rectification, threshold (expect due to leakage). with control of attack and
attack, release and ratio R 2 d i s c h a r g e s C 1 a n d release times.
Gnd
ensures that the average
circuit output decreases when the average input signal
level decreases. Since the discharge path for C1 is via
Fig.5. Simplified block diagram of compressor circuit using JFET
both R1 and R2, their combined value (along with C1)
attenuator to control gain.
sets the release time. R2 is connected as shown, rather
than directly across C1 to avoid forming a potential divide
the attack time (which is typical). In Fig.4 it can be seen that for the rectifier output.
the relative change in the output level due to the step change The JEFT in Fig.5 will switch off with relatively large negative
is smaller than the relative change in input level due to the voltages at the gate. Under these conditions it is effectively
action of the compressor. open circuit and the JFET-plus-R1 potential divider will have
a gain of one. As the control voltage increases (becomes less
JFET compressor circuit negative) the gate will reach the JFETs threshold voltage,
Fig.5 shows a simplified block diagram of an audio dynamic the device will turn on, its resistance will decrease and the
range compressor or limiter based on the JFET voltage- signal will be attenuated. Further increases in control voltage
controlled attenuator/amplifier circuits discussed last month. (towards 0V) will decrease the gain. If the circuit is set up
To minimise distortion, feedback of 50% of the JFET drain- with appropriate bias/reference voltages and signal levels the
source signal would usually be applied to the JFET gate, JFETs threshold can be mapped to the compressor threshold.
but this is omitted from Fig.5 to simplify the diagram. The
feedback can be applied directly around the JFET or from one JFET gain-control characteristics
of the amplifiers connected to the potential divider output, as We can run some simulations to illustrate that the JFET potential
discussed last month. divider characteristics can match the requirements for gain
The circuit in Fig.5 operates as follows. The input signal control of the compressor shown in Fig.3. In the first article we
is amplified (or attenuated) by the input amplifier, which showed graphs of the variation of JFET resistance with gate-
provides high input impedance to prevent the JFET potential source voltage, and noted that it was non-linear, but did not
divider attenuator loading the signal source. It, together with discuss further details. To be more specific now, the relationship
Electronically controlled resistance – Part 3
the choice of R1, also ensures that the voltage levels applied between the JFET’s drain-source resistance (RDS) and the gate-
to the JFET are appropriate (the drain-source voltage must be source voltage (VGS) at small drain-source voltages is given by:
small for low distortion – as discussed in the previous articles).
𝐴𝐴
The signal from the input amplifier is attenuated by a variable 𝑅𝑅!" =
amount by the potential divider formed by R1 and the JFET. (𝑉𝑉#" − 𝑉𝑉$ )
The amount of attenuation (and hence overall gain when Here, A is a constant dependent on device construction and
the output amplifiers connected to the potential divider are VT is the JFET’s threshold voltage (typically around −3V for an
considered) is set by the control voltage applied to the JFET n-channel JFET). A key thing to note here is the resistance is
gate. This is the same principle as the variable gain amplifier inversely proportional to the gate-source voltage above the JFET’s
discussed last month. Here the control voltage is derived from threshold. Thus, applying a control voltage to the JFET in the
the level of the output signal – thus the circuit has a feedback potential divider (in Fig.5) that is proportional to signal amplitude
loop which can reduce circuit gain as signal level increases in will result in a gain of the potential-divider-plus-amplifier which
order to achieve the compression or limiting function discussed
above. The second output amplifier may be needed if the signal
level from the first amplifier is not equal to the required final
output or if buffering is required.
As discussed above, the gain control is based on the average
signal level over time and needs to respond at a suitable
speed (the attack and release times defi ned above). This
can be achieved by rectifying and filtering the signal from
output amplifier 1 and applying it to an RC filter (which sets
the response times). This is the same basic principle as the
circuits used in simple AM radio detection and AC-to-DC
power supplies. The simplest version of this is shown in
Fig.6, but typically real compressor designs will use more
sophisticated circuits. In particular, Fig.6 is only a half-wave
rectifier, but a full-wave rectifier should be used. Usually this
would be implemented using an op amp-based precision
rectifier, which avoids errors due to diode voltage drops.
The op amp rectifier can also act as output amplifier 1. In Fig.7. LTspice circuit to investigate JFET resistance and
principle, even better performance can be achieved by using a potential divider gain.

Practical Electronics | November | 2022 53


Fig.8. Simulation results for the circuit in
Fig.7 (JFET resistance top and potential
divider gain bottom).

is inversely proportional to the signal


amplitude – which is the relationship
we see in Fig.3 above the compression
threshold. Furthermore, if the circuit is
configured correctly, low average signal
amplitudes will produce a control voltage
below the JFET’s threshold and hence a
constant gain.

Simulations
Fig.7 shows an LTspice schematic
which can be used to illustrate the
JFET resistance and potential divider
gain-to-gate-source voltage relationship
discussed above. The circuit applies a
constant 200mV DC voltage to the R1-
JFET potential divider and uses a DC
sweep simulation to plot the response
of the circuit for VGS values ranging from
−2.9V to −1.5V. The sweep range starts
at −2.9V as this is just above the JFET’s
threshold voltage (VT)
of the 2N3819, which
is −3V in the LTspice
model. The results are
shown in Fig.8. The
top trace shows the
resistance of the JFET
(calculated using drain-
source voltage (equals
V ( o u t ) ) divided by
drain-source current
(Id(J1)). The lower
trace shows the gain of
the potential divider
(V o u t / V ( i n ) ). We
Fig.9. LTspice circuit to investigate JFET potential divider gain with respect to compressor gain can see the reciprocal
control requirements. relationship between
both the JFET resistance
and the potential divider gain, and the
gate-source voltage above VT.
The LTspice circuit in Fig.9 has two
versions of the circuit in Fig.7. One is
basically the same as in Fig.7 and the
other uses a behavioural source to offset
the control voltage (JFET VGS) by 0.5V
with respect to the first. The sweep range
is extended with respect to Fig.7 to start
below the JFET threshold voltage.
The results for Fig.9 are shown in Fig.10.
The top plot simply shows the control
voltages to confirm the 0.5V offset between
them. The lower plot shows the potential
divider gain for the two circuits. The shape
of the curve is very similar to Fig.3 and
shows that if we apply a control voltage
to the JFET potential divider which is
proportional to the signal amplitude and
mapped onto a range appropriate for the
JFET, then we achieve the gain variation
characteristics required by a compressor

Fig.10. Simulation results for the LTspice


circuit in Fig.9.

54 Practical Electronics | November | 2022


Fig.11. Another LTspice
circuit to investigate
JFET potential divider
gain with respect
to compressor gain
control requirements.

with LTspice using the circuit in Fig.11


where a resistor has been added at the
JFET’s source. This resistor will change
the limit of the potential divider gain
when the JFET resistance is small. The
results are shown in Fig.12. Comparing
FIg.12’s plots with Fig.3, we see can the
source resistor could be used modify
the compression ratio.

Simulation files
Fig.12. Simulation results for the circuit in Fig.11. Most, but not every month, LTSpice
is used to support descriptions and
circuit. By changing the DC offset of We can manipulate the characteristics analysis in Circuit Surgery.
the control voltage, we can modify the of the JFET potential divider by adding The examples and files are available
compressor threshold. additional resistors. This is illustrated for download from the PE website.

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
o er lifier d
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 | November | 2022 55


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  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
 The techniques of electronic
project construction PRACTICALLY SPEAKING
The first section (80 pages) is dedicated to Circuit INGENUITY UNLIMITED
 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 –


 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  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
 TINA (Limite ramming tutorial in 11 parts plus free double-click 2 Plus MikroElektronika,
PIC Prog ch-In
CODE V3
 FLOW d versio
n) software nics Tea Publishing
Ltd
Microchip and L-Tek PoScope
Software Quizzes to Test
(Limite Electro WimborneMPLAB, PIC and
dsPIC are
rated
logy Incorpo ogy
active
Again, a whole range of subjects, from soldering to
© 2013 and logo,

 Inter ledge The Microch


ip name of Microchip
Techno
s. © 2013
Microch
ip Technol
.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

Teach In 3 Cover.indd 1 06/05/2010 16:22:29

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
 An eleven part tutorial
important electronics units that are currently studied in
many schools and colleges. These include, Edexcel
 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  Over 800 PDF pages

contains over 800 pages of electronics theory,


 In-depth theory
autorun,
should
This software in Windows
 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

projects, data, assembly instructions and web links. ANUAL


dable Free
Downloa be.com
www.ado

BA SE Mmag.co.uk
www.epe
ne Publishi
ng Ltd.
2011

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 FCRDE-ROM
EE OM EE M E
FR -RO
n ...and much more! FR -R

ELECTRONICS Audio Out – an ELECTRONICS ELECTRONICS


£8.99 £8.99 £8.99
D CD
DV

and Circuit Surgery


The Teach-In 6 CD- analogue expert’s take
TEACH-IN 6 TEACH-IN 7 TEACH-IN 8
FROM THE PUBLISHERS OF

by Ian Bell – ‘State


FROM THE PUBLISHERS OF
FREE

ROM also contains all


CD-ROM
on specialist circuits
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
Electronic Building Blocks
By Julian Edgar

Quick and easy construction Great results on a low budget

Selecting and Using Actuators – Part 2


Turning electronic signals into physical movement – linear and rotary

L
ast month, we looked at some of the ways use precious metal brushes that wear more quickly. Literally
that we can turn electronic signals into physical move- hundreds of configurations of these motors are available,
ment. We covered DC motors and their use in linear with varying gear reductions, output shaft lengths and
actuators and RC servos. This month, we continue with gear configurations (eg, right-angles), stall currents and supply
and stepper motors. voltages. Output torque values can be over 50kg-cm.
Some motors are available with quadrature encoders (eg,
Gearmotors up to 64 counts per rotation) giving feedback of motor speed
Gearmotors are small DC motors that have a gearbox and/or direction.
mounted on one end. The gearbox reduces motor speed and If you intend using a gearmotor in a common application
increases torque, making the motors useful in a wide range (eg, turning a wheel on a model car or robot) then the cheapest
of applications where continuous rotation is required. Most approach is to buy a kit that comprises the motor, wheel,
of these motors use a D-shaped output shaft, so pulleys and coupling and mounting bracket (Fig.2).
wheels with a suitable female opening can be connected, with If you are after a large and powerful gearmotor, and are
or without set-screws (Fig.1). working to a strict budget, salvage a battery-powered electric
Micro metal gearmotors use a small motor (10 x 12mm drill. (The drills using old battery technology – eg, nickel-
cross-section) and exposed reduction gears. They are available metal hydride (NiMH or Ni–MH) batteries – are very often
in a very wide range of gearing – from 5:1 to 1000:1. ‘20D’ discarded.) Inside, you’ll find a brushed DC motor connected
gearmotors use enclosed gearboxes, with the assembly 20mm to an epicyclic gearbox (Fig.3). The assembly is easily removed
in diameter. Available ratios are from 29:1 to 154:1. Still more and connecting it mechanically to the output is easy – you just
gearmotors are available in 25mm and 37mm diameters with clamp a shaft in the chuck. These motor/gearbox assemblies
a wide variety of gear ratios. produce excellent torque, even at low supply voltages, thus
If you intend operating a gearmotor for long periods, ensure allowing them to be speed controlled over a wide range while
that you select one equipped with carbon brushes – some still having the grunt to operate real-world loads. The clutch

Fig.1. A gearmotor – note how the gearbox is attached directly to the Fig.2. A gearmotor, mounting bracket, coupling and wheel.
end of the motor, giving a compact assembly. The typical D-shaped Gearmotors are ideal for driving wheels on moving robots and similar
output shaft can be seen. This gearmotor is a 24V design that rotates – this gearmotor operates on 6V, draws a loaded 0.5A and rotates
at a no-load 25 RPM (150°/s). Cost is just £6. at 100 RPM. Cost is £11. (Courtesy Banggood)

Practical Electronics | November | 2022 57


Fig.3. The motor/gearbox assembly from an old battery-powered electric drill. These can be obtained at low/no cost and have excellent
torque. The mechanical connection to the output can be made by clamping a shaft in the chuck.

fitted to many drills can even be used to in professional and hobby 3D printers separately monitored, or something like
protect the motor should the load stall. and CNC machines designed to machine a microswitch is used to establish a ‘start’
In summary, where continuous, high- wood, plastic or metal. They’re also position on a repetitive basis.)
torque rotation is needed, a gearmotor is used in printers, cameras and many The second major advantage is that
an excellent choice. The huge range and other consumer and industrial goods – a stepper motor has good low-speed
ready availability of couplers, mounts see Fig.5. torque. It can therefore get loads
and accessories also means that you Stepper motors have three major moving from a standstill better than
can assemble lots of different projects advantages over other actuators. The most other actuators, without needing
without any machining or complex first is that because they can be driven gearing. Finally, a stepper can be speed-
metalwork. However, keep in mind that in discrete steps, the position of the controlled accurately – the electronic
gearmotors are not ‘commercially rated’ output shaft can be determined with controller determines the required
– ball bearings are not used and there accuracy. That is, if the output shaft number of steps per second; making it
is no facility for easily oiling motors is rotated by – say – 50 steps, because essentially a frequency-based controller.
and gearboxes. the angular rotation is known for each While stepper motors are most often
step, the final shaft position can be used in applications where position or
Stepper motors accurately determined. (Note, though, speed are important, in many hobbyist
In contrast to the continuous rotation that this is open-loop control – there is applications stepper motors are also
achieved by DC brushed motors, stepper no position feedback built into a stepper useful when an ultra-durable motor is
motors – as the name suggests – are motor. To cater for this, most commercial required. Most medium and large stepper
driven in discrete steps, each step being users of stepper motors have systems motors are equipped with ball bearings
a small or very small fixed fraction of a where a variable being influenced (rather than plain bearings), and don’t
full rotation. Stepper motors are used by the action of the stepper motor is need commutator brushes, which wear

Fully opened and closed automatic switch-off

A
ctuator position feedback Door open Door closed Polarity
Fig.4. An easy way
can quickly get quite complex. reversal to automatically
Usually, a microcontroller is M switch off a DC
needed – and it will typically need to motor’s power in ‘fully
+
opened’ and ‘fully
run PID software to do a good job. But
closed’ positions.
what if you simply want a DC motor
to turn off when a certain position is – door, simply swap
reached? In that case, you can use the the polarity of the
approach taken in linear actuators. Let’s motor feed. The
look at this more closely – it’s elegant diode associated
and simple. with the ‘door open’
Let’s imagine we want to turn off an microswitch will
actuator when a door is fully opened or allow the current to
closed. Two normally closed (NC) series bypass the switch,
microswitches are used in the power so causing the
feed to the actuator motor, with their actuator to move
Red microswitches open Both microswitches closed Green microswitches open
levers or buttons arranged so that one in reverse. When
switch is opened when the door is fully When you want to open the door, the door fully closes, the same thing
open, and the other switch is opened you feed power to the circuit. Then, happens, but this time it’s the ‘door
when the door is fully closed. Across when the door has fully opened, the closed’ switch that opens to stop power.
each microswitch is wired a parallel microswitch cuts off power to the Note that the diodes must be rated for
diode, oriented cathode to cathode. motor. When you wish to close the the current requirement of the motor.

58 Practical Electronics | November | 2022


Fig.5. Stepper motors are used in a very wide variety of consumer and industrial equipment, making salvaging second-hand steppers
easy. They’re also available new from many sources. (Courtesy Adafruit)
out, thus they are reliable and have a long life. If you need a control is needed. And, unlike servos, the controller needs
motor to turn continuously, using a stepper motor may well be to be able to handle the current demand of the stepper motor.
a better approach than using a conventional brushed DC motor. Further, to get the best results, the controller needs to be
However, stepper motors have a significant downside – well matched to the specific stepper motor.
to achieve all these good things, sophisticated electronic Stepper motors are available in wide range of sizes and
configurations – from those as small as
a coin to ones as large (or bigger than) as
a coffee mug. However, many hobbyists
use stepper motors that fall within the
NEMA (National Electrical Manufacturers
Association) frame sizing. NEMA sizing
refers to the distance between the
mounting holes, measured in inches. So,
a NEMA 14 stepper motor has a distance
of 1.4 inches between its flange mounting
holes, a NEMA 17 has a distance of 1.7
inches between mounting holes, and so
on. (Fig.6).
Note that the NEMA sizing refers only
to the physical faceplate size – it doesn’t
refer to the mechanical or electrical
characteristics of the motor. Having said
that, NEMA 17 is commonly used in 3D
printers and smaller CNC machines. The
larger NEMA sizes are more common
in CNC machines used in industrial
applications. At the other end of the scale,
tiny stepper motors are useful in robotic
and animatronic applications.
Like gearmotors, stepper motors are
available with D-shaped output shafts and
there are lots of adaptors, shaft connectors,
gears and levers available to help make
the mechanical construction of a project
Fig.6. The NEMA standard sizes for a variety of
stepper motors. Note that the NEMA spec applies more straightforward.
only to the spacing of the flange mounting holes, not The next stepper motor specification to
to the electrical specifications. consider is the number of steps per full
revolution. This can be expressed directly

Practical Electronics | November | 2022 59


board costs from £10 – £20 and works
with most stepper motors connected in a
four-wire configuration – See Fig.7. (Do
shop around – there is a quite a range of
pricing / delivery times). We covered this
board extensively in the December 2021
Electronic Building Block column.
Stepper motors are excellent where a
well-matched electronic control system
is being used and precise positioning is
required. But they’re also useful where
high durability is needed – if I had to
construct a 24/7 shop window display
with a waving hand, then I’d use a
stepper motor.

Fig.7 This standalone programmable controller is a very easy way of getting a stepper Solenoids
motor up and running. Speed, direction and rotational angle can all be set, and the module
Where an actuator with a short, low force
has the ability to store nine programs that can be run automatically in sequence.
and linear movement is needed, a solenoid
is the cheapest and easiest option.
in step count (eg, 200 steps/revolution) or indirectly as the A solenoid consists of a coil wound around a hollow former.
degree of rotational change for each step – so 1.8° in this case. Positioned partly inside the former is an iron plunger. When
(360° / 200 steps = 1.8° per step.) Common step counts are 24, power is fed through the coil, the plunger is pulled fully into the
48 and 200. Other stepper motor specifications include voltage, former. As this movement occurs, a coil spring is compressed.
current draw per phase and holding torque. For example, a When power is switched off to the coil, the spring returns the
NEMA-17-size stepper may have the following specs: 1.7A plunger to its previous position.
per phase at 2.8V and a holding torque of 3.7kg/cm. (See last Solenoids move very quickly, so they can place high
month’s issue for more on torque.) Note that maximum current instantaneous loads on whatever they are moving. They also
flow occurs when the stepper is in the ‘hold’ position. tend to be noisy when triggered, though of course when they’re
There is a range of stepper motor electrical configurations in fully open or closed positions, they don’t make any noise
resulting in 4-wire, 6-wire and 8-wire motors. These can be at all. Solenoids are specified for:
driven in different ways – eg, series and parallel, unipolar and n Operating voltage
bipolar, normal stepping and micro stepping. (For a detailed n Continuous current draw (but note that peak current draw
coverage of different stepper motor driving techniques, on switch-on will be much higher)
refer to Using Stepper Motors Parts 1-5, PE, October 2019 – n Maximum pull value (usually in newtons).
February 2020.)
If you are using a stepper motor in a critical positioning or Most solenoids are rated for continuous duty – that is, they can
speed application, I suggest that you buy a suitable stepper be held in their pulled-in position with a constant supply of
motor for your application and also buy the supplier’s power. Note that solenoids work equally happily on AC or DC.
recommended controller. There’s a lot of difference between Ensure that any solenoid you source has a plunger design
just making a stepper motor rotate – and having it rotate a to which it’s easy to make a mechanical connection. Many
repeatable number of steps with high torque. Of course, many solenoids have a forked end to the plunger, allowing connection
commercially available projects that use stepper motors (eg, of links via a simple pin, or screw and Nyloc nut. Solenoids
3-axis router and mill kits) take this approach, with the motors, are widely available at low prices and old tape recorders –
controller software and interface all provided. both audio and video – usually have a selection of solenoids
On the other hand, if all you want to do is rotate a stepper, and that can be salvaged.
you won’t destroy precious materials if it gets it slightly wrong If you’re using a transistor or similar to drive a solenoid,
(or you’re happy to tweak the control system to get the results remember that you will need to fit a freewheeling diode –
you want) then microcontroller stepper motor control boards, solenoids create a big inductive spike on switch-off.
and standalone low-cost stepper motor controllers, are widely Solenoids are ideal for applications like door and cabinet
available. For example, the Banggood / AliExpress ‘DC8V-27V locks, but they can also be used to raise visual indicators
Programmable Stepper Motor Driver Controller Board Step (your mail has just been delivered!) or to automate mechanical
/ Angle / Direction / Speed / Time Adjustable 42/57 Phase’ handles and pull-knobs.

Conclusion
If you wish to develop a mechanical system that is electronically
controlled, your options have never been better. There are now
plenty of low-cost electronic controllers available, and there’s
a vibrant retail sector selling mechanical parts. However, the
success or otherwise of your project will rest heavily on the
actuator(s) you choose and how you drive them.
For high speed and low torque applications, a simple
brushed DC motor directly driving the load (eg, a fan) works
well. If the torque requirement is high (eg, driving a winch
or hill-climbing wheeled robot) then a gearmotor is cheap
Fig.8. A typical general-purpose solenoid with a spring return. This and effective. For really high torque loads, look towards
one is for use on 12V, with a continuous current draw of 2A and a something like a car windscreen wiper motor. If the required
maximum pull of 20N (about 2 kg force.) Cost is low – only about £4. motion is in a straight line, a linear actuator will give

60 Practical Electronics | November | 2022


reasonably durable and very powerful value for money. They can be driven to operate thousands of hours a year, a
results. Using inbuilt limit switches or from a microcontroller or, where you stepper motor can provide that too.
feedback-based electronic controlled, want easy control over speed and Which brings us back to gearmotors.
the linear actuator’s maximum and acceleration, by a more sophisticated I must admit that the explosion in the
minimum extensions can also be easily controller. However, remember that number and type of these motors took me
set. Each of these DC motor-based they’re typically not designed for by surprise – there are literally hundreds
actuators can also be speed controlled many hours of use – I doubt that one of designs available with different gearing,
via PWM, and with the use of a more would cope with opening and closing electrical characteristics and output shaft
sophisticated controller, the actuator’s household curtains several hundred configurations. Geared right down, and
maximum speed and acceleration can times a year, for example. run at low voltage and with position
be finely regulated. Stepper motors are good where feedback, gearmotors can rival stepper
If rotational accuracy is needed, torque positional accuracy is paramount – CNC motors for many tasks – and be much
and power loads are not too high, and machines, 3D printers and the like. But simpler to operate. At the other end of the
the rotation needs occur within an again, don’t miss something that does spectrum, they can rotate fast enough to
angle of less than 180°, an RC servo can seem to be a little overlooked – if you be suitable for high-speed requirements.
provide all of that – accurately and at want a stepper motor control system to And solenoids? To operate, all
low price. RC servos are a good example work at commercial levels of accuracy, they need is to have AC or DC power
of a relatively complex product where the motor and controller will need to be connected or disconnected – and it
the price has been driven down by well matched. On the other hand, if you doesn’t get much simpler than that! Truly
economies of scale – they are brilliant just want a very durable motor that needs there’s an actuator for every project…

Levers – and car air brakes

W
hen using linear actuators airbrake, one that rises very fast when rise as fast as possible. So what about
(see last month’s issue) and the driver puts their foot on the brake using a lever to increase the speed of
solenoids, levers are especial- pedal. (An air brake creates a lot of movement? If we put the actuator and
ly important. Levers trade higher speed aerodynamic drag and thus slows the the lever’s fulcrum (pivot point) close
and stroke for greater required actuator car very rapidly at high speeds – and together, with the load at the other
force, or vice versa – less required actu- all without any concern around tyre end of the lever, we will turn a slow
ator force for slower speed and reduced skidding on the road or track.) actuator movement into a faster one
stroke. (If this sounds familiar, it’s just From what we’ve learned here, an (Fig.8). But, at just the same rate as the
the same as gearing. Gearing comprises airbrake’s up/down movement would increase in speed, we will also increase
continuously rotating levers.) be best accomplished by a linear the force the actuator has to exert.
So, and just for a moment putting actuator – high force and when power So let’s say a linear actuator extends
on my other hat as an automotive is removed, it locks itself into position. fully over 5 seconds, and we want to
modification writer, let’s say we want However, these actuators are quite arrange a lever to make the airbrake
to create a racing car aerodynamic slow – and we’d want an air brake to extend fully in just 0.2 seconds. That’s
a 25:1 ratio – so the force on the linear
Fulcrum actuator goes up by just the same
A
Lever ratio. Hmm…, it depends on speed
B and air brake area, but let’s say that
at full deployment, the airbrake has a
force acting on it of 300N (that is, the
force that is trying to close it). 300N
multiplied by 25 = 7500N! In reality,
the required force won’t be quite as
high as this (because at any angle less
Linear actuator
than full deployment, the air brake will
exert less force) but the back-of-the-
envelope calculations quickly show
that no normal linear actuator is going
Fig.10. A trial rear aerodynamic air to meet the requirement. (In fact, in this
brake on a road car. When braking, the situation, I used a pneumatic cylinder
panel between the side fins was rapidly backed by a lot of air pressure. It didn’t
raised through about 80 degrees. The quite meet the force requirement, but
speed of the required erection, and it came close.)
Fig.9. By using a lever, we can increase the forces involved, meant that no off- So, while levers are very effective
the stroke and speed over which a linear the-shelf electrical actuator could do it
actuator works – distance B will be larger in mechanical situations of the sort
– no matter the leverage applied. But
than distance A, with both achieved in the we are describing, remember that you
a pneumatic cylinder (arrowed) could.
same time. But you can’t get something And the result? At very high speed the can never get something for nothing
for nothing – the force that the linear brake was excellent – but unfortunately, – there will always be a trade-off in
actuator needs to develop increases in at legal speeds, it was rather weak. Oh, terms of speed/stroke or required
direct proportion. if only to drive every day in Germany… actuator force.

Practical Electronics | November | 2022 61


Max’s Cool Beans
By Max the Magnificent

Flashing LEDs and other engineering temptations – Part 33

O
ne of the things that Thinking about this caused me to re- Analogue magic
never ceases to amaze me is visit the gears forming the gear train in I’ve noticed that my meandering mus-
how little I know and how the simple servo my friend Steve Manley ings seem to be stirring up a lot of reader
much I have yet to learn. In an ear- dismantled and modelled (Fig.1). The memories. In my previous column (PE,
lier column (PE, September 2022) I 8:32 ratio between stages 2B and 3A im- October 2022), for example, I touched
waxed eloquently about the topic of mediately caught my eye, so I emailed on the topics of using mercury delay
servo motors and their gears and gear Peter back asking: ‘Re your point about lines and magnetic core stores for early
trains. As part of this, we noted that, gear wheels not having common denom- digital computer memory subsystems.
although some people – especially inators with respect to the number of This prompted a retired physicist and
in the UK – informally refer to gears their cogs. In the servo we broke down software engineer (just call me ‘Jim’) to
(a.k.a. gearwheels) as ‘cogs,’ the term in the September issue, we do have an email me saying: ‘Hi Max, I just read your
‘cog’ officially denotes an individual 8 to 32 cog transition between 2B and latest Cool Beans article and enjoyed it
tooth on a gear. 3A (Steve just recounted the cogs to as always. I have an interesting anec-
make 100% sure), so is this the excep- dote to share with you. Way back in the
The wheels are turning tion that proves the rule?’ 1980s I was doing my PhD at Warwick
Following that column, I received an Peter responded saying that this was University using a clapped-out Auger
email from retired mathematician, physi- indeed an unfortunate ratio, adding: ‘The electron spectrometer that I mostly had
cist and engineer Peter Brearey, who said: 10:38 ratio between 1B and 2A also is to rebuild, often from scratch, and that
‘One point you did not mention (and not so good. It would have been better used exclusively analogue electronics.
evident in the example gear train you to use 11:38 for 1B and 2A then 8:33 for It was connected to an equally clapped
showed) is that the ratio should have no 2B and 3A. But in this instance, it is un- out GEC4080 mainframe that used core
common factors such that each cog on likely users would dis-assemble the gear memory, a primitive analogue-to-digital
one gear wheel will interact with every train then re-assemble it later; also, the converter for signal measurement, and
cog on the coupled gear wheel to ensure wheels are plastic, so they would easily an equally primitive digital-to-analogue
even wear and to allow the gear train re-profile themselves provided they were converter for control of the spectrome-
to be dis-assembled and rebuilt with- made to a reasonably close tolerance. It ter. One day, halfway through a lengthy
out problems of binding and ill-fitting.’ is just that the more precision you want, experiment, we had a complete power
As soon as I read this I thought, ‘that the greater the need for gear ratios to have cut for about 15 mins. Of course, all the
makes perfect sense.’ It also struck me no common factor. A tolerance of 1/100 equipment and computers, including
that this probably wasn’t something I is less onerous than 1/1,000 or 1/10,000. the GEC went down. When the power
would have thought of for myself. A lot It is horses for courses, and where wear came back up, the BBC Micro in our lab
of this sort of thing was conceived in and/or breakage can be best tolerated. promptly proceeded to format both its
the distant past when mechanical engi- And for mass production, cost and re- floppy disks, and all of the (then) fancy
neering and steam-powered machines usability of parts and ease of assembly digital equipment either rebooted or
dominated the technological landscape. without errors is important (notice the hung in some obscure state. My equip-
It makes me realise that our engineering colouring of the wheels). Mass produc- ment powered up perfectly and took its
predecessors knew a lot of stuff about tion compared with a one-off hand-tuned next data point as though nothing had
a lot of stuff. item is like comparing chalk to cheese.’ happened. So, analogue electronics +
core memory = magic. Actually, this
Shaft Gear # Teeth Ratio incident opened my eyes, because this
is how all electronics should work, and
Input Input 9 will work in the future as soon as we
1A 47 5.2222 get truly persistent memory.’
Intermediate Jim went on to say: ‘One of my lec-
1B 10
turers at Warwick told me the follow-
2A 38 3.8000 ing story about mercury delay lines. He
Output was working on one of the first comput-
2B 8
ers and they had a long delay line that
3A 32 4.0000 was a glass tube filled with mercury
Intermediate that stretched right across the lab. They
3B 7
built a comfy bench over it to protect
it and so they could sit down. Immedi-
Output Output 23 3.2857 ately they noticed random bugs. Those
old computers depended entirely on
Fig.1. Summary of servo gear train. the time of flight of pulses down the

62 Practical Electronics | November | 2022


Fig.2. Abandoned power plant in Hungary. (Image source: André Joosse)

delay line, and they eventually figured abandoned ruins or hidden components control room in André’s photograph
out that whenever someone sat on the of the manmade environment. Although positively projects panache.
bench, their backside warmed the mer- targets of exploration vary from one
cury up just enough to slow the pulses country to another, high-profile aban- I’m as sick as a parrot
and introduce a bug.’ donments include amusement parks, Speaking of parrots (we weren’t, but
He closed by saying: ‘Sometimes I grain elevators, factories, power plants, we are now), in my previous column
long for the days when a power switch missile silos, fallout shelters, hospitals, we experimented using two 2-axis joy-
was a switch rather than a negotiation.’ asylums, prisons, schools, poor houses sticks to control two pan-and-tilt servo
I have to say this latter point brought a and sanatoriums. mechanisms. Since we were feeding the
wry smile to my face because I’m cur- I don’t know why, but I love wander- signals from the joysticks directly into
rently doing some work with switches ing round old buildings like factories an Arduino Uno, this required four of
myself and I know just what Jim means. and power plants. I also love seeing the Uno’s analogue input pins. Similar-
pictures of these things. Maybe it’s my ly, since we were driving the servos di-
I’m as happy as a clam interest in post-apocalyptic science fic- rectly from the Uno, this required four
In earlier columns I made mention of tion stories. The main thing is that I’m of its pulse-width modulated (PWM)-
the fact that I was heading out to Trond- not alone, because a lot of other people capable digital output pins.
heim in Norway at the beginning of are also interested in this sort of thing. In the case of the animatronic head cre-
September. While there, I gave a guest One of my heroes in this area is André ated by Steve Manley with (occasionally
lecture to the Embedded Computing Joosse, who hails from the city and mu- useful) suggestions by your humble nar-
students at the Norwegian University nicipality of Goes in the southwestern rator (PE, March, April, and May 2022),
of Science and Technology (NTNU). I Netherlands on Zuid-Beveland, which we have two 3-axis joysticks and seven
also gave the keynote presentation at is in the province of Zeeland. André’s servo motors. Your own projects (and
the FPGA Forum, which is the place to website boasts myriad awesome urbex our future projects) might boast many
‘see and be seen’ if you have anything photos (www.urbex.nl). One of my fa- more control inputs and servo outputs.
to do with FPGAs in Norway and nearby vourites, which André kindly gave me As result, in this column I was origi-
countries. I’m happy to report that both permission to share with the students nally planning on talking about using I2C-
of my talks went down rather well (well, and with the readers of PE, is of an aban- based analogue breakout boards (BOBs)
no one threw anything at me, which I doned power plant in Hungary (Fig.2.). to gather the signals from multiple ana-
always take to be a positive sign). If In the case of the students, I used this logue inputs, along with I2C-based servo
you are interested, you can learn more as the lead-in to talk about old display controller BOBs, each of which can con-
about these talks by bouncing over to technologies. For the purpose of our trol 16 servo motors. The result would
https://bit.ly/3BlWJTr and https://bit. discussions here, however, I just want allow us to monitor large numbers of
ly/3xvOZx3, respectively. us to feast our orbs on this bodacious analogue inputs and control large num-
One of the things I shared with the beauty. To be honest, words fail me. bers of servo motor outputs using just
students is the concept of ‘urbex’ (urban A lot of what we build these days is a two pins on our microcontroller.
exploration), which refers to the explo- ‘tribute to concrete’ and lacks even the The reason I’m not, in fact, talking
ration of manmade structures, usually rudiments of style. By comparison, the about this is that I’m currently feeling

Practical Electronics | November | 2022 63


A g1 g2 g3 g4 g1 g2 g3 g4 g1

A B
B
00 10 11 01 00 A g1 0 0
Clockwise
Rotation g2 1 0
B g3 1 1
00 10 11 01 00 10 11 01 00 g4 0 1
Clockwise Rotation

A g1 g4 g3 g2 g1 g4 g3 g2 g1
B A B
00 01 11 10 00
A g4 0 1
Anticlockwise
Rotation g3 1 1
B g2 1 0
Anticlockwise Rotation 00 01 11 10 00 01 11 10 00 g1 0 0

Fig.3. Conceptual working of rotary incremental quadrature encoder. Fig.4. The leading signal is used to determine the
direction of rotation.
as sick as a parrot. I’m not sure as to the I’d show you a picture of my anima- I feel like an old fool (but where are
origin of this phrase. Some sources say tronic noddle, but I don’t want to make we going to find one at this time of the
that it derives from the fact that some you cry. Fortunately, as you may recall, day?). The reason I say this is that I’ve
parrots will feed on fermenting (alco- Steve very kindly made his 3D design files come to the realisation that I largely
holic) fruit and end up suffering from a available for use by anyone who wants to meander my way through life without
hangover. I also read that Aphra Behn, create their own animatronic masterpiece. really noticing anything that’s going on
who was an English playwright, poet, You can download a compressed ZIP (file around me. My wife (Gina the Gorgeous)
prose writer and translator from the CB-May22-01.zip) containing these design has said this about me for years. Earli-
Restoration era, started the ball rolling files from the May 2022 page of the PE er today, for example, she proclaimed,
in her 1682 comedy, The False Count, website (https://bit.ly/3oouhbl). So, that’s ‘You haven’t been listening to a word
in which the maid Jacinta says of her just what I’m going to do, thereby restor- I’ve said!’ And I thought, ‘Well, that’s
mistress Julia, ‘Lord, Madam, you are ing my precious pate to its former glory a strange way to start a conversation.’
as melancholy as a sick Parrot.’ (watch this space for more details). Recently, someone asked me a question
Whatever the source of this expres- about switch bounce in the context of
sion, I’m certainly not wearing my happy Ravishing rotary encoders digital rotary encoders. At first, I thought
face. When Steve and I first commenced A few months ago, I read the biography we were talking about rotary switches,
work on our animatronic noggin project, of Leonardo da Vinci by Walter Isaac- but it turned out that the topic in hand
I visited the workshop of my friend ‘Car- son (https://amzn.to/3xvzbu6). One of was something completely different.
penter Bob’ and constructed a couple of the things I learnt was how Leonardo Consider the volume control on a car
small wooden testbenches to hold my had the ability to notice ‘stuff.’ For ex- radio, for example. In the not-so-distant
joysticks and servos (PE, March 2022). ample, I’ve looked at a lot of trees in my past, this would have been implemented
Meanwhile, Steve set to work creating time without thinking anything more using a potentiometer (variable resistor)
his 3D-printed masterpiece. profound than ‘That’s a pretty tree.’ By with a fixed range of rotation. More re-
When Steve’s far superior realisation comparison, Leonardo whipped out his cently, this control will be implemented
was finished, he kindly built one for me, tape measure and determined that the using a rotary encoder that has a tactile
which resulted in my proudly ‘holding sum of the cross-sectional areas of tree ‘click-click-click...’ feel as you rotate it.
my head in my hands’ (PE, May 2022). branches above a branching point is equal One point of interest here is that there
A few days before setting off to Norway, to the cross-sectional area of the trunk are no ‘end stops’ per se; that is, you can
since I had occasion to go downtown, (or the branch) immediately below that keep on rotating these things clockwise
I decided to take my fully-fledged ani- branching point. Genius! or anticlockwise to your heart’s desire.
matronic head to Bob’s workshop to
show him how our original prototype
had evolved.
It has to be said that Bob was duly
impressed, proudly presenting it to
anyone who visited his workshop while
I was there. However, when I returned
to my office, I foolishly left my head in
the trunk (boot) of my car (and that’s
not something you expect to hear your-
self saying on a regular basis). I really
didn’t think anything about the weath-
er, but it turned out that the outside
temperature tickled 100°F (~38°C) later
that afternoon.
The reason for my frowny visage is
that, when I returned home and went
to retrieve my head, I discovered that
it was a sadly drooping incarnation
of its earlier self, strangely reminis-
cent of Salvador Dalí’s melting clocks
in The Persistence of Memory – see:
https://bit.ly/3BOHJPu Fig.5. 30-click (top), 20-click (middle), and 20-click (bottom) (Image: Joe Farr).

64 Practical Electronics | November | 2022


Fig.6. Testbench to evaluate six different rotary encoders. (Image: Joe Farr)

I must admit that I had vaguely no- to ground (logic 0). Also, we can visu- A, then the mechanism is rotating an-
ticed these characteristics in my own alise the white areas as not being con- ticlockwise (Fig.4).
car, but I never paused to ponder this nected to anything, which will let the When you see these diagrams, things
phenomenon in more depth (I bet Leon- pull-ups on the A and B signals pull do look relatively easy, don’t they? It’s
ardo would have caught onto this im- them to logic 1. As a result, the A and true that my own knee-jerk reaction was
mediately). It turns out that these little B signals are 90° out of phase. In turn, to think that all we had to do was con-
rascals are being deployed everywhere. this results in four ‘Gray code’ (https:// nect the A and B signals to two digital
In my car, for example, there are two on bit.ly/pe-nov22-gray) combinations of inputs on a microcontroller – let’s say an
the radio (volume and tuning) and three A and B that we might label g1, g2, g3, Arduino Uno to keep things simple – and
on the air conditioning system alone. and g4. If A leads B, then the mecha- ‘Bob’s your uncle’ as they say (or aunt,
After a little investigation, I discov- nism is rotating clockwise. If B leads depending on one’s family dynamic).
ered that there are all sorts of these little
scamps. Let’s start with the fact that there
two main types, which we can class as
absolute and incremental. A digital ab-
solute encoder produces a unique digi-
tal code for each distinct angle of the
shaft. By comparison, an incremental
digital encoder will report changes in
position, but it will not report or keep
track of absolute position.
The encoding for both types can be
implemented using mechanical, opti-
cal, magnetic or capacitive technolo-
gies. For the purposes of these discus-
sions, we are focusing on mechanical
incremental quadrature digital encod-
ers because these cheap-and-cheerful
devices appear all over the place. Also,
there are lots of examples available on
Amazon for use with hobby projects, see:
https://amzn.to/3di9mHf

Easy peasy lemon squeezy


When I first started to investigate this
topic, the explanations all seemed to be
relatively simple and straightforward.
Let’s start with the fact that there will
be three pins coming out of the encoder.
One will be a common signal that we will
connect to ground. This will be accom-
panied by two encoded signals called
A and B to which pull-up resistors will
be attached. A conceptual drawing of a
rotary incremental quadrature encoder
sensor mechanism with corresponding
logic states of the A and B signals is
shown in Fig.3.
In this conceptual implementation,
the A and B signals are connected to con-
tacts on two rings. We can think of the
black areas as being copper connected Fig.7. 30-click device: a) (top) turning the knob one click clockwise; and then b) again.

Practical Electronics | November | 2022 65


middle and this common pin will be
connected to ground. The A and B pins
on each side are connected to the two
‘spoke’ areas at the top, each of which
has five ‘spokes.’ Now consider the ro-
tating disk in the middle. This is what’s
connected to (driven by) the main shaft.
This disc carries four conducting con-
tacts that are connected and mounted
at 90° to each other. This means that at
least one of these contacts is always in
touch with the main ground area, while
two of the three remaining contacts in-
terface with the two ‘spoke’ areas. It’s
difficult to wrap your brain around how
this works (and also why anyone would
decide to implement it this way in the
first place), but the end result is that it
generates similar signals to the first 20-
click device.
Our next step was to observe the inner
machinations of different devices on
an oscilloscope, for which purpose Joe
created a small test bench, as illustrat-
ed in Fig.6.
Suffice it to say that more surprises were
in store. For example, in some of these
devices, what are labelled as being the
A and B outputs in the data sheet oper-
ate the opposite way round to what you
would expect in terms of which transi-
tions first. Of course, it’s easy to swap the
wires going to your microcontroller or to
address the issue in software. Nonethe-
less, it’s a tad disconcerting to discover
that two devices from different vendors
that purport to operate in the same way
have their A and B outputs swapped over.

Fig.8. 30-click device: a) (top) turning the knob one click anticlockwise; and then b) again. Let’s get testing
We’ll start with one of our 30-way devices.
In this case, we started with both A (top)
Not so simple were. What this means is that if the A and B (bottom) being 11; had the knob
Of course, nothing in life is simple. I was and B outputs start at 11, then after one been rotated one click in either direction,
chatting to my friend Joe Farr, who hangs ‘click’ in any direction they will end up however, they would have commenced
his hat in the UK, and he mentioned that at 00. Another click will result in them at 00. Turning the knob one click clock-
he’s had some non-intuitive experienc- being 11 again. Remember that it’s the wise resulted in the waveforms shown
es with rotary encoders in the past. As signal that changes first that’s used to de- in Fig.7a, ending up with A and B at 00
a result of our discussions, we both or- termine the direction of rotation. (A transitioned first). Turning the knob
dered a bunch of different encoders and Now consider the first 20-click device, one more click clockwise resulted in the
dismantled them to see what was inside. which has 20 mechanical indentations waveforms shown in Fig.7b, ending up
Give me strength – each one was imple- (Fig.5 middle). In this case, the encod- with A and B back at 11 (again, A tran-
mented in a different way (see Fig.5)! ing disk also has 20 ‘spokes.’ As a result, sitioned first).
You may remember my saying that the A and B outputs always start with a Similarly, turning the knob one click
these encoders have a tactile ‘click-click- value of 11. Following a click, they will anticlockwise resulted in the waveforms
click...’ feel as you rotate them. This end up back at 11 again, but they will shown in Fig.8a, ending up with A and
is implemented by mechanical means have passed through the intermediate 10, B at 00 (B transitioned first). Turning
using small indentations in the casing. 00, 01 (or 01, 00, 10) values on their way. the knob one more click anticlockwise
The result is that the switch settles into Once again, it’s the signal that changes resulted in the waveforms shown in
a specific state following each click. first that’s used to determine the direc- Fig.8b, ending up with A and B back at
Let’s start with the 30-click device, tion of rotation. 11 (again, B transitioned first).
which has 30 mechanical indentations Finally, take a look at the second 20- Next, let’s look at one of the 20-way
(Fig.5 top). Joe has highlighted the click device, which also has 20 me- switches. In this case we always start with
common signal and the A and B signals chanical indentations (Fig.5 bottom). the A and B signals in a 11 state. Turn-
in red. The A and B contacts are slight- This one really made us scratch our ing the knob one click clockwise resulted
ly staggered (offset), thereby resulting in heads for a while. Let’s start with the in the waveforms shown in Fig.9a, with
the quadrature encoding. Of particular blue plastic piece on the left. In this A (top) and B (bottom) passing through
interest here is the fact that the encod- case, the big area of metallisation is the 10, 00, and 01 states, ending up with
ing disk itself has only 15 ‘spokes,’ as it connected to the common pin in the A and B returning to 11 (B transitioned

66 Practical Electronics | November | 2022


first for this switch). Similarly, turning
the knob one click anticlockwise resulted
in the waveforms shown in Fig.9b, with
A and B passing through the 01, 00, and
10 states, once again ending up with A
and B returning to 11 (A transitioned
first for this switch).
All of this obviously gives us a lot to
think about. If you weren’t aware that
these devices can behave in different
ways, for example, you might be sur-
prised to discover that for one type of
encoder it took two physical clicks for
your software to register one count. Con-
trariwise, a single click on a different type
of encoder might cause your software to
register two counts.

Bouncy bouncy!
I’m afraid I haven’t told you the whole
story (I rarely do). The waveforms I’ve
shown thus far have been relatively
clean noise-wise, but some of these de-
vices can be incredibly bouncy, and any
bouncing increases with the speed of ro-
tation (Fig.10).
In particular, observe the bouncing in
the middle of the screen. It’s bad enough
if the A and B signals are bouncing in iso-
lation, but it can be a pain in the nether
regions if they are bouncing together.
It’s easy to see how someone’s software
could get confused by this sort of thing.
In fact, thinking about this caused me
to pop out to my 2019 Subaru and start
playing with the rotary encoder volume
control on its radio. When you turn the
knob, a graphical display appears on the
screen representing the current volume
Fig.9. 20-click device: a) (top) turning the knob one click clockwise; and then b) (bottom) level. Each click of the knob results in
turning one click anticlockwise. a coloured segment being added to or
subtracted from the display.
I’ve never really looked at this closely
before. If I turn the knob clockwise the
volume goes up; if I turn the knob anti-
clockwise the volume goes down. How-
ever, now that I’m paying close attention,
I observe that things are not always as ex-
pected. Most of the time, slowly rotating
the knob ‘forward’ one click, for exam-
ple, causes a segment to be added to the
display (and the volume to increase) as
expected. However, sometimes we jump
‘backward’ one ‘click equivalent’ on the
display and the volume goes down, or
we jump ‘forward’ two ‘click equivalents’
on the display and the volume rises ac-
cordingly (‘Curiouser and curiouser,’
said Alice).
All of this tells me that the people who
wrote the software for my car had not
performed the same level of evaluations
Fig.10. The mechanical contacts in rotary encoders can bounce. as Joe and your humble narrator. Follow-
ing on from this, they hadn’t come up
Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor with the same cunning solution to this
of all he surveys at CliveMaxfield.com – the go-to site for the problem as have Joe and yours truly.
latest and greatest in technological geekdom. However, that’s a story for another day.
As always, I welcome your comments,
Comments or questions? Email Max at: [email protected]
questions, and suggestions.

Practical Electronics | November | 2022 67


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
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 l i er .................................................................... 19104201 £11.95
l i er odule using ............. 19104201-88 £8.95
AUGUST 2022 l i er set o acrylic case ieces and s acer ................ 19104201-ACR £8.75
Multi-purpose Battery Manager – I/O Expander module ... 11104212 5.95 l i er ide ................................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 icro hone rea lifier.................................................... 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
oadies est ignal enerator sur ace ount version .. 01005201 £8.95
MAY 2022 oadies est ignal enerator 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 APRIL 2021
Digital FX Unit – using BCD switch ................................... 01102212 9.95 e o ven ctive rossover .................... 01106193
Universal Audio PSU ......................................................... AO1-APR22 11.95 e o ven ctive rossover ront anel ......... 01106195 £19.95
e o ven ctive rossover .................... 01106196
MARCH 2022 Frequency Reference Signal Distributor.................................... CSE200103 £8.95
Mini Isolated Serial Link..................................................... 24102211 £5.95
Busy Loo Indicator............................................................. 16112201 £5.95 MARCH 2021
nalogue ocoder and ass filter oard ...................... AO1-MAR22 9.95 Nutube Guitar Effects Pedal .............................................. 01102201 £12.95
nalogue ocoder filter oard............................. AO2-MAR22 9.95 Programmable Thermal Regulator (Peltier Interface)........ 21109181
£18.95
Programmable Thermal Regulator (Peltier Driver) ............ 21109182
FEBRUARY 2022 Tunable HF Preamp .......................................................... CSE190502 £8.95
Arduino-based Power Supply ............................................ 18106201 9.95
Battery Monitor Logger ...................................................... 11106201 10.95 FEBRUARY 2021
Electronic Wind Chimes .................................................... 23011201 10.95 4G Remote Monitoring ...................................................... 27111191 £9.95
nalogue ocoder river lifier................................. AO-FEB22 8.95
JANUARY 2021
JANUARY 2022 utu e alve rea lifier ................................................. 01112191 £12.95
Vintage battery Radio Li-ion Power Supply ....................... 11111201 9.95 Arduino DCC Controller..................................................... 09207181 £10.95
MiniHeart: A Miniature Heartbeat Simulator ...................... 01109201 8.95
DECEMBER 2020
DECEMBER 2021 Pseudo-Random Sequence Generator ............................. 16106191 £7.95
AM/FM/SW Digital Receiver .............................................. CSE200902A 13.95 Clever Charger .................................................................. 14107191 £11.95
Balanced Input and Attenuator for USB CODEC............... 01106202 11.95 here in lifier....................................................... AO-1220-01 £8.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 | November | 2022


Double-sided | plated-through holes | solder mask

PROJECT CODE PRICE PROJECT CODE PRICE


NOVEMBER 2020 JANUARY 2020
LED Christmas Tree (1 off)................................................ 16107181-1 £6.95 solated erial in ............................................................ 24107181 £8.50
LED Christmas Tree (4 off)................................................ 16107181-2 £14.95
LED Christmas Tree (12 off).............................................. 16107181-3 £24.95 DECEMBER 2019
LED Christmas Tree (20 off).............................................. 16107181-4 £34.95 tre ely ensitive agneto eter................................... 04101011 £16.75
USB/SPI Interface Board................................................... 16107182 £5.95 our channel igh current an and u ontroller ... 05108181 £8.75
45V/8A Power Supply PCB plus acrylic spacer................. 18111181 £14.95 seless o ....................................................................... 08111181 £11.50
o er u ly ront anel five ay dis lay e el.. 18111181-BZ £3.95
ive ay anel eter is lay................................... 18111182 £7.95 NOVEMBER 2019
innitus nso nia iller aycar case see te t ........... 01110181 £9.95
OCTOBER 2020 innitus nso nia iller ltronics case see te t ........ 01110182 £9.95
igital udio illivolt eter................................................. 04108191 £9.95
recision ignal lifier .................................................. 04107191 £7.95
OCTOBER 2019
SEPTEMBER 2020 rogra a le synced re uency e erence .......... 04107181 £11.50
PE Theremin PSU ............................................................. AO-0920-01 £5.95 Digital Command Control Programmer for Decoders........ 09107181 £9.95
PE Theremin PSU transformer.......................................... AO-0920-02 £7.95 to isolated ains elay ain oard ........................... 10107181 £11.50
icro ite lore ......................................................... 07108191 £6.95 to isolated ains elay ter inal e tension oard ...10107182
ltra rite river ......................................................... 16109191 £6.95
AUGUST 2019
AUGUST 2020 rain ave onitor............................................................. 25108181 £12.90
icro ite ac ac ............................................ 07106191 £9.95 u er igital ound ects odule.................................. 01107181 £6.95
Steering Wheel Audio Button to Infrared Adaptor.............. 05105191 £7.95 Watchdog Alarm ................................................................ 03107181 £8.00
here in three oards itch volu e ............. PETX0819 £19.50
JULY 2020 here in co onent ac see . ugust ... PETY0819 £15.00
canning ignal enerator ........ 04106191 £13.95 For the many pre-2016 PCBs that we stock please see the
eech ynthesiser ith the as erry i ero ............... 01106191 £5.95
ini organ ........................................................... AO-0720-01 £14.95
PE website: www.electronpublishing.com
ini organ selected arts ............................................ AO-0720-02 £8.95
igh current olid state
igh current olid state
attery solator control ..... 05106191
attery solator o ... 05106192
£6.95
£9.95
PE/EPE PCB SERVICE
Order Code Project Quantity Price
JUNE 2020
rduino rea out oard . inch is lay ............... 24111181 £6.95 .........................................................
i in ut udio elector ain oard ................................. 01110191
£10.95
i in ut udio elector s itch anel oard ..................... 01110192 .........................................................

MAY 2020 .........................................................


ltra lo distortion rea lifier n ut elector......................... 01111112
£11.25
ltra lo distortion rea lifier ush utton n ut elector ..... 01111113 .........................................................
niversal egulator .................................................................... 18103111 £7.95
ireless ata e eater .............................................. 15004191 £8.50 .........................................................
ridge ode da tor or lifier............................................. 01105191 £7.95
i stic er inal................................................................ 02103191 £5.95
Analogue noise with tilt control................................................... AO-0520-01 £7.95 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Audio Spectrum Analyser........................................................... .
Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
APRIL 2020 .........................................................
li dot is lay lac coil oard................................................. 19111181
li dot is lay lac i els ....................................................... 19111182 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
£14.95
li dot is lay lac ra e ....................................................... 19111183
li dot is lay green driver oard............................................ 19111184
Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
MARCH 2020
iode urve lotter ........................................................... 04112181 £10.95 aya le to Practical Electronics
tea rain histle iesel orn ound enerator............... 09106181 £8.50
niversal assive rossover one o ...................................... UPC0320 £12.50 Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FEBRUARY 2020 Valid From . . . . . . . . . . . . . . . . . iry ate . . . . . . . . . . . . . . . .
otion ensing o er itch ................................... 05102191 £5.95
ey oard ouse da tor........................................ 24311181 £8.50 Card Security No . . . . . . . . . .
ctive rossover ............................................ 01106191
ctive rossover ...................................... 01106192 You can also order PCBs by phone, email or via the shop
ctive rossover ............................................ 01106193 £29.95 on our website: www.electronpublishing.com
ctive rossover o er routing .............................. 01106194
ctive rossover ront anel .................................. 01106195
ctive rossover ............................................. 01106196
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.
rders and ay ent should e 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
he ues should e ade aya le to ractical lectronics (Payment in £ sterling only).
NOTE: ost oards are in stoc and sent ithin seven days o recei t o order lease allo u to days delivery i e need to restoc .

Practical Electronics | November | 2022 69


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
JULY 2019 FEBRUARY 2018
Full-wave 10A Universal Motor Speed Controller.............. 10102181 £12.90 GPS-Synchronised Analogue Clock Driver ....................... 04202171 £11.95
Recurring Event Reminder ................................................ 19107181 £8.00 High-Power DC Motor Speed Controller – Part 2
Temperature Switch Mk2 ................................................... 05105181 £10.45 + Control Board................................................... 11112161 £11.95
+ Power Board .................................................... 11112162 £15.30
JUNE 2019
Arduino-based LC Meter ................................................... 04106181 £8.00 JANUARY 2018
USB Flexitimer................................................................... 19106181 £10.45 High-Power DC Motor Speed Controller – Part 1.............. 11112161 £15.30
uild the lifier odule ..................................... 01108161 £13.95
MAY 2019
2× 12V Battery Balancer ................................................... 14106181 £5.95 DECEMBER 2017
Deluxe Frequency Switch.................................................. 05104181 £10.45 Precision Voltage and Current Reference – Part 2............ 04110161 £14.95
USB Port Protector ............................................................ 07105181 £5.95
NOVEMBER 2017
APRIL 2019 50A Battery Charger Controller ......................................... 11111161 £12.95
Heater Controller ............................................................... 10104181 £14.00 Micropower LED Flasher (45 × 47mm) ......................... 16109161 £7.95
(36 × 13mm) ......................... 16109162 £5.95
Phono Input Converter ...................................................... 01111161 £7.9
MARCH 2019
10-LED Bargraph Main Board ........................................... 04101181 £11.25 SEPTEMBER 2017
+Processing Board ............................................. 04101182 £8.60 Compact 8-Digit Frequency Meter..................................... 04105161 £12.95

FEBRUARY 2019 AUGUST 2017


1.5kW Induction Motor Speed Controller........................... 10105122 £24.95 Micromite-Based Touch-screen Boat Computer GPS ....... 07102122 £10.45
Fridge/Freezer Alarm......................................................... 03104161 £7.95
NOVEMBER 2018
Super-7 AM Radio Receiver .............................................. 06111171 £15.95 JULY 2017
Micromite-Based Super Clock ........................................... 07102122 £10.45
Brownout Protector for Induction Motors ........................... 10107161 £12.90
OCTOBER 2018
6GHz+ Touchscreen Frequency Counter .......................... 04110171 £12.95 JUNE 2017
Two 230VAC MainsTimers ................................................ 10108161 Ultrasonic Garage Parking Assistant ................................. 07102122 £10.45
£11.95
10108162 Hotel Safe Alarm................................................................ 03106161 £7.95
SEPTEMBER 2018 100dB Stereo LED Audio Level/VU Meter......................... 01104161 £17.75
3-Way Active Crossover .................................................... 01108171 £17.95
Ultra-low-voltage Mini LED Flasher ................................... 16110161 £5.95 MAY 2017
The Micromite LCD BackPack........................................... 07102122 £7.95
AUGUST 2018 Precision 230V/115V 50/60Hz Turntable Driver ................ 04104161 £13.95
Universal Temperature Alarm ............................................ 03105161 £7.95
Power Supply For Battery-Operated Valve Radios ........... 18108171 APRIL 2017
18108172 £24.95 Microwave Leakage Detector ............................................ 04103161 £7.95
18108173 Arduino Multifunctional 24-bit Measuring Shield ............... 04116011 £12.95
18108174 + RF Head Board................................................ 04116012
JULY 2018 Battery Pack Cell Balancer................................................ 11111151 £8.95
Touchscreen Appliance Energy Meter – Part 1 ................. 04116061 £14.95
uto otive ensor odifier .............................................. 05111161 £12.95 MARCH 2017
Speech Timer for Contests & Debates .............................. 19111151 £13.45
JUNE 2018
High Performance 10-Octave Stereo Graphic Equaliser... 01105171 £14.95 FEBRUARY 2017
Solar MPPT Charger/Lighting Controller ........................... 16101161 £14.95
MAY 2018 Turntable LED Strobe........................................................ 04101161 £7.95
High Performance RF Prescaler........................................ 04112162 £10.45
Micromite BackPack V2..................................................... 07104171 £8.45 JANUARY 2017
Microbridge........................................................................ 24104171 £5.95 igh er or ance tereo alve rea lifier .................... 01101161 £17.75
High Visibility 6-Digit LED Clock........................................ 19110151 £13.95
APRIL 2018
Spring Reverberation Unit ................................................. 01104171 £13.95 DECEMBER 2016
DDS Sig Gen Lid ............................................................... Black £5.95 Universal Loudspeaker Protector ...................................... 01110151 £9.95
DDS Sig Gen Lid ............................................................... Blue £5.95 9-Channel Infrared Remote Control .................................. 15108151 £14.95
DDS Sig Gen Lid ............................................................... Clear £5.95 Revised USB Charger ....................................................... 18107152 £5.95

MARCH 2018 NOVEMBER 2016


Stationmaster Main Board ................................................. 09103171 Fingerprint Access Controller – Main Board ...................... 03109151
£17.75 £12.95
+ Controller Board .............................................. 09103172 Fingerprint Access Controller – Switch Board ................... 03108152
lifier odule o er u ly.......................... 01109111 £16.45

70 Practical Electronics | November | 2022


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
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 36 Advertisement offices
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 41 Matt Pulzer
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 10
iTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv)
Electron Publishing Ltd
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1 Buckingham Road
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii)
Brighton
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 East Sussex BN1 3RA
POLABS D.O.O.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Tel 07973 518682
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Email [email protected]
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Web www.electronpublishing.com
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 For editorial contact details see page 7.

Practical Electronics | November | 2022 71


Next Month – in the December issue
Hummingbird Audio Amplifier
This miniature audio amplifier delivers up to 60W into 8W or
100W into 4W. It is an ideal building block for multi-channel
amplifiers in applications like surround sound or when using an
active crossover.
Geekcreit’s 35MHz-4.4GHz Signal Generator
This self-contained module is based on the Analog Devices ADF4351
wideband digital synthesiser chip. It has an onboard microcontroller unit, OLED
display and pushbuttons to set the desired frequency and adjust the output
level. All it needs is a 5V DC power supply.
SMD Trainer Board
Are you interested in learning to solder small surface-mount
devices but don’t want to ruin an expensive board or chip
gaining those skills? This simple Trainer project is a great way
to practise soldering a variety of surface-mount devices.
If done correctly, you’ll be rewarded with a series of LEDs
flashing in sequence.
USB Cable Tester – Part 2
We have introduced and described the USB Cable Tester,
next month it’s time to build and test it.

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 3 November 2022
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
tswor
th

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: £29.99 (6 months); £54.99 (12 months); £104.99 (2 years). EUROPE: airmail service, £33.99 (6 months); £63.99 (12 months);
£119.99 (2 years). REST OF THE WORLD: airmail service, £41.99 (6 months); £77.99 (12 months); £149.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 | November | 2022


Did you know our online shop
now sells the current issue of
PE for £5.49 inc. p&p?
Practical
Electronics Prac
Electro tical
The UK’s premier electronics and computing maker magazine
The UK
Circuit Surgery

and compressors
Audio Out Electronic
nics
Using JFETs limiters Using audio Building Blocks
Make it’swith
CircAdding
transformers Using actuatorsJFE TFT
Ts as e
contro
preMicromite

lectro
ry
n
mier eleand
a PS/2 keyboard
uit display
Surge to a PicoMite
ica A u
ctronic
d io O
s and
compu
ting ma
lled re ker ma
sistors lly Using a ut Kick
transfo udio L
St a r t gazine
rme ow-vo M ake
WIN! rs op am ltage it
Buildin with Micro
Microchip ps g mite
PicoM GPS into
AVR-IoT ite syste
Cellular Mini
ms
WIN! WIN!
Micro
MPLAB chip
In-CircSnap
Debug uit
Build a WIN!
ger

USB Cable Tester PicoMite


computer
Interc
Pocket om u Station
analWeather
ogue sing retro SM D T
phone
s! Tweez est
ers

Pream
Self-Contained 6GHzwith D plifier
Digital Attenuator Tone igital Touc B uild
a
/ Volu h
me Co screen tracke GPS
PLUS!
PLUS! n2022
Nov trol£5.49
s th e P i r w i th
Techno Talk – Hidden hazards
Te hn 11 coMite
Cool Beans – Investigating rotarycencoders
o Talk
–S
Cool B
Net Work – Technology and the Queen eans – olar flares –9 772632 573023
Net W L time to
ork – W ixie displays panic?
www.electronpublishing.com @practicalelec and m
hole-h practicalelectronics
www.e ome me agnet Oct 20
lectro sh wire ic core 22
npubli less sy memo £5.49
shing stems ry
.com 10
@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
innovative Technology Projects

USB OSCILLOSCOPES

Handyscope HS6 DIFF*


4 differential inputs
1 GSa/s, 250 MHz, 256 Mpoints
Key specifications
Differential inputs Up to 256 Mpoints memory per channel
8, 12, 14, 16 bit resolution, 0.25 % DC Up to 200 MSa/s continuous streaming
vertical accuracy, 0.1 % typical 1 ppm time base accuracy
Up to 1 GSa/s sampling, up to 250 MHz
bandwidth

Handyscope HS5* Handyscope HS4 DIFF*


2 single ended inputs 4 differential inputs
500 MSa/s, 250 MHz, 64 Mpoints 50 MSa/s, 50 MHz, 128 Kpoints
Arbitrary Waveform Generator

Key specifications Key specifications


8, 12, 14, 16 bit resolution, 0.25 % DC Differential inputs
vertical accuracy, 0.1 % typical 12, 14, 16 bit resolution, 0.3 % DC accuracy
Up to 500 MSa/s sampling, up to 250 Up to 50 MSa/s sampling, 50 MHz bandwidth
MHz bandwidth 128 KSamples memory per channel
Up to 32 Mpts memory per channel
20 MSa/s, 14 bit continuous streaming
1 ppm time base accuracy

This is just a small selection of USB Oscilloscopes, see


www.itp101.com for more details and products
*Prices vary depending on model and specification

27 Stephenson Road, St. Ives, Cambridgeshire, PE27 3WJ, UK


www.itp101.com [email protected] +44 (0)1480 700158

You might also like