100% found this document useful (2 votes)
940 views76 pages

Practical Electronics 2023-05

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
100% found this document useful (2 votes)
940 views76 pages

Practical Electronics 2023-05

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 Make it with Micromite Audio Out
Using op amps as PicoMite Smart-light Op amp adaptor boards:
comparators Controller SMD and through-hole

Even better! WIN! 500W Power


Our new improved
Microchip
ATtiny817 amplifier
Xplained Pro
SMD Test Tweezers WIN!

Precision AM-FM DDS


Signal Generator
Control RC servos
with the Pololu
Micro Maestro

PLUS!
Techno Talk – Prophecy can be perplexing May 2023 £5.99
05
Cool Beans – Arduino Bootcamp: bits, nibbles and bytes
9 772632 573030
Net Work – EV trends and updates on power generation

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
Volume 52. No. 5

Practical May 2023


ISSN 2632 573X

Electronics Contents
Projects and Circuits
500W Power Amplifier – Part 2 by John Clarke 17
After last month’s description, we follow on this month with amplifier construction,
beginning with the Amplifier Module PCB assembly.
Precision AM-FM DDS Signal Generator by Charles Kosina 27
This Signal Generator offers very high calibrated accuracy with an error of ten parts
in a billion. It boasts plenty of features, including amplitude and frequency modulation.
Improved SMD Test Tweezers by Tim Blythman 39
Our SMD Test Tweezers project from October 2022 was extremely popular. We’ve
decided to see what features we could add by upgrading its microcontroller.

Series, Features and Columns


Techno Talk by Max The Magnificent 8
Prophecy can be perplexing
The Fox Report by Barry Fox 10
Cinema’s insatiable appetite for ‘versions’
Net Work by Alan Winstanley 12
This month’s Net Work examines the latest EV trends, plus updates on power
generation and news from the LEO satellite broadband sector.
Make it with Micromite by Phil Boyce 46
Part 46: A PicoMite Smart-light Controller – Part 1
Max’s Cool Beans by Max The Magnificent 51
Arduino Bootcamp – Part 5
Circuit Surgery by Ian Bell 55
Op amps as comparators
Audio Out by Jake Rothman 60
Op amp adaptor boards: surface mount and through-hole versions
Electronic Building Blocks by Julian Edgar 63
Controlling RC servos with the Pololu Micro Maestro

Regulars and Services


Wireless for the Warrior 2
Subscribe to Practical Electronics and save money 4
NEW! Practical Electronics back issues DOWNLOADS – 2022 now available! 6
Reader services – Editorial and Advertising Departments 7
Editorial 7
Spring is here at last!... Is this me or a computer?
Exclusive Microchip reader offer 9
Win a Microchip ATtiny817 Xplained Pro
Teach-In bundle – what a bargain! 26
PE Teach-In 9 67
Practical Electronics PCB Service 68
PCBs for Practical Electronics projects
Classified ads and Advertiser index 71
Next month! – highlights of our next issue of Practical Electronics 72
Made in the UK.
Written in Britain, Australia,
the US and Ireland.
Read everywhere.
© Electron Publishing Limited 2023
Copyright in all drawings, photographs, articles,
technical designs, software and intellectual property
published in Practical Electronics is fully protected,
and reproduction or imitation in whole or in part are
expressly forbidden.
The June 2023 issue of Practical Electronics will be
published on Thursday, 4 May 2023 – see page 72.

Practical Electronics | May | 2023 1


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

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

ORDER YOURS TODAY!


JUST CALL 01202 880299 OR VISIT www.electronpublishing.com
All prices include 20% VAT. Free UK mainland delivery on orders over £60.
Quasar Electronics Limited Postage & Packing Options (Up to 1Kg gross weight): UK Standard 2-5 Day
PO Box 6935, Bishops Stortford Delivery - £4.95 : UK Mainland Next Day Delivery - £9.95 : Please order online
CM23 4WP, United Kingdom if you reside outside the UK (our website will calculate postage for you).
Payment: We accept all major credit/debit cards. Make UK cheques/PO’s
payable to Quasar Electronics Limited and include P&P detailed above.
Tel: 01279 467799 !! Order online for reduced price postage and fast despatch !!
E-mail: [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! Mr Robot Kit Digitally Controlled FM Radio Kit


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

LED Buddy / LED Tester Kit


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

SUBSCRIBE NOW!
Circuit Surgery
Simulating digipots
in LTspice
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Audio Out
Further circuits for the
Universal op amp board
Make it with Micromite
Multiple displays
for a PicoMite
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Kick Start
BME280 humidity, pressure
Make it with Micromite
PicoMite Fingerprint Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Fox Report
Keeping one step ahead of
Make it with Micromite
Updating the PicoMite
Circuit Surgery
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Fox Report
Hopeless helplines and
Audio Out
Universal board for dual
Circuit Surgery
Using op amps as
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Make it with Micromite
PicoMite Smart-light
Audio Out
Op amp adaptor boards:

01202 087631
op amp amplifiers and temperature sensor Reader coding linear regulators scammers is a full-time task firmware active filters NASty problems audio op amps comparators Controller SMD and through-hole

WIN! Remote Control Driveway Gate Cooling Fan Controller & Raspberry Pi 500W Power
Microchip WIN!
Even better! WIN! 500W Power
PIC32CX-BZ2 Range Extender Remote Control Loudspeaker Protector Pico BackPack Microchip amplifier
and WBZ451
Curiosity
dsPIC33EV 5V
Our new improved
Microchip
ATtiny817 amplifier
CAN-LIN Xplained Pro
Development WIN! Starter
Board
Microchip Kit SMD Test Tweezers WIN!
Curiosity
Development WIN!
Board Fingerprint Microchip
WIN! PIC32CM JH01
Three low-noise
Reader Curiosity Pro
Development
Board HF-UHF Amplifiers
Classic LED Fingerprint Capacitor
Discharge Precision AM-FM DDS
Metronomes Reader Building the Capacitor Signal Generator
35MHz-4.4GHz Welder
LTDZ V5.0 Discharge Welder Control RC servos
Signal Generator
budget with the Pololu
Spectrum Micro Maestro
Analyser
Tesla Coil Semaphore
Multi-Channel Solid-State Signal for
Speaker Protector Flame OO-Gauge Amplifier
Discharge Model Railways Clipping Indicator
PLUS! PLUS! PLUS! PLUS! PLUS!
Jan 2023 £5.49 Feb 2023 £5.99 Mar 2023 £5.99 Apr 2023 £5.99 May 2023 £5.99
Techno Talk – Raudive voices revisited 01 Techno Talk – Mushroom magic 02 Techno Talk – It’s handover time 03
Techno Talk – Robots... down on the farm! 04
Techno Talk – Prophecy can be perplexing 05
Cool Beans – Introducing the Arduino Bootcamp Cool Beans – Arduino Bootcamp Cool Beans – Arduino Bootcamp: two LEDs (twice the fun)! Cool Beans – Arduino Bootcamp: 7-segment displays Cool Beans – Arduino Bootcamp: bits, nibbles and bytes
9 772632 573023
Net Work – Smart light bulbs and Alexa’s skills Net Work – Alexa update, plus space and energy news 9 772632 573030
Net Work – Satellites and the roots of the Information Age 9 772632 573030
Net Work – Smart devices with ‘Plug and Play’ simplicity 9 772632 573030
Net Work – EV trends and updates on power generation 9 772632 573030

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

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

Overseas rates represent exceptional value


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

SUBSCRIPTION ORDER FORM


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

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

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

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


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

4 Practical Electronics | May | 2023


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

9 771030 266001
12

11
$ 50* NZ $1290
INC GST INC GST

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

Australia’s top electronics magazine


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

Print Combined Online


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

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

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

To start your subscription go to


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

FIVE-YEAR collections – 60 issues!


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

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


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

240 magazines for just


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

Do you have the 15-year bundle?


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

Download your collections at: www.electronpublishing.com


Practical
Volume 52. No. 5
May 2023
ISSN 2632 573X

Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619 Spring is here at last!
Electron Publishing Limited Mob 07973 518682 The sun is out, the grass is green and it’s time to welcome you to
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected] the first springtime issue of Practical Electronics magazine. This
East Sussex BN1 3RA Web www.electronpublishing.com month, we bring you the latest news on EVs and power generation,
Advertisement offices
fun-to-build projects, insights into learning to use the Arduino, the
Practical Electronics Adverts Tel 01273 777619 perils of using op amps as comparators. how to get up and running
1 Buckingham Road Mob 07973 518682 with RC servo motors and much more.
Brighton Email [email protected]
East Sussex BN1 3RA
Turning to this issue’s projects, we have our usual, generous
Editor Matt Pulzer
General Manager Louisa Pulzer
helping of exciting circuits for you to build. First up is Part 2 of
Digital subscriptions Stewart Kearn Tel 01202 880299 the impressive 500W Amplifier we started last month. Next, a
Online Editor Alan Winstanley
Web Systems Kris Thain
Precision AM-FM DDS Signal Generator and last, but not least,
Publisher Matt Pulzer an update to our very popular SMD Test Tweezers. The latter uses
the same fundamental hardware as the October project, but swaps
Print subscriptions
Practical Electronics Subscriptions
out the microcontroller with a newer, more powerful PIC that can
PO Box 6337 accommodate expanded software. If you liked the first version
Bournemouth BH1 9EH Tel 01202 087631 then you’ll love the second one!
United Kingdom Email [email protected]

Technical enquiries Is this me or a computer?


We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase,
Thanks to recent advances in AI, this is an increasingly important
repair or modification of commercial equipment or the incorporation question. Unable to resist the hype, I signed up for a trial run of
or modification of designs published in the magazine. We cannot ChatGPT – the latest AI ‘chatbot’ to hit the news. To be honest,
provide data or answer queries on articles or projects that are
more than five years old. I really didn’t know what to expect. I tried asking it some fairly
straightforward, but varied questions just to see what it came up
Questions about articles or projects should be sent to the editor
by email: [email protected]
with. ‘What is a Laplace Transform?’, ‘How can I remember my
dreams?’ and, with a nod to this month’s Circuit Surgery, ‘Do op
Projects and circuits amps make good comparators?’.
All reasonable precautions are taken to ensure that the advice and
data given to readers is reliable. We cannot, however, guarantee
it and we cannot accept legal responsibility for it. I was impressed. The answers were concise, accurate, written
A number of projects and circuits published in Practical Electronics
in proper English and – as far as I can tell – not just regurgitated
employ voltages that can be lethal. You should not build, test, from a Wikipedia page. I then tried a more challenging question:
modify or renovate any item of mains-powered equipment unless ‘Can you write 200 words for the editorial in a hobby electronics
you fully understand the safety aspects involved and you use an
RCD (GFCI) adaptor. magazine?’ What returned was a little bland, but by no means
generic. Drop in a few key words relating to 500W Amps or a
Component supplies PicoMite and it would be a pretty convincing piece of work. In
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We short, this is an impressive technology that everyone should try:
advise readers to check that all parts are still available before https://openai.com/blog/chatgpt
commencing any project in a back-dated issue.

Advertisements I finished off my first AI session with, ‘Who is Matthew Pulzer?’


Although the proprietors and staff of Practical Electronics take The answer came back: ‘I couldn’t find any notable public figure
reasonable precautions to protect the interests of readers by
ensuring as far as practicable that advertisements are bona fide, or known person with the name Matthew Pulzer. It’s possible that
the magazine and its publishers cannot give any undertakings Matthew Pulzer is relatively unknown.’ Serves me right for asking,
in respect of statements or claims made by advertisers, whether
these advertisements are printed as part of the magazine, or in but I can’t argue with the answer!
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.
Matt Pulzer
Publisher
Transmitters/bugs/telephone equipment
We advise readers that certain items of radio transmitting and
telephone equipment which may be advertised in our pages
cannot be legally used in the UK. Readers should check the law
before buying any transmitting or telephone equipment, as a fine,
confiscation of equipment and/or imprisonment can result from
illegal use or ownership. The laws vary from country to country;
readers should check local laws.

Practical Electronics | May | 2023 7


Prophecy can Techno Talk
be perplexing Max the Magnificent

Many of the technological discoveries we once found exciting are now lucky if they can elicit a ‘Meh!’
But what about the possibility of teleportation, the ability to speed up, slow down, or reverse time, or
the capability to extract free energy from a quantum vacuum?

