Practical Electronics - December 2022 PDF
Practical Electronics - December 2022 PDF
Practical Electronics - December 2022 PDF
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out Make it with Micromite
Understanding Universal op amp board Detecting, comparing and storing
and using digipots (optimised for audio) fingerprints with a PicoMite
Hummingbird WIN!
Microchip
Amplifier PIC32MM
Curiosity
Development
Board
USB
Cable
Tester
PLUS!
Dec 2022 £5.49
Techno Talk – Giant boost for batteries 12
Cool Beans – LogiSwitch debounce breakout board
9 772632 573023
Net Work – Energy-saving and monitoring resources
www.electronpublishing.com @practicalelec practicalelectronics
Two dsPIC33C Devices on a Single Chip
Design Separately, Integrate Seamlessly Using dsPIC33CH Dual-Core
DSCs
The dsPIC33CH dual-core DSCs are designed to facilitate independent code development for each core
by separate design teams, which can subsequently be seamlessly integrated when the separate codes
are later brought together. With the power of two dsPIC33C DSCs in a single chip, the dsPIC33CH family
is optimized for several applications including safety-critical applications, touch control, wireless charging,
digital power, motor control and many more.
Key Features
• High performance with the power of two dsPIC33C DSCs in one chip
• Enables isolation of safety-critical firmware and real-time operation from rest of the application code
• Specialized peripherals for high-performance
• Board space and cost savings of up to 40% by eliminating the need for an additional microcontroller
(MCU) and supporting circuits
• Faster on-chip, inter-core communication
• Reduces development time by enabling parallel development by multiple teams
Electronics Contents
Projects and Circuits
Hummingbird Audio Amplifier by Phil Prosser 16
This miniature amplifier is nimble, small in size but strong, delivering up to 60W
into 8Ω or 100W into 4Ω.
USB Cable Tester – Part 2 by Tim Blythman 28
Our USB Cable Tester, introduced last month, is ideal for going through piles of
cables and sorting them out – a great first step in diagnosing a fault!
SMD Trainer Board by Tim Blythman 36
This simple SMD Trainer project is a great way to practice soldering a variety of
surface-mount devices.
Volume 1 and Volume 2 cover transmitters Volume 4 covers clandestine, agent or ‘spy’
and transceivers used between 1932-1948. radio equipment, sets which were used by
An era that starts with positive steps special forces, partisans, resistance, ‘stay
taken to formulate and develop a new behind’ organisations, Australian Coast
series of wireless sets that offered great Watchers and the diplomatic service. Plus,
improvements over obsolete World War I selected associated power sources, RDF and
pattern equipment. The other end of this intercept receivers, bugs and radar beacons.
SUBSCRIBE NOW!
Using distortion and
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery KickStart
Exploring DACs and
Make it with Micromite
MMBASIC + RPi Pico + display Mastering electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
Make it with Micromite
Small displays and using JFETs as electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
KickStart
Low-voltage
Make it with Micromite
Building GPS into
Circuit Surgery
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Audio Out Electronic Make it with Micromite
Using JFETs limiters Using audio Building Blocks Adding a PS/2 keyboard and
Circuit Surgery
Understanding
Audio Out
Practical
Electronics
The UK’s premier electronics and computing maker magazine
01202 087631
distortion circuits microcontrollers = PicoMite Backpack! controlled resistance transformers infrared to synchronise time controlled resistors transformers op amps PicoMite systems and compressors transformers Using actuators TFT display to a PicoMite and using digipots (optimised for audio) fingerprints with a PicoMite
WIN!
WIN! WIN!
Microchip
SAM V71 Microchip
PIC32CM LS60
Microchip
MPLAB Snap
WIN! Hummingbird WIN!
Microchip
Multi-purpose Battery
Xplained Ultra
Evaluation Kit Curiosity Pro
Evaluation Kit
In-Circuit
Debugger
Microchip
AVR-IoT
Amplifier PIC32MM
Curiosity
WIN! Cellular Mini Development
WIN! WIN!
Manager WIN!
Board
Retro gaming
with Nano Pong!
20A DC Motor Speed Controller Build a
SMD Test PicoMite
Adding small Tweezers USB Cable Tester
Intercom using retro computer
displays to
Flowcode the PicoMite analogue phones!
Digital Clock Micromite to Pocket Weather Station
Design Smartphone SMD Trainer board Build a PicoMite
Simple Flowcode
fingerprint reader
MIDI
C
void interrupt(void)
{ if (intcon & 4)
{
Bluetooth Link
clear_bit(intcon, 2);
Assembly
Preamplifier
:040000008A01122837
Preamplifier
EF10000
:10001000040EF2000A0
EF300BA110A122928352
86C
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.
Electronics
Rest of the World £41.99 (Airmail)
1 Year: UK £54.99, Europe £63.99 (Airmail),
Rest of the World £77.99 (Airmail)
2 Years: UK £104.99, Europe £119.99 (Airmail),
SUBSCRIPTION PRICES Rest of the World £149.99 (Airmail)
Subscriptions for delivery direct to any address in: To: Practical Electronics Subscriptions
PO Box 6337
UK: 6-months £29.99, 12-months £54.99, 24-months £104.99 Bournemouth BH1 9EH
Europe Airmail: 6-months £33.99, 12-months £63.99, United Kingdom
24-months £119.99 Tel: 01202 087631
Email: [email protected]
Rest Of The World Airmail: 6-months £41.99, 12-months
£77.99, 24-months £149.99 I enclose payment of £ ..............
(cheque/PO in £ sterling only)
Cheques (in £ sterling only) payable to Practical Electronics payable to Practical Electronics
and sent to: Practical Electronics Subscriptions, PO Box 6337,
Please charge my Visa/Mastercard
Bournemouth BH1 9EH, United Kingdom
My card number is: .......................................................................
Tel: 01202 087631 Please print clearly, and check that you have the number correct
Email: [email protected]
Card Security Code .................. Valid From Date........................
Also via our online shop at: www.electronpublishing.com (The last 3 digits on or just under the signature strip)
Subscriptions start with the next available issue. We accept Card Ex. Date ......................................
MasterCard or Visa.
Name ............................................................................................
(For past issues see the Back Issues page.)
Address ........................................................................................
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!
• 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.
Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619
Electron Publishing Limited Mob 07973 518682 Soldering surface-mount devices
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected]
Apart from the general shortage of silicon over the last few years,
East Sussex BN1 3RA Web www.electronpublishing.com one of the biggest gripes for amateurs and hobbyists has been the
inexorable rise of SMDs (surface-mount devices). While these are
Advertisement offices fantastic for mass producing compact, cheap electronic products,
Practical Electronics Adverts Tel 01273 777619
1 Buckingham Road Mob 07973 518682
for the home design/constructor they can be a real problem.
Brighton Email [email protected]
East Sussex BN1 3RA The simple fact of the matter is that soldering SMDs is
Editor Matt Pulzer
inherently harder than ‘traditional’ through-hole components.
General Manager Louisa Pulzer First, there are no ‘legs’, wires or holes to secure and orient
Digital subscriptions Stewart Kearn Tel 01202 880299 parts before applying solder – components just sit on the board.
Online Editor Alan Winstanley Second, and probably here is the biggest problem, SMD parts
Web Systems Kris Thain
Publisher Matt Pulzer are smaller, sometimes considerably smaller than their through-
hole counterparts. In fact, some parts are so small they are
Print subscriptions barely visible and are specifically designed to be applied using
Practical Electronics Subscriptions
automated pick-and-place machines, making the challenge
PO Box 6337
Bournemouth BH1 9EH Tel 01202 087631 of manually placing and soldering these minute parts almost
United Kingdom Email [email protected] impossible.
Technical enquiries Unsurprisingly, since commercial and industrial consumers
We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase, of silicon prefer the lower costs involved with SMD-based
repair or modification of commercial equipment or the incorporation production, the market has simply followed demand, and for
or modification of designs published in the magazine. We cannot some years we have been in the situation where certain new ICs
provide data or answer queries on articles or projects that are
more than five years old. are not even supplied in through-hole format – strictly SMD.
Questions about articles or projects should be sent to the editor So, what to do? Well, there are two options. It’s worth
by email: [email protected]
remembering that despite all of the above, there are still very
Projects and circuits many through-hole components available, and while you would
All reasonable precautions are taken to ensure that the advice and be limiting some of your options by avoiding SMDs, there is still
data given to readers is reliable. We cannot, however, guarantee enough user-friendly through-hole silicon to keep most people
it and we cannot accept legal responsibility for it.
happy. If you want to stick to just through-hole then you can.
A number of projects and circuits published in Practical Electronics That said, however, a better option is to grasp this nettle and
employ voltages that can be lethal. You should not build, test, learn to solder SMDs. If that’s your preferred route then you’re
modify or renovate any item of mains-powered equipment unless
you fully understand the safety aspects involved and you use an
in luck, because this month we have a great article and a trainer
RCD (GFCI) adaptor. project to help you learn to solder SMDs. Do remember that not
all SMDs are the same size. While some are definitely out of reach
Component supplies for manual solderers, plenty of SMDs are entirely useable with a
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We bit of practice and some useful guidance. You may need to invest
advise readers to check that all parts are still available before in a new soldering iron, plus a few other tools and materials, but
commencing any project in a back-dated issue. the cost is not high and the rewards justify the outlay.
Advertisements
Although the proprietors and staff of Practical Electronics take If you’ve been meaning to take the plunge into the SMD pool,
reasonable precautions to protect the interests of readers by now is the time jump in!
ensuring as far as practicable that advertisements are bona fide, .
the magazine and its publishers cannot give any undertakings
in respect of statements or claims made by advertisers, whether
Matt Pulzer
these advertisements are printed as part of the magazine, or in Publisher
inserts. The Publishers regret that under no circumstances will
the magazine accept liability for non-receipt of goods ordered, or
for late delivery, or for faults in manufacture.
Transmitters/bugs/telephone equipment
We advise readers that certain items of radio transmitting and
telephone equipment which may be advertised in our pages
cannot be legally used in the UK. Readers should check the law
before buying any transmitting or telephone equipment, as a fine,
confiscation of equipment and/or imprisonment can result from
illegal use or ownership. The laws vary from country to country;
readers should check local laws.
Imagine a battery that you can recharge a thousand-times faster than anything available today. If you
can’t, you should read this article. It covers the intriguing possibility of quantum super-batteries that can
recharge in minutes or even seconds.
W
hen the BBC began to to create a type of quantum battery in becoming viable for practical, commer-
broadcast 100 years ago, it was which the recharge time is related in- cial application is both real and unreal.
clear that the crude ‘crystal set’ versely to the amount of stored energy. Dr Kavan Modi, associate professor of
receivers offered for sale were hardly A demonstration battery of this kind quantum physics at Monash University
what you would call a mature technol- has now been built by a team of research- (Australia) concedes: ‘For us, the theo-
ogy. Wearing headphones and poking ers in Italy led by Tersilla Virgili and ry [is] just an interesting playground to
around to find the most sensitive spot Giulio Cerullo. They write: ‘This leads explore fundamental ideas of time and
on the crystal wasn’t a user-friendly to the intriguing idea that the charging energy. I don’t think there will be tech-
way of listening to the wireless, and it power of quantum batteries is super-ex- nological applications. Of course, I may
took a while before valve radios gave us tensive, meaning that it increases faster be completely wrong.’
straightforward tuning and easily adjust- with battery size. Each molecule repre- He may be. If you consider quantum
able volume controls. sents a unit that can exist in a quantum computers, these were once purely con-
In the same way, it’s hard to deny that superposition state of two energy levels ceptual but are now close to becoming a
in some ways the rechargeable batter- (fundamental and excited), similar to commercial reality. Google aims to have
ies installed in road vehicles are also the way a qubit, the basic unit of quan- a commercial-grade quantum comput-
unwieldy and inefficient. Lithium-ion tum information, can be both 0 and 1 er by 2029, and is only one of several
batteries may be adequate for computers simultaneously in quantum computers.’ companies racing to build a business
and smartphones, but when scaled up around this emerging technology. In the
for motive power applications, they are Collective behaviour makes for same way, the overwhelming economic
clearly bulky, weighty, slow to recharge strength in numbers necessity to find a means of recharging
and potentially unsafe. The lithium and Our two experts continue: ‘By construct- EV batteries as rapidly as filling a petrol
other ‘critical minerals’ used to manufac- ing the quantum battery in a way that tank will incentivise research and de-
ture them are not only far from plentiful, units can exist in superposition, the velopment of viable quantum batteries.
but also vulnerable to being weaponised total system can behave collectively. At this stage, the only certainty is that
in global trade wars. What we desper- This behaviour, known as ‘quantum nobody can say whether or when quan-
ately need is a radically different battery coherence’, allows the units to act co- tum batteries will be commercialised.
technology that is easier to make, with operatively [interconnectedly], giving But consider LED lighting: electronical-
far less ecological impact, faster to re- rise to a hyper-fast charge that depends ly generated light was demonstrated as
charge and offering much greater energy on the number of molecule-units. In the long ago as 1907 by the English experi-
density within a given physical volume. future, this type of device can be applied menter HJ Round of Marconi laboratories,
in various scientific and technological using a crystal of silicon carbide and a
Bring on the super cell! fields, such as wireless chargers, solar cat’s-whisker detector. It took more than
Does this perfect battery technology cells and cameras.’ a century to produce affordable LED
exist? Conceptually it does, and scien- This hyper-fast speed points immedi- lamp bulbs!
tists around the world are doing their ately to the killer application of quantum
utmost to bring it into a state of real- batteries: the ability to slash the time Quantum magic
ity. It goes by the name of the ‘quantum taken to recharge the batteries of EVs. A qubit (short for ‘quantum bit’) is a
battery’ and if the term ‘quantum’ is a The $64,000 question is, by how much? basic unit of quantum information,
word that you recognise but know lit- Researcher Ju-Yeon Gyhm at the Institute used in quantum computing. In con-
tle about, don’t worry – you’re in good of Basic Science in the Republic of Korea ventional computing the unit is a bit
company. However, so you don’t need has calculated that quantum batteries (short for binary digit), which can
a degree in physics or higher maths to could be charged in a thousandth of the have only one of two states: one or
understand this article – there’s a brief time that classic batteries would take zero. But in quantum systems, a qubit
explainer panel at the end. to be revitalised. What’s more, in nor- can exist in both states simultaneous-
So, how do quantum batteries differ mal batteries, the power increases with ly, a property that is fundamental to
from the batteries used in smartphones the number of cells in parallel. But in quantum mechanics (and quantum
and electric vehicles (EVs)? To quote the quantum batteries, you can make the computing). The classic example
website scitechdaily.com, quantum bat- power increase with the square of the of this is Schrödinger’s hapless cat,
teries are a new class of energy storage number of cells. which hypothetically can be simul-
devices that operate according to the taneously both alive and dead, as a
principles of quantum physics, the sci- Highly speculative result of its fate being linked to a ran-
ence that studies the atomically small, Rather as Schrödinger’s cat (see below) dom subatomic event that may or may
where the laws of classical physics do not can be simultaneously both alive and not occur. https://bit.ly/pe-dec22-cat
always apply. Remarkably, it is possible dead, the prospect of quantum batteries
seamless integration with Microchip’s MPLAB X The board also offers various user interfaces like
IDE and MPLAB Code Configurator for easy set- switches, LEDs and potentiometer, and supports a
up and development. MikroElektronika mikroBUS interface that lets you tap
into an ecosystem of over 300+ add-on click boards enabling,
This PIC32MM family features core-independent peripherals, customers to accelerate application prototype development.
designed to offload the CPU, such as Configurable Logic Cells Additionally, Bluetooth Low Energy communication can easily
(CLC) and Multiple-output Capture Compare PWMs (MCCPs) be added using Microchip’s BM71 module footprint.
Free-to-enter competition
Microchip PIC32MM Curiosity Development Board
Microchip DM320101
I
AAPA , the self-styled ‘Global ExCel is a huge cluster of giant, big thing as virtual reality (VR) and
Association for the Attractions utilitarian exhibition halls, now nicely augmented reality (AR). Although
Industry’ (don’t ask me how the accessible by the new Elizabeth tube only a few couch potatoes will don
acronym derives), recently came to the line as well as the driverless Docklands headsets to watch movies (which is
ExCel Conference Centre in Docklands Light Railway. what so absolutely predictably kills
near London City Airport. (See: www. If you’ve ever watched the movie, 3DTV and cinema 3D every time it is
iaapa.org/expos/iaapa-expo-europe The Long Good Friday, the transformed re-invented) people who go to theme
for more details.) ex-docks area round ExCel is what Bob parks may well be up for wearing one.
Founded in 1918, IAAPA is – in Hoskins cleverly foresaw before he was Put simply, the theme park indus-
plainer English – the trade body for scarily disappeared in the back of a cab. try is over-layering VR/AR tech on
companies involved in the big business I went along looking for new elec- conventional park rides, games and
behind the world’s amusement parks, tronic technology that might make a day experiences – see the pictures below.
theme parks, attractions, water parks, at a ‘park’ more fun… or more scary. Most speak for themselves, except the
resorts, family entertainment centres, What I came away with was an over- one which shows the tribute to the
zoos, aquariums, science centres, mu- riding impression, best summed up Queen – who had just died – elec-
seums, cruise lines, manufacturers and by a bunch of pictures. In a nutshell, tronically plastered all over ExCel’s
their suppliers. the Attractions industry sees the next front entrance. What a pity no-one
e w !
n ze s
1555F IP68 sealed flanged enclosures si
Learn more: hammfg.com/1555f
Contact us to request a free evaluation sample.
[email protected] • 01256 812812
I
t was exactly three years ago, seems likely that cash incentives may Their contracted tariffs would presum-
in the December 2019 issue, that be offered to help shift energy con- ably prevail, leaving users no worse
I wrote about the rocky roll-out sumption to off-peak periods. off financially. I’ve also suggested in
of Britain’s smart meter programme. The National Grid holds the UK’s the past that smart meter owners might
Smart meters originated as an EU supply lines together, and it spells out start to receive a text message or a
policy, and I described how, a decade the picture for the National Transmis- nag-screen popping up on their IHD
earlier, the EU’s energy policy had sion System (the gas network) in its (In-Home Display) when demand is
established three fundamental goals: Gas Winter Outlook 2022/23 at: https:// high, encouraging them to turn down
to secure energy supply, to combat ngrid.com/3z9BpA9 (PDF, 51pp); the lights. If you don’t have a smart
climate change and to establish an the winter forecast for electricity is meter, then you won’t get the message,
‘internal market’. As part of these published at: https://bit.ly/3CULty6 and presumably you will miss out on
lofty ambitions, 80% of traditional (PDF, 25pp). any cash bonus they offer.
electricity meters would be replaced These publications are aimed mostly
with ‘smart’ ones by the year 2020, or at industry, so readers will probably Killer watts
so the EU Commission hoped. find the website of National Grid A clear trend is emerging of consum-
With energy supplies now in tur- ESO more enlightening (see: www. ers fixating on their smart meters or
moil, radical measures have been nationalgrideso.com). The Electricity IHDs, LCD monitoring devices that
introduced across Europe to reduce System Operator manages all of Great glow red in anger when major ap-
consumption, shore up gas reserves Britain’s electricity supplies, and with pliances are devouring power. One
and import more liquefied natural it comes the job of balancing the na- family friend goes out of her way to
gas (LNG). German public buildings tion’s energy supply and demand. keep her smart meter ‘in the green’
and swimming pools, for example, Their own annual Winter Outlook her- and feels put under intense pressure
have reduced their heating (or turned alds some ‘cautious action’ that will when the cooker’s turned on; likewise,
it off altogether) and unnecessary be taken to secure wintertime supplies I read how one Amazon reviewer ex-
amenity and advertising lighting has (see: https://tinyurl.com/2ee2bz4f). claimed that a portable dehumidifier
been turned off, with more cutbacks Under the heading New times requires ‘takes hardly any electricity and my
to come. new tools, one of the ESO’s new ob- smart meter stays on green when this
At the time of writing, the UK is jectives is ‘Creating a new “Demand is working’.
currently exporting some 2.2GW of Flexibility Service” where energy It’s obviously no bad thing if IHDs
electricity through its interconnects users will be incentivized to reduce influence energy consumption this
to Europe, while importing 1.1GW consumption/turn off power at key way. There are also smartphone apps
from Norway at the same time. As times to reduce overall demand across available that will work in conjunction
mentioned last month, the Gridwatch the system’, as they put it. with your smart meter data, or they can
website www.gridwatch.co.uk gives This new ‘demand management tool’ work in lieu of an IHD – useful if your
a very useful summary of Britain’s could pay consumers not to consume supplier has yet to provide an IHD or
energy production and usage – but electricity. Uncon-
remember it’s for guidance only. firmed reports suggest
that inducements
Winter of discontent would start at a mini-
The ongoing stability and resilience of mum of £10 for using
energy supplies are probably foremost energy off peak. Using
in everyone’s minds. Unprecedented washing machines
price increases have started to hit con- and dishwashers, EV
sumers and that’s before the winter chargers and other
weather draws in, when demand for current-heavy appli-
energy will soar and supplies will be ances this way could
stretched. While UK consumers are shave 2GW off the
now receiving Government energy nation’s peak electric-
subsidies until April 2023, everyone ity consumption, the
is being encouraged to start saving ESO hopes.
energy, and in last month’s Net Work Presently, there’s
I suggested that consumers might nothing to suggest that
receive some sort of ‘carrot’ from consumers would be The Loop ‘Smarter Meter’ app displays your smart meter
electricity suppliers to reduce peak- penalised for using data on your smartphone or tablet, and can help optimise
time electricity consumption. It now energy at peak times. energy consumption.
Nuclear fusion has been accomplished at laboratory level. The The multinational ITER nuclear fusion plant under construction in
next step is to scale it up. (BBC/YouTube) Provence. It is hoped that ‘first plasma’ will occur in 2025. (Photo:
ITER Organization, April 2022)
R
eaders frequently ask us for so compact and has modest power In the end, we looked at larger
advice on building amplifiers supply requirements, you can quite high-quality amplifiers and shrunk the
with more than two channels. easily jam half a dozen (or more!) of design. The result is the Humming-
We’ve published many Hi-Fi ampli- them into a reasonably sized chassis. bird Amplifier Module, which packs
fier module designs over the years, but We designed these for driving a surprising punch for its size, while
mainly they have been designed for multi-way loudspeaker systems using keeping many of the low-distortion
maximum power and minimum dis- an active crossover to split the sig- characteristics of the larger amplifiers
tortion, resulting in modules that will nals into frequency ranges to suit from which it takes inspiration. It can
only fit one or two per case (unless you each driver. This approach needs one achieve up to 60W into 8W or 100W
use a huge case!). amplifier per driver (woofer, tweeter into 4W with distortion below 0.0008%
We have published amplifier designs and so on) but you generally don’t at 1kHz and less than 0.008% all the
using all-in-one IC ‘chip’ amps like the need as much power per amplifier, way up to 20kHz. That’s way better
LM1875T. They are always quite com- since they are working together. than ‘CD quality’.
promised, both in terms of maximum Initially, we looked at using small,
power output (typically topping out low-cost Class-D amplifier modules Design
at around 30-40W) and performance, which could deliver 30-50W. After If you are familiar with larger ampli-
with distortion and noise figures far quite a bit of searching, we concluded fier topology, then an examination of
worse than a discrete amplifier. that there was nothing readily avail- the circuit diagram (Fig.7) will show
This design offers an excellent able with distortion performance many similarities between the Hum-
compromise between the two. It’s within an order of magnitude of what mingbird and larger siblings. On the
cheaper and easier to build than we’d call ‘Hi-Fi’. Many smaller Class-D other hand, for compactness, the prin-
our best Hi-Fi amplifiers while still amplifiers exhibit high-frequency dis- cipal differences are:
delivering plenty of power with very tortion above 0.5%, worse than many n
We opted for one pair of output tran-
good performance. And because it’s decent loudspeaker drivers! sistors, rather than two
Features Specifications
● Low distortion and noise ● Output power (±32V rails): 100W RMS into 4W, 60W RMS into 8W
● Extremely compact PCB ● Frequency response (−3dB): 1Hz to 150kHz
● Fits vertically on a 75mm heatsink and can be stacked in a 2RU case ● Signal-to-noise ratio: 118dB with respect to 50W into 4W
● Produces specified power output continuously with passive cooling ● Input sensitivity: 1.2V RMS for 60W into 8W; 1.04V RMS for 100W into 4W
● All through-hole parts ● Input impedance: 22kW || 1nF
● Low in cost, simple to build ● Total Harmonic Distortion (8W, ±32V): <0.008%, 20Hz-20kHz,
● Onboard DC fuses 50kHz bandwidth 32W (see Fig.2 and Fig.6)
● Output over-current and short-circuit protection ● Stability: unconditionally stable with any nominal speaker load ≥4W
● Clean overload recovery with low ringing ● Power supply: ±20-40V DC, ideally ±34V DC from a 25-0-25 transformer
● Clean square wave response with minimal ringing ● Quiescent current: 53mA nominal
● Tolerant of hum and EMI fields ● Quiescent power: 4W nominal
● Quiescent current adjustment with temperature compensation ● Output offset: typically <20mV (measured)
n
We chose inexpensive NJW21193/4 The SOA protection is tightly cou- short circuit or severe overload. This
output transistors pled with the output stage and sits protects the amplifier from all but the
n
The maximum supply rail voltages between this and the voltage amplifier worst abuse.
are just ±40V (larger amplifiers often stage (VAS). The VAS and driver come Calculations confirmed that using
go to ±60V). next, and sit between the fuses, again a mains transformer with a 25-30V
with little room to spare. At the front AC secondary providing rail voltages
It’s also worth noting that the PCB is end of the board is the input stage. of ±35-42V would be safe with a sin-
not large – just 64mm wide – and cir- How the various sections of the ampli- gle pair of output devices into 4W, 6W
cuit simplification lets us use through- fier fit on the PCB is shown in Fig.1. or 8W, delivering 60W into 8W loads
hole components exclusively. We are only using one output device and 100W into 4W loads. With a 25V
The width of the PCB is defined per side, so we have chosen a robust transformer, that’s reduced slightly to
by the two output devices and ther- device with a generous safe operating 50W for 8W.
mal compensation transistor. This is area (SOA). Few devices are sturdier For those of you who follow audio
also a neat fit for the emitter resis- than the NJW21193G/NJW21194G amplifier design, the topology here is
tors required for a stable operating (or their beefier MJL21193/4 sib- basically the ‘blameless’ amplifier (as it
bias point. lings). These are rated at 16A, 250V is dubbed by Douglas Self), which just
Despite their relatively large size, we and 200W. works. The innovation in this project
have used DC rail fuses in this design, We decided to add output SOA is more about our aproach to simplifi-
as they form an important protective protection to the amplifier that mon- cation and minimisation.
layer for the amplifier in case some- itors the output current and voltage No doubt using SMDs would have let
thing goes wrong in use. and shuts off the output in case of a us make the PCB less, err, packed.
Fig.1: this depiction of the Hummingbird PCB is at 90% of life-size and shows the purpose of each set of components.
The input stage is responsible for setting the gain and distortion cancellation while the VAS and drivers buffer the
signal from the input stage to provide suitable drive for the output transistors. The SOA protection circuitry keeps the
output transistors within their ‘safe operating areas’.
Performance
We took total harmonic distortion
(THD) measurements of the prototypes
at 10W and 35W into 8W by power-
ing it from a bench supply, shown in
Fig.2. The 35W measurement required
using a 40dB attenuator with our test
equipment, while the 10W level only
needed a 20dB attenuator. That is why
the distortion results at 10W look so
much better than at 35W.
Given that the shapes of the two
curves are very similar, it’s likely that
the actual performance of the ampli-
fier is closer to the 10W figures, even
up to its maximum 60W power out-
put. We can confidently say that this
amplifier generates very low distortion
levels, and at 10W, is below 0.002% Fig.2: total harmonic distortion (minus noise) plots for the Hummingbird at two
THD over much of the audio range. different power levels: 36W (red) and 10W (blue). The other curves show the test
Note that Fig.2 also shows partial results with various combinations of output transistors, driver transistors and,
distortion curves for various alterna- in one case, a different VAS transistor (BD139, pink curve). Regardless of which
devices you choose, the performance is pretty good.
tive output/driver/VAS transistors,
and we will explain those options a the amplifier via an attenuator, while The 22kW input resistor is selected
bit later. the right channel is monitoring the sig- to match the 22kW feedback resis-
The amplifier behaves well at clip- nal into the amplifier. As you can see, tor so that each side of the differen-
ping. The most common problem is the distortion at the output is hardly tial amplifier formed by PNP tran-
the output ‘sticking’ as the amplifier any higher than the input signal, and sistors Q7 and Q8 has matched DC
exits clipping from the negative rail, the second and third harmonics are input impedances. Assuming that
when the VAS transistor comes out of roughly equal at around −110dB. these transistors have equal current
saturation. The Hummingbird behaves through each leg and similar hFE, the
well coming out of clipping, as shown Circuit description offset voltages at the bases of Q7 and
in Fig.3 and Fig.4. Fig.7 shows the Hummingbird circuit. Q8 will be about the same.
We also tested with a square wave A 220kW resistor biases the input sig- This should ensure a low output off-
signal, and the result is in Fig.5. There nal at CON2 to 0V DC. The input signal set voltage on the amplifier. We mea-
is not a lot to show here; it generates passes through a 10μF bipolar capaci- sured less than 20mV on our prototypes.
a bandwidth-limited square wave out- tor and then a 100W resistor shunted by We have specified BC556 transistors
put as shown, with no overshoot and 1nF and 22kW to the low-noise signal for Q7 and Q8, although you could use
minimal undershoot. ground. This connects to the output low-noise BC560 devices if you can
Finally, Fig.6 shows one of the ground via a 10W resistor. The 10μF find them. These are commonly avail-
spectral plots taken while gathering and 22kW combination at the input able and perform well in this applica-
the measurements for Fig.2. The left sets the −3dB low-frequency cutoff tion. 100W emitter degeneration resis-
channel is connected to the output of point below 1Hz. tors are used for Q7 and Q8. These
Fig.3: a scope plot of the amplifier’s Fig.4: this time, the amplifier has been Fig.5: we fed a square wave signal
output waveform into an 8W resistive driven into clipping with a 3W resistive (orange) into the Hummingbird and
load, driven into clipping. You can load, representing pretty much the connected its output to a 3W resistive
see there’s a tiny bit of ‘sticking’ worst-case situation it will have to deal load (harsh, we know). It handled this
to the negative rail as it comes out with when driving a real 4W (nominal) very well, with no sign of overshoot or
of clipping, but not enough to be loudspeaker. Once again, the recovery undershoot; clearly, it’s a very well-
concerned about. from clipping is fine. behaved amplifier.
assist with achieving balance and lin- input to Q8 increases, which reduces The VAS transistor needs to have a
earity in the differential amplifier. This the current into Q16. Because the cur- very low COB or output capacitance.
reduces its sensitivity to transistor and rent mirror ‘tries’ to keep the current There are not many really suit-
temperature variations. through Q15 and Q16 the same, this able devices being made these days,
The input stage operates with 3mA excess current flows into Q13’s base. most likely as the best VAS transis-
of bias current. This is set by the 220W Q13 forms part of a quasi Darling- tors were also video amplifier tran-
resistor in the emitter leg of PNP ton transistor pair with Q14, which sistors for cathode ray tube (CRT)
transistor Q3, which serves as a con- ultimately drives the amplifier out- monitors, which have gone the way
stant-current source. put. These transistors together form of the dodo! We used the BF469 video
The keen-eyed will note that we the voltage amplifier stage (VAS). It transistor here in the past, but they
have omitted a resistor from between transforms the current from the front are now obsolete.
the constant-current source and the end into a voltage. The load on the VAS is the constant
differential amplifier. Our lower Q14 is a KSC3503DS transistor, current from PNP transistors Q1 and
voltage rails mean this is not neces- which is specialised for this sort of Q2, which is set to about 8mA, plus
sary, as Q3 can handle the resulting application. These are available from the current required to drive the out-
100mW dissipation. Mouser, Digi-Key, element14 and RS. put stage.
The collector legs of the differen-
tial amplifier feed into a current mir- The Hummingbird Amplifier is built on a
ror made using NPN transistors Q15 PCB measuring 64 x 88mm. It can be built
with multiple configurations of transistors.
and Q16. A current mirror works by
For example, this photo uses MJE15032/3
exploiting the fact that with a matched transistors for Q4 and Q12. These could
set of transistors at the same tempera- be replaced with BD139/140 transistors
ture, the VBE (base-emitter voltage) rela- respectively. See Tables 1-3
tionship vs current will be the same. for more detail.
So by connecting the bases of Q15
and Q16, and putting the same resis-
tance in their emitter circuits, if we
drive 1.5mA through Q16, Q15 will
similarly seek to conduct 1.5mA as
it has the same base-emitter voltage.
This ensures that the differential
pair of Q7 and Q8 operates with the
same current in each leg, which means
it operates optimally as a linear differ-
ential amplifier.
The output of the differential ampli-
fier is a current that flows into the base
of NPN transistor Q13. If the amplifier
output is higher than the input, the
This, in turn, starves the output device voltage divider formed by the other Construction
of base drive until the output current two resistors, so that at low output All parts are through-hole, and they fit
reduces to the point that Q6 is no lon- voltages, more current is injected, and on the 64 x 88mm, double-sided PCB
ger switched on so hard. the current limit kicks in earlier. coded 01111211, shown in Fig.13 and
This creates a local feedback loop This results in the SOA protection availabel from the PE PCB Service. The
that limits the output current, thus pro- being ‘sloped’ to fit the SOA of the parts are closely spaced but not too
tecting the output stage. Diode D1 is output devices, and allows more cur- tight. We have kept the pad sizes gen-
included so that the opposing current rent at high output voltages, because erous to make soldering easier.
protection circuit is not reverse-biased the voltage across the devices is lower. Before we continue, we strongly
by heavy output loads. Thus they dissipate less power for the advise you to use transistors from a
In the absence of the three extra same current. reputable supplier. There are cheap
resistors, Q6 would switch on at an transistors on internet auction/sale
output current of about 3A (0.6V across Output device selection sites. Do not be tempted by these.
a 0.22W resistor). This is too early, so The pinout of the output devices is Fakes are prolific, even in surpris-
to allow more current, the 820W and very common. The Hummingbird ingly simple devices. All the devices
220W resistors form a voltage divider delivers the measured performance recommended for this amplifier are
with a division ratio of 0.21. Thus, with the parts specified, but we have available at reasonable prices from
a current of about 13A through the checked that the amplifier works prop- major suppliers.
emitter resistor is required to turn the erly with a range of other output tran- Start by fitting all the small resistors
over-current protection on. sistors. You do need to change the SOA and diodes – make sure the orienta-
Without the 18kW resistor, the cur- protection resistor values, though, as tions of the diodes match what’s shown
rent limit will be the same regardless per Table 1. You also have options for in Fig.13 and on the PCB silkscreen.
of the output voltage. Adding that the driver transistors (Table 2) and VAS Follow with the trimpot, orienting its
resistor injects more current into the transistor (Table 3). adjustment screw as shown. This is
critical because we need to be able to with their + (longer) lead to the left good practice to mount these a few
set the quiescent current to a minimum when the PCB is oriented with the millimetres proud of the PCB.
before the module is first powered up. output devices at the top. Ensure that The PCB will accept standard 5W
Next, mount the input and out- you have adequate voltage ratings on cast resistors, but we liked the look
put connectors. We have used parts these parts (ie, at least what is speci- and fit of some smaller resistors from
with the common 5/5.08mm spac- fied in the parts list). Mouser (see the parts list). They need to
ing on these (except the input, a Now install the TO-92 transistors. It have a rating of at least 3W in this appli-
2.54mm-pitch header). is worth finding matched pairs for Q7 cation, so 5W is quite conservative.
You should consider how you will and Q8 and also Q9 and Q10, if you
mount the modules before choos- can. To do this, check the hFE figures Making inductor L1
ing either screw terminals or plug- of a handful of each type. Select pairs The output inductor is made from
gable connectors. Access to a screw that have reasonably similar hFE mea- 0.8mm enamelled copper wire (ECW)
terminal may be obstructed in some surements; within 10% is fine. Also, as follows:
arrangements, so in that case, use try selecting pairs that have high hFE 1. Find a mandrel that is a bit over
pluggable connectors. figures compared to the others. 10mm in diameter and has a slight
Now install all the non-polarised With the BC549 and BC556, an hFE chamfer so that once complete, you
capacitors. Fit the MKT parts close to figure below 100 is cause to throw the can push the inductor off. We used
the PCB. Ensure you use a 100V-rated part in the bin, although such a low a large ‘Sharpie’ brand permanent
device for the 220pF capacitor. reading is rare indeed. marker.
Follow with the 5A fuses and their Now is a good time to mount the 2. Put masking tape around this man-
clips. We find it easiest to put the fuses remaining resistors. The only ones that drel but ensure the sticky side is
in their clips and then solder that as get warm are the 0.22W output stage facing outwards.
an assembly to the PCB. This ensures emitter resistors, and that’s only when 3. Place a bend in the enamelled cop-
everything is well-aligned. delivering full-power sinewaves from per wire (ECW), 30-40mm from the
Fit the electrolytic capacitors next, the amplifier, which will not happen end, and wind nine turns onto the
noting that they must all be installed with musical material. But it is still masking tape.
Finishing construction
Fig.14: route the wiring
Now fit the remaining transistors: solder to each module like
Q2, Q4, Q12 and Q14 directly to the PCB. this to ensure you get
The BD139, NJW21193 and NJW21194 the stated performance.
devices that mount on the main heatsink Current flowing through
(Q5, Q9 and Q11) come last. these wires will cause
Before proceeding, check your magnetic fields, which
mounting arrangements and ensure affect the operation
that you load these at the right height of components on the
for mounting on the main heatsink. The amplifier. Routing the
best way to mount these transistors to cables this way keeps
those magnetic field
the heatsink is with the insulating kits strengths low. Once
and machine screws. Bend their leads you’ve run them, use
to fit the board and then solder them. cable ties and cable
If you can, tap the heatsink to accept clamp to hold them
the screws, otherwise, drill through in place and keep
between fins and use long screws/nuts. everything neat.
Is your power supply delivering and VBE multiplier transistor. Power Allow this to settle and readjust. It
both positive and negative rails, and it up and adjust the bias by turning will take a while to settle; depending
do you have the ground connected? potentiometer VR1’s screw anticlock- on your mounting arrangement this
wise while watching the voltage across should be done with the full supply
Setting the bias the 10W resistor. Nothing will happen voltage applied (ie, the final voltages
This requires the amplifier to be for quite a few turns; then, the bias cur- you intend to use).
mounted to a heatsink with appropri- rent will rapidly increase. Adjust this Re-install the 5A fuses, and you are
ate insulators for the output devices to achieve 500mV across the resistor. ready to go. You can check the bias
later by measuring the voltage across this measuring a batch of modules power to be 60W on each subwoofer
the 0.22W resistors; you should see we built to verify our results; we had channel, possibly half this for the mid
10mV across each. If you’re mount- to tighten the connections to achieve and a tiny fraction of this on the high.
ing multiple modules on a heatsink consistent results. As a result, a power supply based
sideways as we did, the side-adjust on a 300VA transformer will be more
style trimpot specified makes this Getting the most out of it than enough for all six channels.
quite easy. We expect this module to find use Even a 160VA transformer might
where a small, low distortion, rugged cut it if you don’t plan on driving it
Installation and reasonably priced multi-channel especially hard. If your application
To minimise distortion to the levels amplifier is required. As these mod- calls for high power levels, there are
presented requires careful attention to ules will fit on a 75mm heatsink, many more appropriate options, such as the
layout and the power supply wiring. of them can be mounted vertically in SC200 Amplifier Module (see PE, Jan-
Our recommended wiring layout per a 2U rack case. uary to Match 2018). You could use
module is shown in Fig.14, and the Our original application for this a pair of those for the low-frequency
recommended power supply config- amplifier was to provide six channels channels and the Hummingbird for
uration is shown in Fig.15. for a stereo system using three-way the others.
The wiring from the main supply loudspeakers with active crossovers.
capacitors should have the positive, With two channels for subwoofers, Reproduced by arrangement with
negative and ground wires twisted two for mid-range two for tweeters, SILICON CHIP magazine 2022.
together. The output should fold back we expect the maximum continuous www.siliconchip.com.au
toward the output devices, run paral-
lel to the 0.22W output resistors, then
follow the power wires.
The output wire should follow the
power wires back past the power sup-
ply and pick up a ground wire, mini-
mising the loop area created, then run
as a pair from there to the speaker ter-
minals (see above).
Ensure that the power supply has a
‘star earth point’ from which you con-
nect to the input ground, the ampli-
fier ground and the speaker output
ground. Also check that the way you
connect the rectifier and its ground
connection to the capacitors does Fig.15: we’ve left the power supply for the Hummingbird somewhat open-ended, as
not inject noise onto your star earth it has pretty standard requirements. It just needs split DC rails without too much
point. Connect the input shielded ripple, somewhere between ±20V and ±40V. The configuration above will produce
around ±34V, which is right in the sweet spot and uses commonly available parts.
cable screen to the star point. Make sure your filter capacitors have a high enough voltage rating (above the
Make sure all connections are highest expected peak DC voltage) and enough capacitance to ‘hold up’ the supply
secure and have low resistance; poor between 100Hz recharge pulses at the maximum sustained output power you’re
connections can easily double the expecting. Generally, you will need at least a few thousand microfarads per rail;
distortion levels, or more. We found ideally, at least 10,000μF per rail for multiple amplifier modules.
U
S Cable
B Tester
Our USB Cable Tester, introduced last month, is ideal for going through piles
of cables and sorting them out. It’s also a great first step in diagnosing a
faulty USB-connected device. It can perform continuity and short-circuit
checks on practically any USB cable and will report problems such as high
resistance in the power wires; a source of frustrating intermittent faults.
I
n the initial article last month, their ability to carry current under real- The second reason is to help those
we described the reasoning and prin- world conditions. The resistance and who construct and repair cables. You
ciples of operation behind the USB voltage drop is reported. can use it to check individual cable
Cable Tester. Bristling with all the This feature will ferret out many halves, mainly to ensure that there
standard USB sockets, it will test and cables that are causing intermittent are no shorts between any conductors.
diagnose any cable with either a USB-C problems. When devices such as por- The third is perhaps the most
or USB-A (2.0 or 3.2) on one end and table hard drives mysteriously stop important. That is to check that the
any of USB-C or USB-B (such as 2.0, working, it’s possibly due to their very fiddly USB sockets have been cor-
3.2, micro or mini) on the other end. high-current needs being hampered rectly soldered to the PCB. It’s a kind
It will report whether the cable is by poor connections. of self-diagnosis.
suitable for power only, USB 2.0 or USB With this tool, you can weed out We will offer a different order of con-
3.2 operation (and indicate whether dodgy cables and choose the best ones struction than usual to take advantage
one or two SuperSpeed lanes are pres- for high-current applications. Now you of this self-diagnosis feature.
ent). With USB 3.2 (which has replaced can know for sure if it’s the cable or the
USB 3.0 and USB 3.1), each Super- device that’s causing problems. PCB layout
Speed lane consists of four wires, form- The USB Cable Tester can also run The internal photos and the overlay
ing differential pairs in both (upstream tests when only one end of a USB diagram (Fig.3) show that the USB
and downstream) directions. cable is plugged in, and it does this sockets all lie along one edge of the
The unit scans every combination of for three reasons. PCB. CON5, CON6 and CON8 are on a
wires among the upstream-facing and First, it verifies cables that are OTG narrow neck without any surrounding
downstream-facing ports. It can tell (USB on-the-go) compatible, which components. That makes fitting those
you which wires are internally shorted short their GND and ID pins. This state sockets easier.
or open circuit to help with diagnosis indicates to a device that it should The other sockets (CON3, CON4 and
and repair. instead behave as a host. Since OTG CON7) are near the relays and buck
The USB Cable Tester also runs cables are usually adaptors, their other circuitry around Q3. Since these com-
pulses of up to 1A through the cable’s end is typically a socket, so you can’t ponents are only needed for the power
power (VBUS and GND) wires to assess plug in it at both ends. testing and not connectivity testing,
Enclosure
Prepare the case lid as the first
step because the LCD is needed
to perform our initial diagnostic
tests, and also we need to align
all the parts to fit the LCD head-
ers accurately.
Refer to the cutting diagram,
Fig.4. The single 4mm hole at
upper right is for access to push-
button S1; we suggest reading the
Options section below to deter-
mine if you wish to fit it (and thus
whether this hole is needed).
It’s essential that the opening for the Fig.3: the only parts that are somewhat tricky to fit are the USB sockets. Make
LCD is centred horizontally to avoid sure that IC1, RLY1, RLY2, the diodes and MOSFETs are oriented as shown.
Note that there is a single 10kW resistor among the rows of 1kW parts. The USB
the connecting header being skewed. Cable Tester might still work if you mix this up, but it will drain the battery
We used a technique that requires a much more quickly. The six USB sockets are located along one edge of the PCB.
sharp hobby knife, pliers (prefera- It is important to fit USB-C socket CON4 before the relays and associated parts
bly wide-nosed), a hacksaw or jigsaw are mounted on the board, so you have decent access to its pins.
and a drill.
You can use the bezel as a template, With the LCD in place, you can use Mount the bezel to the outside of
keeping in mind that the bezel will it (or the bezel) to mark and drill the the lid with the four 15mm-long M3
hide most imperfections in the top location of the four mounting holes. machine screws, keeping the matte
panel. Mark the edges of the hole on If your LCD doesn’t have a pin surface facing out. Secure on the inside
both sides; small holes drilled in the header fitted to its underside, solder with four nuts. While simplifying
very corners of the cutout area will it now. When the screen comes with assembly, these nuts also provide the
help to align the two sides. a header, it’s usually supplied sep-
Firmly score the rectangular cutout arately. Try to keep the pins at right
with the hobby knife against a straight angles to the LCD’s PCB to ensure that
edge. Take care with this, as a slip with they will fit squarely into the header
a sharp knife can really hurt you! sockets on the main PCB.
Make a hole in the centre of the
rectangle that’s large enough to
accept the saw blade, then use
the saw to cut up to the scored
edges. You’ll need to make a
number of these cuts around the Tactile switches with long
edge to divide the rectangle into actuators can be hard to
manageable pieces. come by, although you
Then carefully flex the plastic can certainly use such a
to snap it along the score lines and part if you can find it. Our
break out the centre area in small assembly uses four wires
sections. If the score lines are accu- to stand S1 off the PCB so
rate, the result will have neat, precise that you can access it from
edges. Use the hobby knife to lightly outside the case.
shave small pieces of plastic from the
edges of the hole to enlarge the hole
if necessary and to tidy up.
Another method is to drill a row
of holes inside the periphery of the
marked area to remove most of the
plastic, then file the edges smooth
until the LCD fits. This is slower but
requires fewer tools.
spacing necessary to clear the top of described above. Then place the two and powered up later while allowing
the headers on the LCD panel. case pieces back together. This should access to the test points and jumpers
Slide the LCD module over the align the socket pins into the pads on on the PCB.
machine screws and secure it with the main PCB. If you are having trou-
the remaining M3 nuts. The top of the ble, try aligning one edge of the case Soldering the USB sockets
LCD panel should sit just proud of the and pivoting the other end closed. Some of these are surface-mounted,
bezel on the outside of the lid. You This will bring the pins into location so the usual collection of SMD tools is
can see this in our photos at the end one at a time. required. With CON4 and CON6 being
of the article. With the pins located, screw the case some of the finest pitch parts we have
Using four self-tapping screws, halves together to secure everything in worked on, a magnifier is a necessity,
secure the main PCB to the other half place. Then use your soldering iron to as is a good source of bright light. A
of the case. This will allow us to align tack one pin to the main PCB at each mobile phone camera set to a high dig-
the headers to the LCD and solder end of the two headers (four pins in ital zoom level is an excellent alterna-
them in exactly the right place. There total) through the side opening. This tive to a magnifier.
should be a 20mm gap between the is easiest at the end near the top of You should also have a fine-tipped
main and LCD PCBs when the case the PCB. Once you are happy they are adjustable soldering iron, flux (prefer-
pieces are assembled. secure and still correctly aligned, dis- ably paste) and tweezers. Fortunately,
Note that the enclosure will only assemble the case. most of the USB sockets (except for
fit together one way, so check that Now solder the remaining pins with- CON8) have locating pins, making
it slots together with the LCD1 pads out disturbing the alignment and then exact positioning easy.
on the PCB in line with the LCD pan- refresh any pins that might need it. At Your flux should recommend a sol-
el’s pins. If the LCD panel’s pins are this stage, you should be able to reas- vent to use for cleanup. Some desol-
above the USB sockets when the case semble the two halves with the pins dering braid (solder wicking braid) is
is assembled, remove the PCB and lining up and seating into the header, a cheap and handy thing to have on
rotate it by 180°. pivoting the case as described earlier. hand for fixing any bridges or other sit-
If you have 20mm spacers, you might If you’re having trouble with the uations where there is too much solder.
like to use them (and the three mount- alignment, you could instead join the Remember that flux can generate
ing holes on the PCB) to align the LCD. LCD to the main PCB with ribbon cable, smoke. Use a fume extraction fan
Doing it that way is less fiddly. strands of hookup wire or similar. Keep or work outside if necessary. Work-
Before proceeding, check our pho- in mind to follow the correct pin order- ing outside is another way of getting
tos of how the header sockets are fit- ing and use at least 5cm of cable for decent illumination.
ted to the main PCB. Note that they each connection to allow for flex when Start with the mini-USB socket,
only occupy the six end positions of the case halves are separated. CON5. Apply flux to the pads, rest
each end of the header; the four central Remove the main PCB from the case the part in place (locking its plastic
positions are not connected (as they are to continue the construction. To sim- pins into the PCB holes) and apply a
not used in the LCD’s four-bit mode). plify testing, we recommend detach- bit more flux to the top of the pins.
Separate the case pieces and slot ing the LCD from the lid to allow the Ensure that it is flat against the PCB.
the sockets onto the LCD’s pins as bare PCB to be attached to the LCD Also try to keep the part square and
Problem?
If there is no LCD backlight, there's
likely a problem around transistor
Q1. If you can light the backlight by
grounding the LED cathode (pin 16) of
the LCD, then it's definitely the PCB
components and not the LCD.
If you get a message on the LCD
listing the UFP or DFP, these mes-
sages will point to USB socket pins
A close-up view of the soldered pins on some of the USB sockets. This is what
that might be shorted. Refer to the cir-
you want the solder joints to look like; glossy, with clear fillets between the
PCB pads and socket pins, and no bridges between them. Elongated pads are cuit diagram and overlay to find those
provided for many of the pins which make soldering them significantly easier. pins. Disconnect the power supply,
check and make repairs, and then
test again until you get the ‘Ready for
at CON1; you can solder the wires to soldering around the five tracks that cable.’ message.
the pads. The holes near CON1 are for go to CON2 from IC1.
strain relief, so thread the battery leads Two of the programming pins (PGD Remaining components
from below the PCB into the tops of and PGC) are also used for probing the Fit the three remaining capacitors.
the holes and then solder from below USB sockets at CON3 and CON4, so The two 1000μF and one 10μF elec-
(see photos). make sure that they are not shorting trolytic capacitors all have their posi-
While there is room to fit a socket to anything else. tive (longer) leads facing to the right,
for IC1, we don’t recommend you use If you have opted to use a according to the PCB silkscreen.
one. For a start, the large number of PIC16F18875, use the 0410821D.HEX Slot the two remaining USB sock-
pins will make fitting and removing file instead (Both of the Hex files are ets (CON3 and CON7) into place.
IC1 tricky. We only used one to allow available from last month’s download Tack a couple of leads and ensure that
us to test different microcontrollers. bundle on the November 2022 page the parts are flat against the PCB and
Gently bend IC1’s pins to slot into of the the PE website.) Our original squarely aligned to the PCB. This will
the PCB, making sure that the pin 1 prototype used a PIC16F18875, which help align the sockets to the front panel.
marker goes to the left as shown. Tack is why the PCB is marked with this When the sockets look correct, sol-
down two pins on opposite corners part number. der the remaining pins and be gen-
and check that the part is flat and ori- We decided to standardise on the erous with the mechanical tabs to
ented correctly. Adjust if needed and PIC16F18877 as we think it will be ensure that they have the necessary
then solder the remaining pins of IC1. more useful in the future and doesn't mechanical strength.
Before we move on to the start of cost much more (it has more room There are two more diodes. Fit the
the testing, we first need to program for expansion). Though they are from single 1N4148 near CON4; it will sit
the chip. the same family, some of their special between the two relays and is easier
function registers are in different loca- to fit before them. Check that its cath-
Programming tions, so remember that the HEX files ode stripe aligns with the silkscreen
Install cells in the battery holder to are not interchangeable. markings. The remaining diode is D3,
power the circuit (unless you have When finished, detach the program- a 1N5819 near L1.
a programmer that can supply up to mer and power down the circuit (eg, Then fit the two relays, RLY1 and
25mA at 4.5-5V). You can use a PICkit by removing the cells). RLY2. They should have one end
3, PICkit 4 or Snap programmer. marked with a stripe that will match
We use the MPLAB X IPE for pro- Testing the line on the PCB at the end nearest
gramming; it can be downloaded Plug the LCD into its headers, apply to IC1. As for any multi-lead part, sol-
(along with the MPLAB X IDE) from power and adjust VR1, the LCD con- der a couple of pins and check that the
www.microchip.com under the ‘Tools trast control, until the display is leg- device is correctly positioned before
and Software’ tab. ible. You should see a splash screen soldering the remaining pins.
Select the PIC16F18877, click with a countdown timer, followed by Then fit the other 2N7000 MOS-
‘Apply’, select your programming tool the main USB Cable Tester screen. FET (Q2) near RLY2 and Q3 – the
and click ‘Connect’. Open the HEX file You can check the contrast voltage larger TO-220 P-channel MOSFET,
0410821C.HEX using the ‘Browse’ but- at VR1's wiper. Our unit reads around near L1. Its marked face should be
ton and then press ‘Program’. 1V with a fresh battery. towards L1 with the tab closest to the
If you see a ‘Program and Ver- If you see a ‘Ready for cable.’ mes- cutout in the PCB. Ensure Q3's leads
ify successful’ message, all is well. sage after seven seconds, construc- are pushed down against the board so
Otherwise, check the wiring and tion is correct so far, and your USB that it doesn't foul the enclosure lid.
Options Fit the JP1 and JP2 headers but leave displays its prompts and responses on
The remaining parts are optional and the jumper shunts off for now, or plug the LCD instead of the serial terminal.
only really needed for calibration them onto just one pin of the header. Open a serial terminal program (eg,
(which isn't required). However, as S2 fits flat against the PCB as it is TeraTerm) and connect to the USB-se-
we noted in the last month’s article, only used for setup and calibration. It rial converter at 9600 baud, 8 bits, no
you can also use S1 to wake up the shouldn't be accessible during normal parity, one stop bit (8N1). It won't mat-
USB Cable Tester without plugging in use. Snap it into the pads and ensure it ter if your USB-serial converter has
a cable. This could be handy if you are is flat against the PCB before soldering. 3.3V or 5V signals. The 1kW resistor
often testing just one end of a cable. If you want to make S1 available will limit the current flow, and IC1
The UART header (CON9) is only for use after calibration, you need to will recognise logic levels in this range.
needed to enter calibration mode via a drill the extra hole shown in Fig.4 Now power up the USB Cable Tes-
USB-serial module. S2 can be used to and mount S1 above the PCB, near ter PCB. When the prompt shown in
reset the microcontroller and quickly the top panel. Screen 1 is visible, press the ESC key
jump in and out of calibration mode. To align everything, attach the main on the serial terminal. If communica-
JP1 and JP2 are used to calibrate PCB to the enclosure using one screw tion is working correctly, you should
out the resistance of the internal wir- in each corner. Use lengths of tinned see Screen 2. If not, check your wiring
ing and traces. copper wire to attach S1 to the PCB. and reset the micro with S2 to get the
The other two calibrations are for the Align S1 to the inside top of the front prompt to press ESC again.
microcontroller's internal 1.024V refer- panel with some tape or Blu-Tack, then, At Screen 2, you can press 1, 2, 3
ence voltage and current-sense shunt after placing the lid on top, tack solder or 4 on the terminal to change the dis-
resistance. The internal reference is one of the wires in place. played value, as seen in Screen 3, after
specified to be accurate within ±4%, This just needs to be enough to locate which you are prompted to confirm
so the USB Cable Tester will be per- S1. Remove the tape and the lid. With the change (Screen 4) with ‘Y’ or ‘N’.
fectly functional without calibration, the better access this provides, add If you press ‘Y’, you will see something
but it will be slightly more accurate if more wires to secure the switch on all like Screen 5.
this is done. four corners. To calibrate the VREF value, mea-
The current sense resistor should If you don't need external access sure the supply voltage between TP1
be within 1% and won't need adjust- for S1, it can be simply soldered flat and TP2 and compare this with the dis-
ment. The measured voltage is around against the PCB like S2. played voltage shown at top right. The
100mV with 1mV resolution, so the This completes the soldering for the internal voltage reference is in inverse
shunt resistance only needs to be USB Cable Tester. Double-check your proportion to the displayed voltage.
adjusted if you can't use the specified work, then plug the LCD into its header. So if the displayed voltage is 1% too
shunt value. high (for example), increase the VREF
Values from 100mW to 500mW Calibration value by 1% of its current value. With
should work, although we have only If you wish to perform calibration, the internal reference specified being
tested the specified 220mW value. connect a USB-serial converter to accurate to within 4%, you should
Lower values will give less accu- CON9 using female-female jumper not need to change this up or down
racy, while higher values reduce the wires. If you are using a CP2102 type by more than 40 points.
headroom to measure voltage drop (like us), the pin marked ‘TXD’ on the Another way to calculate this is that
in cables. converter connects to R on the PCB. an error of 0.01 in the displayed volt-
Fit CON9 with the pins facing up; GND on the converter connects to ‘−’ age (ie 10mV) is equivalent to about 2.1
this will allow a pair of jumper wires on the PCB. VREF steps. So if the displayed value
or similar to be connected between Only one data line needs to be is 4.68V instead of 4.65V, add 6 points
the USB-serial converter and the PCB. connected as the USB Cable Tester to the VREF value.
Screen 3: each calibration value is entered in decimal. The Screen 4: there is a final confirmation prompt before an
value can be accepted by pressing Enter (CR, ASCII code entered value is committed to EEPROM. To answer the
13) or cancelled by pressing ESC. You can clear the last prompt, enter either upper or lower case ‘Y’ or ‘N’.
keypress with delete or backspace.
The nominal shunt value should be underside of the enclosure, we suggest As shown in Screen 11, the results of
accurate enough. You can measure the gluing it with neutral-cure silicone or the UFP and DFP tests are summarised
shunt resistance any time the relays construction adhesive. If you do use so that single-ended tests may be car-
are inactive (all the time in calibration screws, fit self-adhesive rubber feet to ried out. This is done by unplugging
mode) and there are no cables plugged the underside of the box to prevent the one end of the cable at a time, leaving
in. Measure between TP1 and TP3. screws from scratching any surfaces. just the UFP or DFP connected.
To calibrate the relay contact resis- Slot the rear panel supplied with the It's common that the DFP and UFP
tance, use option 3 to set this to 0mW. case in place, then fit the cells. Care- tests will detect that GND is shorted
Then exit calibration mode by press- fully position the enclosure lid, feel- to the shield. This is the case for some
ing Ctrl-C on the terminal or resetting ing that the LCD header locks in place. USB-C cables and doesn't seem to
the microcontroller. The LCD backlight may illuminate if cause any problems.
Attach jumper shunts to JP1 and JP2. the unit has not gone to sleep, but there The final line summarises the results
This will simulate a power-only cable won't be a meaningful display since of the current pulse test. Values around
being connected, and you should get the LCD controller will not have been 200mW can be expected for cables in
a display like Screen 6. Note down the properly initialised. good condition. Up to around 500mW,
resistance value shown, then remove Allow the unit to go to sleep (the they could work fine, especially for
the shunts. LCD backlight will go off), then plug light loads; higher values indicate a
Reset the micro again and go back in a cable (or press S1) to wake it up; cable that may cause problems.
to calibration mode with ESC on the this should reinitialise the LCD, and You can test cable combinations,
terminal. Save the noted value as the you should see one of the cable report- such as when a cable is supplemented
contact resistance and exit calibration. ing screens (or the idle screen). If this by a USB extension cable. However, as
If you reattach JP1 and JP2, you should is the case, all is well, and you can we noted, high-speed signal integrity
see a value very close to zero. secure the two halves of the case with is not tested by the USB Cable Tester.
At this stage, you can try out the its two included screws. If you want to check a USB extension
USB Cable Tester on any USB cables cable, first test a cable with a plug that
you have lying around. See the Usage Usage will fit into it on one end (ie, A-type or
section for further information. Screens 7-11 show the Tester in use. C-type) and a B-type or C-type on the
Screen 7 is the idle screen, which other; ideally, a USB 3.2 SuperSpeed
Final assembly shows the battery condition and time type, although you can still do the test
Power down the unit by removing until the unit enters low-power sleep if you don't have one.
the cells, detach the LCD from its mode. It is present when the unit is Verify that cable is good and note
header and reattach it to the lid as awake, but no cable is detected. its type and resistance. Then plug that
described earlier. Once a cable is inserted, you should cable into the extension cable and test
Put the front panel PCB over the see the full diagnostic display, as seen the combination. Subtract the resis-
USB sockets on the main PCB and in Screen 8. The first line shows a broad tance reading noted earlier from the
slot the pair of PCBs into place in the pass/fail assessment of the cable. new reading to measure the extension
base of the enclosure. Secure the main The second line identifies the USB cable's own resistance
PCB to the enclosure using the eight rating and the number of short circuits Screen 9 shows what might be seen
self-tapping screws. (+) and open wires (−) detected. For an if the cable has a fault; the first line
There are solder pads on the inside OK result, these are both zero. The third indicates this. The second line lists the
of the front panel PCB, so the panel line shows more detailed information nearest 'working' cable type to what has
can be affixed to the main PCB by sol- depending on the test results, listing been detected and also the number of
dering these pads to the USB sockets. the wires involved in any short or open faults present; in this case, '1−' means
The battery holder may have circuits detected. The text may scroll if that this is most likely a USB 2.0 cable
screw holes, but to avoid marring the it doesn't fit on one line. but with one conductor open circuit.
Screen 7: once calibration is complete, the main idle screen Screen 8: a typical test result on a USB-C to USB-C cable
is shown unless a cable is plugged into the ports. The shows what is expected for a fully USB 3.2 compatible cable
battery condition is reported and the sleep timer counts with two SuperSpeed lanes, meaning that it has the USB 2.0
down 10 seconds before entering low-power sleep mode. D+/D− pair as well as the SuperSpeed wires.
The third line indicates that the open tests, with the USB 3.2x1-2.0 or USB screen, as usually, there should be no
wire is the GND conductor, so it is 3.2x2-2.0 indication for the remainder. connections between pins.
unlikely to work at all. The ‘High resis- That is, unless your cable has an extra If four or more pins are listed, they
tance’ message is only shown when the D+/D− pair, which is non-standard, but might not all be shorted together, but
cable is incapable of carrying the low- it could still work on some devices. they will all be shorted to at least one
est 100mA test current. If all the combinations show USB other pin. Up to 11 wires can be dis-
The display in Screen 10 needs some 3.2x1-2.0 or USB 3.2x2-2.0, there is played, so there might be more than
explanation. USB-C leads only have a problem with the D+/D− pair either those shown if the screen is full.
one D+/D− pair (the wires required for being missing or open circuit. The x1 Also remember that you must always
a legacy USB 2.0 connection) but can designation means one SuperSpeed connect a cable between one of the
be plugged in one of two ways, and lane is present, while x2 means two UFPs and one of the DFPs. For exam-
some cable orientations do not detect lanes, which is only possible with a ple, a normal USB-A to USB-C cable
this pair. USB-C to USB-C cable. can be plugged into the two DFP sock-
In this case, the USB 3.2x2-2.0 indi- Screen 11 shows a typical UFP- ets, but this will not give a meaningful
cation is shown. That means that two only test result. If short circuits are result; the USB-C end should instead
of the SuperSpeed lanes needed for a detected in both the UFP and DFP be plugged into the UFP socket.
USB 3.2 connection are detected, but simultaneously, but no continuity is
the USB 2.0 wires are not. For these detected between the two ends, then Conclusion
cables, you must try each USB-C plug the UFP and DFP screens will alter- With this comprehensive and easy-to-
both ways around (rotated 180°). nate. This either means your cable has use piece of test gear, you can now sort
If only one end is USB-C, run the test failed very badly or (more likely) you through all your old USB cables and
one way and flip it to try the other. If have two different cables plugged in. see whether they are worth keeping.
you have USB-C at both ends, flip one For Screen 11, one end of an OTG With a 30μA sleep current, the USB
end, flip the other, then flip the first cable has been plugged in. The fourth Cable Tester will happily sit for years
end back; this will test all four plug line shows a specific message for on the shelf, always ready.
orientation combinations. this case – it has detected that the For a final flourish to your USB
You should get a USB 3.2x1 or GND and ID wires are connected. Cable Tester, you can carefully apply
USB3.2x2 result for only one of these Only short circuits are shown on this some white acrylic (or similar water-
based paint) to the etched text on
Screen 11: a the front of the LCD bezel. Wipe the
typical use for the excess away with a damp cloth and
single-ended cable allow to dry.
tests is checking
if OTG cables
correctly ground
the ID pin. Here Reproduced by arrangement with
we see that is that SILICON CHIP magazine 2022.
case, with a specific message provided on the bottom line. www.siliconchip.com.au
The header on the LCD screen aligns with two 6-pin sockets on the main PCB.
SMD
TRAINER BOARD
Are you interested in learning to solder small surface-mount devices but
don’t want to ruin an expensive board or chip gaining those skills? Perhaps
you have no choice but to learn since so many parts made these days only
come in SMD packages. This simple SMD Trainer project is a great way to
practice soldering a variety of surface-mount devices. If done correctly,
you’ll be rewarded with a series of LEDs flashing in sequence.
S
urface-mount devices if you come across anything that you eyes – but there is no reason for it to
(SMDs) are the preferred type don’t fully understand. That’s espe- come into a child’s hands as it is defi-
of parts used in most commer- cially the case if you are not expe- nitely not a toy.
cial equipment due to their compact- rienced at soldering, or have doubts
ness, good reliability, low cost and about your ability to handle SMDs. First half
widespread availability. While some Assuming you have read that arti- IC1 is a timer IC (a 7555). We’ve cho-
manufacturers are still producing cle (at least in part) and are starting to sen this CMOS variant rather than the
new through-hole parts, your choices get an idea of how you would go about bipolar transistor-based 555 to allow
become a lot more limited if you can’t assembling this board, let’s move on the circuit to work at low voltages and
handle SMDs. to describing its design. be powered by a coin cell. The supply
We know it seems daunting initially passes to IC1’s pin 8 (positive) and 1
(it did to us, too), but you will be sur- Circuit details (negative). Pin 4 (RESET) is held high
prised how easily you can do it with The circuit of the SMD Trainer Board to allow the timer to run.
a bit of practice. And that’s precisely is shown in Fig.1. We’ll explain how IC1 has its supply bypassed by a
what this board is designed for. It’s a it works before going any further. It’s 100nF capacitor and a second 100nF
working circuit designed using a wide important to know what it should capacitor stabilises the internal voltage
variety of different SMD parts, allow- do, so that you can figure out what’s on the CV pin (pin 5). IC1 is config-
ing you to try out soldering them. This wrong if it doesn’t work initially. ured with the 100kW resistors and 1μF
way, you can master the techniques There are two main parts to the cir- capacitor in the well-known astable
and become familiar with the common cuit, the second of which depends on oscillator configuration.
sizes and packages. the first. The first part of the circuit is In this arrangement, the 1μF capaci-
It’s designed so you can start with also easier to build, so you can try out tor charges from the supply via the two
the larger parts and, as you gain con- your skills on that before dialling up 100kW resistors; its top is connected to
fidence, move onto the smaller ones. the difficulty. input pins 2 and 6. When pin 2 rises
And you can test it along the way, so Common to both parts is the power above 66% of the supply voltage (about
you’ll find out pretty quickly if you’ve supply. Coin cell holder BAT1 is par- 2V), an internal flip-flop toggles and
made a mistake and have an opportu- alleled with a USB socket, CON1. Only pin 7 is connected to ground (through
nity to correct it. one of these should be fitted. We rec- a transistor inside IC1). At the same
This article includes the basic ommend the coin cell holder, as a coin time, pin 3 goes low.
instructions for building and testing cell is less likely to deliver damaging This causes the 1μF capacitor to dis-
the SMD Trainer Board, along with current in case you make a mistake charge through the lower 100kW resis-
a description of how it works. The building it. tor into pin 7, until the voltage on the
accompanying article provides con- Due to the presence of a coin cell, capacitor reaches 33% of the supply
siderably more detail regarding the take care that the SMD Trainer Board (about 1V). The flip-flop resets, pin 3
necessary tools and techniques. is kept out of reach of children (swal- goes high, pin 7 stops sinking current,
We recommend that you look at that low/choke hazard). It has flashing the capacitor begins charging again,
article now and refer back to it later lights, so it will appeal to curious and the cycle repeats.
With the provided component val- other chips, but is left disconnected makes it easier to keep track of what
ues, the oscillator frequency is around in this case. step you are up to.
4.8Hz with a 66% duty cycle at pin 3 Each of the ten outputs noted above For the most part, this order is dic-
(ie, pin 3 is high about 2/3 of the time). has a 1kW series resistor and LED con- tated by the component heights. Com-
When pin 3 is low, current is sunk nected to its output. Thus, a clock sig- ponents that are close to the PCB are
from the supply via LED12 and its nal at pin 14 causes the LEDs to light placed first as they don’t restrict the
1kW series current-limiting resistor, up in order, one at a time. placement of taller parts. Also, this
causing it to light. When pin 3 is high, The components around IC2 have means that the PCB can be turned
MOSFET Q1 is switched on by the a variety of sizes to present a more upside down without the through-
positive voltage at its gate, and cur- interesting challenge; IC2 is also in a hole components falling out; they are
rent flows through LED11 and its series smaller SMD package than IC1. See held on the PCB by the work surface.
resistor instead. Thus, these two LEDs Table 1 for more details. Working with SMD parts has sim-
flash alternately. ilar motivations, but there is much
This first part of the circuit is built Placement and order less need to invert the PCB, so no real
from larger SMD parts, like those we Our recommended assembly order for chance of parts falling out. Also, most
usually include in our projects when most through-hole designs is for a few SMD parts have a low profile.
through-hole parts are unsuitable. reasons. Working by component type, Therefore, in SMD assembly
It can operate independently of the for example, starting with resistors, the primary consideration will
remainder of the circuit, and can be then diodes, capacitors and then ICs, be to place the more difficult-to-
built and tested as the first part of a
two-part challenge.
Second half
A horizontal line on the PCB divides
it neatly into two distinct parts; part
two is below this line.
IC2, a 4017-type decade counter,
is the heart of the second part of the
circuit. It is powered from the same
supply as IC1, connected to its pin 16
(positive supply) and pin 8 (negative
supply). Its supply is also bypassed by
a 100nF capacitor for stability.
IC2 has ten outputs at pins 3, 2,
4, 7, 10, 1, 5, 6, 9 and 11. These
are driven high, one at a time, in
response to a clock signal applied to
pin 14. This signal comes from pin 3
of IC1 mentioned above. Pins 13 and This is the SMD Trainer board that we put together (shown at approximately
15 are pulled low to allow normal 166% actual size). If you’re having trouble making out the M0603/0201 LEDs, it
counting operation. Pin 12 is a carry might be because they’re not fitted! We couldn’t solder these by hand, and won’t
output, which can be cascaded to pretend that it’s easy to do so.
Figs.2 and 3: start by fitting the components in the top half of the PCB, which forms the alternate flasher, lighting LED11 and
LED12. These components are larger SMDs that are generally not too hard to solder. Once you have those working, you can
move onto the more challenging parts below, which form an LED chaser. With IC2 and its bypass capacitor in place, fit LED1,
LED6 and their series resistors, then move onto the smaller parts, testing it at each step to ensure your soldering is good.
Completion
Take your time and work through the
differently-sized LEDs and resistors in
turn. Don’t be disappointed if you can’t
solder the M1005/0402 or M0603/0201
parts by hand. We have not used any-
thing smaller than M1608/0603 in any
There’s a set of TQFP pads located on the underside of the PCB. This is for you of our designs, and even we find any-
to practice soldering, and does not have any electrical connection to the circuit. thing smaller than M1005 challenging.
Soldering
TipS & TrickS
While the only differences between SMD and through-hole components is
packaging and how they are soldered to the PCB, there is a lot of jargon
surrounding SMDs and new techniques required to work with them, especially
the smaller types. This article accompanies our SMD Trainer project and
provides a lot of detail to help you become an SMD soldering master.
Image source: www.pxfuel.com/en/free-photo-qhfan
U
ndoubtedly, some people electrolytic can capacitors sitting on sides, the numbers might be reversed
would prefer to learn how to sol- a small plastic base with SMD-style (eg, M1632/0612).
der SMDs by getting a hold of the leads protruding. While smaller than The metric digits are in tenths of a
Trainer board (see page 36) and some most electros, they are still larger than millimetre, so an M3216 part measures
parts and just getting stuck into assem- most surface-mount passives, so they 3.2mm long by 1.6mm wide. Also note
bling it. However, soldering SMDs is a are not hard to work with. that the two terminals will be situated
lot easier if you know the tricks. The parts in chip packaging are at opposite ends, lengthwise.
You might find the information in often described by a four to six-digit Under the imperial system, each pair
this article helpful even if you don’t code, and there are both imperial of digits accounts for 1/100th of an
plan on building the SMD Trainer. and metric versions of this code. For inch, so a 1206 part is 0.12in by 0.06in,
There’s plenty of general advice and example, a common 3216 metric sized close to the metric equivalent.
hints here, so it’s well worth a read. part would be interchangeably known Table 1 summarises some of the more
However, keep in mind that this article as 1206 under the imperial system. common two-lead sizes. Note the last
is intended to accompany the Trainer; Confusingly, there are some parts row showing a five-digit imperial code
it does not describe less common com- with the same codes in both systems (with a dimension under 1/100th of an
ponents and SMD packages that do not (including 1206), but they are very inch or 0.25mm!). You can also see how,
appear on the Trainer PCB. different sizes! confusingly, some codes (such as 0603
If you have some SMD experience One way of differentiating these is and 0402) are present in both rows.
but still might have something to learn, to use the ‘M’ prefix for metric sizes; On our Trainer board, the parts
you could read through this article and this is what we prefer, and we will around IC1 are all M3216/1206 size.
skip over any sections about subjects usually quote both to resolve ambi- This is one of the largest sizes for
that you already understand. guity. For example, you will often see which there is a comprehensive range
(M3216/1206) in our parts lists. This is of parts, so it is a good choice for using
SMD component sizes and packages the largest resistor and capacitor size SMD parts where there is no need to
Many of the components used in our that we have used in the SMD Trainer. go smaller.
Trainer design (including the resistors, Larger parts are available, though; the The LEDs around IC2 vary from
capacitors and diodes) have two leads next step up is usually M3226/1210 M3216/1206 through M2012/0805,
(terminals) and are in so-called ‘chip’ and then M4532/1812. M1608/0603 and M1005/0402 down to
style packaging. These are small, flat The first two digits determine the M0603/0201. Each has a corresponding
and roughly rectangular. These tend component length, while the other resistor of the same size.
to be the most numerous type of com- digits determine the width. Most parts Another two-lead package that you
ponents in any design based primarily are longer than they are wide, so the might see is often used for diodes and
on surface-mount parts. first two digits will be greater, but this is known as SOD-123 (small outline
Some passive components come in is not always the case. Usually, the diode). These are similar in appearance
different types of SMD packages. For leads are along the short sides, but in to the transistor packages we’ll describe
example, it’s common to see small cases where the leads span the longer below, but only have two leads.
PCB holder
Many boards that use SMDs are quite
small, and it can be helpful to secure a
PCB in place while working on it. It’s
also handy to be able to move it around
This is a close-up of some solder wick braid. It’s normally sold on a reel and is
to access a particular component at a used for cleaning solder.
certain angle. Source: https://commons.wikimedia.org/wiki/File:Solder_wick_close_up.jpg
Tool’s like Jaycar’s TH1982 Third
Hand PCB Holder or Altronics’ T2356
Spring Loaded PCB Holder are ideal.
The PCB is held in place but can be
adjusted, or the entire tool rotated, to
allow access from different angles.
While these tools are not expen- A solder sucker is better for removing a larger volume of solder, while a braid is
sive, even something like Blu-Tack or better for smaller jobs such as SMD components.
a similar reusable putty can be a handy Source: https://commons.wikimedia.org/wiki/File:Solder_sucker.jpg
These movements are what has to Inspect the part closely with a magni- finer pitch, down to about 0.4mm (eg,
be practised. The timing will also fier. If the joint appears dry or unclean, TQFP-144).
depend on things like your iron tem- then apply fresh flux and gently touch In these cases, it’s easier to drag solder
perature and choice of (tin-lead or the clean iron tip against each lead in the ICs. Once the chip has been tacked
lead-free) solder. turn. You’ll find that even this step of in place and flux applied to the pins, a
If you experience a solder bridge, and refreshing each lead will help distrib- small amount of solder is loaded into
as long as the part is correctly aligned, ute solder to where it should be. the iron’s tip and then gently dragged
continue to solder the remaining leads. along a row of pins. Surface tension
Then sort out the bridge. Drag soldering pulls a small amount of solder from the
Use the technique described earlier When SMD components have pins tip and onto the pins. Done correctly, it
to remove solder from bridged leads. that are very close together, it becomes forms perfect joints the first time.
Apply more solder if needed (espe- impractical to solder them individu- It’s generally better to apply too
cially if you can’t easily access the ally. The only component on the SMD much solder than not enough because
bridge). Apply flux, braid (see below) Trainer PCB that we would consider bridges are easier to see than joints
and then the iron. Allow the braid to having such tight pin spacings is IC2, with insufficient solder, and they are
absorb some solder, then carefully slide in an SSOP package with 0.65mm easily cleaned up using braid (see
both away. pin pitch. Some chips have an even below) and more flux.
Like the chisel, the knife tip can make contact with a
large area of the board at one time. Its angle makes it
more comfortable for running down the sides of ICs.
Common soldering iron tips; most are suitable for SMD work.
►
Reflow soldering doesn’t use a
soldering iron at all – temperature-
controlled hot air or IR is used to
melt the solder ‘paste’ applied to the
component and copper tracks to be
soldered. The board passes through
the oven, the solder paste melts and –
hey presto! – a soldered joint.
L R
O
ften the subject of this
column is initiated by a reader’s
request. In this case, Mr Martin
van Doorn from Holland needed an
op amp tester. To create a tester that
covered every op amp parameter would
be very complex – more a job for a team
at say Peak Electronic Design than my Fig.2. Here’s a typical studio application for the RS boards, adding balanced XLR
own ‘sole-trader’ approach. So, having inputs to an upwards compressor (low-level ambience booster).
dodged that job, I did come up with a
viable alternative idea.
Mission creep
In audio equipment, op amps are
surprisingly reliable, with a failure rate
almost as good as single small-signal
transistors. Their most common failure
mode is the inputs getting zapped by
abuse – for example, connecting large,
charged capacitors or 48V phantom
power with no protection. This usually
results in the output permanently stuck
at one of the power rails or a short
between the power pins. In such cases
it’s a straightforward go/no-go test with
a DVM/multimeter or simply sniffing for
smoke. A more subtle failure is input
transistor degradation, resulting in a Fig.3. A problem with the RS board was a lack of provision for the large capacitors
high noise level, a major problem for required for audio work.
+
C7* C8*
*Feedback
components Vb Vb
R10* R11*
Bias R6 R3
–input V+
R3
pad
0V
C1 C3 R4 C11
Output
+
2 7 V+ V–
Input – – 0V R12 C9
6
+
+ R5 IC1
3 4
Input + +
8 Op amp inputs
C2 5 C10
100nF R13
0V V+ R6 +input
R1 R2 pad Power on 3-pin
Vb bias C6 connection
R9 V–
C5
Vb C12
+ 0V
C13 R8 Link pads
Fig.6. The board has provision for experimentation in the form of four ‘blob points’.
Essentially, five pads connected in strips like a bread board.
R14
Basic circuit
Component functions
10kΩ Rf
Sum input C4 R7 Normally, for a board like this,
1µF 10kΩ
C7
the components would be
+
47pF C8 Rin
– annotated according to their
Input
IC1
R10 R11 Output
function. On the RS board for
Bias
+
Gain = – Rf/Rin
example, the negative feedback
R3 –input V+ 0V resistor was called Rb. To
pad C11 C9 keep things simple for the
C1 C3 R4 100nF 10µF Output PCB designer and constructor
+
2 7
Input – – 0V 25V
6
+
R5 IC1 I’ve decided to stick with
+
3
Input + +
8
4 R12 conventional numbering.
5 C10 47Ω R13
C2
100nF 100kΩ
H e r e ’s a l i s t o f t h e
0V V+ R6 +input
R1 R2 pad Power on 3-pin components and their possible
Vb bias C6 connection
R9 22pF V– functions. Things will become
C5
C12 clearer when specific circuits
Vb 100nF
are shown where many of the
+ 0V
C13 R8 Link pads board’s component positions
Link Used Not used are left empty.
R4
This is the input resistor for an inverting
amplifier configuration, commonly
designated ‘Rin’. It can also be the
negative-phase (‘cold’ in audio parlance)
input resistor on a differential amplifier.
Fig.11. The assembled board – the op amp is a TDA1034, the original NE5534, R6 is usually linked to ground in inverting
designed by Philips. The date code is 1977 and this one was used in Pink Floyd’s amplifiers via a link. A low value, such
touring mixing desk made by Midas for Britannia Row. It’s still working fine, having been as 560Ω, is often used for audio for
installed many times. low noise while providing a degree of
+
C7* C8*
the same value as the feedback –
network giving lowest DC Feedback Input2
R10* R11* 10kΩ IC1
components
Bias Output
offset. For single-supply rail +
use, it is connected to the half- R3 –input V+
0V
rail bias network consisting of C1 C3 R4 pad
22µF 22µF 10kΩ C11
R8 and R9 via another link. Output
+
2 7
Input – – 0V R12 C9
6
+
The link area is shown in Fig.7. R5 IC1
+
3 4
Input + +
8
C2 5 C10
R5 0V V+ R6 +input 100nF R13
R1 R2 pad Power on 3-pin
This can be the positive phase connection
Vb bias C6
input resistor on a differential R9 V–
C5
amplifier. In the non-inverting Vb C12
configuration, it becomes the + 0V
input RF filter in conjunction C13 R8 Link pads
with C5.
C4 and R7 Fig.12. Summing or mixing amplifier with an extra input – the composite bipolar capacitor (C1 and
These provide a second input C3) is optimised for good LF response. Note: red components shown are in addition to those in Fig.9.
to the inverting amplifier’s
input when used as a virtual earth
C1 0V
summer or mixer. –input
R +
R 14
R14 12
R7 R4 0V
This is the all-important negative Input
feedback resistor. There is provision for C4 R13
Semiconductors
IC1 Single op amp, such as NE5534.
Can be 8-pin DIP through-hole Fig.14. The completed summing amplifier.
or SOIC surface-mount part.
R6 non-inverting input R13 output capacitance isolation
Resistors grounding / bias resistor, resistor 39Ω to 600Ω
All standard 0.25W case size, usually typically 1kΩ to 100kΩ
metal-film, use the 1% 0.6W MRS25 ( m u c h h i g h e r, 1 M Ω t o Capacitors
series for audio. 4.7MΩ, for FET op amps) C1, C2 input coupling capacitors,
R1, R2, R3 input grounding/pull-down R7 summing input resistor typically 1µF to 22µF
resistors 22kΩ to 100kΩ R8, R9 half-rail bias resistors equal C3 part of bipolar capacitor with
R3 bipolar capacitor bias resistor value, 10kΩ to 100kΩ C1 or big lower arm feedback
or link to ground for using R10, R11 extra feedback resistors for capacitor
big lower-arm feedback filters C4 extra input coupling
capacitor in C3 position. R14 feedback resistor zero to capacitor for summing input
R4, R5 op amp input resistors, 220kΩ (much higher, 1MΩ or small lower arm feedback
typically 1kΩ to 100kΩ to 4.7MΩ, for FET op amps) capacitor
+
47pF C8
IC1 Apart from a voltage
Input + follower, this is the simplest
Output
Feedback
components R10 R11 Blocking
Gain = 1 + (Rf/R1) amplifier circuit that can be
Bias capacitor
built on the board. There
R3 –input V+
Bias 1/2 supplyV+
are two ways of feeding
pad C11
C1 C3 R4 100nF
C9 the input. The simplest is
+ 100µF Output
+
Input –
2
– 7
0V 25V to come in via the two-pin
6
+
R5
1kΩ 3
IC1 input Molex connector
Input + + 4
8 C10
R12 shown in the circuit in
C2 5 47nF
0V 220nF R6
V+ 100kΩ +input 100nF Fig.9 and the overlay in
pad Power on 3-pin R13
R1
connection 100kΩ Fig.10. An alternative is to
R9 Vb bias C6
R2 22kΩ C5
V– use the inverting input on
1MΩ
Vb
220pF Link to connect C12 the three-pin connector via
negative rail to 0V
+ 0V
C1. This enables a bipolar
R8 Link pads input coupling capacitor
C13 22kΩ
10µF Link Used Not used composed of C1 and C3
to be used. This network
Fig.15. Non-inverting amplifier with gain of 10x and single-rail biasing. can be biased to give the
lowest distortion. This is
useful for low-impedance applications
R
14
C7
0V
where the input resistor is very small.
R
–input A completed inverting board is shown
C2 +input
R 6 R5 R2 in Fig.11.
12
C5 R7 +
Summing amplifier
R13
C4
This is just an inverting amplifier with
C 0V
10 IC1
Output an extra input resistor. Both inputs on
J1 and J3 are used. The circuit is shown
R R
C13
+
9 8 C9 C11 0V in Fig.12. The bipolar capacitor set
V+
+ up was used for an equaliser where a
low-pass filter output of a state-variable
filter was mixed with the high-pass
Fig.16. Overlay for non-inverting amplifier – note bias links. creating a notch filter. The high value
used (11µF) minimised the LF response
droop. The overlay is shown in Fig.13
and Fig.14 shows the construction.
Non-inverting amplifier
This is probably the most common op
amp circuit, typically giving any gain
from 1 to 1000 (0dB to 60dB) along
with a high input impedance. A circuit
giving a gain of 10x is shown in Fig.15.
This circuit is more complicated
because it is shown designed for
single-rail (rather than the normal
dual-rail powering). This is achieved
by feeding the non-inverting input with
a half-rail bias voltage. The overlay is
given in Fig.16. A useful application
of this configuration is a microphone
Fig.17. Fully stuffed non-inverting amplifier. preamplifier. This consists of a non-
inverting amplifier with variable gain
C5 RF filter, 47pF to 470pF Connectors and a step-up input transformer. Fig.17
C6 NE5534 compensation; not Molex 0.1-inch pitch PCB connectors shows the completed board. To run it off
used for gains over 5: 22pF Molex equivalent 2 off each JYK the dual-rail supply, leave off the half-rail
for unity gain, 4.7pF for RIAA P2500-02 two-pole straight header and bias and link R6 to ground.
stages, 2.5mm pitch three-pole P2500-03 Rapid order codes
C7, C8 feedback, C8 is for extra-large 22-0950 and 22-0955 Next month
polystyrene filter capacitors In Part 2, we will finish describing this
C10 power rail decoupling 0.1µF Classic configurations design with a differential and RIAA
ceramic 5mm Here’s a few of the possible circuits phono amplifier, plus a useful and
C11, C12 0.1µF ceramic 5mm or up to that can be built on the board; I’m sure unusual low-frequency compensated
10µF electrolytic readers will adapt the board for many op amp amplifier.
F
or the previous three months potentiometer or JFET electronically between A and B is fixed and is referred to
we have been discussing electroni- controlled resistors. Real mechanical as the end-to-end resistance, or simply the
cally controlled resistance, focusing potentiometers are not perfect so do resistance of the digipot. This resistance
mainly on the use of JFETs (junction field- not have an infinite effective number varies widely for available devices – for
effect transistors) as voltage-controlled of steps. Their effective resolution and example, from 1kΩ to 1MΩ – but devices
resistors. This series was instigated by repeatability (the accuracy with which with 5kΩ to 100kΩ resistance are more
a post on the EEWeb forum about elec- the same value can be set after moving common. Often, a given IC will be available
tronically controlling resistance, but not away) may be about 0.5% to 1%. Multi- in a few different resistance values.
specifically about JFETs. Although JFETs turn mechanical potentiometers provide The wiper is implemented using a set of
(and sometimes other FETs) are com- better resolution (finer adjustment) at electronic switches. One of the switches
monly used as electronically controlled higher cost. Wirewound mechanical will be on to determine the wiper position,
resistors, and have significant historical potentiometer have lower resolutions all the other switches are off. The A, B and
significance, they are not the most widely because the wire turns effectively create wiper (W) connections correspond with the
used approach in modern systems. So, this mechanical steps in the resistance value. standard potentiometer symbol shown in
month we will look at ‘digipots’ – digi- The resolution of an N-step digipot is Fig.1. The wiper switches connect to all
tal potentiometers – which are
integrated circuits providing a A
similar function to mechanical SN
potentiometers and trimmers.
Digipots are available
in both rheostat and RN–1
SN–1
potentiometer versions (see Control logic
Fig.1). Potentiometer versions
can usually also be used in RN–2
rheostat mode by using the SN SN–2
Control signals
resistance between the wiper or standard bus
SN-1
and one of the ends (A or B). SN–2
Digital Resistance Switch RN–3
The resistance (rheostat) or interface register logic Wiper (W)
circuit is switched off, then its setting will be the same when
the circuit is next switched on. The mechanical potentiometer
‘remembers’ its setting, unless of course someone moves it Fig.3. AD5243 block diagram, an I2C-controlled dual
deliberately or inadvertently while the circuit is off (easily done 256-position potentiometer.
W
CS The DS1809 digipot
Up/down 32-position Fig.5 shows a block diagram of the DS1809 ‘Dallastat’ digital
U/D
counter decoder
ZCEN potentiometer, also from Maxim/Analogue Devices, typical price
is around £10 from Mouser or DigiKey. Note that despite being
costlier, unlike the other two devices mentioned above, which
are strictly surface-mound devices, the DS109 is available in
an 8-pin through-hole package. The DS1809 is a 64-position
linear digipot, available with end-to-end resistance values of
10kΩ, 50kΩ, and 100kΩ. It is aimed at replacing mechanical
potentiometers in general applications. The DS1809 has an on-
L chip non-volatile memory for the wiper position.
The control interface to the DS1809 is designed to facilitate
Fig.4. MAX5407 block diagram, a 32-tap logarithmic taper
simple pushbutton control of wiper position – so it does not
digipot with 1dB steps.
require a microcontroller or any software development. However,
and data (SDA). A similar device, the AD5248 (similar price) the interface can be easily controlled by a processor if desired.
provides two rheostats and has address pins allowing multiple For pushbutton operation the input pins UC (up control) and DC
devices to share the same I2C bus. Usually, the I2C bus would (down control) are connected to the switches, as shown in Fig.5.
be connected to a microcontroller and software running on External switch debounce circuitry is not required for correct
that device would control the potentiometer wiper positions. operation. The DC and UC pins are pulled up (by resistors in the
The wiper positions for the AD5243 are set by writing an 8-bit device), so pushing the switches creates a low pulse on the input.
value via the I2C along with a single address bit indicating which A pulse on one of the inputs (DC or UC) which is longer than
potentiometer is being controlled. The current wiper position 1ms but less than 0.5s will cause the wiper position to increment
can also be read from the device via the bus. The potentiometer (UC) or decrement (DC) by one position. Repetitive pulses (to zero)
can be put into a shutdown mode via a control bit. This sets an must be separated by 1ms (high input) or they will be ignored.
open circuit at terminal A and shorts the wiper to terminal B. A low input longer than 0.5s is interpreted as a ‘push and hold’
The AD5243 does not have a non-volatile memory but has very and will cause the wiper to change position by one step every
low power consumption (1.3µA supply current) so could be kept 100ms to facilitate quick adjustment over a larger range. Once
powered up when the rest of the system is off in order to retain the the wiper has been moved to one end it will stay there if further
wiper setting (this approach is discussed in the device datasheet). inputs for the same direction are received.
For the DS1809 to store the wiper position in its non-volatile
The MAX5407 digipot memory at power-down an external capacitor and Schottky diode
Fig.3 shows a block diagram of the MAX5407 from Maxim are required, wired as shown in Fig.6. If the DS1809 is controlled by
Integrated (now a subsidiary of Analog Devices, typical price a processor, then wiper
is around £2.50 from Mouser or DigiKey). The MAX5407 is a position storage can be
logarithmic taper single digipot potentiometer with 32 tap points instigated via the STR Schottky diode
configured to have 1dB steps between taps. It has an end-to-end pin without the external
resistance of 20kΩ. The MAX5407 is aimed at replacing mechanical diode and capacitor.
potentiometers in audio applications, for 1
Vcc
8
volatile memory. + 4 5
RL 10µF
A problem that can occur with digipots in
audio applications is an audible click when
STR NV memory
the wiper position is changed. To address this UC
issue the MAX5407 features a zero-crossing Control logic
UD
detector. Changing the wiper at the point
the audio waveform is crossing through 0V Fig.6. DS1809 block diagram
prevents sudden signal level changes which showing the addition of an external
can be heard as clicks. When this is enabled capacitor and Schottky diode to store
by taking the ZCEN pin low the MAX5407 Fig.5. Block diagram of the 64-position linear the wiper position in its non-volatile
waits for up to 50ms for zero voltage across digipot DS1809. memory at power-down.
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
Fig.1. Various fingerprint modules are readily available online, priced from £15 upwards. We are using the R503 model (top left) in
this article, which costs around £22.
B
eing able to recognise So, how could we have fun with a readily available – see Fig.1 for some
different fingerprints is a useful fingerprint reader in a project closer to examples. They start from around £15
biometric feature to add to an home? Perhaps the classic Electronic for something basic that a hobbyist
electronics project, especially one that Combination Lock project (PE, December might use, to units costing many
involves an element of security. By 2019) could be updated, or maybe you hundreds of pounds which are designed
identifying different people from their could switch your home-security system for commercial use. Even the cheaper
unique fingerprint, it becomes possible on and off. Whatever the application, fingerprint modules pack an impressive
to distinguish between authorised and a fingerprint reader must primarily be number of features and capabilities.
unauthorised users, thus allowing a capable of reading a fingerprint, and For example, they typically contain
specific action to be performed (or not). then determining who it belongs to, either an optical or capacitive sensor,
Real-life examples of how fingerprint and hence if it belongs to an authorised which feeds image data to an onboard
readers are used include: controlling user, or not. microcontroller for converting any
access to a locked door (via a solenoid detected finger into a ‘template’ pattern.
or electromagnet), turning on a device Fingerprint modules Some fingerprint modules include other
such as a computer, or even triggering If you search online, you will see that elements such as LEDs, a sounder, or
a cashless payment. there are many fingerprint modules a vibration-motor for tactile feedback.
Message demo
Now that we have seen how to construct the bytes for a message
that is sent to the fingerprint module, and also understood what
JTAG Connector Plugs Directly into PCB!!
the response should look like, let’s now send the actual Command No Header! No Brainer!
message to see if it does indeed turn on the blue ring-LED as we
expect. We will also check the values returned in the Acknowledge
response message. Performing this simple test will also check
that we have connected the fingerprint module correctly.
Download the file FP_MessageDemo1.txt from the December
2022 page of the PE website and install the program into the
PicoMite. When you RUN the program you should see the
blue ring-LED turn on. If not, check the six connections. A
common error with serial devices is getting the Tx and Rx Our patented range of Plug-of-Nails™ spring-pin cables plug directly
connections reversed – remember, Tx from the fingerprint into a tiny footprint of pads and locating holes in your PCB, eliminating
reader goes to Rx on the PicoMite, and Tx from the PicoMite the need for a mating header. Save Cost & Space on Every PCB!!
goes to Rx on the fingerprint module. Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
Challenge
If you examine the program code, you will see that it is well
www.PlugOfNails.com
commented, allowing you to try other parameter values to Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
make the LED behave differently. Why not make it flash a
Eek! Zeke!
One of the things I’ve been meaning to
talk to you about is an amazing 11-year-
old kid called Zeke. I was first intro-
duced to Zeke and his dad Eric a couple
Fig.4 Checking the LogiSwitch BOB works in the limit switch. of months ago (Fig.5). In this image we
see them holding a circuit board Zeke
the NL/HS signal goes high, the program while the two on the right are marked designed using AWR Microwave Office
in the microcontroller that’s monitor- ‘NC’. When the switch is in its deacti- software from Cadence Design Systems
ing and using this signal can change its vated state, a small bar connects the two (Zeke is the one on the left).
input to an output, pull the signal low NC terminals. When the switch is acti- There’s so much to tell here but (as
for 5µs, and then return it to being an vated, this bar moves, disconnecting the always) so little time to tell it. In a
input again. The LogiSwitch IC will un- two NC terminals and connecting the crunchy nutshell, Zeke has been inter-
derstand this to be an acknowledgement two NO terminals. ested in science and technology since
that the switch event has been seen and Observe the clear plastic piece that he was about one and a half years old
it will take over pulling this signal low. holds everything in place. The blue when Eric took a piece of wood and at-
This saves you having to set a flag in your outer shell sits on top of this without tached a small incandescent light bulb,
code to say when you are waiting for the any gap whatsoever. I started by cover- a battery holder, and a knife switch of
switch to go inactive. Last, but not least, ing the internals with painter’s mask- the type favored by Igor and Franken-
the TG signal starts off in a high state. ing tape to stop dust getting anywhere stein (‘It’s alive! It’s alive!’). Zeke car-
Every time the switch is activated, the it shouldn’t. I then used a small file to ried that little creation around with him
TG signal toggles to its opposite state. make a wire-sized groove between the two everywhere, turning it on and off and
My mission was to insert this BOB into halves of the clear plastic (the red lines chanting ‘switch, battery, light bulb…
an 8108 lever-arm limit switch with ad- shown on the left). There are ‘steps’ in switch, battery, light bulb…’
justable roller (Fig.3b). These are won- the clear plastic on the right (on the far When he was eight, Zeke informed his
derful devices, but it has to be acknowl- side, middle, and nearside pieces stick- parents that he wanted to communicate
edged that there’s not a lot of spare space ing out). I also filed half of the middle with the astronauts and cosmonauts on
inside (Fig.3c). What is inside is four in- step down further to make room for the the international space station (ISS). If
dividual terminals. The two on the left- FET on that side of the BOB (the red I’d said this to my dad, he would have
hand side of this image are marked ‘NO’, lines shown on the right). patted me on the head and wished me
Left-right: Fig.5. Budding electronic engineer Zeke, with his dad Eric, showing a PCB he designed; Fig.6. Zeke with his first ham radio;
and Fig.7. Zeke working on his 10-foot helical antenna.
ELECTRONICS
£8.99
CD
Mike & Richard Tooley CD
JUMP START
TEACH-IN 3
£7.99
The three sections of the Teach-In 3 CD-ROM cover a Mike & Richard Tooley
TEACH-IN 5
FROM THE PUBLISHERS OF
huge range of subjects that will interest everyone involved 15 design and build circuit projects for newcomers or
CIRCUIT SURGERY JUMP START
in electronics – from newcomers to the hobby and i The how and why of circuit design those following courses in school and colleges. 15 design and build circuit projects
dedicated to newcomers or those
PRACTICALLY SPEAKING
following courses in schools and
students to experienced constructors and professionals. The projects are: n Moisture Detector n Quiz
colleges
i The techniques of electronic
project construction PRACTICALLY SPEAKING
The first section (80 pages) is dedicated to Circuit INGENUITY UNLIMITED
i Over 40 different circuit ideas
Machine n Battery Voltage Checker n Solar- The techniques of project construction
Surgery, EPE/PE’s regular clinic dealing with readers’ Powered Charger n Versatile Theft Alarm n Spooky
PIC ‘N MIx
Starting out with PIC microcontrollers
nics
Teach-
In FREE Circuits n Frost Alarm n Mini Christmas Lights n
queries on circuit design problems – from voltage ro
FREE M
TEACH-IN 1 CD-ROM bo
rne
Publishing Ltd 201
0 CD-RO
t
W
1
TWO TEACH-INs FOR
Elec
©
TWO TEACH-INs FOR
THE PRICE OF ONE!
n Egg Timer n Signal Injector Probe n Simple Radio
THE PRICE OF ONE !
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.
£18.95
ELECTRONICS FROM THE PUBLISHERS OF
What a Bargain!!
if not, open double-click
and
Explorer f
index.pd
This CD-ROM
Adobe®
requires
Reader™
from
an d w eb l i n k s
UAL
projects, data, assembly instructions and web links.
dable Free
Downloa be.com
MAN.co.u
www.ado
BA SE .epe mag
k
2011
www ne Publishi
ng Ltd.
RASPBERRY Pi ®
DISCRETE LINEAR CIRCUIT DESIGN
the necessary software A COMPREHENSIVE GUIDE TO RASPBERRY Pi
Practically Speaking – • Understand linear circuit design INTRODUCING THE ARDUINO
• Pi PROJECT – SOMETHING TO BUILD • Design simple, but elegant circuits
The CD-ROM includes
• Hardware – learn about components and circuits
• Pi CLASS – SPECIFIC LEARNING AIMS
for the series, so that • PYTHON QUICKSTART – SPECIFIC PROGRAMMING TOPICS
the techniques of
• Learn with ‘TINA’ – modern CAD software
• Five projects to build: Pre-amp, Headphone Amp,
• Programming – powerful integrated development system
• Microcontrollers – understand control operations
• Pi WORLD – ACCESSORIES, BOOKS ETC
the files for:
Tone Control, VU-meter, High Performance Audio Power Amp • Communications – connect to PCs and other Arduinos
• HOME BAKING – FOLLOW-UP ACTIVITIES
readers and circuit project building.
FREE
designers can get DVD-R
OM
ALL THE
SOFTWA
TEACH-I
RE
N6
FREE M
-RO
CD CIRCUIT
n Teach-In 8
FOR THE RRY Pi
n Microchip MPLAB
RE FOR
SERIES SOFTWA 7
CH-IN
THE TEA
SERIES
Smartscope software.
building PIC-based projects
ELECTRONICS
£8.99
SERIES
FOR
THE TEACH-IN
8
This CD-ROM version of the exciting and popular Teach-In 8 series INTRODUCING THE ARDUINO
• Hardware – learn about components and circuits
• Programming – powerful integrated development system
has been designed for electronics enthusiasts who want to get to • Microcontrollers – understand control operations
• Communications – connect to PCs and other Arduinos
SOFTWARE
The CD-ROM contains the software for both the Teach-In 8 and PICkit 3 series.
Practical
Electronics BACK ISSUES
Practical Practical Practical Practical Practical Practical Practical
Electronics Electronics Electronics Electronics Electronics Electronics Electronics
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out Circuit Surgery
Make it with Micromite Audio Out KickStart Circuit Surgery
Make it with Micromite Audio Out Cool Beans Make it with Micromite
Circuit Surgery Audio Out Wind turbine Electronic Building Blocks
Circuit Surgery Audio Out Circuit Surgery
Make it with Micromite Audio Out Circuit Surgery
Make it with Micromite KickStart Make it with Micromite
Exploring op amp PE Analogue Vocoder: Exploring op amp
Using and interfacing the Vocoder: Driver Using the Exploring
Using and interfacing the the Vocoder: Mastering switch Build an iButton-based
Exploring the Vocoder final Small-scale Building a budget Distortion and Designing a practical Code for an iButton-based
Simulating distortion Using transformers in Installing MMBASIC on
Using
a distortion and Exploring DACs and MMBASIC + RPi Pico + display
exponential amplifiers Driver Amplifier design versatile iButton input offsets Amplifier build I2C bus versatile iButton LM35 temp sensor Audio PSU debounce Royer oscillator
Electronic Door Lock assembly garden set-up electronic stethoscope
distortion circuits de-thump circuit Electronic Door Lockand distortion circuits audio electronics Raspberry Pi Pico distortion circuits microcontrollers = PicoMite Backpack!
power supply
Assembly
Board
clear_bit(intcon, 2);
Microchip
Learn Wind Chimes Evaluation Kit from Microchip
FCM_INTERRUPT_TMR
Simple
EF300BA110A122928352
WIN
Flowcode
Programming
86C
:2000200D928FE28073 Flowcode C
void interrupt(void)
{ if (intcon & 4) C
Learn
void interrupt(void) o(); {
bsf STATUS, RP0 Assembly
{ if (intcon & 4) clear_bit(intcon, 2);
bcf STATUS, RP1
Flowcode
:08000800F000F00S030 Hex
192kHz, 24-bit
o(); bsf STATUS, RP0
EF10000 movwf _adcon1
bcf STATUS, RP1 movlw D′192′
Hex :10001000040EF2000A0 :040000008A01122837
Learn
:040000008A01122837 86C EF10000
movwf _option_reg
Vintage Battery
:08000800F000F00S030 :2000200D928FE28073 :10001000040EF2000A0
Programming:
EF10000 EF300BA110A122928352
:10001000040EF2000A0
SuperCodec:
86C
If we do not have a a paper version of a particular SEND TO: Practical Electronics, Electron Publishing Limited
issue, then a PDF can be supplied for the same price. 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU
Your email address must be included on your order. Tel: 01202 880299 Email: [email protected] On-line Shop: www.electronpublishing.com
Please make sure all components are still available before Payments must be in £ sterling – cheque must be drawn on a UK bank and made payable to ‘Practical Electronics’.
commencing any project from a back-dated issue. All items normally posted within seven days of receipt of order. Copy this form if you do not wish to cut your issue.
Practical Electronics PCB SERVICE
PROJECT CODE PRICE PROJECT CODE PRICE
DECEMBER 2022 JANUARY 2022
Hummingbird Amplifier .............................................................01111211 9.95 Vintage battery Radio Li-ion Power Supply ....................... 11111201 9.95
SMD Trainer..............................................................................29106211 8.95 MiniHeart: A Miniature Heartbeat Simulator ...................... 01109201 8.95
SMD Trainer PCB + parts ........................................................29106211 13.95
DECEMBER 2021
NOVEMBER 2022 AM/FM/SW Digital Receiver .............................................. CSE200902A 13.95
USB Cable tester – main PCB .................................................04108211 12.95 Balanced Input and Attenuator for USB CODEC............... 01106202 11.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
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.
SEPTEMBER 2020
PE Theremin PSU ............................................................. AO-0920-01 £5.95
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95
Micromite Explore-28......................................................... 07108191 £6.95 For the many pre-2016 PCBs that we stock please see the
Ultrabrite LED Driver ......................................................... 16109191 £6.95
PE website: www.electronpublishing.com
AUGUST 2020
Micromite LCD BackPack V3 ............................................ 07106191
Steering Wheel Audio Button to Infrared Adaptor .............. 05105191
£9.95
£7.95
PE/EPE PCB SERVICE
Order Code Project Quantity Price
JULY 2020
AM/FM/CW Scanning HF/VHF RF Signal Generator ........ 04106191 £13.95 .........................................................
Speech Synthesiser with the Raspberry Pi Zero ............... 01106191 £5.95
PE Mini-organ PCB ........................................................... AO-0720-01 £14.95 .........................................................
PE Mini-organ selected parts ............................................ AO-0720-02 £8.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 2020
Arduino breakout board – 3.5-inch LCD Display ............... 24111181 £6.95 .........................................................
Six-input Audio Selector main board ................................. 01110191
£10.95
Six-input Audio Selector switch panel board ..................... 01110192
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAY 2020 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ultra-low-distortion Preamplifier Input Selector ......................... 01111112
£11.25
Ultra-low-distortion Preamplifier pushbutton Input Selector ..... 01111113 .........................................................
Universal Regulator .................................................................... 18103111 £7.95
433MHz Wireless Data Repeater .............................................. 15004191 £8.50 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bridge-mode Adaptor for Amplifier ............................................. 01105191 £7.95
iCEstick VGA Terminal ................................................................ 02103191 £5.95
Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analogue noise with tilt control ................................................... AO-0520-01 £7.95 I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
Audio Spectrum Analyser ........................................................... PM-0520-01 £8.95
payable to: Practical Electronics
APRIL 2020
Flip-dot Display black coil board................................................. 19111181 Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flip-dot Display black pixels ....................................................... 19111182
£14.95
Flip-dot Display black frame ....................................................... 19111183 Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
Flip-dot Display green driver board ............................................ 19111184
Card Security No . . . . . . . . . .
MARCH 2020
Diode Curve Plotter ........................................................... 04112181 £10.95 You can also order PCBs by phone, email or via the shop
Steam Train Whistle / Diesel Horn Sound Generator ............... 09106181 £8.50 on our website: www.electronpublishing.com
Universal Passive Crossover (one off) ...................................... UPC0320 £12.50
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
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,
ADVERTISING INDEX
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 57 Advertisement offices
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 57 Matt Pulzer
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 10
iTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv)
Electron Publishing Ltd
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1 Buckingham Road
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii)
Brighton
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 East Sussex BN1 3RA
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Tel 07973 518682
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Email [email protected]
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Web www.electronpublishing.com
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
For editorial contact details see page 7.
JPG Electronics
Britannia Maison Mes Amis
Bournemouth BH1 9EH, United Kingdom
Inn
Old Road Remember, we print the date of the last issue
ad
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: £29.99 (6 months); £54.99 (12 months); £104.99 (2 years). EUROPE: airmail service, £33.99 (6 months); £63.99 (12 months);
£119.99 (2 years). REST OF THE WORLD: airmail service, £41.99 (6 months); £77.99 (12 months); £149.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box
6337, Bournemouth BH1 9EH, United Kingdom. Email: [email protected]. PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the
Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold,
hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.
WIN!
Microc
hip
AVR-Io
Cellula T
r Mini
WIN!
U SB C
able T
ester B uild
a
PicoM
Build a PicoMite comp te i
SMD Trainer board uter
fingerprint reader
Pocke
t Wea
th e r S
USB tati on
Cable
SelTester
f-C
Digita ontained 6
PLUS! l Atten GHz
PLUS uatoDec
r 2022 £5.49
!
Techno Talk – Giant boost for batteries 12
Techn
Cool Beans – LogiSwitch debounce o Talk board
breakout
Cool B – Hidd
ea
Net Work – Energy-saving and monitoring resourcesen haz 9 772632 573023
Net W ns – Investig ards
ork – ating ro
www.electronpublishing.com Techn
@practicalelec tary en
practicalelectronics
www.e ology code Nov 20
a n d th
lectro
npubli e Que rs 22 £5.49
shing en
.com 11
@prac 9 772
632 5
ticalele 73023
c
practi
calele
ctronic
s
You read that right! We now sell the current issue of your favourite electronics
magazine for exactly the same price as in the High Street, but we deliver it
straight to your door – and for UK addresses we pay the postage. No need to
journey into town to queue outside the newsagent. Just go to our website, set
up an account in 30 seconds, order your magazine and we’ll do the rest.
www.electronpublishing.com
innovative Technology Projects
OSCILLOSCOPES
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
20 MSa/s, 14 bit continuous streaming
1 ppm time base accuracy
Arbitrary Waveform Generator
Handyscope HS5*
The 500 MSa/s 14 bit dual channel High
Resolution Oscilloscope with function generator.