A
popular Nostradamus quote https://bit.ly/3LeUYxJ). I asked it for ‘A The Gods Themselves
goes something like, ‘Predicting pencil sketch of two little boys in boots Everything we’ve discussed this far is
things is difficult, especially if it and shorts using shovels to dig a hole in ‘small potatoes,’ as it were. What about
involves the future’. What? You thought the back yard.’ Only seconds later, I was antigravity, spaceships with hyperdrive
Mark Twain said that? Well, according the proud possessor of an awesome image. engines, teleportation, and things of that
to Quote Investigator, it’s been attrib- Also, I just tried using Whisper to tran- ilk? On the one hand, it’s easy to say that
uted to everyone from Niels Bohr to scribe the audio recording of a customer these things are impossible because they
Yogi Berra: https://bit.ly/2D0jiSw call into a text file. This literally saved defy known physics, but the physics we
Whoever said it first, this sentiment is me a couple of hours of wading through know and love today was inconceivable
spot on. When I graduated from univer- the video and making notes by hand – not-so-long ago.
sity in 1980, there was no way I could see: https://bit.ly/3mKIV1f As the American physicist Albert
have predicted the far future we now call Interested in learning more? Fast Michelson said in 1894, ‘The more im-
the present. I mean to say… the Internet, Company provides a wonderful over- portant fundamental laws and facts of
Bluetooth, Wi-Fi, GPS, and MEMS sen- view of 33 different AI tools you can try physical science have all been discov-
sors, all coming together to realise smart yourself for free: https://bit.ly/3YyYd6t ered…’ This was just three years before
things in the form of phones, buildings, the British physicist JJ Thomson discov-
cities and even watches, for goodness’ Ew! Sticky! ered the electron.
sake. And then there are robots and co- Do you remember the ‘before times’ pri- In 1972, Isaac Asimov published a sci-
bots (collaborative robots) along with or to the COVID-19 pandemic when we ence fiction novel, The Gods Themselves.
machine vision, artificial intelligence didn’t give a second thought to being in In a crunchy nutshell, aliens in a parallel
(AI) and machine learning (ML) that a crowded room packed with strangers, universe with different physical laws es-
actually works, and… the list goes on. shaking hands, or using doorhandles in tablish communication with us. They are
As I mentioned in my previous col- public places? These days, by compari- seeking to exchange matter and exploit
umn, I’ve been immersed in science son, the simple act of using the pump at the differences between our respective
fiction since I was a sprog. When I was a petrol station is ‘fraught with danger’. physical laws to provide us both with a
young and foolish, I truly believed all Although they’re relatively new, source of energy. What they don’t tell us
the technologies I read about were just there’s nothing revolutionary about is that this exchange will cause our sun
around the corner. As I grew older and the idea of self-cleaning germicidal door to go supernova (thereby giving them all
wiser (and balder and sadder), I came handles (https://go.nasa.gov/3yvwEjO). the energy they desire). Fortunately, we
to realise that the chances were slight But what about touch screens on elec- detect the problem and determine the
that many of these technologies would tronic devices? In addition to the solution, which is for us to start simulta-
ever see the light of day. So, you can ickiness associated with touching pub- neously exchanging matter with a third
only imagine my excitement to discover lic products, have you looked at your universe whose physical laws cancel out
that, in many cases, those fantastic fu- smartphone or tablet computer screen the instability caused by the first. And
tures might arrive sooner than expected. recently? If you do, holding it up to then things start to get complicated...
the light, you may well find yourself These are just stories, right? Of
Let’s not chat! exclaiming ‘Ew! Sticky!’ course, they are. It’s barely worth not-
You’ve probably noticed that AI-based Happily, the days of sticky screens ing that, just a few years ago, Chinese
tools are currently sprouting up like may soon be gone. I just saw an arti- researchers demonstrated the ability to
metaphorical mushrooms. In addition cle on New Atlas telling how General transport photons from the ground to
to AI chat and search tools, there are Motors (GM) has patented self-cleaning a satellite orbiting 300 miles in space,
AI art generators, AI writing tools, AI touchscreens that erase oily fingerprints see: https://bit.ly/403IXj7
content summarisers, AI speech-to-text along with all other signs of your pres- How about the fact that physicists can
transcribers, AI visual editors and AI au- ence overnight: https://bit.ly/3J4TBPL speed up, slow down and even reverse
dio tools, to name but a few. In addition to the usual red, green, blue the flow of time within a quantum sys-
I bet you think I’m going to chat about (RGB) pixels, GM proposes to add a fourth tem (https://bit.ly/3ZXoegB)? And, just a
ChatGPT – see: https://bit.ly/3JaHyQH ultraviolet (U) pixel type. Meanwhile, few days ago as I pen these words, I read
– if so, you’d be wrong. Even though a the surface of the screen will have an how – using quantum mechanics – it’s
friend did ask it to, ‘Explain semicon- additional transparent coating of a met- possible to extract energy from a vacu-
ductor technology in the style of Clive al-oxide-based catalyst like titanium um: https://bit.ly/3mKGD24
(Max) Maxfield,’ I’m going to restrain dioxide. The UV would be activated All I know is that I’m more than ready
myself from discussing the scary results. when the equipment was inactive (like to take possession of my self-powering
However, I did recently use an art gen- in the middle of the night) resulting in antigravity flying car with the optimal
erator called Stable Diffusion Online (see: a sparklingly clean and sterile screen. teleportation feature.

8 Practical Electronics | May | 2023


Exclusive offer

Win a Microchip
ATtiny817 Xplained Pro
Practical Electronics is offering its readers the chance to win a to 20MHz with 8KB Flash, 512B SRAM and 128B of EEPROM,
Microchip ATtiny817 Xplained Pro (ATTINY817-XPRO) – all in a 24-pin package. The series uses the latest Core
and even if you don’t win, receive a 15%-off voucher, Independent Peripherals with low-power features,
plus free shipping for one of these products. including an Event System, intelligent analogue

The ATtiny817 Xplained Pro evaluation kit is a


Worth and advanced peripherals. Capacitive touch
interfaces with proximity sensing and driven
hardware platform for evaluating the tinyAVR
microcontrollers (ATtiny817, ATtiny816,
$56.00 shield are supported by the integrated
QTouch peripheral touch controller.
ATtiny814,ATtiny417). The evaluation kit comes (approx £46.00)
with a fully integrated debugger that provides
seamless integration with Atmel Studio.
each ATtiny817 Xplained Pro currently supports more
than 20 extension boards — including wired
and wireless connectivity, crypto authentication
The ATtiny817 microcontroller features the 8-bit and QTouch capacitive touch kits, as well as generic
AVR processor with a hardware multiplier that runs at up I/O and OLED boards.

Free-to-enter competition

Microchip ATTINY817-XPRO Microchip ATtiny817 Xplained Pro

How to enter December 2022 winner


For your chance to win a Microchip ATtiny817 Luke Jarvis
Xplained Pro or receive a 15%-off voucher, including
free shipping, enter your details in the online entry
form at:
https://page.microchip.com/PE-Tiny817.html
He won a PIC32CX-BZ2
Closing date and WBZ451 Curiosity
The closing date for this offer is 30 April 2023 Development Board

Practical Electronics | May | 2023 9


The Fox Report
Barry Fox’s technology column

Cinema’s insatiable appetite for ‘versions’

H
ats off to movie industry around 100 versions, with ‘bigger’ 10 quadrillion bytes
trade body SMPTE (the So- titles hitting 500. But Avatar: The The post-production engineers handling
ciety of Motion Picture and Way of Water (AWOW), ideally needed all this work were split between New
Television Engineers). It does a very 5000 versions, compromised down to Zealand and California, with a database
good job of educating movie and tel- a final 1065 versions, partly because of 10PB (one petabyte (PB) equals one
evision engineers. The enterprising it’s in 3D (which involves different million gigabytes) of uncompressed
UK branch recently held two first- projection systems needing different audio and video and metadata, repre-
class sessions, which I was lucky brightness and colour gradings) and senting 381 million picture frames. This
enough to attend. partly because movie maker James was moved across the world by Ama-
For one of them, SMPTE gained Cameron wanted multiple aspect zon’s Web Cloud service, which needed
access to the National Physical Labo- ratios to stop cinemas with different radical tweaking by AWOW engineers
ratory in Teddington, to learn more screen sizes projecting pictures with to make it fast enough. The data was
about time – more next month. black masked bars and borders. There physically moved by undersea cables,
For the other event, SMPTE took are 27 different aspect ratio versions using ‘dual wet routes’; a matched pair
over the Dolby Screening Room in of AWOW. of 10GB fibre ‘pipes’. In this way, if a
Soho Square to show Disney’s Avatar: The sound options range from simple trawler drags up a cable and breaks it,
The Way of Water in immersive audio, stereo and surround to Atmos immer- the data keeps on streaming.
high frame rate, and high dynamic sive, with subtitles in 51 languages In all, 3500 hours of movie material
range 3D. Carly Brown, Disney’s Direc- and 28 language dubs. was cut to the final release length of 3
tor of Motion Picture Operations, and Whereas most cinemas project at 24 hours 12 minutes. To achieve all this,
Rich Welsh, Deluxe’s SVP of Innova- frames per second (fps), a few (Dolby) movie engineering companies that
tion, talked ahead of the screening cinemas can handle 48 fps. The 24 normally compete ended up working
about the mind boggling multitude of fps versions of AWOW were down together to get the job done. The credits
sound and picture formats needed for converted from 48 fps. at the end of the movie are as long as
release to different types and grades In fact, AWOW uses a mix of mate- a short film. Even James Cameron was
of cinemas worldwide, ranging from rial created at 24fps and 48 fps. This moved to admit: ‘I’ve never worked like
high-end Dolby venues (such as the explains why keen eyes will spot 24 this before, and I never want to again’.
Leicester Square Odeon or the new fps motion artefacts (judder) in some The Dolby screening room in London
Battersea Power Station cinema) to action sequences, even when the movie is classed as a ‘grading theatre’ and is
bog-standard flea pits and local multi- is playing at 48 fps. thus permitted to screen movies in pitch
purpose halls. The subtitles were originated in 3D black, without any of the emergency
and down converted to 2D for the 2D lighting or Exit signs which public cin-
Multiple versions cinema versions. The 3D titles hover emas must provide. It’s a unique way to
According to Brown and Welsh, run- in unusual areas of the screen, at dif- watch a movie and reminds how much
of-the-mill movies are released in ferent depths. ambient light pollutes all other cinemas.

1552 hand-held plastic enclosures


Learn more: hammfg.com/1552

[email protected] • 01256 812812

10 Practical Electronics | May | 2023


charging the battery, removing and owners of Amazon Ring cameras can
replacing the battery and pressing the rest easier in their beds, knowing that
reset button for short and long periods. they are not being silently surveilled.
A quick Google-check showed that
other Ring camera users had experienced
exactly the same problem; a forced

NEW!
update that bricked the device.
Just for the heck of it I called the Ring
Help line, which is run by Amazon who
bought the Ring company. As I feared,
I was compelled to repeat all the same
fault-fixing steps while the helper (in
South Africa) religiously followed her
script and made side-calls for more help
5-year
from more senior helpers.
After an hour of laboriously achieving
collection
absolutely nothing Amazon insisted
that I try one last fix. I had to sit by the
2017-2021
Amazon’s Ring camera has an annoying habit of dead and disconnected device while All 60 issues from Jan 2017
auto-updating itself to death. Amazon tried to force an update over
the Internet. I tried politely to question to Dec 2021 for just £44.95
Likewise, the Dolby screening room the logic behind this powerful magic. If PDF files ready for
can use the Dolby 3D system, which a stone dead device isn’t connected to immediate download
was developed by German company anything, how can it receive anything?
Infitec, and is less fatiguing than other But the helpers insisted on trying.
systems, but not commercially viable. I then began to doubt my sanity and See page 6 for further
The spectacles (which filter slightly wonder whether the clever boffins at details and other great
different red, green and blue spectra for Amazon might perhaps be selling su-
the left and right eye views) cost at least per-clever cameras that can play dead back-issue offers.
£25 a pair and are thus too expensive to but actually respond remotely, much as
risk losing to light-fingered customers. the Pegasus software from Israeli com- Purchase and download at:
Was all Cameron’s work worthwhile? pany NSO lets security services access www.electronpublishing.com
Everyone will have their own opinion, apparently dead
but AWOW is a remarkable technical camera phones. If
achievement on all counts. As a movie, so, that would be
I find it far too long and too loud, a real story!
with endless bang, whoosh, boom and But sadly, or
ratatat audio effects for interminable fortunately, this
battle scenes. There are also some failed too. Ama-
very distressing sea creature harpoon zon-Ring’s Help-
hunting sequences that remind of the ers finally had to
infamous 1956 Moby Dick movie with acknowledge that
Gregory Peck. the dead device
But for those who enjoy Marvel- wasn’t responding
Comic-style blockbusters, which play to the firmware that
like a computer game with no pause Amazon was opti-
control, AWOW will hugely appeal. mistically pushing
Reportedly, it has earned more than into the ether.
JTAG Connector Plugs Directly into PCB!!
$2.2bn worldwide. It was nominated for Like all the other No Header! No Brainer!
four Oscars, including best picture and users complain-
won the Best Visual Effects category. ing about their
bricked Ring cam-
Helplines Coda eras, I have now
Amazon is a clever company with been offered a
mould-breaking ideas, but perhaps not 30% discount off
always as clever as it thinks. the price of a new
I recently started to use a Ring CCTV Ring device to risk
Our patented range of Plug-of-Nails™ spring-pin cables plug directly
camera that had being lying in my draw- being bricked. into a tiny footprint of pads and locating holes in your PCB, eliminating
er for a while. It worked for around half Whether I con- the need for a mating header. Save Cost & Space on Every PCB!!
an hour and then decided to download test or take up the Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
itself a firmware update. The update offer is a whole Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
‘bricked’ the camera. It was stone dead, other story which
showing no lights or other signs of life. will probably be www.PlugOfNails.com
I followed all Ring’s recommend- too long and bor- Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
ed fault-fixing steps, including fully ing to recount. But

Practical Electronics | May | 2023 11


Net Work
Alan Winstanley
This month’s column brings the latest electric vehicle trends and new EV brands about to launch
in Britain, with updates on the power generation front and, of course, the latest from the LEO
satellite broadband sector.

P
revious Net Work columns
brought news of Britain’s
electric vehicle sector as the
lurch towards car electrification
gathers pace. The UK’s Society of
Motor Manufacturers and Traders
(SMMT) reports that 52% of all new
car registrations in February were
battery-powered (BEV), hybrid (HEV),
mild hybrid (MHEV) or plug-in hybrid
(PHEV). Those BEVs represented 16.5%
of all UK February car registrations.
Even so, 48% of new cars registered
in February were still petrol (gas) or
diesel – a far higher proportion than
in, say, EV-friendly Norway – but there
was of course no reference to used The Atto 3 is BYD’s (Build Your Dream) first EV to launch in Britain, featuring a futuristic
car sales, whether fossil-fuelled or interior and ‘Blade’ battery.
electrically propelled. Despite the
interest in new EV cars, the high cost sensibly priced petrol cars instead. It beyond the prototype stage. This il-
and practical challenges of running seems there is plenty of life left in older lustrates the typical vagaries of this
them puts them well beyond the reach petrol cars before sales of new ones are fast-moving tech sector.
of many motorists struggling in today’s banned altogether. Maybe those used At least British EV owners are not
financial climate. EVs will be sold off at bargain base- alone in suffering practical problems
However, the signs are that interest ment prices in coming months. of EV ownership. An American EV
in buying used EVs has cooled dramat- owner recently posted on Reddit: ‘Was
ically in Britain: wary buyers, already Who’s in charge? at the Electrify America station in In-
feeling the pinch from the rising cost Britain continues to drag its heels over diana yesterday. In a blizzard. With 30
of living and energy costs, are de- the supply of EV charging points. New miles of range and about 75 miles to
terred by the dearth of EV charging British housing stock is supposed to in- drive. Station had eight chargers. Only
points, worries about range anxiety clude an EV charging point, but as one ONE was working and it was in use.
and nagging doubts about becoming web forum poster pointed out, ‘if the The EA call centre was useless. Took
lumbered with yesterday’s outdat- local electricity substation that feeds hours to get a charge when it should
ed (or worn out) battery technology. your street has a 400A fuse, and every have taken 20 minutes. Until this gets
As used EVs are gradually ‘returning house has at least one 32A charger, then figured out, electric cars will be lim-
to the market’, some secondhand EV you do the maths. They can’t even roll ited, period.’ Sounds all too familiar.
models are suffering ‘incredibly large out smart meters for every house and
drops’ in value, says car dealer journal that’s cost more than £12bn so far, and Blade Runner
Automotive Management. They report is far from complete... I understood that Listed in nearly 74,500 new February
that the lack of interest in buying used the electrical load of a new housing registrations were exactly 13 (thir-
EV cars is such that some dealerships estate averages eight amps per prop- teen) GWM Ora £32,000+ electric mini
have stopped stocking them altogeth- erty, and now they want to add 32A cars, the cute Chinese EV previously
er, in order to avoid getting stuck with for one EV on top of changing your gas described in Net Work. There are yet
large inventories of rapidly depreciating central heating boiler to a heat pump,’ more Chinese EV brands, almost too
electric cars that simply aren’t selling. the poster mused. many to follow, heading our way across
Highlighted is the Tesla Model 3, In the January 2022 issue I mentioned Northern Europe, starting with BYD –
which has dropped over 33% on aver- a possible charging solution for EV an acronym for ‘Build Your Dreams’.
age in the past four months, and Tesla owners in the shape of a semi-porta- BYD is barely 20 years old and may
also skewed the market by slashing ble battery pack on wheels, called the be unfamiliar to most readers, but
new car prices by up to 20% earlier ZipCharge Go. This well-publicised BYD is a huge Chinese conglomerate
this year, as supply finally started to powerbank was being developed for that manufactures semiconductors
exceed demand. Semiconductor short- ‘topping up’ EVs in the street or car and batteries as well as solar arrays,
ages and supply chain problems didn’t park – the idea was due to launch some energy storage systems, EV chargers
help EV sales either, so consequently time this year, but I now understand and electric buses. Cars made by sub-
there is still a keen interest in buying that the ZipCharge Go never made it sidiary BYD Auto will arrive in British

12 Practical Electronics | May | 2023


showrooms this year, starting
with the attractive BYD Atto 3
compact SUV.
Of particular interest is BYD’s
‘Blade’ lithium-iron-phosphate
battery that they claim is among
the safest in the world. BYD
reckons that the pressure to
improve car cruising range had
forced battery makers to pursue
an increase in battery energy
density over safety considera- The Atto 3 cabin is ‘built with the concept of sports and fitness’ with a ‘trendy and avant-garde
design’, BYD says. Traditional motorists might not agree.
tions. BYD’s Blade battery uses
a unique cell construction, which they an extremely sleek executive car and a coal-fired station up to speed, and
stated withstood nail puncture tests SUV from BYD. The Atto 3 is expected environmentalists were hopping mad
and neither overheated nor produced to cost around £35,000. For more de- at the thought of it, but, thanks to the
smoke. When damaged, ordinary Li-Ion tails, see: www.byd.com/eu/car/atto3 efforts of all those in our hard-work-
batteries have a tendency to thermally ing energy sector, the lights are still
runaway and are nearly impossible to Energy for tomorrow on, and life goes on as normal. This
extinguish once they start to melt down Despite earlier dire predictions of pos- time round, smart meter users were not
– often exploding – as graphically de- sible power cuts, the UK seems to be asked to reduce their consumption in
scribed in previous Net Work columns. weathering the winter storms well, at return for receiving a small cash bonus.
Other Blade safety distinctions include least as far as energy consumption is Software developer Kate Rose Morley
having a high starting temperature for concerned. In March, National Grid has coded a very impressive website
exothermic reactions, slow heat release ESO (the UK electricity system opera- that publishes more live National
and low heat generation, as well as an tor) tweeted that an electricity margin Grid data than I know what to do
ability to not release oxygen during notice (EMN) had been issued to the with – it’s available for viewing at:
breakdowns or easily catch fire. market for one day, which meant that https://grid.iamkate.com
BYD adds that their smart technology Britain’s last remaining coal-fired power Historical trend graphs (under
allows for ‘bi-directional EV charg- stations were ‘warmed up’ just in case ‘Generation’) show the gradual total
ing’. Suitably equipped vehicles could they might be needed to top up the elimination of coal, a steady decline
charge overnight at off-peak times when supply. It takes time and money to get in nuclear and a rise in wind power
energy demand is low, and become a
powerbank to feed energy back into the
electricity grid when demand is high.
A year ago, in the May 2022 issue, I
mentioned this V2G or V2H (Vehicle
to Grid/ Home) technology but this is
barely at a developmental stage here
in Britain. In comparison, BYD has
offered DTG (Direct to Grid) charging
since 2015 when its conventional-look-
ing ‘e6’ car was first launched in the
US – it was the only car on sale at that
time with V2G included as standard.
As things turned out, BYD arrived in
the UK well over a decade ago, float-
ing its ‘e6’ potentially as a taxi, but
the Chinese firm has kept a low profile
ever since – until now. As well as in
the UK (eg, Arnold Laver dealerships),
dealers for BYD electric cars have been
signed up across Europe. Traditional-
ists who prefer to use tactile knobs and
switches might not adapt so well to the
touchscreen way of doing things in an
electric vehicle, but the BYD Atto 3 has
a stylish interior dash that’s ‘built with
the concept of sports and fitness’ with
a ‘trendy and avant-garde design’ they
say, so its target market is clear to see.
BYD is presently slugging it out with
Tesla over pricing, but the BYD Atto 3
is part of a phalanx of futuristic-look-
ing electric vehicle brands, including
XPeng, Fisker and Nio that may eventu-
ally become familiar sights on Britain’s An impressive data website coded by Kate Rose Morley displays National Grid
roads. European drivers will also see generation and statistics.

Practical Electronics | May | 2023 13


Left: The first of two French-built 500-tonne reactor
vessels arrived at the UK’s Hinkley Point C nuclear power
station in February.

Above: A Russian-built poloidal field coil was successfully


delivered to the multinational ITER nuclear fusion pilot
plant in France in February.

generation over the past ten years. For distant memories: when I hosted the Ariane 6 launcher which is now slated
a different outlook on the National Grid Ingenuity Unlimited column of readers’ to launch from French Guyana by the
stats, try the graphs and dials shown circuit ideas here at Everyday Practi- year end. Last year, Arianespace signed
on: www.gridwatch.templar.co.uk cal Electronics in the 1990s, I received a contract with Amazon for 18 flights
The Hinkley Point C nuclear power a circuit suggestion for a 4000-series carrying satellites into LEO for Project
station in Britain is the first new one CMOS-based electronic rotary switch Kuiper, Amazon’s own satellite-based
to be built in 20 years. Sadly, like a from an engineer who worked at the Internet service that is still seeking
number of other key infrastructure pro- emerging Indian Space Research Organ- regulatory approval. More details are
jects in Britain, it has suffered delays isation (ISRO) Department of Space. It at: www.arianespace.com – note that
and construction cost overruns. In was carefully typed with a dot-matrix there is no website for Kuiper, although
February the site received the first printer on tissue-thin paper, which I projectkuiper.com leads to an enigmat-
of two French-built 500-tonne nu- found in my archives (fortunately, ic login page.
clear reactor vessels, as construction I’m ruthlessly methodical) and our
of this ‘too-big-to-fail’ power station correspondence had always stuck in Other news
continues with completion expected my mind. An advanced new fusion energy proto-
within five years. Interested readers Fast forward 25 years, and in Octo- type will be built by Tokamak Energy
can find more background on the his- ber 2022 a jubilant ISRO launched its at the United Kingdom Atomic Energy
tory and status of Hinkley Point C at: new LVM3 (Launch Vehicle Mk. III) Authority’s (UKAEA) Culham Campus,
https://bit.ly/pe-may23-hinkc rocket from the Satish Dhawan Space near Oxford. The compact spherical
Previously covered in Net Work, Centre in Sriharikota and it success- tokamak, called ST80-HTS, is due for
December 2022, the International Ther- fully placed 36 OneWeb satellites into completion by 2026. It will incorporate
monuclear Experimental Reactor (ITER) their intended orbits. The triumph was advanced technologies required for the
is an ambitious multi-national effort one of India’s biggest ever commercial delivery of sustainable fusion energy,
being built in France to explore the orders, and the launch can be seen at: including cutting-edge high temper-
boundaries of nuclear fusion. The http://bit.ly/3yFSAsn ature superconducting magnets to
ITER tokomak will not however be OneWeb’s constellation of 542 confine and control the hydrogen fuel,
used to generate electricity for the grid. first-generation satellites is nearing which becomes plasma many times
In February, after a near four-month completion, and a second launch from hotter than the sun, they report. Last
voyage from St. Petersburg, a giant India was due to lift off in March. year, their current ST40 fusion device
Russian-made 160-tonne poloidal field Following the outbreak of the in Milton Park, Oxfordshire, achieved
coil was successfully delivered to the Ukraine conflict, 36 OneWeb satellites a 100-million-degrees-Celsius fusion
ITER site, having taken some six years worth some $230m were impounded plasma – the highest temperature ever
to fabricate. Russia’s Rosatom is contrib- at the Russian-controlled Baikonur recorded in a compact spherical to-
uting 400 tonnes of equipment to the Cosmodrome in Kazakhstan, where kamak, the research centre reported.
ITER project, which has now reached presumably they have lain ever since. The European Union has formulated
78% along the road to ‘first plasma’. It’s thought that they could now be in record time plans for a new secure
traded for some badly needed Russian satellite communications programme
Space is (still) hard Soyuz stages languishing at the Eu- of its own. Called IRISS (or IRIS2), the
London-based network operator ropean Spaceport in French Guyana, Infrastructure for Resilience, Intercon-
OneWeb continues to build its constel- which is situated in north-eastern South nectivity and Security by Satellite may
lation of satellites intended to provide America. Roscosmos pulled the plug see the development and launch of
Internet access between the North Pole on co-operating with the European up to 170 LEO satellites between the
and the 50th parallel. OneWeb uses a Space Agency, leaving critical Soyuz years 2025 and 2027. It’s also intend-
number of service providers, includ- rocket parts behind. ed to integrate with other EU space
ing friendly rival SpaceX, to launch The European site accommodates programmes such as the Copernicus
small batches of its satellites into LEO. the European Ariane 5 as well as Rus- earth observatory and Galileo satnav,
To digress for a moment, it’s funny sian-built Soyuz vehicles, but the ESA as well as offering secure communica-
how a feeling of deja-vu can trigger continues to develop its long-overdue tions while eliminating Internet dead

14 Practical Electronics | May | 2023


India’s Space Research Organisation Dept of Space readies a payload of 36 OneWeb satellites for launch into low-earth orbit.
spots in Europe and across the entire booming space sector. The firm states, JAXA, Virgin Orbit, Skyrora and ABL
African continent. ‘it is serious about having a footprint in Space Systems have all recently found.
America’s Lockheed Martin has an- the UK and creating UK jobs, as well as Green tech company Ivie is selling
nounced plans to build its first satellite developing the UK supply chain.’ Lock- a replacement or upgrade In-Home
factory outside the US in Britain, which heed Martin, in partnership with ABL Display (IHD) for British smart meter
will create 2,000 skilled jobs in Britain’s Space Systems, would be among the owners. The Ivie Bud costs £49.99 and
first companies to support a launch from will work with any energy supplier, they
the SaxaVord Spaceport – one of Brit- say, but it’s necessary to check smart
ain’s new vertical spaceports, currently meter compatibility before buying. This
under construction (see last month). can be done online at https://ivie.co.uk/
Japan’s first launch of its new H3 product/ivie-bud/ and the Ivie app is
rocket on 7 March ended in failure available from Google Play and the App
when a self-destruct signal had to be Store. Alternatively, there’s the Loop
sent to abort the mission, destroying app (with no IHD) that links to your
the Advanced Land Observing Satel- smart meter, see: https://loop.homes
lite-3 payload. The Japan Aerospace That’s all for this month’s Net Work.
Exploration Agency (JAXA) suspects Don’t forget that the hyperlinks above
that the second stage failed to ignite are ready-made for you to click on
The Ivie Bud is a replacement In-Home – see: http://bit.ly/3FqcV93 in my Net Work blog summary at:
Display with app, for UK smart meter Space is still hard to do and full of www.electronpublishing.com
owners. Check compatibility online. ‘anomalies’ and ‘launch attempts’, as See you next month!

varia

Practical Electronics | May | 2023 15


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

HP33120A Function Generator 100 microHz – 15MHz £350


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

ESR Electronic Components Ltd

All of our stock is RoHS compliant and CE


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

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

16 Practical Electronics | May | 2021


500 POWER
WATTS AMPLIFIER PART 2 BY JOHN CLARKE

Having described our new 500W Amplifier Module last month, giving its
performance details and describing the circuit, we follow on this month
with the amplifier construction, beginning with the PCB (Amplifier Module)
assembly. Next month, we’ll build this into a complete amplifier, along with
fan cooling, a speaker protector and a clipping detector.

T
he 500W Amplifier has four Before starting, it’s a good idea to is unlikely to cause any problems; we
main components: the Amplifier inspect the board carefully. This will want to joints to be shiny, and adding
Module, its power supply, the familiarise you with its layout and a bit too much solder is better than not
Fan Cooling and Loudspeaker Pro- reveal any defects (however unlikely adding enough!
tector board and the Clipping Indica- that is). If you feel the need to remove the
tor board. The last two of those have Start construction by fitting transis- excess solder, add a little bit of flux
already been described in the Febru- tors Q1 and Q2. These are small SOT- paste and touch the join with a clean
ary and April 2023 issues respectively. 23/TO-236 surface-mounting devices. soldering iron tip.
This article focuses on the assembly They are relatively easy to solder due Now mount the small (¼W or ½W)
of the Amplifier Module – its circuit was to their widely spaced pins, but you resistors. Check each value using a
described last month. Next month, the might need the aid of a magnifying digital multimeter set to read ohms
final article will detail the power supply, glass and strong light if your vision is before soldering in place. Don’t just
the chassis and the final assembly and not perfect. rely on the colour bands to determine
wiring, bringing all those parts together. First, align Q1 onto the pads, hold- the value, as these can be difficult to
Now let’s move on to building the ing it with tweezers, and solder one of read accurately.
all-important Amplifier Module. the pins to the PCB. Check that it is Note that there are two pairs of resis-
correctly aligned with the other pads, tors labelled R1 and R2 on the PCB;
Construction reheating the solder joint to realign if they don’t have associated values. The
The 500W Amplifier Module is built necessary. Then solder the remaining nominal values required for these resis-
on a double-sided, plated-through PCB pins. Mount Q2 similarly. tors (which define the SOA protection
coded 01107021 that measures 402 x Don’t worry if you add so much curves) are R1 = 35.328kΩ and R2 =
124mm. Refer to Fig.6, the parts layout solder that the joints on these SOT-23 204.8Ω. We can’t get these exact values,
diagram during construction. parts look like small silver balls. This but there are two ways we can get close.

Practical Electronics | May | 2023 17


Fig.6: all the parts
for the amplifier
module mount on
this somewhat large
PCB. As usual,
take care with the
orientations of the
transistors, diodes,
LEDs and electrolytic
capacitors and don’t
get similar-looking
parts mixed up.
Note the two wire
links required in the
middle of the board.
You should sleeve
them with insulation
just to be safe.

This overlay is
shown split at
actual size.

We can use E96 value resistors, We don’t think the +1% error using The UF4003 diodes (D4-D7) can
with R1 = 35.7kΩ (+1%) and R2 = 35.7kΩ for R1 matters; the current- go in next. They are not all oriented
205Ω(+0.1%). That is the easy method, sensing 0.47Ω resistors have 5% toler- the same way, so check Fig.6 and the
and if you buy the set of hard-to-get ances, and the protection curves have PCB silkscreen.
parts from us, you’ll get the 35.7kΩ a built-in safety margin. Still, if you’re There are two wire links in the
and 205Ω resistors – see the note in the concerned about it, you can use the middle of the PCB above Q7 and Q9.
Parts List in Part 1 last month. parallel pairs instead. Make these using 0.7mm diameter
A slightly more precise method for Fit these resistors in the eight posi- tinned copper wire covered in 1mm
R1 and R2 is to use paralleled pairs tions, using your preferred method. heatshrink tubing over most of their
of resistors, one fitted to the top side Now install the two small 1N4148 lengths, leaving just the ends exposed.
of the PCB as normal, and the other diodes (D1 and D2) with their striped Continue by mounting the 1W resis-
soldered across the pads underneath ends (cathodes) as shown on the over- tors, again being careful to check the
afterwards. These are 62kΩ || 82kΩ for lay diagram and PCB silkscreen. Next, values. For the 56Ω resistors near
R1 giving 35.3kΩ (−0.08%) and 390Ω fit the BAV21 diode (D3) with the cath- speaker connector CON3, four mount
|| 430Ω giving 204.5Ω for R2 (+0.15%). ode facing the same way. on the top side of the PCB and four on

18 Practical Electronics | May | 2023


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

the underside. The PCB screen print- The three LEDs are mounted about retention clips are on the outside.
ing shows the resistor positions on 5mm off the PCB, taking care to ori- The best approach to make sure the
both sides. ent them correctly and using the green fuse clips are aligned correctly is to
Next, you need to fit the small-sig- LED for LED1. The longer lead is the first fit a fuse to hold the fuse clips in
nal transistors in TO-92 packages anode, and this position is marked position, then solder to the pads on
next. These are Q3 and Q4 (BC546) with an ‘A’ on the board. the underside of the PCB.
plus Q5 and Q6 (BC556). Leave Q25 Fit the 75pF 200V capacitor now, You can now solder in the 12 0.47Ω
and Q26 off at the moment, as these along with the 1nF, 10nF, 100nF, 470nF 5W resistors. These should be mounted
need to be mounted against the heat- and 1μF MKT capacitors. Follow with about 2mm proud of the PCB so that
sink. However, you can fit the two trimpot VR1, then VR2 with its adjust- cooling air can circulate beneath them.
TL431 references now, also in TO-92 ment screw towards the bottom of the A cardboard spacer slid under the resis-
packages (REF1 and REF2). Read board, as shown (right edge in Fig.6). tor bodies before soldering their leads
the device markings carefully, and The four M205 fuse clips are next. can ensure consistent spacing.
be sure to install the correct type at Press them down fully onto the board Now fit the connectors, ie, the RCA
each location. before soldering and ensure that the socket (CON1), the two-way socket for

Practical Electronics | May | 2023 19


L1 Winding Jig
1 2

These photos show how


3 4
the winding jig is used to
make the 2.2μH inductor.
First, the bobbin is F
slipped over the collar on
the bolt (1), then an end
cheek is attached and the
wire threaded through the
exit slot (2). The handle is S
then attached and the coil
tightly wound onto the
bobbin using 13.5 turns of
1mm-diameter enamelled copper wire (3). The finished
coil (4) is secured using a couple of layers of insulation
tape and a band of heatshrink tubing.

Wind wire on
bobbin clockwise be slipped over the collar, after which the scrap PCB end
cheek is slipped over the bolt, ie, the bobbin is sandwiched
into position between the washer and the scrap PCB.
Align the bobbin so that one of its slots lines up with
T he winding jig consists of a 70mm M5 bolt, two M5
nuts, an M5 flat washer, a piece of scrap PCB material
or similar measuring approximately 40 x 50mm and a scrap
the exit hole in the end cheek, then install the first nut and
secure it tightly. Next, fit the handle by drilling a 5mm hole
piece of timber (about 140 x 45 x 20mm) for the handle. through one end, slipping it over the bolt and installing
In use, the flat washer goes against the bolt’s head, the second nut.
after which a collar is fitted over the bolt to take the bob- These photos show how the winding jig is used to make
bin. This collar should be slightly smaller than the inner the 2.2μH inductor.
diameter of the bobbin and can be made by winding insu- First, slip the bobbin over the collar on the bolt (1),
lation tape onto the bolt, or from tubing. The collar needs then attach the end cheek and thread the wire through
to be of sufficient diameter for the bobbin to fit snugly the exit slot (2). Next, attach the handle and wind the coil
without being too tight. tightly onto the bobbin using 13.5 turns of 1mm-diameter
Drill a 5mm hole through the centre of the scrap PCB enamelled copper wire (3). Finally, secure the finished
material, plus a 1.5mm exit hole about 8mm away that will coil (4) around the outside using 20mm diameter heat-
align with one of the slots in the bobbin. The bobbin can shrink tubing.

the loudspeaker connection (CON3) Mini heatsinks the solder to realign if necessary. Then
and the 6-way power connector Before fitting Q7 and Q9, you must solder the remaining pins.
(CON2). For CON3, first insert the ter- first attach the heatsinks. Do this by The metal tab needs to be soldered
minal block plug into the socket and inserting the mounting posts into to the PCB right next to the heatsink.
then install the socket into the PCB the PCB holes and soldering these to Again, you will need to heat it with
holes with the wire entries toward the the underside of the PCB. These will your iron for an extended period due
outside edge of the PCB. require a lot of heat from your solder- to the heatsink drawing heat away.
Now mount the 100nF X2 class ing iron before the solder will success- Once the solder melts, though, sol-
capacitor located near CON3. The fully melt to secure the heatsink. Take der the tab as quickly as possible to
47μF, 470μF and 2200μF electrolytic care to avoid burning yourself on the avoid overheating the device. Now
capacitors can then go in. The 47μF hot heatsinks; wait until they are cool install transistor Q9 (FZT458) in the
NP (non-polarised) electrolytic can go before mounting Q7 and Q9. same manner.
in either way around, but the others Now tackle Q7 (FZT558). It would
must all be oriented correctly. help to spread a little flux paste on Winding inductor L1
Note that the 47μF capacitor above all four of its pads before placing the The inductor (L1) is wound using a
Q5 and Q6 must be rated to handle part. Align the device with the PCB 0.9m length of 1mm diameter enam-
at least 50V (eg, a 63V type would be pads and solder one of the pins to the elled copper wire on a plastic bobbin
acceptable). PCB. Check for alignment and reheat (not 2m/1.25mm wire – an error in last

20 Practical Electronics | May | 2023


month’s Parts List). Use a winding jig thread. Do this at two places along the
as shown above. Without it, it’s a much bottom edge on each heatsink. This
more difficult procedure, and you risk is for mounting the heatsinks to the
damaging the relatively fragile bobbin. chassis later.
Attach the bobbin to the jig, then wind
13.5 turns of 1mm diameter wire in the Tapping
clockwise direction as shown, leaving To tap the underside mounting holes,
about 20mm free at each end. you will need an M3 intermediate (or
When finished, secure the wind- starting) tap (not a finishing tap). The
ing with a narrow strip of insula- trick here is to take it nice and slowly. Use a cable tie to secure the
tion tape, then slip a 15mm length Keep the lubricant up and regularly 2.2μH inductor L1 to the board.
of 20mm diameter heatshrink tubing wind the tap out to clear the metal
over the bobbin and heat it gently (be swarf from the hole. Relubricate the Q12 (the MJE15034) on the
careful to avoid melting the bobbin). tap each time before resuming. left-hand heatsink and Q11 (the
Next, use a small, sharp hobby knife Do not apply undue force to the tap. MJE15035) on the right-hand heat-
to scrape away the enamel from the It’s all too easy to break a tap in half sink need silicone TO-220 insulat-
protruding lengths of wire around if you are heavy-handed. Similarly, if ing washers and an insulating bush
the whole circumference and tin the you encounter any resistance when inserted into the device’s tab hole
exposed copper at the ends, ensuring undoing the tap from the heatsink, before being secured with an M3 x
the solder sticks. gently rotate it back and forth and let 15mm screw and M3 nut. Also leave
The inductor can then be installed it cut its way back out. In short, don’t these loose for the moment.
on the PCB, oriented as shown. Secure force it, or it will break. Q10, the BD139, mounts with the
it with a cable tie over the top of the Finally, lightly deburr hole edges metal face toward the heatsink and
winding and through to the underside using an oversized drill bit and clean a TO-220 silicone washer between
of the PCB. off any aluminium particles or swarf. the heatsink and transistor. Attach it
Check that the area around the holes with an M3 x 15mm screw and M3
Preparing the main heatsink is perfectly smooth, or the insulating nut, and again, leave the screw con-
The next step is to drill the heatsinks washers could be damaged. Scrub the nection loose.
using the drilling templates provided heatsink thoroughly using water and Now mount the PCB on six
(Fig.7). It is essential to place the detergent and allow it to dry. M3-tapped 9mm spacers and sit it on
holes accurately, so they are centred a flat surface. Lower each heatsink,
between the heatsink fins. That way, Final assembly one at a time, inserting the transistor
the screw heads will fit neatly between Fig.8 shows the transistor mounting leads through the appropriate holes.
the fins. details. Start by mounting transistors Once they’re in, push the board down
Before drilling the heatsink, you Q13 to Q24, noting that Q13-Q18 are the so that all four spacers (and the heat-
will have to carefully mark out the MJW21196 transistors while Q19-Q24 sink) are in contact with the benchtop.
hole locations using a very sharp pen- are the MJW21195 transistors. Q13-Q18 This adjusts the transistor lead
cil, then use a centre punch (or ham- are mounted on the left-hand heatsink lengths and ensures that the bottom of
mer and nail) to mark the hole cen- and Q19-24 on the right-hand heatsink. the board sits exactly 9mm above the
tres. Next, drill 3mm holes at all the The locations for these are shown in bottom edge of the heatsink.
marked positions. Fig.7 (you can also refer to Fig.6). Check that the correct transistor is
It is best to use a drill press as it’s These all mount with a silicone in each position and adjust the PCB
challenging to get the holes perfectly insulating washer between each tran- assembly horizontally so that each
perpendicular to the mounting face sistor and the heatsink face. They are extends an equal 1mm beyond the side
otherwise. Use a small pilot drill to secured using M3 x 20mm machine of the heatsink. Now tighten all the
begin with (eg, 1.5mm), then step up screws inserted between the heatsink transistor screws just enough that they
the drill size to either 2.5mm or 3mm. fins and a flat metal washer and M3 are held in place while keeping the
Use a suitable lubricant when drill- nut against the transistor face. Do not insulating washers correctly aligned.
ing the holes. Kerosene is the recom- tighten the screws yet, so you can move The rear of each heatsink should be
mended lubricant for aluminium, but the insulation washers and transistors flat against the transistor mounting
we found that light machine oil (eg, to allow mounting onto the PCB. edge of the PCB.
Singer or 3-in-1) also works well for
jobs like this.
The holes have to go between the
fins, so check that the hole positions
are correct before drilling them.
Don’t try drilling each hole in one
pass. When drilling aluminium, it’s
important to regularly remove the
bit from the hole and clear away the
metal swarf. If you don’t do this, the
aluminium swarf has a nasty habit of
jamming the drill bit and breaking; it
and can also scratch the heatsink face.
Relubricate the hole and the bit each
time before you resume drilling.
At this stage, 2.5mm holes can be
drilled in the bottom edge of the heat-
sink, ready to be tapped with an M3 A close-up of the mounting arrangement of the transistors to the heatsink.

Practical Electronics | May | 2023 21


Fig.7: drill the two side-by-side heatsinks as shown here. You can drill the transistor mounting holes through the
heatsink using a 3mm bit and then mount the transistors using screws, nuts and washers. The underside edge is
drilled to 2.5mm and tapped for M3 in two places on each heatsink so that it can be mounted to the chassis.

The next step is to lightly solder so that the PCB is maintained at right If you don’t do this, it will sag under
the transistor leads from the top of angles to the heatsink. its own weight and remain in this con-
the PCB, or at least as many leads as If you don’t have anything handy dition after the leads are soldered.
you can easily access from the top. that you can stack to a suitable height, Now you can solder the remaining
Then carefully turn the whole assem- you can cut a couple of cardboard cyl- transistor leads and add extra solder to
bly upside down and prop the front inders to 63mm (eg, from discarded any that need it. Make sure the joints
edge of the board up by placing books paper towel rolls) to use as tempo- are good since they can carry many
or something similar under the board rary supports. amps at full power. When finished,

22 Practical Electronics | May | 2023


Fig.8: use this diagram as a guide for mounting the various devices to the
heatsink. Note the use of silicone insulating washers for all the large devices (no
need for Mica given how spread out the heat load is) and the plastic bushes for
the TO-220 devices with fully exposed metal tabs.

trim the leads and turn the board right- Q25 (BC546) and Q26 (BC556)
way-up again. can be mounted now. These are held
Next, tighten the transistor mount- in position using transistor clamps
ing screws to ensure good thermal attached to the heatsink by 15mm M3
coupling between the devices and screws and nuts.
the heatsink. They need to be tight, Apply a smear of heatsink com-
but don’t get out your breaker bar or pound to the flat face of each, mount
impact driver. the transistor clamps and position
each transistor so the clamps will Now you must remove the three
Checking device isolation hold them in place at approximately support spacers from the edge of the
Now check that the transistors are all the centre of the transistor body. Then board adjacent to the heatsink. This
electrically isolated from the heatsink. tighten the screws. Turn the PCB edge of the board must be supported
Do this by switching your multimeter assembly upside-down and solder and only by the heatsink transistor leads.
to a high-ohms range and measuring trim the transistor leads. This avoids the risk of eventually
the resistance between the heatsink
mounting surface and the collectors
of the heatsink-mounted transistors.
For transistors Q13-Q24, it’s simply
a matter of checking between each of
the fuse clips closest to the heatsink
and the heatsink itself on each side
of the Amplifier. That’s because the
device collectors in each half of the
output stage are connected together
and run to their respective fuses. You
should get a reading above 10MΩ, and
quite likely ‘OL’ because it should be
too high for your DMM to read.
Testing shorts for transistors Q10 (the
VBE multiplier), Q11 and Q12 is differ-
ent. In this case, you have to check for
shorts between the centre (collector)
lead of each device and the heatsink.
If you do find a short, undo each
transistor mounting screw in turn until
the short disappears. It’s then simply When finished, our
a matter of locating the cause of the 500W Amplifier will
problem and remounting the offending have fans attached at the
transistor. Be sure to replace the insu- back of the heatsink via a
lating washer if it has been damaged in metal bracket on the base of
any way (eg, punched through). the case.

Practical Electronics | May | 2023 23


cracking the PCB tracks and pads Coming up next give full details on building the Ampli-
around the heatsink-mounted tran- That completes the assembly of the fier into a vented aluminium metal
sistors due to thermal expansion and Amplifier Module. Next month, we case (shown on the previous page with
contraction as the assembly heats up will describe the power supply, how its lid removed) and keeping it cool,
and cool down. to power up and test the Amplifier and even under full load conditions.

Parts List – Complete 500W Amplifier


1 assembled 500W Amplifier Module (as described in Wire and cable
PE, April and May 2023) 300mm of 7.5A or 10A Earth wire (green/yellow striped)
1 assembled Amplifier Clipping Indicator set up for [can be stripped from three-core mains flex]
±80V DC supplies (see PE, April 2023) 1 1.5m length of twin-core 7.5A sheathed mains cable
1 assembled Fan Controller and Loudspeaker Protector 5m of 0.5mm diameter copper wire (eg, copper picture
with three 120mm PWM fans (see PE, February frame wire)
2023) 400mm of dual-core shielded microphone cable (or
1 12V 15W switch-mode mains supply single-core if RCA input socket is used)
[Jaycar MP3296, Altronics M8728] 2m of red 25A-rated hookup wire, 2.9mm2
[Jaycar WH3080]
Chassis 2m of black 25A-rated hookup wire, 2.9mm2
1 3U Aluminium rack enclosure, 558.80mm x [Jaycar WH3082]
431.80mm x 133.35mm, made from: 1m of figure-8 wire, 2.93mm2 per conductor
1 Bud Industries RM-14222 Rackmount Chassis Kit [Jaycar WB1732]
(front, back and sides) [Digi-Key 377-1392-ND] 1m of figure-8 wire, 2.5mm2 per conductor
1 Bud Industries TBC-14253 Solid Rackmount Cover [Jaycar WB1712]
(for base) [Digi-Key 377-1396-ND] 2m of figure-8 wire, 0.76mm2 per conductor
1 Bud Industries TBC-14263 Perforated Rackmount [Jaycar WB1708]
Cover (for lid) [Digi-Key 377-1397-ND] 1m of figure-8 wire, 0.44mm2 per conductor
4 equipment mounting feet [Jaycar WB1704]
[Jaycar HP0830/HP0832, Altronics H0890] Hardware, including screws
1 400mm length of 20 x 20mm x 3mm aluminium angle 2 No.4 x 6mm self-tapping screws (or two M2 x 6mm
[hardware store] machine screws and two M2 nuts)
1 220 x 60mm front panel label 1 M8 x 75mm bolt, M8 hex nut and washer for
transformer [hardware store]
Power Supply 8 M4 x 50mm machine screws
1 800VA toroidal mains transformer with 2 x 115V AC 1 M4 x 20mm machine screw
and 2 x 55V AC windings [RS Components 1234050] 3 M4 x 15mm machine screws
1 toroidal transformer mounting disc (drill hole out to 22 M4 x 10mm machine screws
8mm diameter) [RS Components 6719202] 4 M4-tapped joiners
2 Neoprene washers for toroidal transformer 39 M4 hex nuts
[RS Components 6719218] 3 M4 star washers
1 35A 400V bridge rectifier (BR1) 2 M3 x 15mm machine screws
[MB354, KPC3504 or similar] 4 M3 x 12mm countersunk head machine screws
1 208 x 225 x 0.8mm insulating sheet (Prespahn, 10 M3 x 10mm machine screws
Elephantide or similar) [Jaycar HG9985] 11 M3 x 9mm Nylon standoffs
1 295 x 125 x 3mm plastic sheet (Perspex, 2 M3 x 6mm machine screws
Polycarbonate, PVC, acrylic or similar) 22 M3 x 5mm machine screws
1 IEC mains input connector with fuse 12 M3 hex nuts
[Jaycar PP4004, Altronics P8324] Other parts
1 IEC mains connector insulating boot [Jaycar PM4015] 1 SPDT 30A relay, 12V coil (RLY1) [Altronics S4211]
1 IEC mains power cord 3-pin female XLR panel connector [Jaycar PS1054,
1 M205 3.15A slow-blow fuse (F3) Altronics P0903] (or insulated panel-mount RCA socket)
1 DPDT mains switch with red neon lamp (S1) 1 panel-mount pair of heavy-duty loudspeaker terminals
[Jaycar SK0982, Altronics S3242B] [Jaycar PT0457, Altronics P9257A]
1 3-way 6A mains-rated terminal strip 1 RCA line plug
[Jaycar HM3194, Altronics P2130A] 1 panel-mount bezel for 5mm LED [Jaycar SL2610,
8 10,000μF 100V electrolytic capacitors Altronics Z0220]
[Jaycar RU6712 with mounting brackets] 3 6.3mm yellow insulated female spade crimp
6 15kΩ 1W resistors connectors [Jaycar PT4725, Altronics H1842A]
2 5mm LEDs (LED4, LED5) 1 560nF 100V MKT capacitor
6 5mm yellow insulated crimp eyelets 2 10kΩ lug-mount NTC thermistors [Altronics R4112]
[Jaycar PT4714, Altronics H2061B]
6 6.3mm blue insulated female spade crimp connectors Here is the complete parts list for the 500W Amplifier
[Jaycar PT4625, H1996B] needed for the final constructional article next month.
10 150mm cable ties As always, use the above references to determine part
7 adhesive panel mount cable anchors specifications if the above suppliers are not local to
assortment of heatshrink tubing you and you need to purchase from more convenient or
cheaper alternative sources.

24 Practical Electronics | May | 2023


Create Fantastic Electronic systems
using

VERSION
• NOW FREE 10
FOR HOBBYISTS •
• NOW FREE FOR HOBBYISTS •
10% off your first Flowcode purchase using code: EPE20
VERSION 10
Use code at checkout: flowcode.co.uk/buy

• NOW
10% off your FREE FOR
first Flowcode HOBBYISTS
purchase • EPE20
using code:
Use code at checkout: flowcode.co.uk/buy

• NOW FREE FOR HOBBYISTS •


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

Mike & Richard Tooley CD


JUMP START CD

TEACH-IN 3
£7.99

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

FROM THE PUBLISHERS OF

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

PRACTICALLY SPEAKING
following courses in schools and

students to experienced constructors and professionals. The projects are: n Moisture Detector n Quiz
colleges
i The techniques of electronic
project construction PRACTICALLY SPEAKING
The first section (80 pages) is dedicated to Circuit INGENUITY UNLIMITED 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
i Over 40 different circuit ideas PIC ‘N MIx
Starting out with PIC microcontrollers

queries on circuit design problems – from voltage nics


Teach-
In FREE Circuits n Frost Alarm n Mini Christmas Lights n
ro
FREE M
TEACH-IN 1 CD-ROM bo
rne
Publishing Ltd 201
0 CD-RO

regulation to using SPICE circuit simulation software. iPod Speaker n Logic Probe n DC Motor Controller
im
TEACH-IN 2

t
W

1
TWO TEACH-INs FOR

Elec
©
TWO TEACH-INs FOR
THE PRICE OF ONE!
The second section – Practically Speaking – n Egg Timer n Signal Injector Probe n Simple Radio
THE PRICE OF ONE !
i The free CD-ROM provides cal
Plus:
MikroElektro
nika,

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


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

Receiver n Temperature Alarm.


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

Again, a whole range of subjects, from soldering to


2013 Wimb MPLAB, logy Incorpo ogy
active
and logo,

8 Inter ledge The Microch


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

PLUS
Inc.
3 09:59:25

avoiding problems with static electricity and identifying


29/07/201

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 £8.99

A BROAD-BASED INTRODUCTION TO ELECTRONICS


CD

£18.95
ELECTRONICS FROM THE PUBLISHERS OF

Mike & Richard Tooley


TEACH-IN 4 FREE
CD-RO

PLUS you also get the contents of the


M

The Teach-In 4 CD-ROM covers three of the most


WORT
A BROAD-BASED £2 9.9
H
5
INTRODUCTION TO ELECTRONICS
i An el even par t t u t or i al
important electronics units that are currently studied in
many schools and colleges. These include, Edexcel
i Uses i n expen si ve c i r c u i t
si m u l at i on sof t w ar e 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 ELECTRONI CS MANUAL

The CD-ROM also contains the full Modern


Th e e s s e n t i al r e f e r e n c e
w o r k f o r e ve r yo n e

The Full Modern Electronics Manual!


s t u d yi n g e l e c t r o n i c s

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

contains over 800 pages of electronics theory,


i I n -dept h t h eor y
autorun,
should
This software in Windows
i Ext en si ve dat a t abl es

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

This CD-ROM
requires
Reader™ an d w eb l i n k s

projects, data, assembly instructions and web links.


Adobe® from

UAL
dable Free
Downloa be.com

MAN.co.u
www.ado

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

A package of exceptional value that will appeal


© Wimbor

to anyone interested in learning about electronics – Teach In 4 Cover.indd 1 14/11/2011 20:33:21

hobbyists, students or professionals.

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


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

Audio Out – an
FR -RO

ELECTRONICS ELECTRONICS
£8.99 £8.99 £8.99
D CD

and Circuit Surgery


DV
ELECTRONI CS
The Teach-In 6 CD- analogue expert’s take
TEACH-IN 7 by Ian Bell – ‘State TEACH-IN 8
FROM THE PUBLISHERS OF FROM THE PUBLISHERS OF
FREE

ROM also contains all TEACH-I N 6 on specialist circuits


CD-ROM
SOFTWARE

Machines part 1 and 2’.


FOR
THE TEACH-
IN 8
FROM THE PUBLISHERS OF SERIES

RASPBERRY Pi ®
DISCRETE LINEAR CIRCUIT DESIGN
the necessary software A COMPREHENSIVE GUIDE TO RASPBERRY Pi
Practically Speaking – INTRODUCING THE ARDUINO
The CD-ROM includes
• Understand linear circuit design
• Pi PROJECT – SOMETHING TO BUILD • Design simple, but elegant circuits • Hardware – learn about components and circuits

for the series, so that • Pi CLASS – SPECIFIC LEARNING AIMS


• PYTHON QUICKSTART – SPECIFIC PROGRAMMING TOPICS the techniques of
• Learn with ‘TINA’ – modern CAD software • Programming – powerful integrated development system
• Microcontrollers – understand control operations

the files for:


• Five projects to build: Pre-amp, Headphone Amp,
• Pi WORLD – ACCESSORIES, BOOKS ETC Tone Control, VU-meter, High Performance Audio Power Amp
• Communications – connect to PCs and other Arduinos

readers and circuit • HOME BAKING – FOLLOW-UP ACTIVITIES


project building.
FREE
designers can get DVD-R
OM
ALL THE
SOFTWA
TEACH-I
RE
N6
FREE M
-RO
n Teach-In 8
FOR THE RRY Pi CD CIRCUIT
started quickly and
n Microchip MPLAB
RASPBE ALL THE
RE FOR
SERIES SOFTWA 7
CH-IN
THE TEA
SERIES

easily with the projects


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

Smartscope software.
interface boards
building PIC-based projects

ORDER YOUR BUNDLE TODAY!


JUST CALL 01202 880299 – OR VISIT www.electronpublishing.com
BY CHARLES KOSINA
∎ Output Frequency: 100kHz to 75MHz in 1Hz steps
∎ Frequency Accuracy: ±0.1Hz immediately after
calibration against a precise standard
∎ Output Level: 0dBm +0, −0.5dB 100kHz to 55MHz;
+0,−3dB 55-75MHz
∎ Modulation: none, AM or FM
∎ AM: 50Hz-10kHz, 50% modulation
∎ FM: 50Hz-1kHz; 2.5kHz, 5kHz or 10kHz
deviation
∎ 5V, 140mA power supply
∎ Digital frequency readout
∎ low RF leakage

PRECISION
AM-FM DDS
SIGNAL GENERATOR
This Signal Generator aims to provide very high calibrated accuracy with an
error of just ten parts in a billion (1 in 108), which translates to 0.1Hz at 10MHz.
It also has plenty of features, including amplitude and frequency modulation.

N
umerous cheap signal Those have several problems, start- processing power.
generators are available online, ing with the crystal oscillator module, The display needs to convey lots of
but their accuracy leaves a lot to which is just a standard cheap 30MHz information, but a large screen is ruled
be desired. So I decided that if I wanted unit. The accuracy and temperature out by the need for a small cutout to
to have a maximum error of 0.1Hz at stability is dubious and does not fit give low RF leakage. That’s why I chose
10MHz, which would be ideal, I would my design criteria. a 0.96-inch (24mm) diagonal OLED. It
have to design one. Yes, you can remove it and add a does have rather small characters, but
The first decision I had to make was wire link to an accurate temperature- conveys all the needed information.
what I wanted it to look like. This compensated crystal oscillator By eliminating ready-made mod-
would determine the type of enclosure (TCXO) on the main board, but it’s ules, the final PCB size (and thus the
needed, the display and the controls. not ideal. Applying amplitude mod- enclosure) is much smaller. Diecast
With the current worldwide shortage ulation requires access to the RSET boxes are expensive, so using a smaller
of many components, choosing these pin on the AD9851 chip, meaning one does make it considerably cheaper.
parts can be difficult. There is no another wire link to the main board. The final major component needed
escaping the fact that most advanced The type of output I want to use is another DDS chip, the AD9833. This
components are only available in requires a wideband transformer from only comes in a tiny 10-pin MSOP
surface-mount packages, some with two pins on the DDS chip. This is now package but it is available on a small,
very small lead pitch. getting into the ‘too hard’ category and ready-made module. I was tempted to
Good shielding is essential for a sig- is the final reason for rejecting the pre- use such a module in my design, and
nal generator. You want the signal to built module. could have fitted it in, but I did not
be via the output connector and not The cheapest Arduino modules want yet another oscillator running in
radiated from the device itself. For mostly use an ATMega328 chip running the unit (the module has an onboard
this reason, I chose a diecast alumin- at 16MHz. All the I/O pins are brought 25MHz oscillator).
ium box with a minimum number of out, so there are no changes needed. So I am just using the bare, stand-
apertures that need to be cut. The larg- But with my design, the number of pins alone chip. It gets its 20MHz clock
est of these is for the display, and by available from the ATmega328 are inad- source from the clock output pin on
using a small OLED module, RF leak- equate, so a fancy pin-sharing arrange- the ATmega644 processor.
age is cut down substantially. ment would be necessary.
Next, I had to decide whether to use Also, much processing is needed to Component Selection
ready-made modules or individual apply frequency modulation, and the Given the present severe shortage of
parts. Let’s take the frequency generat- 16MHz clock speed is marginal for electronic components, I paid particu-
ing chip, the Analog Devices AD9851. this. So instead, I am using a 44-pin lar attention to being able to source parts
This is available on a prebuilt module ATmega644. This gives me more than from several suppliers. The AD9851
with its own clock generator and out- enough I/O pins and I can arrange for DDS chip is available from several sup-
put filtering. it to run at 20MHz for a 25% boost in pliers on AliExpress for about £10-12

Practical Electronics | May | 2023 27


Fig.1: the Signal Generator circuit is based on three main chips: IC1, the AD9833 DDS that’s used for the AM signal; IC2,
the ATmega644 microcontroller; and IC3, the AD9851 DDS that produces the output signal. IC3 is clocked by the high-
precision 30MHz TCXO, while IC1 and IC2 are both clocked by the same 20MHz crystal (X1) driven by IC2’s internal
amplifier. Microcontroller IC2 also monitors user controls EN1, VR1 and VR2.

delivered. The AD9833 DDS chip is also May, so they are well worth checking. Make sure you read the included
available for about £2 plus delivery from Wherever you get it, make sure it’s the text file that describes the fuse values,
numerous AliExpress sellers. 20MHz, 44-pin TQFP variant. which need to be set after loading the
If you want to stick to more reputa- This is quite a sophisticated project HEX file (your programming software
ble – but pricey – suppliers, Digi-Key and one that is not aimed at beginners. should have a mode to do that).
and Mouser have the AD9851 for £31 I am assuming that if you are interested The 30MHz TCXO is best obtained
and the AD9833 for £10 in this level of DDS then you know from AliExpress, around £13.50 deliv-
The ATmega644 chip is a little how to program a processor. The board ered. I have found none suitable at
unpredictable and varies enormously includes a 3x2 ICSP header for you to Mouser, Digi-Key or element14.
in price, ranging from well under £10 connect a programmer (AVR ISP) and The OLED is a 0.96in, 128 x 64 pixel
to many multiples of that. Mouser load the firmware (CSE21100A.hex) type with the SSD1306 controller.
and Digi-Key are surprisingly inex- which is available for download from There are multiple suppliers for this,
pensive but currently out of stock. the May 2023 page of the PE website: and it comes in different colours. The
However, they estimate delivery from https://bit.ly/pe-downloads one I have has the top quarter yellow

28 Practical Electronics | May | 2023


Signal Generator
and the rest blue, and this highlights the The output frequency is adjusted by Tuning
set frequency, but you can choose what- an incremental shaft encoder (EN1) The shaft encoder used to adjust
ever colour combination pleases you. in steps set by its integral pushbutton the output frequency is available
Likewise, the potentiometers and switch. Pressing it cycles through step from numerous suppliers on eBay
the encoder are standard items. Make sizes from 1Hz to 1MHz. and AliExpress as well as Digi-Key,
sure that they are the same size. The Potentiometers VR1 and VR2 are con- Mouser, element14 and others. They
distance from the PCB to the end of the nected to two of IC2’s analogue inputs. come in different shaft lengths and
shaft should be about 25mm. One sets the modulating frequency for prices; choose one with a 20mm
That leaves the magnetic compo- both AM and FM. Rather than have shaft length.
nents. The output transformer is made a continuous range of frequencies, I I have added pull-up resistors on all
by Coilcraft, with the PWB-16-BL giv- instead opted for 11 separate frequen- the pins. There are weak internal pull-
ing the best result. cies. The other adjusts the FM deviation ups in IC2, but I have found the lower
M3216/1206-size chip inductors are and also for calibration. Three-position value external resistors plus capacitors
suitable for the remaining inductors. toggle switch S2 selects between AM, to ground (for contact bounce filtering)
These have pretty close tolerances, far CW and FM. give far more reliable operation.
better than trying to wind your own. Almost everything that I design You want the frequency to increase
At 85MHz, the low-pass filter (LPF) for includes a simplified RS232 serial port when you wind the knob clockwise
the RF output needs three 120nH coils. using transistors Q2 and Q3. I find this but depending on the shaft encoder, it
These are readily available at element14, an invaluable tool for debugging while can operate either way. To solve this, a
although they can also be sourced from developing the code. It could also be jumper placed between pins 4 and 6 of
AliExpress. I paid £2 for 100, with free used for controlling the unit from a PC the programming header will reverse
postage, and by some miracle, they as part of a future upgrade. the encoder direction.
arrived from China in two weeks. The two DAC outputs from the The firmware detects this by
The rest of the components are ordi- AD9851 are connected to centre- enabling a pull-up and checking the
nary resistors and capacitors, almost tapped RF transformer T1, which has level on the MOSI SPI programming
all in the standard M2012/0805 SMD a 7th-order Chebyshev low-pass filter pin (PB5, pin 1 of IC2). With the
size. The toggle switches can be bought connected to its secondary to reduce jumper on, this pin is low; otherwise,
from Jaycar, Altronics and many oth- harmonics and spurs. it is high. The interrupt handler tests
ers, as can the diecast box. With a clock frequency of 180MHz, the state of the PB5 and selects the
it is possible to generate frequencies rotation direction based on this.
Circuit details up to the Nyquist limit of 90MHz, but With a range of 100kHz to 75MHz,
The complete circuit is shown in Fig.1. the waveform is extremely distorted by you don’t want to turn the knob mil-
The microcontroller (IC2) drives the then. I set the limit at 75MHz and, with lions of times to set the frequency. This
two Analog Devices direct digital syn- the output filter, it does not contain is where its integral pushbutton switch
thesis (DDS) chips. The AD9851 (IC3) too many spurs even at that frequency. comes into use. Pressing it cycles
generates frequencies from 100kHz to The unit draws 140mA from a 5V through step sizes of 1Hz, 100Hz,
75MHz, while the second DDS chip DC supply. I find that a mobile phone 1kHz, 10kHz, 100kHz and 1MHz.
(IC1, AD9833) provides the amplitude charger is ideal for powering it. I must
modulation (AM) from 50Hz to 10kHz. have at least ten of these; I am sure AD9851 interface
The SSD1306 OLED screen (OLED1) most people have lots of spares. The AD9851 has a 32-bit Frequency
shows the current status. As mentioned earlier, the whole Tuning Word (FTW) that controls the
The reference clock for the AD9851 thing fits in a standard diecast box, output frequency. There is a handy
is a 30MHz TCXO which is multiplied making it quite robust and providing online tool for calculating the required
by the AD9851 to 180MHz. good shielding. value at: https://bit.ly/pe-may23-ad

Practical Electronics | May | 2023 29


For a 1MHz output, FTW =
23860929, which is 16C16C1 in
hexadecimal. The actual frequency
with this FTW is 999.999982305kHz,
an error of about 0.02Hz. But this
assumes that the TCXO is exactly
30.000000MHz. The ones that I have
bought from AliExpress have been
within about 10Hz.
Is that good enough? It depends
on your application, but with some
of the digital communication tech-
niques used, an error of just a few
hertz can make message decoding
impossible. So I developed a cali-
bration technique that reduces this
error to less than 0.1Hz at 10MHz.
More on this later.
The FTW can be loaded into the
AD9851 using serial or parallel meth- Fig.2: the Signal Generator’s output level varies by about ¼dB between 100kHz
and 55MHz, except for a dip at −½dB between about 10MHz and 22MHz. It’s
ods. Serial loading takes far too much
usable up to 75MHz, although the level drops considerably above 55MHz,
time and would make FM virtually reaching nearly −3dB at 70MHz.
impossible. Hence, I’m using parallel
loading with five bytes transferred: one RF output 75MHz. This gave me an output close
control byte plus four for the FTW (4 There are two outputs from the DAC to 0dBm over much of the range (Fig.2).
× 8 = 32 bits). (digital-to-analogue converter) on the
You can see in the circuit diagram AD9851. Application note AN-423 Output Filter
that I have split this up into four bits from Analog Devices suggests using a Without a low-pass filter on the output,
from two separate ports on microcon- wideband transformer to couple these there will be many undesirable harmon-
troller IC2. two outputs to the external load. This ics and spurs. While it is feasible to use
I did this because I can’t use all of makes for clean amplitude modulation some of these spurs for frequencies well
Port A as I need two analogue inputs, (AM), also described in the note. above the Nyquist limit, for simplicity, I
and the only available analogue inputs The transformer in their example decided not to use this approach.
are on Port A. Port B has the 20MHz is 1:1 centre tapped, which for a 50Ω Filter design is so easy these days.
clock output required by the AD9833 load, reflects 25Ω to the DAC outputs. Rather than ploughing through some
(PB1), so that’s ruled out. Port C has I used a Coilcraft transformer with complex s-parameter mathematics,
dedicated SDA and SCL pins for the this ratio and found it to be most unsat- there are online calculators. The one I
I2C interface to the OLED, and I want isfactory. The 25Ω load on the DAC used to work out the C and L values for
to use INT0 and INT1 on port D for the outputs is far too low in impedance; a 7th-order Chebyshev low-pass filter
shaft encoder. it reduced the output levels, and the with 85MHz cutoff and 0.5dB passband
Therefore, I couldn’t dedicate all waveform became very noisy. I feel ripple is at: https://rf-tools.com/lc-filter/
eight lines of one port for loading the that specifying such a transformer is The output of this calculator can
FTW. So I split up the parallel inter- an error. be exact or standard values; the dif-
face into four bits from Ports C and D. Experimenting with other Coilcraft ference in performance between the
The extra few lines of code required transformers, I found the best results two is minimal. The choice of induc-
to do this don’t slow things down very were with the PWB-16-BL with a 16:1 tors was discussed above in the com-
much. Once the byte is set up, it is impedance ratio that reflects 400Ω to ponent selection section.
clocked in by the WCLK pin, and after each DAC output; a far more satisfac-
all five bytes have been sent, the FQUD tory value. The transformer −3dB band- Amplitude modulation
pin is pulsed to update the AD9851’s width is 75kHz to 90MHz, so there is The ATmega644 processor (IC2) could
internal latch. a slight drop in level at 100kHz and generate amplitude modulation, but

Fig.3: here’s what the 100kHz output signal looks like with Fig.4: as expected, the spectrum of the signal from Fig.3 has
5kHz AM (yellow). The AM signal output from the AD9833 a single prominent peak at 100kHz with two smaller peaks,
is shown below (cyan). 5kHz on either side (ie, at 95kHz and 105kHz).

30 Practical Electronics | May | 2023


why bother with the complicated cod- 500Hz, 600Hz, 700Hz, 800Hz, 900Hz left over from generations of phones.
ing involved when we can use a second and 1kHz. Most of them deliver a nominal 5V at
low-cost DDS chip instead? The AD9833 There are ways of getting a higher up to 2A. The maximum current drawn
(IC1) can run at clock speeds of up to modulation frequency. If we can stand by the Generator is about 140mA, well
25MHz. It is a tiny 10-pin chip with a having a rougher sinewave, we could within the capability of all chargers.
three-wire serial control interface. have samples 30° apart, which would I included a schottky diode in the
Rather than having a separate clock allow a maximum frequency of 2kHz. design for reverse polarity protection.
generator, I use the 20MHz clock out The spectrum of an FM signal is far This drops the supply voltage by about
pin on PB1 (pin 41) of IC1. The out- more complex; advanced mathematics 0.37V. The charger that I used had
put of the AD9833 is applied to the is needed to derive it. It has sidebands an output of 5.2V, dropping to 4.85V
gate of MOSFET Q1 via a 10kΩ trim- that go on forever, but their amplitude through the diode. It’s a simple mat-
pot, and this controls the RSET pin on decreases rapidly so that only the first ter of cutting off the connector on the
the AD9851 as per the aforementioned few are important. For more details cable and replacing it with a DC bar-
application note AN-423. Rather than visit: https://w.wiki/4eC$ rel plug to suit your DC socket (either
having a separate knob on the front 2.1mm or 2.5mm inner pin diameter).
panel, I preset the modulation level Display The PCB design includes another
to about 50%. The OLED module has an SSD1306 regulator, REG1, so that a higher sup-
Potentiometer VR1 sets the mod- controller and a resolution of 128 x ply voltage could be used. However,
ulation frequency. The voltage read 64 pixels. this is probably not necessary, so it’s
using the 10-bit analogue-to-digital My original design used an 8 x 8 just linked out in the final design.
converter (ADC) in IC2 is converted by font which gave eight lines each of 16 I have connected another DC socket,
software into the tuning word required characters. This allowed for a fair bit of CON6, in parallel with CON5. This is
by the AD9833. information to be displayed but with for powering the companion Attenua-
I could have had a continuous range rather tiny characters. I changed it to tor, to be described in a future article.
but found that setting the frequencies a 16 x 16 font, which is much easier The OLED requires 3.3V, and this is
was very fiddly. I decided instead to read, but this gives only four lines supplied by a TO-92 low-dropout lin-
on dividing the ADC reading into 11 of eight characters. So I had to con- ear regulator, which draws from the 5V
distinct values: 50Hz, 100Hz, 200Hz, siderably simplify what is displayed. supply. The open-drain SDA and SCL
400Hz, 1kHz, 2kHz, 3kHz, 5kHz, 6kHz, Screen 1 shows the unit’s normal pins for driving the OLED are pulled
8kHz and 10kHz. display. The top line readout is the fre- up to 3.3V by a pair of 4.7kΩ resistors.
Fig.3 shows a 100kHz generated sig- quency in Hz, while the second has the
nal with 50%, 5kHz amplitude mod- frequency adjustment step size. Line Construction
ulation on channel 1, with the sine- 3 shows the AM frequency, one of 11 The Signal Generator is built on a dou-
wave modulation signal on channel 2. fixed frequencies from 50Hz to 10kHz. ble-sided PCB coded CSE211002 that
The spectrum of this signal is shown Line 4 shows the FM frequency, which measures 100 x 78.5mm and is avail-
in Fig.4. steps through 11 fixed settings from able from the PE PCB Service. Refer
50Hz to 1kHz. to the PCB overlay diagram (Fig.5) as
Frequency modulation With the Function knob fully clock- a guide during construction. It shows
Applying FM proved to be the trick- wise, the unit enters calibration mode, which components go where.
iest part of the design. To approxi- shown in Screen 2. The modulation Most of the parts on the PCB are
mate a sinewave, we have to change frequencies are replaced with line 3 surface-mount types, and two of them
the AD9851 output frequency con- showing ‘Calib’ and line 4 showing are very fine-pitch ICs. These are the
tinuously. This sinewave is divided the Frequency Tuning Word (FTW). two DDS chips, and you should start
into 24 samples, each 15° apart. Tak- The calibration procedure is explained with these. Soldering them accurately
ing the sine of that angle and multi- later in the article. and without short circuits between the
plying it by the maximum deviation pins takes some skill.
gives the instantaneous deviation for Power supply It helps to spread a little flux paste
that sample. Many readers will have numerous on the pads before placing the ICs and
For example, if the maximum devia- mobile phone chargers lying around, ensure they are aligned with their pads
tion is 3kHz, sin(30°) = 0.5, so we add a
value to the FTW equivalent to 1.5kHz Table 1 – frequency modulation FTW offsets for ±2.5kHz deviation
(3kHz x 0.5). The numbers become angle θ sin(θ) Δf (Hz) ΔFTW angle θ sin(θ) Δf (Hz) ΔFTW
negative past 180° and subtract from
0° 0 0 0 180° 0 0 0
the frequency. This takes quite a bit of
processor time; so much that the max- 15° 0.259 647 15,437 195° -0.259 -647 -15,437
imum modulation frequency possible 30° 0.500 1250 29,825 210° -0.500 -1250 -29,825
is 1000Hz.
45° 0.707 1767 42,160 225° -0.707 -1767 -42,160
At this frequency, the microcon-
troller’s timer generates 24,000 inter- 60° 0.877 2192 52,301 240° -0.877 -2192 -52,301
rupts per second, and each triggers 75° 0.966 2415 57,622 255° -0.966 -2415 -57,622
a new FTW value to be calculated
and sent. For other modulation fre- 90° 1.000 2500 59,650 270° -1.000 -2500 -59,650
quencies, the timer interrupt is 24 105° 0.966 2415 57,622 285° -0.966 -2415 -57,622
times the modulation frequency. See
120° 0.877 2192 52,301 300° -0.877 -2192 -52,301
Table 1 for the values that are added
and subtracted to the FTW to give 135° 0.707 1767 42,160 315° -0.707 -1767 -42,160
±2.5kHz deviation. 150° 0.500 1250 29,825 330° -0.500 -1250 -29,825
The available modulation frequen-
165° 0.259 647 15,437 345° -0.259 -647 -15,437
cies are 50Hz, 100Hz, 200Hz, 400Hz,

Practical Electronics | May | 2023 31


getting any solder high up on the pins,
where it is harder to fix bridges.
After soldering all the pins, it’s
then just a matter of spreading some
more flux paste over them and care-
fully using a length of solder wick to
remove any excess solder, including
that which might be bridging adjacent
Screen 1: this shows the screen layout Screen 2: calibration mode is entered pins. Clean off the flux residue with
during normal operation. The output by rotating the Function knob fully some flux cleaner or alcohol, then
frequency (in Hz) is at the top, the step clockwise; the bottom two lines of inspect the IC leads to make sure all
size and FM deviation on the second the display change, with the last line the solder joints look good and there
line and the amplitude and frequency showing the FTW. If you have the are no remaining bridges.
modulation signal frequencies on the right gear, you can get the output If you find anything that looks sus-
last two lines. frequency within 0.1Hz. pect, add a dab of flux paste, heat the
offending pin(s) and use solder wick
if necessary. Repeat this process as
many times as needed until you have
nicely soldered ICs.
Following these, mount the
ATmega644 chip (with wider pin
spacings than the first two, but pins
on four sides), again being careful with
its pin 1 orientation, followed by all
the other SMD components. The ori-
entation of SMD transformer T1 also
matters. Then give the board a good
clean to remove flux residue.
Now fit the through-hole parts from
lowest profile to tallest. Be careful to
orientate diode D1, the TCXO, VR3,
and REG2 as shown. Don’t forget the
wire link across REG1, which can be
made from a component lead off-cut.
You can safely omit Q2, Q3, the two
adjacent resistors and CON3. These are
the simplified RS232 interface and are
used as a debugging aid.
The OLED screen plugs into a four-
pin socket strip and is held in place
by two screws and standoffs. Rather
than cutting down an 8-pin strip that
I already had, I just removed four pins.
Depending on the OLED, the mount-
ing holes may be either 2mm or 2.5mm
in diameter. While M2 screws are not
as easy to find as M3, I bought some
from eBay. Some larger online elec-
tronics retailers also stock M2 screws
and nuts. Don’t try to drill the holes
out on the OLED to bigger screw sizes!
There are four screw holes provided
but two are adequate.
The potentiometers and encoder
should be installed last, after clean-
ing off any flux residue on the board.

Preparing the case


Fig.5: use this PCB overlay diagram to help with board assembly. Remember to The photo (overleaf) shows the diecast
link out REG1 and note that Q2, Q3, and associated 15kΩ and 1kΩ resistors are box with the board already mounted in
only needed if you will use the serial debugging interface. Make sure that the
the base. The positions of the required
three ICs, D1, REG2, T1, TCXO1 and VR1 are oriented as shown. Note that the
orientation of REG2 is swapped in the prototype, this is because regulator that holes are shown in the drilling and
was used has a different pinout than the one specified in the parts list. cutting template/guide, Fig.6.
The case’s raw aluminium is not
on both sides after tacking the first pin Rather than trying to solder the pins very attractive, so I sprayed it with
and before soldering any others. Also, without bridges, concentrate on mak- three coats of matte black paint. I
be careful to check that their pin 1s ing sure that each pin gets enough sol- used the blank circuit board as a tem-
are located correctly before soldering der and that it flows down onto the plate to accurately drill the mounting
more than one pin! corresponding PCB pad. Try to avoid holes and the holes for the control

32 Practical Electronics | May | 2023


shafts. There are small holes on the
PCB in the centre of the controls for
this purpose.
It takes a bit of care to make the
rectangular cutout. There are various
ways of doing it. If you have a mill-
ing machine, that’s great, but very few
readers would possess one. I started
by drilling a circular hole of 25mm
diameter centred on the rectangle with
a step drill. Then I filed it out into the
required 26 x 28mm rectangle. It takes
a bit of time but results in a neat finish.
You will also need to drill two
holes in the side of the base, near the
lid, to accept the barrel sockets. Make
sure they are placed so that they will
not foul the PCB assembly once it’s
dropped in. You might also want to
drill a hole in the side so that you
can access VR3 (the AM depth adjust-
ment trimpot) once the board has been
mounted in the case.
The panel label shown in Fig.7 can
be downloaded from the May 2023 Fig.6: template of the cutouts on the diecast box.
page of the PE website and printed This template can be downloaded from the PE
onto photographic paper – visit: website and printed at actual size. You can also
https://bit.ly/pe-downloads use the blank PCB to mark the hole positions.
Make the OLED and shaft cutouts
with a sharp scalpel or hobby knife. I If you run into any problems, some higher-end oscilloscopes).
cut a piece of 1mm-thick clear acrylic remove the PCB and have a good look Set the three-position switch to
to 112 x 86 mm to protect the label, at it. Check that all the solder joints ‘CW’ and the output frequency to
again using the blank PCB as a tem- look good, especially on the SMDs, 10000000Hz (10MHz). Rotate the
plate to drill the holes. and that everything is where it should Function knob fully clockwise and
Attach the PCB to the front panel be, referring to Fig.5. adjust the tuning knob to get FTW =
using 12mm threaded spacers with 23860929. This is the value needed if
countersunk screws on the outside. Calibration the TCXO has an output of precisely
Add a washer under each spacer to Without calibration, the accuracy of 30MHz. If you have no other equip-
slightly increase the distance. the signal generator is entirely depen- ment available, press the tuning but-
Now it’s time to install the panel- dent on the TCXO. The best calibration ton to save that value into EEPROM
mount connectors. It turned out to procedure requires a two-channel oscil- and turn the Function knob back a bit.
be too difficult to mount the BNC loscope, a GPS-disciplined 10MHz ref- If you have an accurate frequency
connector on the PCB itself. Con- erence and a high-precision frequency counter, repeat above but adjust
nect a 50mm length of stiff wire to counter (which might be built into the FTW for exactly 10MHz on the
the connector and pass this through
the centre hole of the BNC connec-
tor location on the PCB. Once the
board is attached to the box, cut off
the excess and solder it. To remove
the board, you will have to desolder
this one wire.
After the PCB has been fitted, con-
nect the DC sockets in parallel, then
wire them to the matching plug for
CON1. Make sure the wires are the
right length to reach CON1. Also,
ensure the polarity is correct. You
can check this by testing for continu-
ity between the barrel socket’s tip and
one end of power switch S1, and also
continuity from the outer barrel (with
a plug inserted) to PCB ground.
Apply power and check that every-
thing works before fitting the lid to
the box with the supplied screws.
You should get a sensible display on
the OLED as soon as it’s switched
on. Check that you can adjust all the
parameters with the knobs. Fig.7: the front panel label for the Precision DDS Signal Generator.

Practical Electronics | May | 2023 33


A ‘sneak
peak’ at the
companion
attenuator
PCB that
we will
describe in
an upcoming
issue.

Once the PCB has been mounted in


the case and the wire to the BNC Parts List – AM-FM DDS Signal Generator
socket soldered, all you need to do
is wire up and plug in the DC socket. 1 PCB coded CSE211002, 100 x 78.5mm available from the PE PCB Service
You only need one, as shown here, 1 diecast aluminium enclosure, 119 x 93.5 x 34mm [Jaycar HB5067 or
but if you’re thinking of building the Altronics H0454]
upcoming matching attenuator, add a 1 0.96in OLED display module with I2C interface and SSD1306 controller (OLED1)
second socket in parallel so you can 1 mechanical rotary encoder with integrated pushbutton switch and 20mm
daisy-chain the power. total height (RE1) [Bourns PEC11R-4215F-S0024]
2 10kΩ PCB-mount vertical 10mm 20mm-tall linear potentiometers (VR1,
VR2) [Alpine RK09K1130AH1]
frequency counter, and save it into 1 10kΩ side-adjust multi-turn trimpot (VR3) [Altronics R2361]
EEPROM as before. 1 large knob to suit RE1
For best accuracy, first, adjust the 2 medium knobs to suit VR1 and VR2
frequency using the counter as above. 1 20MHz 18pF 30ppm crystal resonator, HC-49 (X1)
Then connect the GPS disciplined ref- 1 30MHz 20 x 12mm TCXO module (TCXO1)
erence 10MHz signal to one channel [aliexpress.com/item/32719087266.html]
of a two-channel oscilloscope, and 1 Coilcraft PWB-16-BL SMD wideband transformer (T1)
trigger on that channel to produce a 3 Coilcraft 1206CS-121XJEC 120nH chip inductors or equivalent,
stationary display. Set the signal gen- M3216/1206 size (L1-L3)
erator to 10MHz and connect it to the 1 3x2 pin header, 2.54mm pitch (ICSP) (optional; for programming IC1)
other scope channel. 1 2-pin polarised locking header with matching plug, 2.54mm pitch (CON1)
If the frequencies are identical, the 1 3-pin polarised header with matching plug, 2.54mm pitch (optional; CON3)
signal generator waveform will be 1 panel-mount BNC socket (CON4)
steady. But this will hardly ever be the 2 panel-mount DC barrel sockets (CON5, CON6)
case; it will drift left or right. Set the 1 4-way female header socket (for OLED1)
Function knob fully clockwise, and 1 SPDT panel-mount switch (S1) [Altronics S1310]
using the tuning knob, adjust the FTW 1 SPDT panel-mount centre-off switch (S2) [Altronics S1330]
for minimum drift. Typically, the drift 1 tactile pushbutton switch (S3)
will take 10 or more seconds across one 4 12mm-long M3 tapped metal spacers
complete cycle. The 10 seconds corre- 2 10mm untapped spacers
sponds to an error of 0.1Hz at 10MHz. 4 M3 x 6mm panhead machine screws
Press the frequency button to save the 4 M3 x 8mm countersunk head machine screws
calibrated FTW value into the EEPROM. 2 M2 x 12mm panhead machine screws and nuts
The calibrated frequency may hold 4 M3 flat washers
for several hours depending on tem-
perature fluctuations; the TCXO is by Semiconductors
no means perfect. Do the calibration 1 AD9833 12.5MHz DDS generator, MSOP-10 (IC1)
just before you want to do any seri- 1 20MHz ATmega644 microcontroller in TQFP-44 (eg, ATMEGA644PA-AN or
ously accurate work. ATMEGA644PA-AU) programmed with CSE21100A.hex (IC2)
There is a multi-turn trimpot acces- 1 AD9851BRS 180MHz DDS generator, SSOP-28 (IC3)
sible through a hole in the left side of 1 LP2950CZ-3.3 3.3V low-dropout linear voltage regulator, TO-92 (REG2)
the case. Setting the amplitude mod- 3 2N7002 60V 2A N-channel 3.3V drive MOSFETs, SOT-23 (Q1-Q3)
ulation level is best done using an 1 1N5819 40V 1A schottky diode (D1)
oscilloscope. Still, if you loosely cou- Capacitors (all SMD M2012/0805 size unless otherwise stated)
ple the output to an AM receiver, you 1 100μF 6.3V X5R ceramic, M3216/1206 size
can simply adjust the level for a clear 3 10μF 6.3V X5R ceramic 1 220nF 50V X7R ceramic
tone. It will overmodulate and create 10 100nF 50V X7R ceramic 2 10nF 50V X7R ceramic
lots of spurious and harsh harmonics 2 100pF 50V NP0/C0G ceramic 2 68pF 50V NP0/C0G ceramic
if you wind it up too much. 2 22pF 50V NP0/C0G ceramic
Resistors (all SMD M2012/0805 size 1% thick film unless otherwise stated)
A matching attenuator 6 27kΩ 2 15kΩ 2 4.7kΩ 1 3.9kΩ 1 3.3kΩ
In the small enclosure I specified it 1 1.5kΩ 1 1kΩ 1 51Ω
was impractical to fit an attenuator

34 Practical Electronics | May | 2023


into the same housing. Therefore, around −110dBm. The photo on the
I have designed a separate attenu- previous page shows a preview of
ator in another identical enclosure the attenuator, to be described in an
with an attenuation range from 1dB upcoming article.
to 110dB in 1dB steps. As the out-
put of the Signal Generator is about Reproduced by arrangement with
0dBm, this means the lowest signal SILICON CHIP magazine 2023.
level that the pair can generate is www.siliconchip.com.au

A 300kHz signal with


10kHz amplitude www. poscope. com/ epe
modulation applied,
resulting in smaller
peaks 10kHz on either
side of the carrier
wave.

Here frequency
modulation has
been applied. This
results in many - USB - PWM
small peaks of all - Ethernet - Encoders
sorts of multiples of - Web server - LCD
modulating waves - Modbus - Analog inputs
either side of the - CNC (Mach3/ 4) - Compact PLC
- IO
carrier wave, but this
spectrum analyser
doesn’t have the
resolution to separate
them.

- up to 256 - up to 32
Spectral analysis of a microsteps microsteps
75MHz output signal. - 50 V / 6 A - 30 V / 2. 5 A
Because of how a DDS - USB configuration
works, you not only - Isolated
get spurious peaks
at multiples of the
signal frequency but
PoScope Mega1+
also at fractions. The
most significant in
PoScope Mega50
this case is at 30MHz,
35dB below the
fundamental.

A 100kHz output
signal modulated
by 1kHz at 10kHz
- up to 50MS/ s
deviation. This - resolution up to 12bit
doesn’t show on my - Lowest power consumption
digital scope, but my - Smallest and lightest
old analogue scope - 7 in 1: Oscilloscope, FFT, X/ Y,
provides this pattern. Recorder, Logic Analyzer, Protocol
decoder, Signal generator

Practical Electronics | May | 2023 35


innovative Technology Projects
www.itp101.com

Introducing our range of Multi Channel Oscilloscopes


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

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

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

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

Handyscope HS5

WiFiScope WS6 DIFF

Automotive

For orders and inquiries, email [email protected]


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

QUOTE CODE: ITP10


10% DISCOUNT WHEN CONTACTING [email protected]
Exclusive for Practical Electronics Readers OFFER EXPIRES 31ST MAY 2023
The home for specialist audio, analogue and historic

AOShop components – provided by Jake Rothman, PE’s


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

Ge semiconductors Dual transistors Tantalum – metal cased Potentiometers


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

38 Practical Electronics | May | 2023


Our SMD Test Tweezers project from the October 2022 issue has been
extremely popular. This did not come as a surprise given that they
are handy, compact, easy to use, easy to build and the cost
is reasonable. We decided to see what features
we could add simply by upgrading the
microcontroller at its heart.

Improved Test
SMD Tweezers
T
he 2022 SMD Tweezers are the micro; the analogue-to-digital con- part shortages mean that avail-
a simple but clever design. A verter (ADC) and watchdog timer that ability is patchy. (For example,
PIC12F1572 eight-pin micro- the software requires are found in most Mouser expects to have stock of the
controller powered from a button cell PIC microcontrollers. The low-power PIC16F15214-I/SN by 1 May 2023,
is used to probe resistors, diodes and sleep mode is quite standard too, and which is annoying, but not the terri-
capacitors and then display its find- is essential for standby operation when ble 12-month lead times we endured
ings on a tiny OLED screen. powered from a cell. This allows the at the height of the pandemic!)
The PIC12F1572 does a respectable Tweezers to be left idle but ready to Importantly, the PIC16F15214 is
job, but the Test Tweezers software work at a second’s notice. available in the SOIC package and
takes up all but 42 bits of the avail- The I2C interface to the OLED dis- has twice the Flash memory of the
able Flash memory, leaving no room play is emulated in software by tog- PIC12F1572. Microchip does a pretty
for expansion. gling GPIO (general purpose input/ good job of maintaining pin compatibil-
We used the PIC12F1572 for the output) pins, a technique often known ity between parts, and the PIC16F152xx
2022 SMD Test Tweezers as it was the as ‘bitbanging’. This all means that just series is no exception.
cheapest available at the time, apart about any 8-pin microcontroller with The upshot is that the PIC16F15214
from its close relative with less mem- more program memory could be used is both cheaper and fully capable of
ory, the PIC12F1571. Until recently, for the SMD Test Tweezers. replacing the PIC12F1572 as the con-
the PIC12F675 and later PIC12F617 After developing the original SMD troller for the SMD Test Tweezers, while
were our 8-pin micros of choice, but Test Tweezers, we became aware of the also having the larger program space
Microchip keeps bringing out new PIC16F152xx series of microcontrol- needed for us to add new features.
parts with better performance and lers. The range spans parts from eight
more features at lower prices, so we to 40 pins. While the range has features Tweezers 2.0
try to keep up. that are modest by current standards, We have implemented three major
The PIC12F1572 is more capable they are still more capable than older updates to the SMD Test Tweezers.
than the older PIC12F675. However, devices such as the PIC12F675. First, we expanded the capacitance
when we looked into upgrading the The PIC16F15213 and PIC16F15214 measurement range in both directions
Test Tweezers with some software are the 8-pin parts in the range, (it can measure both larger and smaller
improvements, we realised that the and they are cheaper than the capacitances than before).
PIC12F1572 did not have enough PIC12F1572, although the current Second, we added a calibration and
free memory to add new features or setup procedure.
improve the existing ones. For that, Finally, we improved usability for
we would have to move to the latest left-handed people (or those who want
generation of PICs. Caution to hold something like a soldering iron
So when a new family of PICs in their right hand) by allowing the
Like any project that uses coin cells,
became available, we began to investi- screen display to be rotated by 180°.
the Tweezers should be kept well
gate what we could add by using them. These improvements have all been
away from children who may ingest
made in software, so apart from chang-
them. The Tweezers also have quite
A new PIC ing the PIC12F1572 to the PIC16F15214,
pointy tips, another reason to keep
The original (2022) SMD Test Tweezers the hardware is identical and the general
them out of reach of young fingers.
don’t use any exotic peripherals within operation is much the same.

By Tim BlyThman
Practical Electronics | May | 2023 39
Low-capacitance measurements
Features and specifications Values lower than 1nF are measured
in an entirely different fashion. This
∎ Uses identical hardware to the original Tweezers (PE, October 2022) method is so sensitive that it can mea-
apart from the PIC microcontroller sure the capacitance of the touch of a
∎ Identifies component type (resistor, capacitor, diode or LED) and hand, in the order of picofarads.
measures critical values It’s called shared capacitance sens-
∎ Resistors: value from 10Ω to 1MΩ ing, and we used it to detect finger
∎ Diodes: forward voltage up to about 3V touches in the ATtiny816 Breakout
∎ Capacitors: value from (approximately) 10pF to 150μF Board of July 2021.
∎ Cell voltage with nothing connected It works by comparing the relative
∎ Low power sleep when idle avoids the need for an on/off switch magnitude of two capacitors by ini-
∎ Instant wake-up by touching probe tips together tially charging one and discharging the
∎ Option to select left-handed or right-handed display other, as shown in Fig.2. When they
∎ Calibration of internal and contact resistance are connected, the charge present is
shared between the two in proportion
to their capacitances.
Circuit details time needed to charge and discharge The ratio of the initial and final
Fig.1 shows the circuit, which is the a larger capacitor becomes unreason- voltages relates directly to the ratio
same as last time (PE, October 2022), ably long, in the order of several sec- of the capacitances. The theory and
besides IC1. All the readings are dis- onds between readings. mathematics are explained further in
played on a tiny OLED module con- The only way to overcome this the ATtiny816 Breakout Board article.
nected to CON2. would be to change the series test In the case of our new SMD Test
IC1 drives its RA5 (pin 2, IOTOP) resistor, which would affect the other Tweezers, a capacitor connected to
and RA4 (pin 3, IOBOT) pins high and readings too. CON+ and CON− is charged up via the
low and measures the voltage present The relatively high value of the 10kΩ resistor. The second capacitor is
on pin 5 with its ADC peripheral. For series test resistor also means that actually the tiny internal capacitor that
example, it can determine the resis- capacitance readings can be dis- is used to sample and hold the voltages
tance of a resistor connected between torted by leakage current. Since read by the microcontroller’s ADC.
the CON+ and CON− points using the leakage is typically higher in high- This capacitor is nominally 5pF, and
voltage divider equation. er-value parts, especially in electro- it is discharged by sampling an ADC
Diodes will present their forward lytic capacitors, the accuracy and channel connected to ground.
and reverse voltages between CON+ usefulness of these higher ranges Fortunately, the ADC peripheral has
and CON− when the micro applies are less than what seems theoreti- a selection to make an internal ground
a voltage. The micro determines the cally possible. connection, so this doesn’t need an
diode’s orientation, showing its polar- So higher-value capacitors can be extra pin. The external capacitor is dis-
ity and forward voltage. measured and will return a reading, pos- connected from its resistor, and the two
Capacitors are first charged by sibly after a brief delay, but the accuracy capacitors are connected by taking an
bringing IOTOP high and IOBOT low will not be as good as for lower values. ADC reading from the external capacitor.
and then characterised by measuring
the rate of discharge when IOTOP is
brought low. The Tweezers can even
measure their own supply voltage
by reading the voltage of its internal
1.024V reference relative to that sup-
ply voltage.
These features are already present
in the original SMD Test Tweezers, so
we suggest you refer to the original
October 2022 article for more detail
on how these features work and how
the values are calculated.

Improvements
The upper limit of the capacitance
range was limited by the use of an 8-bit
counter to time the discharge. With
more Flash memory and RAM available,
we can instead use a 16-bit counter.
In theory, this expands the range by
a factor of 256, but in practice, using
this entire range is not possible. The
upper limit is around 150μF now, Improved SMD
equivalent to about 12 bits or a factor Test Tweezers
of 16 higher.
The first reason for this is that Fig.1: the circuit for the updated Tweezers is practically the same as the old
higher values would overflow the version, except IC1 is now a PIC16F15214. It can perform all its tests by
32-bit mathematical calculations that applying different voltages to the IOTOP and IOBOT pins and testing the voltage
are required. The second is that the on the IOTEST pin.

40 Practical Electronics | May | 2023


A few constructors had difficulty
finding the brass strips we
recommended for the original
Tweezers. Standard header pins are We used a low-profile header socket (Altronics P5398) so that we could remove
a substitute and are easily aligned the OLED module during prototyping, to allow access to the programming pins.
for soldering while in their plastic This also required us to cut down the header pins on the underside of the OLED
shrouds. There are even gold-plated and remove the plastic spacer block. The alternative is to simply solder the
versions available. OLED directly to the main PCB.

An equation similar to the volt- Construction towards the curved end of the board.
age divider equation is used on the The assembly procedure is identical Align the part within the pads, clean
ADC result to calculate the value of to the October 2022 design, but we’ll the iron’s tip, apply fresh solder and
the external capacitor. The way the go over it again for those who haven’t tack one lead in place.
capacitors share the charge is analo- seen that article. The SMD Test Twee- Adjust the IC if necessary to ensure
gous to how resistors share voltage in zers are built using three PCBs, with it is flat against the PCB and aligned
a divider chain. the main one coded 04106211, mea- to the pads. Then solder the remain-
The software also makes minor suring 28 x 26mm and available from ing pins, cleaning your iron’s tip and
adjustments to account for some of the the PE PCB Service. Refer to the PCB adding solder as necessary.
stray capacitance that is present and sig- overlay diagrams, Fig.3 and Fig.4, Use the braid to remove any sol-
nificant at these magnitudes. We made during construction. der bridges by adding more flux, then
tests on real capacitors in the picofarad The main PCB is not hard to build, press the braid against the excess sol-
range to fine-tune these readings. even if the parts are all surface-mount- der with the iron. Carefully drag both
The lower limit is fairly arbitrary ing types. Gather your SMD tools and iron and braid away when the solder
and is chosen to avoid the SMD Test supplies. We recommend a fine-tipped has been absorbed.
Tweezers detecting stray capacitance soldering iron, a magnifier, some flux The remaining three components
as a component to be measured, which paste, solder wicking braid and twee- are not polarised, so their orienta-
could cause them not to power down zers, at a minimum. tions are unimportant. The capacitor
correctly. At these scales, even the way The small PCB needs something to sits near CON−, while the two identi-
the Tweezers are held can change the hold it in place. If you don’t have an cal resistors flank IC1 at its other end
reading substantially. appropriate vice tool, you can use an and side.
As the ADC reading nears its upper adhesive putty like Blu-Tack instead. Use a similar technique to IC1. Tack
limit for larger capacitances, the res- If possible, set up some fume one lead, adjust the part, then tack the
olution is poor around 1nF, and steps extraction to deal with the extra smoke other lead. You can also go back and
grow to be as far as 100pF apart. So the that comes from working with flux, or refresh any leads if the joint doesn’t
readings using this method are always work near an open window or outside. look right. It should be smooth and
shown as pF, and other methods are A tip-cleaning sponge is handy too. glossy; you can add more flux at any
used for measurements in nF or μF. Apply flux to the top PCB pads for stage to help improve solderability.
We will detail the calibration and IC1 and the three passive components, Then solder the single component
setup process after the construction then rest IC1 in place using tweezers, to the back of the PCB. Centre the cell
is complete. ensuring the pin 1 dot or bevel is holder to align the two external pins
to their pads. If your iron is adjust-
able, turn it up while soldering this
larger part. You should also ensure that
the wider opening on the cell holder
faces the rounded edge of the PCB to
allow access for the cell to be fitted
and removed.
As before, apply flux, tack one lead
in place and adjust the position. Then
solder the other lead. For these much
larger pads, it can help to apply extra
solder directly to the pad to create
a robust fillet, which you can see in
Fig.2: Cx is the device under test (DUT) connected to the Tweezer probes, while
C1 is the ADC sample-and-hold capacitor inside the microcontroller. The our photos.
capacitors are connected by sampling Cx with the ADC. If the value of Cx equals With the surface mounted parts fit-
C1, the resulting voltage is half the initial voltage. It’s analogous to a resistive ted, you can clean up the PCB using
voltage divider, and the formulas are much the same, with the capacitor charge the flux cleaner designated by the
replacing the voltage across the resistors. flux’s data sheet. Methylated spirits or

Practical Electronics | May | 2023 41


Fig.3: construction of the Tweezers is the same as last time (October 2022) except that IC1 is a different, pin-compatible
microcontroller with more memory. There aren’t many components to fit but make sure that IC1 is oriented correctly.

isopropyl alcohol are good all-round apply power. Then click ‘Program’ The other advantage of using the
alternatives for cleaning many fluxes and check that the part programs and header pins is that they are a good
too, while general-purpose flux clean- verifies correctly. fit for breadboards and jumper wires,
ers are also available (and generally making it very easy to connect the SMD
work better than plain alcohol). Tweezer arms Test Tweezers to other components for
Just ensure that any flammable sol- The two arm PCBs should be attached hands-free readings.
vent has fully evaporated before mov- next, as the OLED module covers much We recommend fitting the arms
ing on to the next steps. of the main PCB, limiting access. roughly in line with the edges of the
Our first version of the SMD Test PCB but slightly tilted inwards with
Programming IC1 Tweezers used small pieces of brass around 15mm separation at the tip
You have two options for loading IC1’s strip to give the arms finer tips than ends. Like the SMD parts, roughly tack
firmware. First, you can buy a prepro- just the bare PCBs would provide. the arms in place and adjust them to
grammed PIC from the PE PCB Service; If you can’t find a brass strip, then your liking.
or, you can buy and program a PIC your- we suggest an alternative that will We prefer fitting the arms with the
self. (Skip the following if your micro- provide your Tweezers with gold- writing and main contact trace running
controller has been preprogrammed.) plated tips! down the inside. This helps shield and
As we noted in the panel, the Many header pins are gold-plated isolate the trace from outside contact
PIC16F15214 is a much newer part and are a good size for working with or stray capacitance.
than the PIC12F1572, so you will small components. These can be used Test the action/pressure of the Twee-
need a fairly new programmer and a instead of the brass strip, but unlike zers when the arms are positioned.
new version of Microchip’s MPLAB the brass strip, we found it easier to When you are happy, apply a generous
X IPE (integrated programming envi- solder these to the arms after attaching amount of solder on both sides of the
ronment). It can be downloaded the arms to the main PCB. main PCB to secure them firmly in place.
as part of the MPLAB X IDE from:
https://bit.ly/pe-may23-ide Parts List – Improved SMD Test Tweezers
We’ve tested with versions v5.40
and later. You may also need to down- 1 double-sided PCB coded 04106211, 28 x 26mm (main PCB)*
load a DFP (device family pack); this 2 double-sided PCBs coded 04106212, 100 x 8mm (Tweezer arms)*
can be downloaded from within the 1 PIC16F15214-I/SN or PIC16F15214-E/SN 8-bit microcontroller
IDE, and the IPE then detects that the programmed with 0410621B.HEX, SOIC-8 (IC1) ●*
DFP is installed. You should look for 1 0.49-inch 64x32 I2C OLED module [eBay, AliExpress – for example, at the
the PIC16F152xx family. time of writing eBay item 154706482381]
You will also need a recent pro- 1 surface-mount coin cell holder (BAT1) [Digi-key BAT-HLD-001-ND,
grammer such as a Snap or PICkit 4 Mouser 712-BAT-HLD-001 or similar]
as the older PICkit 3 is not supported 1 CR2032 or CR2025 lithium coin cell
for these parts. 1 5-pin right-angle male pin header (CON1; optional, for programming IC1
Connect the programmer to the PCB in-circuit)
at CON1, aligning the arrows that mark 1 100nF SMD 50V X7R ceramic capacitor, 3216/M1206 size [Altronics
pin 1. You could solder on a header, R9935]
but we find that holding a short header 2 10kΩ 1% SMD resistors, 3216/M1206 size [Altronics R8188]
strip in place and pressing it firmly 2 15 x 2mm short pieces of thin (eg, 1mm) brass sheet for tips (optional)
against the pads to make contact is OR
usually sufficient. 2 gold-plated header pins for tips (see text) ●
Select the PIC16F15214 part and 1 40mm length of 30mm diameter clear heatshrink tubing (optional)
open the 0410621B.HEX file, which 2 100mm lengths of 10mm diameter heatshrink tubing (optional)
is available for download from the 1 4-way low-profile female header strip (optional, for CON2; can be cut from
May 2023 page of the PE website: Altronics P5398) ●
https://bit.ly/pe-downloads ● These parts have been changed compared to the original Tweezers
You may need to change the set- * Available from the PE PCB Service
tings to allow the programmer to

42 Practical Electronics | May | 2023


Fig.4: the PCB for the
Tweezer Arm section.

To fit the tips, find a strip of about Testing battery from being removed.
six pin headers (to maintain the 15mm Fit a CR2025 or CR2032 3V coin cell The 10mm heatshrink can be put
separation) and while the pins are still into the cell holder, noting the polarity over the arms, leaving just the tips
in the plastic holder, solder the tips of on the cell holder. After about a sec- exposed. It should be pushed up
the arms to the short ends of the head- ond, the OLED should show R HAND firmly against the main PCB before
ers. Using the holder will keep the pins as per Screen 1. If not, check your sol- being shrunk with a heat gun.
parallel and even. dering and that 3V is present on either The wider heatshrink fits over the
Again, apply a generous amount the OLED module’s header pins or pins main PCB and should overhang the
of solder when you are happy with 2 and 3 of CON1. end enough to prevent the cell from
the tips, then carefully and evenly If 3V is not present, the cell may be being removed. Of course, you will
pull the arms and their tips out of flat or there is a short circuit. Remem- have to remove and replace the heat-
the plastic holder. We find that some ber to check the reverse of the PCB, as shrink to replace the cell.
pointy-nosed pliers are handy to help the cell holder, arms and OLED header Also, be careful to not shrink the
in this situation. are all very close together. large heatshrink too tightly around the
Before you proceed to use the SMD OLED, as its glass screen can be frag-
OLED screen Test Tweezers, you might like to go ile. Aim heat along the edges to avoid
The final step is to fit the OLED dis- through the calibration procedure, as heating the OLED and battery, and
play module. You can solder the mod- detailed in the panel overleaf. only shrink enough to secure every-
ule directly to the main PCB. But since thing in place.
we had to do a lot more testing for this Operation
new version, we used a low profile With the calibration and setup com- Parts availability and upgrading
header socket to allow the OLED to plete, normal operation will start. You Apart from the PIC, the hardware is
be removed. This is necessary because should see a display indicating the bat- the same as before. The PCBs can be
the programming pins are also used tery voltage preceded by the letter B. bought from the October 2022 section
to interface with the OLED screen. After five seconds, the Tweezers will of the PE PCB Service, and the new
We used the PIC Programming enter sleep mode and can be woken version PIC from the May 2023 page.
Helper from June 2022 to help with by touching the tips together. While we think the parts cost is
our testing. But we also needed to do At this point, the new SMD Test low enough that it’s worthwhile sim-
some testing and tweaking on the final Tweezers work much the same as the ply building new Tweezers, if you
design, so having a removable display older version, apart from the expanded really want to upgrade a pair you’ve
was handy for these later stages. We capacitance range. already built, you can just order the
used a low-profile (5mm high) header If you close the tips to measure the programmed micro from us and swap
socket to keep the unit compact, and Tweezers’ short-circuit resistance, you it over.
it’s what you can see in our photos. should see a value jumping around We suggest you only do this if you
But we recommend using the direct between 0Ω and 1Ω if everything is are confident in removing SMDs and
mounting method unless you are con- working correctly.
sidering designing your own firmware. We measured the current consump-
So we’ll describe that. tion on our prototype as much the
If the OLED module’s header is not same as the original SMD Test Twee-
attached, solder it now, at right angles zers. The new Tweezers use around
to the module’s PCB. Then mount 4mA when working and 5μA when
the module onto the PCB. You might sleeping. So the cell life will depend
find that the back of the OLED mod- mainly on how much they are used,
ule touches IC1. In this case, use Blu- tending towards the cell’s shelf life.
Tack or a cardboard shim to keep the
two apart until the module is securely Finishing touches
soldered. Like we did with the original SMD Test Screen 1: the first display when the
That leaves the long pins protruding Tweezers, you might also consider add- Tweezers are powered on is the HAND
setting, oriented in correspondence
at the back of the PCB. You can trim them ing some heatshrink to the device to to the setting. Leaving the tips open
carefully with a sharp pair of sidecutters. add some protection and to keep the selects right-handed operation.

It helps to apply extra solder directly The tips might look a bit wonky, but when the arms are squeezed to bring them
to the pad of the Tweezer arms to together they become parallel at about the distance you would typically use
make a robust fillet. them (wide enough to hold a typical SMD component).

Practical Electronics | May | 2023 43


cleaning up the board to accept a new Future improvements 10kΩ resistor limits the applied cur-
chip. This is most easily done with The SMD Test Tweezers are somewhat rent to about 300μA, meaning that the
a hot air station, although it can be limited by only having one resistor to diode forward voltages reported are
done with a regular soldering iron if apply voltages to components, which much lower than expected, and LEDs
you know how. is in turn limited by the 8-pin PIC. The do not light very brightly.

Setup and calibration


The accuracy of modern surface- is a separate calibration step for those. tips with a female-female jumper wire
mounted resistors is excellent and, Still, the preset value we have loaded while inserting the cell. The handed-
as built, the SMD Test Tweezers will into the SMD Test Tweezers firmware ness setting is kept in RAM, saving on
distinguish resistors well enough for will be quite accurate, as long as your wear to Flash memory. Since it is set
most constructors. Still, the extra build is similar to ours. every time power is applied, there is
program space available on the You may have noticed that the SMD no need for non-volatile storage.
PIC16F15214 gives us room to add Test Tweezers do not have any buttons. As the remaining calibration steps
some routines to add some settings So the various settings are configured can be a bit fiddly, there is the option
and calibration constants. using the only input device available: to skip them. You enter calibration
I’m right-handed, and have realised I the probe tips! by holding the tips together when
overlooked an aspect of the design that We can step through the setup and prompted (Screen 3) or leaving them
probably makes the original Tweezers calibration by opening and closing the open to skip. If the tips are left open for
very difficult to use for the left-handed. tips of the Tweezers at various points. about the first 10 seconds after power-
So the first new setting is the option It’s a slow but effective process, made up, the settings are the same as the
to flip the display so that it is legible easier by having a screen to show what original SMD Test Tweezers.
when the SMD Test Tweezers are held is happening. The next step is to adjust the value
in a left hand. Look at the flowchart in Fig.5 as we of the nominally 10kΩ series test resis-
There is also the option to set the explain the process. The setup proce- tor. The OLED displays CAL R+ and a
value of the nominally 10kΩ series dure only runs when the microcontrol- countdown timer (Screen 4). Any time
resistor between pins 2 and 5 of IC1. ler is powered up, so it can be triggered the tips are closed during this phase,
Rather than trying to measure its value, by removing and reinserting the cell. the displayed value will increase, and
we recommend testing an external part The right-hand or left-hand opera- the timer will reset.
of a known value and adjusting the cal- tion setting is selected at the instant This is followed by the CAL R- phase
ibration until the SMD Test Tweezers power is applied. If the tips are open, (Screen 5), which works much the
measure it correctly. right-handed operation is selected; same but allows the value to decrease.
The series value is simply adjusted otherwise, left-handed operation If any changes are made, the cycle
in proportion to the desired change is set. A message is also shown to repeats the CAL R+ and CAL R- steps
in calculated resistance. For exam- RELEASE (Screen 2) the tips, and the until no more changes are made.
ple, if your displayed test resistor is microcontroller waits for this to hap- The OLED then prompts to save the
1% low, increase the series resistor pen so that later calibration steps are value; again, touching the tips together
value by 1%. not triggered inadvertently. before the displayed timeout is con-
This won’t adjust for things like If you find it fiddly to insert the cell firmation that the value is to be saved
trace and contact resistance, so there while holding the tips closed, join the and, if this is done, a brief message is

Screen 2: at various times during Screen 3: the first prompt is to Screen 4: when the tips are closed
setup, you may be prompted to complete the calibration process and is on this screen, it will increase the
RELEASE the Tweezers by opening the accompanied by a nominal five-second saved value of the series test resistor
tips to ensure that multiple settings timer. If the tips are left open during in 1Ω steps. See Fig.5 for a flowchart
are not inadvertently made. this time, calibration is skipped. explaining the process.

Screen 7: this screen shows while the Screen 8: you are prompted to close Screen 9: the contact resistance is
value is saved to confirm that your the tips to calibrate their contact measured around 20 times to get an
selection has been acknowledged. resistance. If you don’t, the saved average. The value shown here is
value is not changed. higher than the default value of 16Ω.

44 Practical Electronics | May | 2023


We are considering a more compli- Having these extra pins means resistors will also improve the over-
cated SMD Test Tweezers design using that we could have multiple current- all accuracy.
a chip with, say, 14 pins. That might limiting resistors and thus a better Reproduced by arrangement with
let us add new test modes and improve choice of test current. As well as SILICON CHIP magazine 2023.
the existing ones. expanding the range, additional test www.siliconchip.com.au

shown indicating this. These are seen


in Screen 6 and Screen 7.
Finally, whether or not any changes
are made or saved, the value of the
series test resistor is freshly loaded
from Flash memory and displayed
for user confirmation. The next step
– to set the contact resistance – is sim-
pler, as this is measured rather than
being entered.
Note that the timers shown on
these screens are not high-precision.
The internal timings vary depend-
ing on what is displayed (especially
changing numbers, which take time
to render). We’ve tried to make the
countdown timers appear reasonably
consistent as seconds, but they are
not highly accurate.
The prompt seen in Screen 8 is the

start of the contact resistance calibra-


tion. When the tips are held together, Fig.5: a flowchart representing the
Screen 9 is seen. This shows the mea- setup and calibration process that
sured contact resistance, averaged over occurs when power is first applied to
the Tweezers. It looks complicated,
several readings. The default value is
but it is simple to go through once
16Ω, as measured on our prototype. you understand the concepts, and the
If the tips are accidentally opened, Tweezers prompt you with what to do
the process aborts, and you will need at each step.
to restart the calibration process to
repeat it. confirm or leave them open to allow
Otherwise, the averaged value is the counter to time out. Screen 11
shown along with a prompt to save it, shows the actual value loaded from
as seen in Screen 10. Close the tips to Flash memory.

Screen 5: similarly, this screen allows Screen 6: this prompts you to confirm
the series test resistor value to be that you wish to save the entered
decreased. If any change occurs, these value to non-volatile flash memory.
two steps are repeated until no change Close the tips to do so.
is detected.

Screen 10: if you don’t get this Screen 11: finally, the actual value
message, the Tweezers have detected saved in flash memory is reloaded so
that the tips may have been opened, that you can confirm that the saved
so the measured value is inaccurate. value is correct.

Practical Electronics | May | 2023 45


Make it with Micromite

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

Part 46: A PicoMite Smart-light Controller – Part 1

T
here are numerous smart- The concept was simple; incorporate a
home devices available today, touchscreen so that the user can select
from lighting, security cameras and a single smart light from a list of all the
alarm systems to speakers, TVs, personal available lights and turn the light on or
gadgets and even kitchen appliances. off, or even alter the brightness. How
Typically, smart technology devices are hard can that be?
controlled from a smartphone (or tablet)
via an installed app. In the early days of Philips Hue
smart tech, each manufacturer had its own There are a lot of choices when it comes
eco-system, meaning that you could end to smart lighting. My preference is the
up with several different apps, each of Philips Hue range. Yes, it’s at the more
which controlled only certain devices, expensive end of the price scale, however,
and they couldn’t talk to each other. their technology always works, and
As smart devices matured, their there are other benefits, as we shall see Fig.1. The surface-mount version of the
manufacturers incorporated compatibility as we work through this project. I have ESP32-WROOM module.
with another branch of smart technology, found that a lot of other smart lighting
voice control. Today, virtually all that is available varies considerably in the readily available ESP32), we should
smart-home devices can be set up to be quality, often resulting in having to buy be able to achieve our goal of a PicoMite
controlled with your voice using (at least) replacements earlier than expected. Just Smart-light Controller.
one of the three main systems: Google recently I had two LED strip-lights fail
Home, Amazon Alexa and Apple Siri. from a no-brand manufacturer. These The ESP32 module
Voice control effectively results in one were used as bedside lights, so they have There are many variations of the ESP32,
common interface for all smart devices in now been replaced with Philips Hue strip- both in terms of hardware and firmware. If
a home, irrespective of the manufacturer. lights, meaning that the whole house (and you search online for ‘ESP32 WROOM’, you
It is worth noting here that some garden) incorporates 100% Hue lighting. will see that there are two main variations
devices also include a touchscreen for Without going into too much detail available – a smaller surface-mount module
user control. However, these tend to be here, the Philips Hue smart lights can (see Fig.1), and a slightly larger through-
limited to the more expensive kitchen be controlled either by BlueTooth, or by hole version (which is essentially an ESP32
appliances and smart speakers. Wi-Fi (Zigbee). Bluetooth control is very surface-mount module mounted on a
Now the dilemma – you may not always limited, and hence won’t provide the daughterboard that in turn provides header
have your smartphone at hand to control, functionality that we’re trying to achieve. connections – see Fig.2). We recommend
for example, a smart light. Likewise, it On the other hand, Wi-Fi provides full
may not be suitable to use voice control control of the smart lights, but the
(perhaps late at night) to instruct your version of Zigbee Philips adopted is
smart speaker to switch off a smart light, overly complex to implement. However,
and you certainly don’t want the smart Wi-Fi control is made much easier when
speaker confirming it has understood your a centralised low-cost Philips Hue Hub
command… or not! (This is even worse is built into the setup; something that
when the confirmation is spoken loudly.) Philips have documented reasonably
Granted, there are portable smart- well. So, rather than communicating
button light switches available, but when directly with the smart lights via a version
you have numerous smart lights in the of the Zigbee protocol, the Hue Hub
home these buttons can quickly become makes it possible for developers to use a
muddled up, especially when children standard Wi-Fi protocol (non-Zigbee) to
like to play jokes with each other and control every aspect of the setup simply
swap them all around. by communicating directly with the Fig.2. Through-hole version of the module is
This led to an idea for a project; a low- centralised Hub. Hence, by incorporating an SMD ESP32 mounted on a
cost PicoMite-based smart light controller. a Wi-Fi module into our project (such as daughterboard with header connectors.

46 Practical Electronics | May | 2023


slightly less if you’re able to used in the project’s program code will
solder the SMD module onto a be recognised by the ESP32, enabling
daughterboard yourself. successful Wi-Fi communication with the
Turning to the ESP32’s Philips Hue hub. Other versions of the
firmware, one version is ESP firmware will probably have some
available that incorporates commands missing and may not work.
an extensive set of AT Let’s get started.
commands. A good set of
AT commands means that it is Updating the ESP32 firmware
possible to gain access to the The five steps to update the ESP32 module
many features that are built with the AT firmware are as follows:
into the ESP32. Furthermore, 1. Download ESP32 Flash tool from Espressif
communicating via AT 2. Download AT firmware file from Espressif
commands from MMBASIC 3. Connect ESP32 WROOM module to PC
is straightforward, which in 4. Run Flash tool to upload the AT firmware
turn means the program code 5. Test the firmware loaded successfully.
will be much easier to follow.
The specific AT firmware file To perform the above steps you will need
we require is available for free the following items:
Fig.3. The MikroElektronika ESP32-WROOM module download from the ESP32 • Windows PC (connected to the Internet)
(MIKROE-3542) used in the development of the PicoMite manufacturer (Espressif). It • USB-to-Serial module
Smart-light Controller. will be used to overwrite • Jumper leads (DuPont)
whatever firmware comes pre- • A mini breadboard.
that you go for the through-hole version loaded in your ESP32 WROOM hardware.
of the ESP32 so that you can then easily Updating the ESP32 firmware can be Note that the ESP32 is a 3.3V device which
connect it to the PicoMite using DuPont challenging, so in Part 1 of this project pulls more than 200mA at peak current
leads. At the time of development, I had a we will guide you through the process (although it does operate lower than this
quantity of ESP32 WROOM Click modules step-by-step. It is important to note that most of the time). To handle these peak
(see Fig.3), so I used one of those for this updating the ESP32 WROOM with the currents, you may require a beefier 3.3V
project. As a guide, expect to pay around relevant AT firmware is essential as it supply than a USB-to-Serial module can
£10-£15 for an ESP32 WROOM module; will guarantee that all the AT commands cope with. Our recommendation is to
use the Raspberry Pi Pico’s main 3.3V
output (on pin 36) as it is capable of
safely supplying 300mA.
We will now work through the five
firmware update steps.

Step 1: Download ESP Flash Tool


The ESP32 Flash Tool is available for
free download from the manufacturer’s
website. However, it currently only
supports the Windows platform.
So, from a Windows computer, visit
https://bit.ly/pe-may23-esp and click
on the link to download the Flash
Download Tools (see Fig.4). This will
download a zipped folder (about 16MB),
Fig.4. The ESP Flash Tool can be downloaded from Espressif’s website. It makes
and at the time of writing, the version
upgrading the ESP32 firmware a much easier task.
number was V3.9.4. Once downloaded,
extract the files and you will then see
the main program that we will be using:
flash_download_tool_3.9.4.exe

Step 2: Download AT Firmware file


The required AT Firmware file can
also be downloaded from the Espressif
website. Visit: https://bit.ly/pe-may23-at
and click the link at the top of the list to
download a zipped folder (about 22MB).
At the time of writing, this was: v2.4.0.0
ESP32-WROOM-32_AT_Bin_V2.4.0.0.zip
(Recommended) – see Fig.5. Extract the
files and make a note of where the extracted
folder is (probably in your Downloads).

Step 3: Connecting the ESP32


Fig.5. The latest version of the required firmware file (zipped folder) is shown at the top of the The ESP32 module has three serial ports
list. Here, it is version v2.4.0.0 ESP32-WROOM-32_AT_Bin_V2.4.0.0.zip (Recommended) (UART0, UART1 and UART2) – we will

Practical Electronics | May | 2023 47


Fig.7. (Right)
Pin labelling
EN EN D23 GPIO23
on a typical GPIO36 D36 D22 GPIO22
ESP32 GPIO39 D39 D1 GPIO1 UART 0 TX
GPIO34 D34 D3 GPIO3 UART 0 RX
through- GPIO35 D35 D21 GPIO21
ESP32 hole module. GPIO32 D32 D19 GPIO19
GPIO33 D33 D18 GPIO18
Positions GPIO25 D25 D5 GPIO05
of pins may GPIO26 D26 D17 GPIO17 UART 2 TX
GPIO27 D27 D16 GPIO16 UART 2 RX
vary between GPIO14 D14 D4 GPIO4
D12 D2
different GPIO12
D13 D15
GPIO2
GPIO13 GPIO5
manufacturers. GND GND GND GND
VIN VIN 3V3 3V3

BOOT
GND

IO0
EN

RX

TX

EN
NC NC to connect three GPIO pins as that contains the executable file:
RST NC follows; along with 3.3V power flash_download_tool_3.9.4.exe
CS TX
(ideally 300mA capable) and Launch it, and the initial screen will be
the Enable pin: as shown in Fig.8a. The top option (Chip
NC RX
Type) will be set to ‘ESP8266’, and this will
NC NC
ESP USB need changing. Click on the drop-down
NC NC
GPIO0 0V arrow (Fig.8b) and select ‘ESP32’ so that
3V3 NC GPIO1(TX) Rx the screen now looks like Fig.8c. The other
GND GND GPIO3(Rx) Tx two options should be left set to ‘Develop’
Wifi BLE click EN 3.3V and ‘UART’.
0V 0V On clicking the ‘OK’ button, you will see
3.3V 3.3V (ideally 300mA) a screen like that shown in Fig.9. At the
bottom, you should select the appropriate
3.3V Note: when GPIO0 is low (0V), COM port (the one Windows assigns to the
0V the ESP32 enters ‘Bootloader’ USB-to-Serial module) and the correct baud
USB-to-serial
module TX mode, and this is exactly what we rate (115200).
RX need to be able to load the new Next, in the top empty line near the
ESP32 AT firmware. However, top of the screen, select the three dots
when GPIO0 is high (3.3V), the to open a file browser and select the
ESP32 will be in normal execution extracted file factory_WROOM-32.bin
mode. GPIO0 has an internal pull- from the firmware folder from Step 2 in
up resistor, so when this pin is your Downloads folder: Downloads\
unconnected, the ESP32 is in ESP32-WROOM-32_AT_Bin_V2.4.0.0\
Normal mode. ESP32-WROOM-32-V2.4.0.0\factory
Now that the ESP32 is In the smaller empty box on the right,
connected to the computer, we enter the value 0x00. Now check all the
can load the new AT firmware. other settings so they match that shown in
Fig.10 (in particular, ensure ‘DoNotChgBin’
Step 4: Upload Firmware is ticked).
Before running the ESP Flash With the settings configured, press
Fig.6. The six connections shown here connect the Tool, make sure that you close the ‘START’ button. This will start the
USB-to-Serial module to the MIKROE ESP32 module any open terminal app program. uploading process with a green progress bar
and put it into Bootloader mode. It connects to This ensures that Windows frees at the bottom of the screen (Fig.11). Note
UART0 on the ESP32. up any COM port that would that the ‘DetectedInfo’ box (left of screen-
use two of them. To flash the firmware otherwise be assigned to to the USB-to- centre) will also show some information,
file into the ESP32 we have to connect Serial module. along with some other data shown in the
our USB-to-Serial module to UART0. To launch the ESP Flash Tool, box below that is not relevant, but confirms
On the MIKROE ESP32 module, UART0 go to the folder unzipped in Step 1 things are happening as expected.
is accessed via a dedicated row of
pins (along with the other pins
we need to connect for flashing
the firmware). Fig.6 shows how to
connect the MIKROE ESP32 module
to the USB-to-Serial module.
If your module does not
have a dedicated set of pins for
flashing the firmware, then all the
relevant pins on the module will
be labelled with GPIO numbers
(plus power and others for basic
control, such as ‘Enable’) – Fig.7 Fig.8. On launching the ESP Flash Tool (left to right): a) change from the default ESP8266 option;
shows an example. You will need b) use the drop-down; and c) select the ESP32 option.

48 Practical Electronics | May | 2023


Fig.9. (Left-top) The main screen of the ESP Flash Tool program.
The COM port and BAUD rate need to be set so it connects to
the USB-to-Serial module correctly.
Fig.10. (Left-middle) The ESP Flash Tool program needs to be
loaded with the AT Firmware File. The three dots highlighted will
open a file browser from where you point to the location of the
firmware .BIN file downloaded as part of Step 2.
Fig.11. (Left-bottom) The upload process is triggered by pressing
the ‘START’ button. Progress is indicated by the green progress
bar at the bottom of the screen.

After a short while, the upload process will finish, indicated


by a full green progress bar, and a light-blue button in lower left
corner stating ‘FINISH’. If you look at the ‘black screen’ behind
the main window, you will also see some text, and the last line
also confirms the process is finished (see Fig.12).
The ESP Flash Tool program can now be closed, ready for the
next step.

Step 5: Testing
To test that the ESP32 firmware upload has been successful, we
need to alter the way that the ESP32 module is connected. We
now need to connect our USB-to-Serial module to UART2 on the
ESP32, and also ensure that we don’t put the ESP32 into Bootloader
mode by removing the connection to GPIO0 (the internal pull-up
resistor on this pin will ensure that the ESP32 is in Normal mode).
Now make the four connections shown in Fig.13 and then launch
your terminal app to communicate directly with the ESP32 and
begin sending AT commands to it.
For the following demonstration, we will be using TeraTerm
as our terminal app. Begin by connecting TeraTerm to the COM
port that Windows assigns to the USB-to-Serial module. Note that
there are two settings within TeraTerm that you may need to alter:
1. In the ‘Setup-Terminal…’ menu, ensure ‘Receive’ is set to ‘CR’,
‘Transmit’ is set to ‘CR+LF’, and ‘Echo’ is unticked (see Fig.14).
2. In the ‘Setup-Serial port…’ menu, ensure that ‘Speed:’ is set to
115200, and the other settings on this page match those shown
in Fig.15.
With the settings configured correctly, simply type AT and then
press enter. The ESP32 should respond with OK. If so, then all is
good. However, if you don’t see the OK response then first check
the four connections (Fig.13), and then re-check the terminal app
settings (Fig.14 and Fig.15).

Fig.12. When the upload is complete, the screen will display a


blue FINISH message in the lower-left corner.

Practical Electronics | May | 2023 49


Fig.15. (Right)
TeraTerm’s
Serial port
settings need
to match
ESP32 those shown
here (speed:
115200 baud).
GND

EN

IO0

RX

TX

NC NC

RST NC

CS TX

NC RX

NC NC

NC NC Two common mistakes are an incorrect baudrate (speed) setting (115200), and
3V3 NC also the Tx and Rx connections swapped over. Remember, Tx on the USB-to-
GND GND Serial module goes to Rx on the ESP32 (GPIO16), and Rx on the USB-to-Serial
Wifi BLE click module goes to ESP32 Tx which is GPIO17.
If it still doesn’t work, then it is likely to be a power issue. As explained, a
3.3V power supply is required; ideally, capable of supplying a minimum of
250mA. So, if connections and settings are correct but you are still not seeing
3.3V the OK response, then power the ESP32 module from the 3.3V output from the
0V
PicoMite (Pin 36).
USB-to-serial
module
When you’ve achieved an OK response after sending the AT command, you
TX
can proceed to check that the version of the ESP32 firmware is correct (ie, the
RX
firmware update has worked). To do this, type the command AT+GMR and it
will respond with the version number of the installed firmware (see Fig.16). If
all has worked, then you will see something similar to:

AT version:2.4.0.0(4c6eb5e - ESP32 - May 20 2022 03:11:58)


SDK version:qa-test-v4.3.3-20220423
compile time(5641e0a):May 20 2022 11:12:05
Bin version:2.4.0(WROOM-32)

OK

If you don’t see the updated firmware version number, then repeat the upload
process. However, if you have followed the above process step-by-step then
this is unlikely to be incorrect.
Fig.13. The four connections above put the ESP32
Congratulations, you have successfully updated the ESP32 with the required
into Normal mode, allowing it to receive AT commands
firmware version in preparation for Part 2 next month.
directly from a terminal app such as TeraTerm.
Next time
Next month, we’ll configure the Philips Hue Hub and assemble a test
circuit – based on a PicoMite and ESP32 – to check we can communicate
with the Hue Hub via Wi-Fi. Until then, stay safe, and have FUN!

Fig.16. To test if the ESP32 firmware upload was successful, use the
AT+GMR command, and check the version number – here, 2.4.0.0.

Questions? Please email Phil at:


[email protected]
Fig.14. Ensure that the settings in TeraTerm’s Terminal settings
page match those shown here.

50 Practical Electronics | May | 2023


Max’s Cool Beans
By Max the Magnificent

Arduino Bootcamp – Part 5

I
’m currently ambling around (DPD) – more efficient than 8421 BCD; now Fig.2. On Off
with a bounce in my stride and a implemented in hardware and software, Example Open Close
great big sloppy grin slapped on https://bit.ly/3l3V1lq – and lots more at: 7-segment Play Pause
my face. I just received an email that https://bit.ly/3JaZwCF ’ messages Stop Error
brought a flush to my cheeks (my face
went red as well). The reason for my OH NO! a sort of graphical binary count, as illus-
jaunty jocularity is that the commu- Toward the end of my previous column trated in Fig.1.
nication in question came from Mike (PE, April 2023), we noted that – since we There are two questions you should be
Cowlishaw, who is a visiting professor can individually control the segments on asking about Fig.1. First, why reference the
at the Department of Computer Science our 7-segment display – we can use them six right-hand columns using the letters
at the University of Warwick, a Fellow to represent characters other than the nu- ‘A’ through ‘F’ rather than the numbers
of the Royal Academy of Engineering, merals 0 through 9. As an example, we 10 through 15. Second, why highlight (in
and a retired IBM Fellow, to name but took the current latest and greatest version green) the two segments associated with
a few of Cowlishaw’s cornucopia of of our program, which repeatedly counts the character in row 5, column 0.
credentials. Suffice it to say that Mike and displays the values 0 through 9, and There are two answers with respect to the
is something of a legend in certain we modified it to commence by first bid- first question: (a) This figure looks crowded
circles (possibly triangles and squares ding us a cheery, ‘HELLO.’ if we use the numbers 10 through 15 and
too) – see: https://bit.ly/400Br8x We’re going to use this version of the pro- (b) this leads us into the topic of hexadec-
In his communique, Mike spake as fol- gram as the starting point for this month’s imal numbers, which is introduced later
lows: ‘Hi Max, as usual, I thoroughly en- experiments. Just to ensure we’re all tap- in this column.
joyed your article in the April 2023 PE. Es- dancing to the same skirl of the bagpipes; In the case of the second question, I
pecially so because decimal representations you can download a copy of our current highlighted these two little rascals to
and arithmetic are dear to my heart. I’ve breadboard layout (file CB-May23-01.pdf) illustrate the fact that some of our seg-
been working on them, off and on, since along with the latest version of our pro- ment combinations may not appear to
1981. I found out in 2001 that there was gram (file CB-May23-02.txt). As usual, have any meaning when considered in
no standard way of doing decimal arith- all the files mentioned in this column are isolation, but their significance becomes
metic. Different software and hardware available from the May 2023 page of the apparent when viewed in the context of
could give different results for a multiply PE website at: https://bit.ly/pe-downloads other combinations. For example, these
on the same arguments (even within the Paste the program into your Ardui- two segments are immediately appar-
same company). However, I was able to no’s integrated development environ- ent as representing a lowercase ‘r’ when
fix that, and decimal arithmetic is now in ment (IDE) and then save it with a name seen in the context of the ‘Error’ message
the IEEE 754 standard for floating-point of your choosing along the lines of: shown in Fig.2.
arithmetic, as well as in hardware. Here Auto_Dec_Count_Up
are a couple of references you might find We closed the aforementioned column Tick tock
interesting: Decimal Floating-Point: Al- by asking you to try to think of other char- Although this is a bit of a (short) diver-
gorism for Computers (some history and acters and symbols and messages we could sion, the topic of controlling individual
rationale, https://bit.ly/3JzMOz6), A Sum- create. Since we have seven segments (ex- segments on 7-segment displays just re-
mary of Densely Packed Decimal encoding cluding the decimal point), and since each minded me of the awesome project created
segment can be in one of two states (on by EE Student Frugha, as documented on
and off), this means we have 27 = 128 dif- Hackaday.io – see: https://bit.ly/3JxO8lS
0 1 2 3 4 5 6 7 8 9 A B C D E F ferent possibilities. The best way to start This little rascal (the project in Fig.3,
0 is to enumerate these possibilities using not Frugha) involves a 6-row x 12-column
1

Fig.1. 16×8 grid showing the 128 possible


states for a 7-segment display. Fig.3. One thing to do if you find yourself with 144 7-segment displays (Source: Frugha)

Practical Electronics | May | 2023 51


= 144 element array of 7-segment dis- 4-nybble value). This equates to 42,473 lowercase letters if we wish, 0xa5e9,
plays. Observe how some of the displays in decimal, but the mapping between but I favour the uppercase approach.
are presenting only fragments of charac- the binary and decimal domains is not
ters. In addition to being employed as intuitively obvious. What? More characters?
a clock, this bodacious beauty can also An alternative is to turn to the hexa- In our previous column, we decided
be used to display all sorts of other data decimal (base-16) number system. This which segments we were going to use to
and imagery. requires us to assign unique symbols to represent the decimal digits 0 through 9
each of the sixteen binary combinations on our 7-segment display (Fig.5).
Hexactly supported by the nybble. We already have If we wish to display hexadecimal
Previously, we noted that groupings of the 0 through 9 characters at our dispos- values on our 7-segment display, we are
four binary digits, or ‘bits’, are common. al, so we need only six more. Instead of going to have to return to the drawing
Such a grouping is known as a ‘nybble’ inventing six completely new symbols board to decide which segments we can
(or ‘nybl’ or ‘nibble’). Since four bits can – which would be a pain because (a) we use to represent the characters A through
represent 24 = 2 × 2 × 2 × 2 = 16 different would have to memorise them and (b) F. Sad to relate, although we can easily
combinations of 0s and 1s, we can use a they wouldn’t exist on our computer create uppercase representations of A,
nybble to encode (map) our ten decimal keyboards – mathematicians and com- C, E, and F, we are obliged to make do
values as BCD. But this involves our em- puter scientists decided to employ the with lowercase incarnations of ‘b’ and ‘d’
ploying only ten of the binary patterns, letters A through F. (Fig.6). The reason is simple: upper-case
0000 through 1001, leaving the remaining Now let’s return to our previous 4-nybble ‘B’ looks just like ‘8’ and upper-case ‘D’
six patterns 1010 through 1111 unused example of 1010 0101 1110 1001. If we could be mistaken for ‘0’ (zero).
and unloved (Fig.4a). wish to transpose this into hexadecimal, Furthermore, this explains why we use
Most of the time (ie, when we aren’t all we need do is perform a one-for-one segment A in our representation of the
working in BCD), we prefer to take full transformation between the four binary number 6 because not using this segment
advantage of all 16 binary patterns, 0000 nybbles and their corresponding hexa- in the letter ‘b’ allows us to differentiate
through 1111, that are available in a decimal digits: 1010 = A, 0101 = 5, 1110 between these two characters.
nybble (Fig.4b). Although we can cer- = E, and 1001 = 9. This means 1010 0101
tainly consider these values in terms of 1110 1001 in binary is the same as A5E9 Fire up the IDE!
their decimal equivalents (0 through 15), in hexadecimal. If you haven’t already done so, use the Ar-
this quickly becomes clunky when we Obviously, it’s just as easy to go in the duino IDE to open our Auto_Dec_Count_Up
wish to work with multi-nybble values. other direction (we would be in a bit of a program (or ‘sketch’ in the vernacular of
Suppose we are working with a pickle were this not the case). If we start the Arduino fraternity) and save it out as:
4-nybble (16-bit) value, for example. with a hexadecimal value of A5E9, then Auto_Hex_Count_Up.
If we consider this field to be in BCD from Fig.4b we know that A = 1010, 5 = Now, all we need to do is modify this
format, we can use it to represent values 0101, E = 1110, and 9 = 1001, so A5E9 program from repeatedly counting from
between 0 and 9999. By comparison, if in hexadecimal is the same as 1010 0101 0 to 9 in decimal to repeatedly counting
we consider it to be a standard binary 1110 1001 in binary. from 0 to F in hexadecimal.
field, it can support 216 = 65,536 differ- As we’ve previously discussed, starting You’ve gone pale. What’s the problem?
ent combinations of 0s and 1s, which we with the least-significant (rightmost) digit, This really is easy peasy lemon squeezy
can use to represent unsigned (positive) column weights in binary (base-2) are 20 because it involves only two small tweaks.
values between 0 and 65,535. = 1, 21 = 2, 22 = 4, 23 = 8… and so on. By First, we change our definition of NUM_
Unfortunately, large binary values comparison, column weights in decimal DIGITS from 10 to 16. Second, we modify
typically don’t make much sense when (base-10) are 100 = 1, 101 = 10, 102 = 100, our DigitSegs[] array to include the
we first see them. As an example, con- 103 = 1000… Thus, it should come as no definitions of the segments used to rep-
sider the 16-bit binary value 1010 0101 surprise that the column weights in hexa- resent the A through F characters, as il-
1110 1001 (the spaces have no mean- decimal (base-16) are 160 = 1, 161 = 16, 162 lustrated in Listing 1.
ing other than indicating that this is a = 256, 163 = 4096 and so on. If you have any problems, you can down-
Just for giggles and grins, let’s sup- load my version (file CB-May23-03.txt).
pose we wish to convert our A5E9 hexa- Use the Sketch > Verify/Compile com-
Dec B CD B in Dec Hex decimal value into decimal. As with any mand to make our new program compile
23 22 21 20 23 22 21 20
other place value number system, each without errors, and then use the Sketch
0 0000 0000 0 0
digit forming the number is multiplied > Upload command to load the program
1 0001 0001 1 1
by its column’s weight and the results into your Arduino and run it. Following
2 0010 0010 2 2
are summed to give the total value of that the ‘HELLO’ message, you will (hopeful-
3 0011 0011 3 3
number. In this case, we have (A × 163) ly) see your 7-segment display repeated-
4 0100 0100 4 4
+ (5 × 162) + (E × 161) + (9 × 160), which ly counting from 0 to F in hexadecimal.
5 0101 0101 5 5
is the same as (A × 4096) + (5 × 256) + (E
6 0110 0110 6 6
× 16) + (9 × 1), which is the same as (10 Switch it up!
7 0111 0111 7 7
× 4096) + (5 × 256) + (14 × 16) + (9 × 1), For our next experiment, rather than let
8 1 0 0 0 1 0 0 0 8 8
which equals 42,473 in decimal (phew!). our program count automatically, we’re
9 1 0 0 1 1 0 0 1 9 9
Last, but not least, when indicating going to control things by hand using
– 1 0 1 0 1 0 1 0 10 A
hexadecimal values in the C/C++ pro- a momentary pushbutton switch. The
– 1 0 1 1 1 0 1 1 11 B
gramming languages, we prefix them ‘momentary’ portion of this appellation
Unused

– 1100 1100 12 C
with 0x or 0X (I prefer the former), for means this is a non-latching switch that
– 1101 1101 13 D
example, 0xA5E9. Also, we can use causes a temporary change in the state
– 1110 1110 14 E
– 1111 1111 15 F A
F B
(a) B CD (b) B inary, Decimal, G
E C
(8421 F ormat) and Hexadecimal D

Fig.4. Introducing hexadecimal. Fig.5. Segments used to represent 0 through 9. Fig.6. 7-segment A through F.

52 Practical Electronics | May | 2023


Assuming you are using the colored pencil or a highlighter to mark
2-pin version of the switch, things on the diagram as you verify them
make sure the pins are pre- on the breadboard.
sented as shown in Fig 7. Press-
ing the switch will make the Testing… testing…
connection between the black Remember, we can make our lives a whole
wire (connecting the left-hand lot easier if we take an ‘atomic’ view of the
side of the switch to 0V) and world and test things in isolation before
the blue wire (connecting the we use them as part of a larger function or
right-hand side of the switch system. In this case, we will start by writ-
to the ‘south’ side of the re- ing a simple program that reads the value
sistor). It’s important to get of the switch and displays that value on
the orientation of the switch our computer screen. Let’s call this pro-
correct. If you rotate it by 90°, gram something like Switch_Test_01. My
the black and blue wires will version of this program is shown in List-
remain forever unconnected ing 2 (file CB-May23-05.txt).
no matter how enthusiastically We start by defining a constant called
you press the button. SAMPLE_PERIOD and setting this to
If you end up using the 100. Later, when we use this value in a
4-pin version of this switch, delay() function, it will be interpreted
you’ll find the pins have a bit as 100ms (milliseconds), which means
Listing 1. Modifying our DigitSegs[] array. of a kink and you will have we will be reading (sampling) the state
to straighten them out using of our switch every tenth of a second.
of the circuit only while the switch is a pair of pliers. In this case, the pins are Next, we declare an integer variable
activated (pressed). connected in pairs as illustrated in Fig.7 called PinSwitch and assign it a value
These switches are available in 2-pin (use a multimeter to determine which pins of A0. In the real world, pin numbers
or 4-pin packages. Both types are 6mm are connected if you’re not sure). Once depend on what type of processor we
square. Also, both are single-pole, sin- again, it’s important to get the orientation are using. That’s why we inform the IDE
gle-throw (SPST) devices with normally of the switch correct. If you rotate it by of the processor type, which is the Ar-
open (NO) contacts, which means press- 90°, the result will be to permanently con- duino Uno in our case. This allows the
ing the switch closes the contact and nect the south side of the resistor to the IDE to automatically replace the A0 value
makes the connection. ground rail. This won’t do any damage, with the appropriate pin number when
Either type of switch will do, but I but the circuit will behave as though you we compile the program.
favor the 2-pin versions for our bread- are constantly pressing the switch. As we see, the setup() function con-
board-based application. I purchased In the schematic (circuit) diagram por- tains only two statements. Let’s discuss
a pack of 20 for only $5.99 here in the tion of Fig.7, we’ve used A0 to indicate these in reverse order. We use the in-
US (https://amzn.to/3JG781t). The clos- the wire/signal feeding the Arduino’s A0 built pinMode() function to inform the
est equivalent I could find in the UK input. When the switch is open (inactive/ Arduino if we want its digital pins to act
was a pack of 20 switches for £3.99 not pressed), we employ a pull-up resis- as inputs or outputs. In earlier programs,
(https://amzn.to/3Tk7Q87). For some tor to pull A0 up to 5V (logic 1 or HIGH). we’ve set the pins driving our 7-segment
reason, the UK versions have longer We can use any value between 1kΩ and display to be of type OUTPUT. In this case,
(14.5mm) leads, so you should cut 10kΩ (or higher) for this resistor. Per- we are telling the Arduino that we want
these down to a suitable length for use sonally, I usually use 10kΩ values with the pin connected to our switch to be of
in your breadboard. their brown-black-orange bands for my type INPUT. If the truth be told, this is
Thus far, we’ve been using the Ardu- pull-up and pull-down resistors. When somewhat redundant because – when it’s
ino’s digital input/output (I/O) pins D0 the switch is closed (active/
through D14. The Arduino Uno also has pressed), it connects the A0
six analogue input pins, A0 through A6. signal to 0V (logic 0 or LOW).
Happily, these analogue pins can also act Once you’ve wired every-
as digital pins if we wish, so let’s add one thing up, STOP! This is the
of our switches along with a pull-up resis- perfect time to slow down,
tor to our breadboard and connect things take a deep breath, and check
up as shown in Fig.7. An image of the that everything is as it should
entire breadboard showing this switch be. Even though there are only
and the 7-segment display is available two components and three
in the download file CB-May23-04.pdf. wires in this circuit, you’d
be amazed how easy it is to
do something silly, such as
5V plugging the north end of the
4-P in
resistor into the 0V (ground/
10K Ω blue) rail rather than the 5V
(power/red) rail, for example.
A0
2-P in (No, I certainly did not just do
SW this myself. Why do you ask?)
I recommend re-drawing
G ND
the circuit on paper, and then
T o the Arduino’s A0 analog pin going through it component-
by-component and connec-
Fig.7. Adding a switch and pull-up resistor. tion-by-connection using a Listing 2. First switch test program.

Practical Electronics | May | 2023 53


powered-up – the Arduino will set all its If you see 0s instead of 1s, the first thing
pins to be inputs by default. However, de- to check is that the north end of your re- Serial functionality
fining this explicitly makes the program sistor is connected to the 5V (red) rail and Much like the built-in functions
easier to read, so we do it anyway. not the 0V (blue) rail by mistake. If you pinMode(), digitalRead(),
Now let’s return to the first statement are using a 4-pin switch, the second thing digitalWrite(), delay() and
in our setup() function. The Arduino to check is that it’s in the correct orien- random(), the serial communica-
has a serial communications capability tation (try rotating it clockwise by 90°). tions functionality presented here
that allows it to talk to something called Once you start seeing the 1s, try press- isn’t part of the C/C++ languages.
the ‘Serial Monitor’ on the host computer. ing and holding the pushbutton, which In this case, it’s a library that’s been
Sometimes we may wish to use the Serial should result in you seeing the following written in C++ and that’s automati-
Monitor to send commands and data to lines of text appear in your Serial Moni- cally included in the Arduino’s IDE.
the Arduino. In this case, however, we tor window: Since this library is written in C++,
are going to use the Arduino to transmit the Serial portion of these state-
information to be displayed on the Serial Switch = 0 ments is classed as being an ‘object,’
Monitor. The Serial.begin() statement Switch = 0 while the .begin(), .print() or
tells the Arduino to get ready to exchange Switch = 0 .println() portions of the state-
messages with the Serial Monitor. The ar- : ments are officially referred to as
gument of 9600 is commonly called the bit Assuming you do see these 0s, play ‘methods’ (supported operations of
rate or the baud rate. This tells the Arduino around by pressing and releasing the the object). Methods may also be re-
we wish to use a data rate of 9600 bits per switch until your excitement is sated. ferred to as ‘functions.’
second (bps), which is the default used by However, if you continue to see 1s rather More information about serial func-
the Serial Monitor (we could set this to be than 0s, the first thing to check is that the tionality is available in the reference
much higher if we wished). south side of your black wire is connected section of the Arduino.cc website:
In the case of the loop() function, we to the 0V (blue) rail and not the 5V (red) https://bit.ly/2qOGWbo
start by declaring an integer variable named rail. If you are using a 2-pin switch, the
switchVal to which we assign the value second thing to check is that it’s in the Yet bolder???
returned when we call the built-in func- correct orientation (try rotating it anti- Wow! I have to say that I’m thrilled by
tion digitalRead() to access the current clockwise by 90°). your enthusiasm. In the case of this third
state of our switch. As we’ve previously undertaking, I want you to start by adding
discussed, we can think of the values we Feeling bold? a second pushbutton switch (with associ-
read on our digital inputs as LOW (0V) or If you’re feeling bold, what I’d like you to ated pull-up resistor) to your breadboard
HIGH (5V), but the Arduino will see them do is return to our Auto_Dec_Count_Up and connect the output from this switch
in terms of 0 and 1, respectively. program and save this as Switch_Test_02. to pin A1 on your Arduino.
The Serial.print() statement prints Your mission, should you decide to Next, I want you to take the current ver-
whatever argument it is presented with. accept it, is to use the minimum number sion of your Switch_Dec_Count_Up pro-
In this case, we are asking it to print the of modifications necessary to tweak gram and save it as Switch_Dec_Count_
string ‘Switch = ’. This will leave the this program so that, after bidding us Up_and_Down. Modify this new incar-
cursor on the same line on the screen, ‘HELLO,’ it loops around reading the nation of the program such that pressing
which means we can use multiple instan- state of the switch and displaying cor- the original switch causes the display to
tiations of this statement to build multi- responding 0 and 1 values on the 7-seg- increment, while pressing the new switch
element lines on the display. ment display. causes it to decrement. In this case, if the
Similarly, the Serial.println() display is currently at 0, then pressing
statement will also print whatever argu- Bolder still?? the decrement button should cause it to
ment it is presented with. In this case, A second task I would be delighted for wrap around back to 9.
we are asking it to print the value we you to perform would be to return to our All of this should keep you busy for a
read from our switch and loaded into our Auto_Dec_Count_Up program and save while. I’ll present my versions of these
switchVal variable. However, this state- this as Switch_Dec_Count_Up. programs in my next column. In the mean-
ment will also throw a new line charac- In this case, following the ‘HELLO’ mes- time, as always, I welcome your insight-
ter when it’s done, which will move the sage, we want to commence by presenting ful comments, perspicacious questions,
cursor to the next line on the display. a 0 on the display. Next, we want the pro- and sagacious suggestions.
Finally, we use the built-in delay() gram to loop around
function to pause for SAMPLE_PERIOD checking the state of
(100 milliseconds), and then do the whole the switch. When- Components from Part 1
thing again. ever the switch is LEDs (assorted colours) https://amzn.to/3E7VAQE
Upload this program into your Arduino pressed, we want to Resistors (assorted values) https://amzn.to/3O4RvBt
and then use the Tools > Serial Monitor increment (add 1 to) Solderless breadboard https://amzn.to/3O2L3e8
command to launch the Serial Monitor (or the value on the dis- Multicore jumper wires (male-male) https://amzn.to/3O4hnxk
click the icon that looks like a magnifying play. As usual, when Components from Part 2
glass with a dot in the center located in we reach 9, press- 7-segment display(s) https://amzn.to/3Afm8yu
the upper right-hand corner of the IDE). ing the button one
After a second or so, you should see more time will cause Components for Part 5
a never-ending series of the following the display to wrap Momentary pushbutton switches https://amzn.to/3Tk7Q87
lines of text start to appear in your Serial around back to 0.
Monitor window:
Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he
Switch = 1 surveys at CliveMaxfield.com – the go-to site for the latest and greatest
Switch = 1 in technological geekdom.
Switch = 1
: Comments or questions? Email Max at: [email protected]

54 Practical Electronics | May | 2023


Circuit Surgery
Regular clinic by Ian Bell

Op amps as comparators

A
n EEWeb forum post by user +5V +5V
Maddan417 describes problems
with a voltage comparator circuit R1
330Ω
using the LM741 op amp (see Fig.1),
which does not operate as hoped. The U1
VIn – LM741
circuit needs to switch at 1.2V for inputs
VOut
ranging from 1V to 3.5V, but switches at +
2.5V. Maddan417 is attempting to do this
using an LM741 op amp, L7805 voltage
R2
regulators, a voltage divider, and a tran- 1kΩ
sistor. The 741 is supplied from a single
5V rail from the regulator, with the power
source being an automotive alternator.
Maddan417’s problems also included the
Fig.1. Maddan417’s circuit.
op amp output not being 0V when the cir-
cuit has switched to a ‘low’ output state. Op Amp Applications Handbook, 2005 –
Another contributor pointed out that see: https://bit.ly/pe-may23-op1
the incorrect switching voltage is at least Robert Widlar, the designer of the
partly due to swapped or incorrectly uA702 and uA709, moved to National
calculated values for the resistors used Semiconductor and produced the LM101,
to set the switching point. The values which, like the LM741 is still in production.
shown set the comparator threshold to Dave Fullagar improved on the LM101 to
5 × 1kΩ/(1kΩ + 330Ω) = 3.76V, swapped produce the uA741, which quickly became
they give 5 × 330Ω/(1kΩ + 330Ω) = 1.24V. very popular. As part of IEEE Spectrum’s
The design used two regulators for the ‘Chip Hall of Fame’ series of articles –
supply and potential divider, which is https://bit.ly/pe-may23-op2 – you can
not necessary. see a letter from Fairchild’s marketing
The more fundamental problems are department in 1968 which concludes,
related to the use of the 741 – it is an op ‘We’ve got a winner’. The various
amp, not a comparator, its performance versions of the 741 have sold in hundreds
is poor, and it is used outside its of millions.
recommended operating conditions in The 741 deserves its place as an iconic
Maddan417’s circuit. In this article we electronic component, but its popularity
will discuss use of the 741, and op amps and ubiquitousness in textbooks and
in general, as comparators. online tutorials can lead to problems when
inexperienced designers assume that it
The 741 will be suitable in circuits where it isn’t. A
The 741 is a very old op amp – the uA741 common example of this is use at relatively
was designed by Dave Fullagar of Fairchild low supply voltage circuits – the 741
in 1968. At the time, there were very few datasheet (Texas Instruments, Rev D, 2015)
other op amps on the market. The 741 specifies a recommended minimum supply
was preceded by the uA702 in 1963 and voltage of ±10V. Maddan417’s circuit
uA709 in 1965, also both from Fairchild. runs on 5V, so the 741 is well outside its
The uA702 was the first monolithic (single recommended operating conditions in
chip) IC op amp, previously op amps this application.
were modular solid-state devices using Of course, the 741 will be OK in plenty
discrete transistors, or hybrid circuits of circuits where high performance and
using chip transistors, or combination relatively low supply voltages are not
of ICs and discrete components. Before required, and it is still likely to be found in
Op amp evolution: (top) GAP/R K2-W: a that there were valve / vacuum tube op commercial designs, many of which may
vacuum-tube op amp from 1953; (below) amps. If you would like a long, detailed have been around for a long time. On the
uA741 IC op amp, first produced in 1967. read on op amp history try Chapter H: other hand, the performance of the 741 is
(Images: Wikipedia) Op Amp History by Walt Jung from the poor compared to more modern devices,

Practical Electronics | May | 2023 55


The maximum output voltage Input voltages
+VSupply +10V range (or output voltage swing) Op amps have two inputs, so there are
of an op amp is often specified input voltage specifications relating to
Differential relative to the supplies (under individual, differential and common-mode
input voltage –
VOut
specific conditions). For signals. Individual inputs have an absolute
VIn + example, ‘within 1V of the maximum voltage specification. For the
Output voltage
Common-mode range: –9 to +9V supplies’ would mean, on a 741 this is either the supply voltage or
input voltage
range: –7 to +7V –10V
±10V supply, the output range ±15V, whichever is lower. The differential
–VSupply would be ±9V (see Fig.2), on voltage is the voltage between the inputs,
a single 20V supply it would again there is an absolute maximum rating
be +1 to +19V (see Fig.3). The for this, which is ±30V for the 741.
Fig.2. Example op amp voltage ranges for split
LM741’s specified output range In most op amp applications, the op amp
supply. For this circuit, for normal linear operation, the
is ±12V to ±14V on ±15V supply is used as an amplifier with feedback. This
common-mode input voltage is equal to Vin.
(ie, within 1 or 2V of the supply) keeps the inputs at more or less the same
so there is relatively little to justify using but is worse for loads below 10kΩ. voltage, so differential input limitations
it in a new design, and many designers An op amp does not experience any are not an issue for normal operation.
today would never consider it. However, fundamental difference operating on a However, if used as a comparator, or if a
its relatively high maximum supply voltage split supply or a single supply of equal linear amplifier is pushed into saturation
(44V/±22V), combined with low cost and magnitude (eg, ±10V split or single 20V). by a large input signal, then larger
well-understood behaviour are sometimes An AC signal can have an offset applied differential inputs can occur.
cited as a reasons for using it. There are, to it so that it varies around the mid-point The common-mode input voltage is the
however, plenty of other op amps which of a single supply. Thus, to the op amp, average of the voltage on the two inputs.
operate at this, and higher voltages, so this the conditions are the same for a ±5V For non-inverting amplifiers and similar
is not in itself a unique property. output on a ±10V split supply, or a 5V to configurations (see Fig.3) the common-
15V output centred on 10V with a single mode input is equal to the input voltage
Voltage ranges 20V supply. However, there is often a (remember the two inputs are at about
There are a few voltage ranges to consider requirement to handle signals specifically the same voltage). Common-mode input
when designing op amp circuits, and these at, or close to 0V, which means that a range may also be specified relative to
op amp specifications must be compatible single-supply circuit requires the op amp the supplies – for example, within 3V of
with the operating requirements of the to output signals at or close to the supply, the supplies, as shown in Fig.3. As with
circuit. We have already mentioned that whereas a split supply does not. This is a output ranges, some op amps have rail-to-
the supply voltage range is a problem in problem for Maddan417’s single-supply rail common-mode input capability. The
Maddan417’s circuit. The other voltage circuit where there is a requirement to common-mode input range figure is not
range parameters are the output voltage output 0V when the comparator output is always quoted for the 741, but the Harris
and input voltage ranges. low – the 741 is not able to achieve this. CA741 datasheet (1993) states ±12V for
Op amps are often operated on split Over the last two or three decades supply ±15V supplies, indicating within 3V of
supplies – usually equal positive and voltages have tended to reduce due to the supplies.
negative supplies (see Fig.2). This enables the effects of advances in semiconductor
the op amp circuit to easily handle AC technology. For example, op amps are Op amps as comparators
signals (that have both positive and often required in circuits together with Op amps can be used as comparators,
negative voltage excursions). A signal digital devices, such as microcontrollers, but there are dedicated comparator
varying around 0V is conveniently in the which require low supply voltages. It is chips which perform this function much
middle of the supply range, which tends convenient to operate op amps on the better. In general, a dedicated comparator
be where it is easiest to design op amp same voltage, where possible, so there is should always be used, but in some
circuits to work effectively. As signals demand for lower voltage op amps. If an cases, for example where the comparator
get closer to (or even beyond) the supply op amp can only handle signals to within requirements are not demanding and/or
voltage range, op amp circuit design 1V of the supply this is much more likely a spare op amp is available on a multi-
becomes more challenging. For example, to be a problem with a 3.3V supply than op-amp package then they can be used.
transistors may turn off, or potentially a 20V one. This, and the convenience of The following discussion will highlight
damaging polarity reversals may occur, single-supply operation with outputs able the differences between op amps
preventing correct operation. Many op to go 0V, have led to the development of and comparators.
amps, particularly earlier devices such op amps with ‘rail-to-rail’ outputs. A comparator’s output will typically
as the 741, are not designed to handle Typically, for BJT op amps, rail-to-rail switch between the positive and negative
signals close to the supply. outputs can go to within a collector- supply voltages (or ground and supply in
emitter saturation voltage single-supply circuits), going rail-to-rail, or
(VCEsat) of the supply. VCEsat is sufficiently close to be easily interpreted
+VSupply +20V dependent on the transistor’s as a logic 0 or 1, or to switch a transistor
collector current and hence or other load effectively. For similar
Differential the op amp’s output current. behaviour from an op amp, a rail-to-rail
input voltage –
VOut For moderate currents (in the output device must be used, otherwise
VIn + mA range) VCEsat is typically the problems observed with Maddan417’s
Output voltage
Common-mode range: +1V to +19V 100 to 300mV. Some op amp circuit will occur. Comparators have no
input voltage
range: +3V to +17V designs take things further need to output intermediate voltages;
and have internal circuits to however, the output may switch (or it may
generate voltages above and be possible to arrange for it to switch) to a
Fig.3. Example op amp voltage ranges for single below the applied supply different voltage from the main comparator
supply. For this circuit, for normal linear operation, the voltage to facilitate full rail- supply to facilitate interfacing to logic
common-mode input voltage is equal to Vin. to-rail signal ranges. circuits, or for switching loads on different

56 Practical Electronics | May | 2023


Input

Overdrive
VRef

tpd

Output
VOH 90%
50%

VOL 10%
tr Time

Fig.4. Comparator propagation delay.


Fig.5. Configuring opamp2 to use the lm741 subcircuit.
supplies. This is more difficult to achieve
with op amps. switching behaviour of comparators means are just required to switch their outputs
Often, comparator output circuits are that they have characteristics related to quickly the slew rate itself is not usually
designed to be easy to interface with switching which are not relevant to the very important as a specification, it is the
specific types of logic. Comparators are standard analogue amplifier usage of op propagation delay and rise time which
therefore available with a variety of output amps. The switching characteristics are are quoted. The compensation applied to
configurations including push-pull, open illustrated in Fig.4. op amps tends to reduce their slew rate,
drain, open collector and LVDS (low- making them relatively slow when used
voltage differential signalling). Open drain Speed of switching as comparators.
and open collector require an external When the comparator input voltage crosses Op amps are designed for applications
(pull-up) resistor connected from the the reference voltage the comparator where the output voltage does not go hard
output to the positive (digital) supply. output will switch. This will not happen to the supply rails – this would normally
Op amps are designed to be used with instantaneously – the time taken for imply clipping of the waveform and hence
negative feedback – a ‘closed-loop’ system. the comparator output to reach 50% distortion. When op amp outputs are driven
All amplifiers have some delay from input of the resulting voltage change is the hard into saturation they tend to be slow
to output, which results in increasing propagation delay (tpd). The time taken for to recover. Like compensation, this makes
phase shift as signal frequency increases. the comparator output voltage to rise from op amps poor comparators where fast
At some point the phase shift reaches 10% to 90% of its range is the rise time switching is required. The internal circuitry
180°, at which point the negative feedback (tr). The amount of voltage applied to the of comparators is different, allowing them
network is actually delivering positive comparator’s input beyond the switching to recover very quickly. A further subtlety
feedback. If the gain of the amplifier and threshold (reference voltage) is known as to this is that op amp saturation recovery
feedback network together is greater than the overdrive. Propagation delay and rise time is likely to vary between individual
one at this frequency then oscillation time are usually sensitive to overdrive, devices, making the propagation delay
will occur. The gain of most op amps with increasing overdrive resulting in somewhat unpredictable.
is deliberately rolled off as frequency faster switching times. Comparator speed is
increases to prevent this instability – this also usually dependent on supply voltage. Simulating the 741
is called compensation. Comparators are The maximum rate of change of output We can simulate a 741 comparator
either used in ‘open-loop’ mode, or with voltage an op amp or comparator can circuit and compare it with a dedicated
positive feedback, so compensation is not deliver is the slew rate. Slew rate is comparator using LTspice. However,
required, leading to significant differences important for op amps because it indicates this takes some effort as there is no 741
between the two types of devices. how well the output voltage will track fast- model provided as part of the LTspice
Op amps are high-gain, linear, differential changing analogue waveforms; failure to do download. If you search online for ‘741
amplifiers; so, as already noted, in normal so causes distortion. Slew rate also directly SPICE model’ you will find a link on
operation the voltage difference between determines the maximum frequency at the Texas Instruments site for a ‘LM741
an op amp’s inputs is very small (typically which an op amp can produce a pure PSPICE Model’ (note Pspice, not LTspice):
microvolts to millivolts). Comparators sinewave at full output swing (the full https://bit.ly/pe-may23-741
often have much larger input differences. power bandwidth), however, sinewave The download provides an lm741.lib
Not all op amps can tolerate large input output is of no relevance to comparators. file, which is a SPICE subcircuit definition.
voltage differences and they perform very For any circuit used as a comparator, This code can be used, together with an
poorly under such conditions. Op amp either the slew rate or the bandwidth may appropriate associated symbol file to allow
input impedance may drop significantly for be the dominant factor in determining the the model to be included in an LTspice
large input differences due to conduction propagation delay. Because comparators schematic. Do be aware that although
of protection diodes – this could upset
circuits driving an op amp used as a Fig.6. Entering
comparator. Comparators are commonly the .lib directive.
used to compare voltages which are not
close to half the supply range. For an
op amp, this is a large common-mode
input voltage. Again, not all op amps
perform well under such conditions. If the
common-mode input range is exceeded
correct operation may not occur.
Gain and offset are characteristics shared
by op amps and comparators, however, the

Practical Electronics | May | 2023 57


Fig.9. New folder in the component selector.
MyComponents). Copy (not move!) the opamp2.asy symbol
file from the Opamps subfolder of the existing sym folder
to your new subfolder and rename the new file lm741.asy.
Also create another new folder for the model file – a
subfolder of …\Documents\LTspiceXVII is appropriate,
with a name like MySub (the folder with the original LTspice
model files is called Sub). Put the downloaded lm741.lib
Fig.7. Symbol Attribute Editor for a component in the library. file in your new folder.
Go to you your symbol folder and double-click
the lm741.asy file to open it in the LTspice symbol
editor. Alternatively, open LTspice and do File >
Open. In the file open dialog change the file type
to Symbols (*.asy) and open the lm741.asy file.
Then, in LTspice open the symbol attribute editor
from the menu using:

Edit > Attributes > Edit Attributes

Referring to Fig.7, in the Symbol Attribute Editor


change the Value attribute to LM741 and insert
the full path to the lm741.lib file as the Modelfile
attribute value. You can also add a description if you
want (see Fig.8). Save the symbol and close LTspice.
Open LTspice and create a new schematic. When
you add a component, the new folder in the symbol
library should be listed (See Fig.9). In this folder
Fig.8. Configuring the LM741 symbol attributes. you will find the LM741 (see Fig.10), which can
be added to the schematic in the usual way. Note
SPICE is a de facto standard, and hence models are often compatible, that the Description attribute is displayed in the component
sometimes it is necessary to edit models created for a different SPICE selector along with the symbol.
tool. Fortunately, in this case, the model works with LTspice. The
741 model can be used as a one-off, or added to the LTspice library LT1018 vs LM741 simulation
so that it can be used like other components. Fig.11 shows an LTspice schematic for comparing the 741
For one-off use, place the downloaded lm741.lib file in the folder with a comparator. The comparator is an LT1018, which is
to be used for the circuit simulation files. Create a new schematic in
the same folder, using the opamp2 component (from the Opamps part
of the component selector) where you need a 741. Right click on the
symbol and change the Value attribute to lm741 (see Fig.5). Then click
on the SPICE Directive (.op) button and enter the .lib command
with the full path to the lm741.lib file (see Fig.6), for example:

.lib D:\LTSpice\Comparator741\lm741.lib

(Do remember to use the path to the file on your computer.) Click
to place the directive text on the schematic.

Adding components to the LTspice library


It is possible to create a new folder in the LTSpice library that will
appear on the list of components when editing schematics. Placing
symbol files in this folder and associating these with .lib SPICE
model files downloaded from manufacturers will make those
components available for use in any simulation. The following
instructions describe what to do for the 741, but other models can
be added using this procedure.
Find the location of the LTspice symbols library (sym folder) on your
computer (eg, C:\Users\username\Documents\LTspiceXVII\lib\
sym) and create a new subfolder here with a name of your choice (eg, Fig.10. LM741 in the component selector.

58 Practical Electronics | May | 2023


Top to bottom:

Fig.11. LTspice simulator schematic for


comparison of an LT1018 comparator
with an LM741 op amp when it is used
as a comparator.

Fig.12. Results from simulation circuit


shown in Fig.11.

Fig.13. Results from simulation circuit shown


in Fig.11 (zoom in on output switching). Input
threshold is crossed at 6ms.

available in the LTspice library. The output


stage of the LT1018 includes a pull-up
current source, eliminating the need for
an external resistor, which is commonly
needed with similar comparators like the
LM393. The simulation uses both devices
in a basic comparator configuration on a
single supply, which is 20V to correspond
with the LM741 recommended minimum.
The comparator reference is at the centre of
the supply range. This provides conditions
which should not take the 741 out of its
recommended operating conditions. This
doesn’t match Maddan417’s circuit, but we
can’t be confident that the 741 model works
well outside the recommended conditions.
The results of the simulation are shown
in Fig.12, and Fig.13 shows a zoom in on
the output switching. These shows that the
output of the LM741 only gets to within
about ±1V of the supplies – as described
by Maddan417 and discussed above. The
LT1018’s output goes to values very close
to the supplies. This again highlights the
fact that interfacing an op amp output
to logic or load switching is often more
difficult than with a comparator device.
The simulation (Fig.13) also shows
the LM741 op amp responds much more
slowly than the LT1018 comparator, as
discussed above. Finally, Fig.12 show
the current into the non-inverting inputs
of the two devices. The current into the
LT1018 is orders of magnitude lower
than for the 741. In general, old op amp
designs have much higher input currents
than modern devices. This may be very
significant in some applications. Op
amps can be used as comparators, but not
without difficulties, and only in relatively
slow-speed applications – the op amp’s
datasheet should be consulted to make
sure that it is suitable for the application to
avoid problems such as those experienced
by Maddan417.

Simulation files
Most, but not every month, LTSpice
is used to support descriptions and
analysis in Circuit Surgery.
The examples and files are available
for download from the PE website.

Practical Electronics | May | 2023 59


AUDIO AUDIO OUT

L R

OUT By Jake Rothman

Op amp adaptor boards: surface mount and


through-hole versions

O
ver the last few issues, such as HobbyTronics Ltd – Fig.1, https://
Pin 1 for 14-pin
we’ve described some general- bit.ly/pe-may23-dil – and I will produce socket under board
purpose audio op amp boards one of these too.

IC1
Pin 1
designed for single and dual op amps. IC1
While I was designing these, it also Replacements and upgrading
seemed like a good idea to make some Audio engineers don’t like to waste
Pin 1
general-purpose adaptor boards to allow money, and like grumpy farmers, they IC2
different package op amps to be adapted expect all equipment to last at least 50

IC2
to any socket. For example, for the years. Unfortunately, some op amp de-
dual op amp board covered last month signs become obsolete and can be hard Pin 9 for 14-pin
I wanted to compare a pair of single to find, but on the up side, new versions socket under board
op amps with a dual device without may well have much better noise and dis-
changing anything else. To achieve this, tortion figures. There’s no point scouring Fig.2. Overlay for the two-duals-to-quad
I designed a special adaptor board to eBay for replacement NOS (new-old- op amp adaptor board.
allow two 8-pin single op amps to be stock) quad-pack 741-style devices – it’s
plugged into a socket with the pinout much better to replace expired op amps
for one 8-pin dual op amp. with some NE5532s.
I liked the idea and decided to take this
concept further, producing a board that J-FET replacements
enables two 8-pin dual op amps to be A quick word or two of advice here. If
plugged into a 14-pin quad op amp socket. you’re working on old equipment that
Once I had sorted that out for DIL (du- uses J-FET input op amps, such as the
al-in-line) ICs I realised that it would be 1980s Texas Instruments TL0xx Bi-Fet
just as useful to have SMD (surface-mount series, then it’s essential to use J-FET
device) versions of these adaptors. This replacements because bipolar input
would not only make the assemblies more op amps have much higher input bias
compact, but also allow the use of some currents. If a bipolar NE5532 is used
new op amps that are only available in to replace a TL072 in a mixer channel Fig.3. The two-duals-to-quad adaptor
SMD packaging. One important point to or preamplifier then then the result is board assembled.
note here: there are quite a few varieties likely to suffer from switch clicks and
of SMD packaging, I have opted to use pot scratching. While the bias currents
the most-common 8-pin SOIC. could be blocked by adding extra cou-
The result is four adaptor boards. (Note pling capacitors and DC path resistors,
that 8-pin-op-amp-SMD-to-DIL adaptor it is a lot of work, probably involving
boards are also available from companies track cutting. Good audio J-FET op amps
tend to be very expensive, such as the
Burr Brown designs. There is only one
relatively low-cost replacement for the
TL072, the SMT-only Nisshinbo NJM8087,
distributed by Profusion. Mouser also
stock them, but they are pricey.
Texas Instruments have taken over a lot
of the National Semiconductor, Analogue
Devices and Burr Brown op amps. The TI Fig.4. The two-duals-to-quad adaptor
OPA134 SoundPlus FET series are one of installed in an old Audio Developments
the best, but they’re expensive. mixer channel strip.
Discontinued early Fairchild J-FET
Fig.1. The original inspiration for these op amps (eg, the µA771 and 772) occa- and Soundcraft. Likewise, the LF351,
adaptor boards: an SMD-to-DIL op amp sionally pop up in late-1970s equipment LF353, LF356, LF441 and TL082 are
adaptor board from HobbyTronics. such as mixing desks from Electrosonic similar second generation Bi-Fets. All

60 Practical Electronics | May | 2023


Pin 1 for 14-pin
socket under board
Pin 1
IC1

Pin 1
IC2

Pin 9 for 14-pin


socket under board

Fig.5. SMD dual-to-quad DIL adaptor Fig.6. Component overlay of the SMD Fig.7. Surface-mount version of the quad
close-up. These are dual NE5532s – note version of the two-duals-to-quad DIL adaptor shown in a mixer. SMD versions
that the pin 1 end is identified with a bar. socket adaptor. are smaller, so they are often easier to fit.

these resemble the TL072 and can be When all the op amps were replaced with Fig.10, installed in the dual RIAA board
satisfactorily replaced with the NJM8087 5532s the hiss dropped 12dB and the described last month. Note the use of
(maximum supply voltage ±16V). distortion dropped to a tenth at 0.002%. solid wire (25 SWG) to raise the adaptor
However, there were some op amp up- board above neighbouring capacitors.
Practical adaptor – quad devices grade side effects, mainly high-frequency The SMD version is shown in Fig.11
If you want to replace an old quad ‘741- instability. This was fixed by putting and Fig.12.
style’ device, such as the LM324, then a 47pF capacitors on the feedback resistors
two-times-dual-to-quad adaptor board, and several 100nF capacitors across the Soldering the adaptors
which simply plugs into the original 14 power rails from positive to negative. Standard square-pin 0.1-inch headers
pin DIL socket, is the solution. Its overlay Also, the power consumption for each (eg, BKL from Rapid, part 50-8086) act
is shown in Fig.2. An assembled unit is channel tripled from 12 to 36mA using as the ‘plugs’ into normal leaf spring IC
shown in Fig.3, and it is shown installed the current-hungry 5532s. sockets. If turned-pin sockets are used
in an Audio Developments broadcast on the ‘motherboard’ then you have to
mixer channel in Fig.4. Quad SMD use round-pin headers on the adaptor
It produced a marked improvement I’ve also created an SMD version of this
in the signal-to-noise ratio of the mixer. adaptor, which is smaller and easier to
install, as shown in Fig.5. The overlay is
shown in Fig.6 and its mixer installation
in Fig.7. Using these boards, I was able to
compare the OnSemi SMD versions with
their Texas DIL counterparts. Strangely
the distortion of the SMD parts was 30%
higher. I suspect the die may have been
shrunk, a common cost-cutting procedure.
If you are interested in comparing op
amp distortion figures, Swiss audio en-
gineer Samuel Groner plotted the results
for dozens of devices in his epic analysis
at: https://bit.ly/pe-may23-ao
Fig.10. Two-singles-to-dual adaptor
Two-singles-to-dual adaptor board installed in an RIAA preamplifier.
In Fig.8 you can see the little board for Note the use of tinned copper wire to plug
Fig.8. Two-singles-to-dual op amp
adapting a dual op amp to two single into turned-pin sockets.
adaptor board.
op amp ICs. This is a handy option for
many applications – for example, if
you wanted to replace a dual NE5532 Pin 1 for 8-pin
socket under board
Pin 1 for 8-pin with two NE5534As, which would pro-
Pin 1
socket under board vide lower noise, lower distortion and IC1
IC1

Pin 1 double the dissipation it can handle. Do


IC1
remember that when using the NE5534A
with gains below five then it’s necessary Pin 1
Pin 1 IC2
IC2 to add compensation capacitors across
pins 5 and 8.
IC2

This board is also useful for exploiting Pin 5 for 8-pin


socket under board
Pin 5 for 8-pin the full ±24V rail voltage rating of the
socket under board
single-pack OPA604 because the dual
version, the OPA2604, has recently been
downrated by Texas to ±20V. Fig.11. Component overlay of the SMD
Fig.9. Overlay for the two-singles-to-dual The overlay for this design is shown version of the two-singles-to-dual
adaptor board. in Fig.9, and you can see it in action in adaptor board.

Practical Electronics | May | 2023 61


Fig.12. Assembled SMD version of the copper wire mentioned above. It fits
two-singles-to-dual adaptor board. well, but can bend easily.
Compensation capacitors for NE5534 op There is a logical order for soldering the
amps that have been added. Sometimes adaptors, such as soldering the headers
a power supply decoupling capacitor before soldering the IC sockets on top
should be soldered on as well. (see Fig.13). In Fig.2, you can see pins
1 to 7 could end up under the op amps
and be very difficult to solder with bits
board (eg, TruConnect from Rapid, part of plastic blocking the soldering iron tip.
22-1704). These are also available from
Tayda (part number A-4662). I had run Sourcing the boards
out of round-pin stock, which is partly All four adaptor boards are available in
why I had to use the 25 SWG tinned packs of five from the PE PCB Service.

Fig.13. The best way to solder pins to an adaptor board is to first put them in a socket on the ‘motherboard’. This holds the pins in alignment
and provides a stable platform for soldering the adaptor and op amp(s). Note the 8087, which replaced a TL072 in a mixer channel.

Desoldering component puller


M
any electronic engineers
make their own little jigs and
tools to deal with the odd jobs
that come their way. As somebody who
deals with studio equipment, I have a
vast junk box full of control knobs of
all different sizes and shaft diameters.
A lot of these are collet knobs, which
have a clamping system similar to a
drill chuck. These are very useful for
holding things such as 3mm drills for
stripboard cutting and the de-soldering
Fig.3. Close-up of the hook.
aid described here.
When the curtain twitcher next door
died, her hideous net curtains were
thrown into a skip. I found a use for
the plastic-coated coiled-spring steel Fig.1. Always check skips! This net
wire used to hold them up (see Fig.1). curtain wire is useful for all sorts of jobs –
It’s 4mm diameter, so fits perfectly it’s tough and springy.
into a standard 4mm Sifam S15 collet
knob, as shown in Fig.2. The wire is
coated with a plastic sheath which
should be peeled off to get a good fit
in the knob.
Cut about 45mm of wire, then fashion
a hook on the end for inserting under a
component lead-out (Fig.3). Don’t use
your precision Lindstrom side cutters
for this job; a tough old electrician’s
pair is needed. The tool is made short
so it can be pulled against the board
using one hand with the soldered joint
being heated underneath at the same Fig.4. It’s easy to pull the resistor out
time, as illustrated in Fig.4. The beauty of the board with one hand, leaving the
of this technique is that only two hands other hand free for the soldering iron. (I’m
are needed, and it stops you getting Fig.2. A 4mm collet knob is attached to happy to supply knobs, curtain wire and
burnt fingers. the stripped net curtain wire. even completed tools.)

62 Practical Electronics | May | 2023


Electronic Building Blocks
By Julian Edgar

Quick and easy construction Great results on a low budget

Controlling RC servos with the Pololu Micro Maestro


Quick and simple programming for automatic servo movements, or manual
control with a pot or switch

I
n previous articles, we’ve looked Pololu Micro Maestro the board can be powered by the USB
at selecting actuators (PE, October/ The Pololu Micro Maestro is a tiny (just connection and the servos powered by
November 2022); controlling stepper 28 x 22mm), light weight (3g) board that a power supply (or batteries, of course).
motors using an eBay pushbutton-pro- packs a lot of capability into a small The servo power supply connection
grammable standalone module (PE, footprint. All connections are by header (power and ground) makes available
December 2021); and controlling linear pins – there are no screw terminals. It power to all the servo channels, so only
actuators using the Pololu Jrk 21v3 costs around £40 and is available from one pair of connections is needed. See
PC-programmable module (PE, June/ a wide range of sources. Fig.1 for these connections.
July 2022). In both the linear actuator and Part of a family of different Maestro With 4.8-6V connected to the module’s
stepper motor articles, set-up and wiring servo motors controllers, the Maestro servo power feed, the next step is to
were straightforward, putting control of has six channels (other Maestros connect a servo itself. The three-pin
these actuators into the hands of people have up to 24 channels). They’re female plug provided on RC servos
who may not want to learn to code. called ‘channels’ rather than ‘outputs’ plugs straight into the board header
This month, we look at the Pololu because each channel on the Micro pins at any of the six channel positions
Micro Maestro board, a PC programmable can be used as an RC servo drive or (labelled 0-5). However – and this is
device than can simultaneously control as an analogue input channel. The important – the servo must be connected
up to six RC servos. Again, we’re going channel function is selected in the PC with the correct polarity. Servo wiring
to take the simplest approach: using a configuration software – more on the is typically:
pot (a manual control knob) or a switch software in a moment.
to control servo position. However, in Each servo control channel can be set Ground Power Signal
addition, we’re also going to look at how for maximum speed and acceleration, black red white
a sequence of instructions can be used to and if an error is detected, channels can brown red orange
automatically cycle the servos through a be configured to go to a specified servo black red blue
series of movements. position or turn off. The servo(s) can be
controlled from a PC via a USB cable,
by a serial connection or by an internal
program (called a script) that also
allows user control via external pots or
switches. It’s the ‘script’ approach that
we will be covering here.

Initial set-up and testing


To get the Micro Maestro up and running,
you will need a USB mini-B cable (not
included), an RC servo and a power
supply suitable for the operating voltage
of the servo (4.8 – 6V). The power supply
The Pololu Micro Maestro board is a tiny RC servos are versatile controllable
– just 28 x 22mm and weighing 3g – but connection for the servos is separate to actuators that are ideal for operating arms
it can control up to 6 RC servos. The the power supply for the Micro Maestro, and legs in hobby robots, moving items
included software gives full control over but since the Maestro can work on 5-16V, in animated model layouts, opening and
servo position, and maximum servo speed the servo power supply can also supply closing vents and many other uses. They’re
and acceleration. power to the board. Alternatively, low in cost and widely available.

Practical Electronics | May | 2023 63


The table is read from left to right – that is, one common plug
+5V regulated Servo power is black-red-white, for example. See Fig.1 or the underside
+V –V +V –V of the Maestro for these servo connections.
The next step is to load the Windows drivers and software
on to the PC. This is best done by clicking on the download
Channels 0-5 link in the excellent Micro Maestro PDF user’s guide. (The
guide is also downloadable from Pololu and its dealers.)
There is a large section in the manual on installing the
software, but with Windows 10 Pro, I just followed the on-
USB
screen prompts and had no difficulties.
connector Now it’s time to control the servo. With the Maestro
connected to the PC, servo power switched on and the
servo connected, open the software. Software connection
with the module is established in the Connected to pull-
down. Once the PC is talking to the Maestro, you can then
tick the box to Enable the channel to which you wired the
servo. Then, without doing anything further, when you move
+V –V Signal +V –V the relevant on-screen slider back and forth, the servo will
rotate accordingly – see: Fig.2.
Board power Channels
5-16V Note that quick movements of the slider will give equally
quick movements of the servo. To produce smoother
Fig.1. These are the connections that you’ll need to make to do all movements, change the value in the Speed box. For example,
that is covered in this article. The two-pin header for the regulated setting this to ‘5’ meant it took the test servo about 8 seconds
5V supply and associated ground connection will need to be to go from one extreme of movement to the other. In addition
provided and soldered into place – it’s not included. to maximum speed, you can also set maximum acceleration.

Fig.2. The Status tab allows you to easily control the movement of the servo by dragging the slider back and forth. Five different servos
can be controlled but here only one output channel has been activated.

Fig.3. In Channel Settings the speed, acceleration, minimum and maximum positions of each servo can be set. Each channel can also
be named (not done here).

64 Practical Electronics | May | 2023


Fig.4. In the Sequence tab, the use of frames (think of them as movement steps) allows a sequence of movements to be developed
and then uploaded to the module. It’s a quick and easy process, especially for repetitive movements (like making a robot walk).

By using a combination of these controls, you can have the


servo smoothly accelerate to a set maximum speed, and
10kΩ then just as smoothly decelerate to a stop at the setpoint.
These effects can be judged not only from the action of the
+5V 0V observed servo, but also from watching the on-screen slider,
where the setpoint is shown by a marker and the actual
servo position by a dot.
Now open the Channel Settings tab. For each connected
servo, the minimum and maximum rotational positions
can be set. In this tab you can also set the servo behaviour
on start-up or when an error is detected – off, ignore or go
to, with the latter allowing the position to be specified.
In this tab you can also see the Speed and Acceleration
settings you’ve already configured, and you can name
each channel as you wish. Note that any changes need to
be uploaded to the Maestro by pressing Apply Settings –
further details in Fig.3
You might be wondering what units are used for the servo
position. These are in microseconds (µs) pulse width –
Fig.5. Using the regulated 5V and ground connections, a pot can something that sounds odd until you realise that it is the
be energised and its variable voltage output connected to a channel pulse width of the signal that controls servo position. (See
input. This allows manual control over the servo position. the breakout box for how an RC servo works.)

Fig.6. Here, Channel 5 has been altered in function to become an input. Rotation of the added pot moves the Input slider, so that it’s
easy to checking that the pot input is working.

Practical Electronics | May | 2023 65


Fig.7. This very simple
program allows the
external pot to control
the movement of the
servo. A switch can
also be used with
this program to give
full servo movement
(for example, to open/
shut a vent).

Now that we have the PC controlling the servo, let’s However, you might notice that some movements don’t
program some sequences of movements. have enough time to be completed before the next one
starts. To fix this, highlight a frame and then click on Frame
Automatic sequential movements using frames properties. The time available for each frame can then
The Pololu software can be used to program a sequence of be changed, with this time expressed in milliseconds, as
movements, called ‘frames’. The software can then be used shown in Fig.4.
to test and (if necessary) edit that sequence, before uploading Pressing Copy sequence to script and then, in the Script
the collection of frames (called a script) to the Maestro. If tab, Apply Settings lets you both see the code you’ve just
the script is configured to operate as a loop after switch-on, created and upload it to the Maestro, respectively. This
the Maestro will then act as a standalone controller (no PC sequence of servo movements is now programmed into the
connection needed), the sequence of servo events repeating module and can run continuously once power is applied,
until power is cut. even without a PC connection. (Note: the speed and
To achieve this programmed movement, go to the Sequence acceleration of all the movements in the sequence can be
tab. The Frame name box will be empty at this stage, but adjusted in Channel Settings.)
you will be able to see that there are various editing tools For sequences of movement, especially those that are
and other controls available for manipulating the frames. To repetitive like making a robot walk, this approach is fast
create the frames, go back to the Status tab – the one with and easy. But what if you don’t want a pre-programmed
the sliders. Set the position of the servo(s) for the first of the movement sequence? Then you can use an external pot or
sequences of movement, then press Save Frame 0. Change switch to control the servo rotation.
the servo position and then press the Save Frame button
again. Continue with this process until you have all your External manual control
movements saved in a sequence of frames. Now return to the Let’s now add a pot to give manual control over the servo
Sequence tab and you’ll find the new frames listed there in position. First, a 2-pin header needs to be soldered into the
order. Press Apply Settings and then when you press Play GND and 5V out PCB holes. These then provide the two end
Sequence, the servo will make appropriate movements. If connections to a 10kΩ pot, while the wiper connects to the input
you tick Play in loop, the sequence will run continuously. of one of the free channels (we will use Channel 5) – see Fig.5.

RC servos Servos use three connections – Centre


position
power, ground and signal. The control
VCC
RC (radio control) servos were signal comprises a pulse train with 1.5ms
pulse
developed for use in, not surprisingly, a varying pulse width ‘on’ time. It width
0V
radio-controlled models. However, their is not a PWM system with varying
20ms period
versatility, low price and wide avail- duty cycle, because the frequency +90°

ability means that they’re now used of the pulses can vary over a wide VCC
2ms
in a broad range of hobby activities. range without affecting the servo’s pulse
width
Mechanically, a servo comprises behaviour. (Standard frequency is 0V
a small DC motor connected to a about 50Hz – a 20ms period.) 20ms period
–90°
geartrain, with the output shaft The pulse width determines VCC
splined to take various levers the servo’s position, with 1.5ms 1ms
pulse
and disks to which other linkages corresponding to the servo’s neutral 0V
width
can be connected. A servo is a point. That is, shorter pulse widths 20ms period
‘smart’ device – it contains control than 1.5ms causes the servo to rotate
electronics. An internal pot is used one way, and pulse widths longer
Servo control signals use pulse width to control
as a position sensor, and the motor than 1.5ms cause the servo to rotate
servo position. 1.5ms is the neutral position;
rotates until the shaft reaches the the other way. The normal pulse shorter pulse widths rotate the servo in one
required angular position. This width range is 1.0ms to 2.0ms, which direction and longer ones rotate it in the other
position is then held – if the shaft corresponds to an output shaft rotation direction. The full range is typically 1-2ms. The
is mechanically rotated from its set of up to 180° degrees (maximum – but frequency of the pulse train can vary but is
position, it actively resists. in practice, often less than this). typically around 50Hz (a 20ms period).

66 Practical Electronics | May | 2023


Go to the Channel Settings tab and change the function 1 – 100kΩ
of Channel 5 from Servo to Input. Now back on the Status
tab, when you turn the pot, you should see the slider for
Channel 5 moving to show the changing input signal (Fig.6).
Switch
To make the system use the pot to control the position of +5V 0V

the servo, some scripting code is needed. However, this is


just a few lines as shown below and in Fig.7:

begin
5 get_position
4 times 4000 plus
0 servo
repeat

Type this directly into the Script tab, tick Run script on
startup, run the script and then press Apply Settings and
the servo should move as directed by the external pot –
and continue to do so, even when disconnected from the
PC. Incidentally, if you wish to better understand the code,
Fig.8. A switch allowing the servo to be set to two positions. The
the PDF manual has a good explanation. For example, if
input is pulled up to 5V via the resistor when the switch is open;
you change the endpoints of the servo movement, you can the input is pulled to ground when the switch is closed.
change the pot scaling to suit, so that there’s no dead travel
in the pot’s movement. can be made to occur smoothly by using the Acceleration
Even when controlled by a pot in this way, the maximum and Speed controls.
speed and acceleration of the servo can still be set by the
previously described controls. It’s therefore easy to give a Conclusion
progressive and smooth servo movement, even if the pot is The Pololu Micro Maestro has a lot more capability than
turned quickly and/or jerkily. has been covered here (the manual is over 100-pages long).
To move over its full rotation, a switch can replace the However, in this article I have been aiming at giving you fast
pot. Pull the input up to 5V via a 1-100kΩ resistor and and practical ways of controlling servos – methods than can
then use the switch to pull the input to ground – see Fig.8. be put into immediate effect. Whether that’s opening and
Operation of the switch will now cause the servo to rotate closing household vents, building a walking robot or even
from one extreme to the other – perfect for things that need operating active aerodynamics on a car, the Micro Maestro
to be open or closed, such as a vent. Again, this movement and RC servos can help achieve all that.

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

TEACH-IN 9
FROM THE PUBLISHERS OF

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

RIES OF ONE

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

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

(includes P&P to UK if ordered direct from us) PIC n’ Mix


Including Practical Digital Signal Processing

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

Teach-In 9
Get Testing

Teach-In 9 – Get Testing! Three Microchip


PICkit 4 Debugger
Guides
Files for:
PIC n’ Mix

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

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

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

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

ORDER YOUR COPY TODAY: www.electronpublishing.com

Practical Electronics | May | 2023 67


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
MAY 2023 JULY 2022
Precision AM-FM DDS Signal Generator ................................CSE211002 14.95 Silicon Labs AM/FM/SW Radio.......................................... CSE210301C 10.95
Improved SMD Test Tweezers programmed PIC....................0410621PIC 12.95 Level Crossing Controller .................................................. 09108211 6.95
AO 2x-dual-to-quad through-hole (pack of five) ......................AO1-MAY23 6.95
AO 2x-dual-to-quad SMD (pack of five)...................................AO2-MAY23 6.95 JUNE 2022
AO 2x-single-to-dual through-hole (pack of five).....................AO3-MAY23 6.95 Full-wave Motor Speed Controller ..................................... 1010221 8.95
AO 2x-single-to-dual SMD (pack of five) .................................AO4-MAY23 6.95 PIC Programming Helper for 8-pin PICs only .................... 24106211 7.95
PIC Programming Helper for 8, 14 or 20-pin PICs ........... 24106212 10.95
APRIL 2023 Advanced GPS Computer ................................................. 05102211 9.95
500W Amplifier Module ............................................................see p.22, April 2023
Clipping Indicator (per channel) ...............................................01112211 7.95 MAY 2022
CD Welder Power Supply (one needed) .................................29103221 9.95 Bus board PCB for Analogue Vocoder .............................. AO1-MAY22 10.95
CD Welder Controller (one needed) ........................................29103222 9.95 Complete set of 14 PCBs for Analogue Vocoder ............... AO2-MAY22 97.95
CD Welder Energy Storage module (several needed) ...........29103223 7.95 Programmed EEPROM for Digital FX Unit ........................ FX1-MAY22 10.95
AO Universal Dual Op Amp Board .......................................AO1-APR23 9.95 Programmed PIC for Digital FX Unit using potentiometer....FX2-MAY22 8.95
AO Stereo RIAA precision passives kit for dual op amp ......AO2-APR23 8.95
APRIL 2022
MARCH 2023 64-key MIDI Matrix shield .................................................. 23101211 8.95
Pico BackPack..........................................................................07101221 9.95 64-key MIDI Matrix switch board ....................................... 23101212 11.95
Semaphore Signal (controller) .................................................09103221 7.95 High-current Battery Balancer .......................................... 14102211 10.95
Semaphore Signal (blade) .......................................................09103222 5.95 Digital FX Unit – using potentiometer ................................ 01102211 9.95
Digital FX Unit – using BCD switch ................................... 01102212 9.95
FEBRUARY 2023 Universal Audio PSU ......................................................... AO1-APR22 11.95
Tesla Coil driver board ..............................................................26102221 9.95
Tesla Coil potentiometer board ................................................26102222 5.95 MARCH 2022
Cooling Fan Controller & Loudspeaker Protector ...................01102221 8.95 Mini Isolated Serial Link..................................................... 24102211 £5.95
Remote Gate Controller ...........................................................11009121 12.95 Busy Loo Indicator ............................................................. 16112201 £5.95
Analogue Vocoder – Band-pass filter board ...................... AO1-MAR22 9.95
JANUARY 2023 Analogue Vocoder – HP/LP filter board ............................. AO2-MAR22 9.95
Classic LED Metronome – 8-LED............................................23111211 7.95
Classic LED Metronome – 10-LED..........................................23111212 8.95 FEBRUARY 2022
Multi-Channel Speaker Protector – 6 channel ........................01101221 9.95 Arduino-based Power Supply ............................................ 18106201 9.95
Multi-Channel Speaker Protector – 4 channel ........................01101222 7.95 Battery Monitor Logger ...................................................... 11106201 10.95
Remote Control Range Extender – IR-to-UHF .......................15109212 5.95 Electronic Wind Chimes .................................................... 23011201 10.95
Remote Control Range Extender – UHF-to-IR .......................15109211 7.95 Analogue Vocoder – Driver Amplifier ................................. AO-FEB22 8.95
AO Universal Single Op Amp Board .....................................AO1-JAN23 7.95
JANUARY 2022
DECEMBER 2022 Vintage battery Radio Li-ion Power Supply ....................... 11111201 9.95
Hummingbird Amplifier .............................................................01111211 9.95 MiniHeart: A Miniature Heartbeat Simulator ...................... 01109201 8.95
SMD Trainer PCB .....................................................................29106211A 8.95
SMD Trainer PCB + parts ........................................................29106211B 13.95 DECEMBER 2021
AM/FM/SW Digital Receiver .............................................. CSE200902A 13.95
NOVEMBER 2022 Balanced Input and Attenuator for USB CODEC............... 01106202 11.95
USB Cable tester – main PCB .................................................04108211 12.95
USB Cable tester – front panel ................................................04108212 5.95 NOVEMBER 2021
USB Cable tester – optional panel...........................................SC5970 5.95 Dual Battery Lifesaver ....................................................... 11111202 £6.95
Model Railway Carriage Lights – PCB ....................................09109211 6.95
AO transfmr PCB – standard VTX-A range ....................... VTX-101-007 6.95 OCTOBER 2021
AO transfmr PCB – dual-outline VTX102-3001/101-3002 ...VTX-Dual 6.95 Mini Wi-Fi LCD BackPack ................................................. 24106201 £8.95

OCTOBER 2022 SEPTEMBER 2021


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

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

68 Practical Electronics | May | 2023


Double-sided | plated-through holes | solder mask

PROJECT CODE PRICE PROJECT CODE PRICE


JULY 2021 JULY 2020
ATtiny816 Breakout / Dev Board with Capacitive Touch ... 24110181 £9.75 AM/FM/CW Scanning HF/VHF RF Signal Generator ........ 04106191 £13.95
IR Remote Control Assistant (Jaycar version) ................... 15005201 £8.95 Speech Synthesiser with the Raspberry Pi Zero ............... 01106191 £5.95
IR Remote Control Assistant (Altronics version)................ 15005202 £8.95 PE Mini-organ PCB ........................................................... AO-0720-01 £14.95
PIC18F Development Board.............................................. PNM-JUL21 £12.95 PE Mini-organ selected parts ............................................ AO-0720-02 £8.95
Microphone Preamplifier .......................................................AO-JUL21 £11.95 High-current Solid-state 12V Battery Isolator – control ..... 05106191 £6.95
High-current Solid-state 12V Battery Isolator FET (2oz) ... 05106192 £9.95
JUNE 2021
Roadies’ Test Signal Generator (surface-mount version) .. 01005201 £8.95 JUNE 2020
Roadies’ Test Signal Generator (through-hole version) ..... 01005202 £9.95 Arduino breakout board – 3.5-inch LCD Display ............... 24111181 £6.95
Touchscreen Wide-range RCL Box (Resistor module) ...... 04104201 Six-input Audio Selector main board ................................. 01110191
£18.95 £10.95
Touchscreen Wide-range RCL Box (Ind/Cap module) ...... 04104202 Six-input Audio Selector switch panel board ..................... 01110192
KickStart Part 3 – Gyrator-based Audio Filter.................... KS3-2021 £7.95
MAY 2020
MAY 2021 Ultra-low-distortion Preamplifier Input Selector ......................... 01111112
£11.25
7-Band Equaliser (Mono)................................................... 01104201 £8.95 Ultra-low-distortion Preamplifier pushbutton Input Selector ..... 01111113
7-Band Equaliser (Stereo) ................................................. 01104202 £10.95 Universal Regulator .................................................................... 18103111 £7.95
Car Altimeter ...................................................................... 05105201 £7.95 433MHz Wireless Data Repeater .............................................. 15004191 £8.50
Bridge-mode Adaptor for Amplifier ............................................. 01105191 £7.95
APRIL 2021 iCEstick VGA Terminal ................................................................ 02103191 £5.95
Reflow Oven – DSP Active Crossover (CPU).................... 01106193 Analogue noise with tilt control ................................................... AO-0520-01 £7.95
Reflow Oven – DSP Active Crossover (Front panel) ......... 01106195 £19.95 Audio Spectrum Analyser ........................................................... PM-0520-01 £8.95
Reflow Oven – DSP Active Crossover (LCD) .................... 01106196
Frequency Reference Signal Distributor.................................... CSE200103 £8.95

MARCH 2021 For the many pre-2016 PCBs that we stock please see the
Nutube Guitar Effects Pedal .............................................. 01102201 £12.95
Programmable Thermal Regulator (Peltier Interface)........ 21109181
PE website: www.electronpublishing.com
£18.95
Programmable Thermal Regulator (Peltier Driver) ............ 21109182
Tunable HF Preamp .......................................................... CSE190502 £8.95
PE/EPE PCB SERVICE
FEBRUARY 2021 Order Code Project Quantity Price
4G Remote Monitoring ...................................................... 27111191 £9.95
.........................................................
JANUARY 2021
Nutube Valve Preamplifier ................................................. 01112191 £12.95 .........................................................
Arduino DCC Controller ..................................................... 09207181 £10.95
.........................................................
DECEMBER 2020
Pseudo-Random Sequence Generator ............................. 16106191 £7.95 .........................................................
Clever Charger .................................................................. 14107191 £11.95
PE Theremin Amplifier ....................................................... AO-1220-01 £8.95 .........................................................

NOVEMBER 2020
LED Christmas Tree (1 off) ................................................ 16107181-1 £6.95
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LED Christmas Tree (4 off) ................................................ 16107181-2 £14.95 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LED Christmas Tree (12 off) .............................................. 16107181-3 £24.95
LED Christmas Tree (20 off) .............................................. 16107181-4 £34.95 .........................................................
USB/SPI Interface Board ................................................... 16107182 £5.95
45V/8A Power Supply PCB plus acrylic spacer ................. 18111181 £14.95 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45V/8A Power Supply front panel five-way display bezel .. 18111181-BZ £3.95
Five-way LCD Panel Meter/Display ................................... 18111182 £7.95
Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
OCTOBER 2020
Digital Audio Millivoltmeter................................................. 04108191 £9.95 payable to: Practical Electronics
Precision Signal Amplifier .................................................. 04107191 £7.95
Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEPTEMBER 2020
PE Theremin PSU ............................................................. AO-0920-01 £5.95 Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95
Micromite Explore-28......................................................... 07108191 £6.95 Card Security No . . . . . . . . . .
Ultrabrite LED Driver ......................................................... 16109191 £6.95
You can also order PCBs by phone, email or via the shop
AUGUST 2020 on our website: www.electronpublishing.com
Micromite LCD BackPack V3 ............................................ 07106191 £9.95
Steering Wheel Audio Button to Infrared Adaptor .............. 05105191 £7.95
No need to cut your issue – a copy of this form is just as good!

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

Practical Electronics | May | 2023 69


Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
APRIL 2020 FEBRUARY 2019
Flip-dot Display black coil board................................................. 19111181 1.5kW Induction Motor Speed Controller........................... 10105122 £24.95
Flip-dot Display black pixels ....................................................... 19111182
£14.95
Flip-dot Display black frame ....................................................... 19111183 NOVEMBER 2018
Flip-dot Display green driver board ............................................ 19111184 Super-7 AM Radio Receiver .............................................. 06111171 £15.95

MARCH 2020 OCTOBER 2018


Diode Curve Plotter ........................................................... 04112181 £10.95 6GHz+ Touchscreen Frequency Counter .......................... 04110171 £12.95
Steam Train Whistle / Diesel Horn Sound Generator ............... 09106181 £8.50 Two 230VAC MainsTimers ................................................ 10108161 £11.95
Universal Passive Crossover (one off) ...................................... UPC0320 £12.50 10108162

FEBRUARY 2020 SEPTEMBER 2018


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

OCTOBER 2019 APRIL 2018


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

AUGUST 2019 MARCH 2018


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

MARCH 2019 SEPTEMBER 2017


10-LED Bargraph Main Board ........................................... 04101181 £11.25 Compact 8-Digit Frequency Meter..................................... 04105161 £12.95
+Processing Board ............................................. 04101182 £8.60

70 Practical Electronics | May | 2023


CLASSIFIED ADVERTISING

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

Send large letter stamp for Catalogue

BOWOOD ELECTRONICS LTD Electrical Industries Charity (EIC)


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

grants and a comprehensive


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

PIC DEVELOPMENT KITS, DTMF kits


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

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

Practical Electronics | May | 2023 71


Next Month – in the June issue
Arduino Programmable Load
To test devices like power supplies, driver circuits and current sources, you often
need a particular or variable load resistance that can handle a bit of power. This
Programmable Load is based on an Arduino shield that is easy to understand, build and
use. It can be controlled manually or automated in a way that suits your application.

500W Power Amplifier – Part 3


To finish our new 500W Amplifier, we will describe the power supply
configuration and the complete assembly details. That includes
mounting all the modules and parts in the enclosure, wiring it up,
checking that it works and making the calibration adjustments.

High-Power Buck-Boost LED Driver


We found some ridiculously bright, low-cost LED panels for sale, and then
tried to figure out the best way to drive them. This Driver is the result;
it is very flexible and useful for many other purposes, such as charging
batteries from a DC source or converting between 12V DC and 24V DC.
CJMCU-7620 Gesture Recognition Module
With this module, you can experiment with sensing and recognising
gestures made with your hands. It is very small, relatively low in
cost and can easily be hooked up to an Arduino or a Micromite.

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

Welcome to JPG Electronics NEW subscriptions hotline!


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

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

Rose & Crown


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

d
Roa
Old H

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

Published on approximately the first Thursday of each month by Electron Publishing Limited, 1 Buckingham Road, Brighton, East Sussex BN1 3RA. Printed in England by Acorn Web Offset Ltd., Normanton WF6
1TW. Distributed by Seymour, 86 Newman St., London W1T 3EX. Subscriptions UK: £33.99 (6 months); £59.99 (12 months); £114.99 (2 years). EUROPE: airmail service, £38.99 (6 months); £69.99 (12 months);
£129.99 (2 years). REST OF THE WORLD: airmail service, £46.99 (6 months); £84.99 (12 months); £164.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box
6337, Bournemouth BH1 9EH, United Kingdom. Email: [email protected]. PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the
Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold,
hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.

72 Practical Electronics | May | 2023


Did you know our online shop
now sells the current issue of
PE for £5.99 inc. p&p?
Practical
Electronics Prac
Electro tical
The UK’s premier electronics and computing maker magazine
The UK
Circuit Surgery
Using op amps as
comparators
Make it with Micromite
PicoMite Smart-light
Controller
CircuOp
active
nics
Audio’sOut
it Suand
Using SMD
digipo
premie
amp adaptor r electr
boards:
rgerthrough-hole
ts
y
onics a
Fox Re
nd com
puting
filters with p o rt maker
Hopele magaz
Even better! WIN! 500W Power p
s
NASty s helplines a
n Au
roblem d
ine
dio O
Microchip
amplifier s Univers ut
Our new improved ATtiny817
Xplained Pro
a
audio l board for d
op am ual
ps
SMD Test Tweezers WIN! WIN!
Micro
dsPIC3 chip 500W
3E
CAN-L V 5V Pow
StarteIN
r ampli er
Kit
fier
Three
HF-UH low-noise
Precision AM-FM DDS F Amp
lifiers
Signal Generator
B uildin
Discha g the RC servos
Control Ca p a
rgwith
e Wethe citor
Pololu
MicroldMaestro
er

PLUS!
P
LUS! May 2023Am£5.99
Techno Talk – Prophecy can be perplexing
Techno p05lifier
Cool Beans – Arduino Bootcamp: bits, nibbles
Talk –and bytes C l i p
s... dow9 772632 573030 ping In
Cool B Robot
Net Work – EV trends and updates on e an generation
power dicato
Net Wo s – Arduino no
rk – Sm Bootca n the farm! r
www.electronpublishing.com @practicalelec mp: 7-
art dev practicalelectronics
www.e ices wit segme
lectro h ‘Plug a n t displays Apr 2023
npubli nd Pla £5.99
shing
.com y’ simp 04
licity 9
@prac 77263
2 573
ticalele 030
c
practi
calele
ctronic
s

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

www.electronpublishing.com

You might also like