Practical Electronics 2023-05
Practical Electronics 2023-05
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Make it with Micromite Audio Out
Using op amps as PicoMite Smart-light Op amp adaptor boards:
comparators Controller SMD and through-hole
PLUS!
Techno Talk – Prophecy can be perplexing May 2023 £5.99
05
Cool Beans – Arduino Bootcamp: bits, nibbles and bytes
9 772632 573030
Net Work – EV trends and updates on power generation
Key Features
• 8 to 44-pin packages
• 3.5 KB to 28 KB of internal memory
• CPU Speed up to 32 MHz
• 10-bit Analog-to-Digital Converter with Computation (ADCC)
• Automated Capacitive Voltage Divider (CVD)
• 8-bit Digital-to-Analog Converter (DAC) module
Electronics Contents
Projects and Circuits
500W Power Amplifier – Part 2 by John Clarke 17
After last month’s description, we follow on this month with amplifier construction,
beginning with the Amplifier Module PCB assembly.
Precision AM-FM DDS Signal Generator by Charles Kosina 27
This Signal Generator offers very high calibrated accuracy with an error of ten parts
in a billion. It boasts plenty of features, including amplitude and frequency modulation.
Improved SMD Test Tweezers by Tim Blythman 39
Our SMD Test Tweezers project from October 2022 was extremely popular. We’ve
decided to see what features we could add by upgrading its microcontroller.
The Wireless for the Warrior books are a the introduction of VHF FM and
source of reference for the history and hermetically sealed equipment.
development of radio communication
equipment used by the British Army Volume 3 covers army receivers from
from the very early days of wireless up 1932 to the late 1960s. The book not
to the 1960s. only describes receivers specifically
designed for the British Army, but also
The books are very detailed and include the Royal Navy and RAF. Also covered:
circuit diagrams, technical specifications special receivers, direction finding
and alignment data, technical receivers, Canadian and Australian
development history, complete station Army receivers, commercial receivers
lists and vehicle fitting instructions. adopted by the Army, and Army Welfare
broadcast receivers.
Volume 1 and Volume 2 cover
transmitters and transceivers used Volume 4 covers clandestine, agent or ‘spy’
between 1932-1948. An era that starts radio equipment, sets which were used by
with positive steps taken to formulate special forces, partisans, resistance, ‘stay
and develop a new series of wireless sets behind’ organisations, Australian Coast
that offered great improvements over Watchers and the diplomatic service. Plus,
obsolete World War I pattern equipment. selected associated power sources, RDF and
The other end of this timeframe saw intercept receivers, bugs and radar beacons.
SUBSCRIBE NOW!
Circuit Surgery
Simulating digipots
in LTspice
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Audio Out
Further circuits for the
Universal op amp board
Make it with Micromite
Multiple displays
for a PicoMite
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Kick Start
BME280 humidity, pressure
Make it with Micromite
PicoMite Fingerprint Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Fox Report
Keeping one step ahead of
Make it with Micromite
Updating the PicoMite
Circuit Surgery
Using digipots with
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Fox Report
Hopeless helplines and
Audio Out
Universal board for dual
Circuit Surgery
Using op amps as
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Make it with Micromite
PicoMite Smart-light
Audio Out
Op amp adaptor boards:
01202 087631
op amp amplifiers and temperature sensor Reader coding linear regulators scammers is a full-time task firmware active filters NASty problems audio op amps comparators Controller SMD and through-hole
WIN! Remote Control Driveway Gate Cooling Fan Controller & Raspberry Pi 500W Power
Microchip WIN!
Even better! WIN! 500W Power
PIC32CX-BZ2 Range Extender Remote Control Loudspeaker Protector Pico BackPack Microchip amplifier
and WBZ451
Curiosity
dsPIC33EV 5V
Our new improved
Microchip
ATtiny817 amplifier
CAN-LIN Xplained Pro
Development WIN! Starter
Board
Microchip Kit SMD Test Tweezers WIN!
Curiosity
Development WIN!
Board Fingerprint Microchip
WIN! PIC32CM JH01
Three low-noise
Reader Curiosity Pro
Development
Board HF-UHF Amplifiers
Classic LED Fingerprint Capacitor
Discharge Precision AM-FM DDS
Metronomes Reader Building the Capacitor Signal Generator
35MHz-4.4GHz Welder
LTDZ V5.0 Discharge Welder Control RC servos
Signal Generator
budget with the Pololu
Spectrum Micro Maestro
Analyser
Tesla Coil Semaphore
Multi-Channel Solid-State Signal for
Speaker Protector Flame OO-Gauge Amplifier
Discharge Model Railways Clipping Indicator
PLUS! PLUS! PLUS! PLUS! PLUS!
Jan 2023 £5.49 Feb 2023 £5.99 Mar 2023 £5.99 Apr 2023 £5.99 May 2023 £5.99
Techno Talk – Raudive voices revisited 01 Techno Talk – Mushroom magic 02 Techno Talk – It’s handover time 03
Techno Talk – Robots... down on the farm! 04
Techno Talk – Prophecy can be perplexing 05
Cool Beans – Introducing the Arduino Bootcamp Cool Beans – Arduino Bootcamp Cool Beans – Arduino Bootcamp: two LEDs (twice the fun)! Cool Beans – Arduino Bootcamp: 7-segment displays Cool Beans – Arduino Bootcamp: bits, nibbles and bytes
9 772632 573023
Net Work – Smart light bulbs and Alexa’s skills Net Work – Alexa update, plus space and energy news 9 772632 573030
Net Work – Satellites and the roots of the Information Age 9 772632 573030
Net Work – Smart devices with ‘Plug and Play’ simplicity 9 772632 573030
Net Work – EV trends and updates on power generation 9 772632 573030
www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics
Take out a one-year subscription and save more than £10 over the year.
Even better – save over £1 per issue if you subscribe for two years – a total saving of £26.
Electronics
Rest of the World £46.99 (Airmail)
1 Year: UK £59.99, Europe £69.99 (Airmail),
Rest of the World £84.99 (Airmail)
2 Years: UK £114.99, Europe £129.99 (Airmail),
SUBSCRIPTION PRICES Rest of the World £164.99 (Airmail)
Subscriptions for delivery direct to any address in: To: Practical Electronics Subscriptions
PO Box 6337
UK: 6-months £33.99, 12-months £59.99, 24-months £114.99 Bournemouth BH1 9EH
Europe Airmail: 6-months £38.99, 12-months £69.99, United Kingdom
24-months £129.99 Tel: 01202 087631
Email: [email protected]
Rest Of The World Airmail: 6-months £46.99, 12-months
£84.99, 24-months £164.99 I enclose payment of £ ..............
(cheque/PO in £ sterling only)
Cheques (in £ sterling only) payable to Practical Electronics payable to Practical Electronics
and sent to: Practical Electronics Subscriptions, PO Box 6337,
Please charge my Visa/Mastercard
Bournemouth BH1 9EH, United Kingdom
My card number is: .......................................................................
Tel: 01202 087631 Please print clearly, and check that you have the number correct
Email: [email protected]
Card Security Code .................. Valid From Date........................
Also via our online shop at: www.electronpublishing.com (The last 3 digits on or just under the signature strip)
Subscriptions start with the next available issue. We accept Card Ex. Date ......................................
MasterCard or Visa.
Name ............................................................................................
(For past issues see the Back Issues page.)
Address ........................................................................................
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 Spring is here at last!
Electron Publishing Limited Mob 07973 518682 The sun is out, the grass is green and it’s time to welcome you to
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected] the first springtime issue of Practical Electronics magazine. This
East Sussex BN1 3RA Web www.electronpublishing.com month, we bring you the latest news on EVs and power generation,
Advertisement offices
fun-to-build projects, insights into learning to use the Arduino, the
Practical Electronics Adverts Tel 01273 777619 perils of using op amps as comparators. how to get up and running
1 Buckingham Road Mob 07973 518682 with RC servo motors and much more.
Brighton Email [email protected]
East Sussex BN1 3RA
Turning to this issue’s projects, we have our usual, generous
Editor Matt Pulzer
General Manager Louisa Pulzer
helping of exciting circuits for you to build. First up is Part 2 of
Digital subscriptions Stewart Kearn Tel 01202 880299 the impressive 500W Amplifier we started last month. Next, a
Online Editor Alan Winstanley
Web Systems Kris Thain
Precision AM-FM DDS Signal Generator and last, but not least,
Publisher Matt Pulzer an update to our very popular SMD Test Tweezers. The latter uses
the same fundamental hardware as the October project, but swaps
Print subscriptions
Practical Electronics Subscriptions
out the microcontroller with a newer, more powerful PIC that can
PO Box 6337 accommodate expanded software. If you liked the first version
Bournemouth BH1 9EH Tel 01202 087631 then you’ll love the second one!
United Kingdom Email [email protected]
Many of the technological discoveries we once found exciting are now lucky if they can elicit a ‘Meh!’
But what about the possibility of teleportation, the ability to speed up, slow down, or reverse time, or
the capability to extract free energy from a quantum vacuum?
A
popular Nostradamus quote https://bit.ly/3LeUYxJ). I asked it for ‘A The Gods Themselves
goes something like, ‘Predicting pencil sketch of two little boys in boots Everything we’ve discussed this far is
things is difficult, especially if it and shorts using shovels to dig a hole in ‘small potatoes,’ as it were. What about
involves the future’. What? You thought the back yard.’ Only seconds later, I was antigravity, spaceships with hyperdrive
Mark Twain said that? Well, according the proud possessor of an awesome image. engines, teleportation, and things of that
to Quote Investigator, it’s been attrib- Also, I just tried using Whisper to tran- ilk? On the one hand, it’s easy to say that
uted to everyone from Niels Bohr to scribe the audio recording of a customer these things are impossible because they
Yogi Berra: https://bit.ly/2D0jiSw call into a text file. This literally saved defy known physics, but the physics we
Whoever said it first, this sentiment is me a couple of hours of wading through know and love today was inconceivable
spot on. When I graduated from univer- the video and making notes by hand – not-so-long ago.
sity in 1980, there was no way I could see: https://bit.ly/3mKIV1f As the American physicist Albert
have predicted the far future we now call Interested in learning more? Fast Michelson said in 1894, ‘The more im-
the present. I mean to say… the Internet, Company provides a wonderful over- portant fundamental laws and facts of
Bluetooth, Wi-Fi, GPS, and MEMS sen- view of 33 different AI tools you can try physical science have all been discov-
sors, all coming together to realise smart yourself for free: https://bit.ly/3YyYd6t ered…’ This was just three years before
things in the form of phones, buildings, the British physicist JJ Thomson discov-
cities and even watches, for goodness’ Ew! Sticky! ered the electron.
sake. And then there are robots and co- Do you remember the ‘before times’ pri- In 1972, Isaac Asimov published a sci-
bots (collaborative robots) along with or to the COVID-19 pandemic when we ence fiction novel, The Gods Themselves.
machine vision, artificial intelligence didn’t give a second thought to being in In a crunchy nutshell, aliens in a parallel
(AI) and machine learning (ML) that a crowded room packed with strangers, universe with different physical laws es-
actually works, and… the list goes on. shaking hands, or using doorhandles in tablish communication with us. They are
As I mentioned in my previous col- public places? These days, by compari- seeking to exchange matter and exploit
umn, I’ve been immersed in science son, the simple act of using the pump at the differences between our respective
fiction since I was a sprog. When I was a petrol station is ‘fraught with danger’. physical laws to provide us both with a
young and foolish, I truly believed all Although they’re relatively new, source of energy. What they don’t tell us
the technologies I read about were just there’s nothing revolutionary about is that this exchange will cause our sun
around the corner. As I grew older and the idea of self-cleaning germicidal door to go supernova (thereby giving them all
wiser (and balder and sadder), I came handles (https://go.nasa.gov/3yvwEjO). the energy they desire). Fortunately, we
to realise that the chances were slight But what about touch screens on elec- detect the problem and determine the
that many of these technologies would tronic devices? In addition to the solution, which is for us to start simulta-
ever see the light of day. So, you can ickiness associated with touching pub- neously exchanging matter with a third
only imagine my excitement to discover lic products, have you looked at your universe whose physical laws cancel out
that, in many cases, those fantastic fu- smartphone or tablet computer screen the instability caused by the first. And
tures might arrive sooner than expected. recently? If you do, holding it up to then things start to get complicated...
the light, you may well find yourself These are just stories, right? Of
Let’s not chat! exclaiming ‘Ew! Sticky!’ course, they are. It’s barely worth not-
You’ve probably noticed that AI-based Happily, the days of sticky screens ing that, just a few years ago, Chinese
tools are currently sprouting up like may soon be gone. I just saw an arti- researchers demonstrated the ability to
metaphorical mushrooms. In addition cle on New Atlas telling how General transport photons from the ground to
to AI chat and search tools, there are Motors (GM) has patented self-cleaning a satellite orbiting 300 miles in space,
AI art generators, AI writing tools, AI touchscreens that erase oily fingerprints see: https://bit.ly/403IXj7
content summarisers, AI speech-to-text along with all other signs of your pres- How about the fact that physicists can
transcribers, AI visual editors and AI au- ence overnight: https://bit.ly/3J4TBPL speed up, slow down and even reverse
dio tools, to name but a few. In addition to the usual red, green, blue the flow of time within a quantum sys-
I bet you think I’m going to chat about (RGB) pixels, GM proposes to add a fourth tem (https://bit.ly/3ZXoegB)? And, just a
ChatGPT – see: https://bit.ly/3JaHyQH ultraviolet (U) pixel type. Meanwhile, few days ago as I pen these words, I read
– if so, you’d be wrong. Even though a the surface of the screen will have an how – using quantum mechanics – it’s
friend did ask it to, ‘Explain semicon- additional transparent coating of a met- possible to extract energy from a vacu-
ductor technology in the style of Clive al-oxide-based catalyst like titanium um: https://bit.ly/3mKGD24
(Max) Maxfield,’ I’m going to restrain dioxide. The UV would be activated All I know is that I’m more than ready
myself from discussing the scary results. when the equipment was inactive (like to take possession of my self-powering
However, I did recently use an art gen- in the middle of the night) resulting in antigravity flying car with the optimal
erator called Stable Diffusion Online (see: a sparklingly clean and sterile screen. teleportation feature.
Win a Microchip
ATtiny817 Xplained Pro
Practical Electronics is offering its readers the chance to win a to 20MHz with 8KB Flash, 512B SRAM and 128B of EEPROM,
Microchip ATtiny817 Xplained Pro (ATTINY817-XPRO) – all in a 24-pin package. The series uses the latest Core
and even if you don’t win, receive a 15%-off voucher, Independent Peripherals with low-power features,
plus free shipping for one of these products. including an Event System, intelligent analogue
Free-to-enter competition
H
ats off to movie industry around 100 versions, with ‘bigger’ 10 quadrillion bytes
trade body SMPTE (the So- titles hitting 500. But Avatar: The The post-production engineers handling
ciety of Motion Picture and Way of Water (AWOW), ideally needed all this work were split between New
Television Engineers). It does a very 5000 versions, compromised down to Zealand and California, with a database
good job of educating movie and tel- a final 1065 versions, partly because of 10PB (one petabyte (PB) equals one
evision engineers. The enterprising it’s in 3D (which involves different million gigabytes) of uncompressed
UK branch recently held two first- projection systems needing different audio and video and metadata, repre-
class sessions, which I was lucky brightness and colour gradings) and senting 381 million picture frames. This
enough to attend. partly because movie maker James was moved across the world by Ama-
For one of them, SMPTE gained Cameron wanted multiple aspect zon’s Web Cloud service, which needed
access to the National Physical Labo- ratios to stop cinemas with different radical tweaking by AWOW engineers
ratory in Teddington, to learn more screen sizes projecting pictures with to make it fast enough. The data was
about time – more next month. black masked bars and borders. There physically moved by undersea cables,
For the other event, SMPTE took are 27 different aspect ratio versions using ‘dual wet routes’; a matched pair
over the Dolby Screening Room in of AWOW. of 10GB fibre ‘pipes’. In this way, if a
Soho Square to show Disney’s Avatar: The sound options range from simple trawler drags up a cable and breaks it,
The Way of Water in immersive audio, stereo and surround to Atmos immer- the data keeps on streaming.
high frame rate, and high dynamic sive, with subtitles in 51 languages In all, 3500 hours of movie material
range 3D. Carly Brown, Disney’s Direc- and 28 language dubs. was cut to the final release length of 3
tor of Motion Picture Operations, and Whereas most cinemas project at 24 hours 12 minutes. To achieve all this,
Rich Welsh, Deluxe’s SVP of Innova- frames per second (fps), a few (Dolby) movie engineering companies that
tion, talked ahead of the screening cinemas can handle 48 fps. The 24 normally compete ended up working
about the mind boggling multitude of fps versions of AWOW were down together to get the job done. The credits
sound and picture formats needed for converted from 48 fps. at the end of the movie are as long as
release to different types and grades In fact, AWOW uses a mix of mate- a short film. Even James Cameron was
of cinemas worldwide, ranging from rial created at 24fps and 48 fps. This moved to admit: ‘I’ve never worked like
high-end Dolby venues (such as the explains why keen eyes will spot 24 this before, and I never want to again’.
Leicester Square Odeon or the new fps motion artefacts (judder) in some The Dolby screening room in London
Battersea Power Station cinema) to action sequences, even when the movie is classed as a ‘grading theatre’ and is
bog-standard flea pits and local multi- is playing at 48 fps. thus permitted to screen movies in pitch
purpose halls. The subtitles were originated in 3D black, without any of the emergency
and down converted to 2D for the 2D lighting or Exit signs which public cin-
Multiple versions cinema versions. The 3D titles hover emas must provide. It’s a unique way to
According to Brown and Welsh, run- in unusual areas of the screen, at dif- watch a movie and reminds how much
of-the-mill movies are released in ferent depths. ambient light pollutes all other cinemas.
NEW!
update that bricked the device.
Just for the heck of it I called the Ring
Help line, which is run by Amazon who
bought the Ring company. As I feared,
I was compelled to repeat all the same
fault-fixing steps while the helper (in
South Africa) religiously followed her
script and made side-calls for more help
5-year
from more senior helpers.
After an hour of laboriously achieving
collection
absolutely nothing Amazon insisted
that I try one last fix. I had to sit by the
2017-2021
Amazon’s Ring camera has an annoying habit of dead and disconnected device while All 60 issues from Jan 2017
auto-updating itself to death. Amazon tried to force an update over
the Internet. I tried politely to question to Dec 2021 for just £44.95
Likewise, the Dolby screening room the logic behind this powerful magic. If PDF files ready for
can use the Dolby 3D system, which a stone dead device isn’t connected to immediate download
was developed by German company anything, how can it receive anything?
Infitec, and is less fatiguing than other But the helpers insisted on trying.
systems, but not commercially viable. I then began to doubt my sanity and See page 6 for further
The spectacles (which filter slightly wonder whether the clever boffins at details and other great
different red, green and blue spectra for Amazon might perhaps be selling su-
the left and right eye views) cost at least per-clever cameras that can play dead back-issue offers.
£25 a pair and are thus too expensive to but actually respond remotely, much as
risk losing to light-fingered customers. the Pegasus software from Israeli com- Purchase and download at:
Was all Cameron’s work worthwhile? pany NSO lets security services access www.electronpublishing.com
Everyone will have their own opinion, apparently dead
but AWOW is a remarkable technical camera phones. If
achievement on all counts. As a movie, so, that would be
I find it far too long and too loud, a real story!
with endless bang, whoosh, boom and But sadly, or
ratatat audio effects for interminable fortunately, this
battle scenes. There are also some failed too. Ama-
very distressing sea creature harpoon zon-Ring’s Help-
hunting sequences that remind of the ers finally had to
infamous 1956 Moby Dick movie with acknowledge that
Gregory Peck. the dead device
But for those who enjoy Marvel- wasn’t responding
Comic-style blockbusters, which play to the firmware that
like a computer game with no pause Amazon was opti-
control, AWOW will hugely appeal. mistically pushing
Reportedly, it has earned more than into the ether.
JTAG Connector Plugs Directly into PCB!!
$2.2bn worldwide. It was nominated for Like all the other No Header! No Brainer!
four Oscars, including best picture and users complain-
won the Best Visual Effects category. ing about their
bricked Ring cam-
Helplines Coda eras, I have now
Amazon is a clever company with been offered a
mould-breaking ideas, but perhaps not 30% discount off
always as clever as it thinks. the price of a new
I recently started to use a Ring CCTV Ring device to risk
Our patented range of Plug-of-Nails™ spring-pin cables plug directly
camera that had being lying in my draw- being bricked. into a tiny footprint of pads and locating holes in your PCB, eliminating
er for a while. It worked for around half Whether I con- the need for a mating header. Save Cost & Space on Every PCB!!
an hour and then decided to download test or take up the Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
itself a firmware update. The update offer is a whole Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
‘bricked’ the camera. It was stone dead, other story which
showing no lights or other signs of life. will probably be www.PlugOfNails.com
I followed all Ring’s recommend- too long and bor- Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
ed fault-fixing steps, including fully ing to recount. But
P
revious Net Work columns
brought news of Britain’s
electric vehicle sector as the
lurch towards car electrification
gathers pace. The UK’s Society of
Motor Manufacturers and Traders
(SMMT) reports that 52% of all new
car registrations in February were
battery-powered (BEV), hybrid (HEV),
mild hybrid (MHEV) or plug-in hybrid
(PHEV). Those BEVs represented 16.5%
of all UK February car registrations.
Even so, 48% of new cars registered
in February were still petrol (gas) or
diesel – a far higher proportion than
in, say, EV-friendly Norway – but there
was of course no reference to used The Atto 3 is BYD’s (Build Your Dream) first EV to launch in Britain, featuring a futuristic
car sales, whether fossil-fuelled or interior and ‘Blade’ battery.
electrically propelled. Despite the
interest in new EV cars, the high cost sensibly priced petrol cars instead. It beyond the prototype stage. This il-
and practical challenges of running seems there is plenty of life left in older lustrates the typical vagaries of this
them puts them well beyond the reach petrol cars before sales of new ones are fast-moving tech sector.
of many motorists struggling in today’s banned altogether. Maybe those used At least British EV owners are not
financial climate. EVs will be sold off at bargain base- alone in suffering practical problems
However, the signs are that interest ment prices in coming months. of EV ownership. An American EV
in buying used EVs has cooled dramat- owner recently posted on Reddit: ‘Was
ically in Britain: wary buyers, already Who’s in charge? at the Electrify America station in In-
feeling the pinch from the rising cost Britain continues to drag its heels over diana yesterday. In a blizzard. With 30
of living and energy costs, are de- the supply of EV charging points. New miles of range and about 75 miles to
terred by the dearth of EV charging British housing stock is supposed to in- drive. Station had eight chargers. Only
points, worries about range anxiety clude an EV charging point, but as one ONE was working and it was in use.
and nagging doubts about becoming web forum poster pointed out, ‘if the The EA call centre was useless. Took
lumbered with yesterday’s outdat- local electricity substation that feeds hours to get a charge when it should
ed (or worn out) battery technology. your street has a 400A fuse, and every have taken 20 minutes. Until this gets
As used EVs are gradually ‘returning house has at least one 32A charger, then figured out, electric cars will be lim-
to the market’, some secondhand EV you do the maths. They can’t even roll ited, period.’ Sounds all too familiar.
models are suffering ‘incredibly large out smart meters for every house and
drops’ in value, says car dealer journal that’s cost more than £12bn so far, and Blade Runner
Automotive Management. They report is far from complete... I understood that Listed in nearly 74,500 new February
that the lack of interest in buying used the electrical load of a new housing registrations were exactly 13 (thir-
EV cars is such that some dealerships estate averages eight amps per prop- teen) GWM Ora £32,000+ electric mini
have stopped stocking them altogeth- erty, and now they want to add 32A cars, the cute Chinese EV previously
er, in order to avoid getting stuck with for one EV on top of changing your gas described in Net Work. There are yet
large inventories of rapidly depreciating central heating boiler to a heat pump,’ more Chinese EV brands, almost too
electric cars that simply aren’t selling. the poster mused. many to follow, heading our way across
Highlighted is the Tesla Model 3, In the January 2022 issue I mentioned Northern Europe, starting with BYD –
which has dropped over 33% on aver- a possible charging solution for EV an acronym for ‘Build Your Dreams’.
age in the past four months, and Tesla owners in the shape of a semi-porta- BYD is barely 20 years old and may
also skewed the market by slashing ble battery pack on wheels, called the be unfamiliar to most readers, but
new car prices by up to 20% earlier ZipCharge Go. This well-publicised BYD is a huge Chinese conglomerate
this year, as supply finally started to powerbank was being developed for that manufactures semiconductors
exceed demand. Semiconductor short- ‘topping up’ EVs in the street or car and batteries as well as solar arrays,
ages and supply chain problems didn’t park – the idea was due to launch some energy storage systems, EV chargers
help EV sales either, so consequently time this year, but I now understand and electric buses. Cars made by sub-
there is still a keen interest in buying that the ZipCharge Go never made it sidiary BYD Auto will arrive in British
generation over the past ten years. For distant memories: when I hosted the Ariane 6 launcher which is now slated
a different outlook on the National Grid Ingenuity Unlimited column of readers’ to launch from French Guyana by the
stats, try the graphs and dials shown circuit ideas here at Everyday Practi- year end. Last year, Arianespace signed
on: www.gridwatch.templar.co.uk cal Electronics in the 1990s, I received a contract with Amazon for 18 flights
The Hinkley Point C nuclear power a circuit suggestion for a 4000-series carrying satellites into LEO for Project
station in Britain is the first new one CMOS-based electronic rotary switch Kuiper, Amazon’s own satellite-based
to be built in 20 years. Sadly, like a from an engineer who worked at the Internet service that is still seeking
number of other key infrastructure pro- emerging Indian Space Research Organ- regulatory approval. More details are
jects in Britain, it has suffered delays isation (ISRO) Department of Space. It at: www.arianespace.com – note that
and construction cost overruns. In was carefully typed with a dot-matrix there is no website for Kuiper, although
February the site received the first printer on tissue-thin paper, which I projectkuiper.com leads to an enigmat-
of two French-built 500-tonne nu- found in my archives (fortunately, ic login page.
clear reactor vessels, as construction I’m ruthlessly methodical) and our
of this ‘too-big-to-fail’ power station correspondence had always stuck in Other news
continues with completion expected my mind. An advanced new fusion energy proto-
within five years. Interested readers Fast forward 25 years, and in Octo- type will be built by Tokamak Energy
can find more background on the his- ber 2022 a jubilant ISRO launched its at the United Kingdom Atomic Energy
tory and status of Hinkley Point C at: new LVM3 (Launch Vehicle Mk. III) Authority’s (UKAEA) Culham Campus,
https://bit.ly/pe-may23-hinkc rocket from the Satish Dhawan Space near Oxford. The compact spherical
Previously covered in Net Work, Centre in Sriharikota and it success- tokamak, called ST80-HTS, is due for
December 2022, the International Ther- fully placed 36 OneWeb satellites into completion by 2026. It will incorporate
monuclear Experimental Reactor (ITER) their intended orbits. The triumph was advanced technologies required for the
is an ambitious multi-national effort one of India’s biggest ever commercial delivery of sustainable fusion energy,
being built in France to explore the orders, and the launch can be seen at: including cutting-edge high temper-
boundaries of nuclear fusion. The http://bit.ly/3yFSAsn ature superconducting magnets to
ITER tokomak will not however be OneWeb’s constellation of 542 confine and control the hydrogen fuel,
used to generate electricity for the grid. first-generation satellites is nearing which becomes plasma many times
In February, after a near four-month completion, and a second launch from hotter than the sun, they report. Last
voyage from St. Petersburg, a giant India was due to lift off in March. year, their current ST40 fusion device
Russian-made 160-tonne poloidal field Following the outbreak of the in Milton Park, Oxfordshire, achieved
coil was successfully delivered to the Ukraine conflict, 36 OneWeb satellites a 100-million-degrees-Celsius fusion
ITER site, having taken some six years worth some $230m were impounded plasma – the highest temperature ever
to fabricate. Russia’s Rosatom is contrib- at the Russian-controlled Baikonur recorded in a compact spherical to-
uting 400 tonnes of equipment to the Cosmodrome in Kazakhstan, where kamak, the research centre reported.
ITER project, which has now reached presumably they have lain ever since. The European Union has formulated
78% along the road to ‘first plasma’. It’s thought that they could now be in record time plans for a new secure
traded for some badly needed Russian satellite communications programme
Space is (still) hard Soyuz stages languishing at the Eu- of its own. Called IRISS (or IRIS2), the
London-based network operator ropean Spaceport in French Guyana, Infrastructure for Resilience, Intercon-
OneWeb continues to build its constel- which is situated in north-eastern South nectivity and Security by Satellite may
lation of satellites intended to provide America. Roscosmos pulled the plug see the development and launch of
Internet access between the North Pole on co-operating with the European up to 170 LEO satellites between the
and the 50th parallel. OneWeb uses a Space Agency, leaving critical Soyuz years 2025 and 2027. It’s also intend-
number of service providers, includ- rocket parts behind. ed to integrate with other EU space
ing friendly rival SpaceX, to launch The European site accommodates programmes such as the Copernicus
small batches of its satellites into LEO. the European Ariane 5 as well as Rus- earth observatory and Galileo satnav,
To digress for a moment, it’s funny sian-built Soyuz vehicles, but the ESA as well as offering secure communica-
how a feeling of deja-vu can trigger continues to develop its long-overdue tions while eliminating Internet dead
varia
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
Having described our new 500W Amplifier Module last month, giving its
performance details and describing the circuit, we follow on this month
with the amplifier construction, beginning with the PCB (Amplifier Module)
assembly. Next month, we’ll build this into a complete amplifier, along with
fan cooling, a speaker protector and a clipping detector.
T
he 500W Amplifier has four Before starting, it’s a good idea to is unlikely to cause any problems; we
main components: the Amplifier inspect the board carefully. This will want to joints to be shiny, and adding
Module, its power supply, the familiarise you with its layout and a bit too much solder is better than not
Fan Cooling and Loudspeaker Pro- reveal any defects (however unlikely adding enough!
tector board and the Clipping Indica- that is). If you feel the need to remove the
tor board. The last two of those have Start construction by fitting transis- excess solder, add a little bit of flux
already been described in the Febru- tors Q1 and Q2. These are small SOT- paste and touch the join with a clean
ary and April 2023 issues respectively. 23/TO-236 surface-mounting devices. soldering iron tip.
This article focuses on the assembly They are relatively easy to solder due Now mount the small (¼W or ½W)
of the Amplifier Module – its circuit was to their widely spaced pins, but you resistors. Check each value using a
described last month. Next month, the might need the aid of a magnifying digital multimeter set to read ohms
final article will detail the power supply, glass and strong light if your vision is before soldering in place. Don’t just
the chassis and the final assembly and not perfect. rely on the colour bands to determine
wiring, bringing all those parts together. First, align Q1 onto the pads, hold- the value, as these can be difficult to
Now let’s move on to building the ing it with tweezers, and solder one of read accurately.
all-important Amplifier Module. the pins to the PCB. Check that it is Note that there are two pairs of resis-
correctly aligned with the other pads, tors labelled R1 and R2 on the PCB;
Construction reheating the solder joint to realign if they don’t have associated values. The
The 500W Amplifier Module is built necessary. Then solder the remaining nominal values required for these resis-
on a double-sided, plated-through PCB pins. Mount Q2 similarly. tors (which define the SOA protection
coded 01107021 that measures 402 x Don’t worry if you add so much curves) are R1 = 35.328kΩ and R2 =
124mm. Refer to Fig.6, the parts layout solder that the joints on these SOT-23 204.8Ω. We can’t get these exact values,
diagram during construction. parts look like small silver balls. This but there are two ways we can get close.
This overlay is
shown split at
actual size.
We can use E96 value resistors, We don’t think the +1% error using The UF4003 diodes (D4-D7) can
with R1 = 35.7kΩ (+1%) and R2 = 35.7kΩ for R1 matters; the current- go in next. They are not all oriented
205Ω(+0.1%). That is the easy method, sensing 0.47Ω resistors have 5% toler- the same way, so check Fig.6 and the
and if you buy the set of hard-to-get ances, and the protection curves have PCB silkscreen.
parts from us, you’ll get the 35.7kΩ a built-in safety margin. Still, if you’re There are two wire links in the
and 205Ω resistors – see the note in the concerned about it, you can use the middle of the PCB above Q7 and Q9.
Parts List in Part 1 last month. parallel pairs instead. Make these using 0.7mm diameter
A slightly more precise method for Fit these resistors in the eight posi- tinned copper wire covered in 1mm
R1 and R2 is to use paralleled pairs tions, using your preferred method. heatshrink tubing over most of their
of resistors, one fitted to the top side Now install the two small 1N4148 lengths, leaving just the ends exposed.
of the PCB as normal, and the other diodes (D1 and D2) with their striped Continue by mounting the 1W resis-
soldered across the pads underneath ends (cathodes) as shown on the over- tors, again being careful to check the
afterwards. These are 62kΩ || 82kΩ for lay diagram and PCB silkscreen. Next, values. For the 56Ω resistors near
R1 giving 35.3kΩ (−0.08%) and 390Ω fit the BAV21 diode (D3) with the cath- speaker connector CON3, four mount
|| 430Ω giving 204.5Ω for R2 (+0.15%). ode facing the same way. on the top side of the PCB and four on
the underside. The PCB screen print- The three LEDs are mounted about retention clips are on the outside.
ing shows the resistor positions on 5mm off the PCB, taking care to ori- The best approach to make sure the
both sides. ent them correctly and using the green fuse clips are aligned correctly is to
Next, you need to fit the small-sig- LED for LED1. The longer lead is the first fit a fuse to hold the fuse clips in
nal transistors in TO-92 packages anode, and this position is marked position, then solder to the pads on
next. These are Q3 and Q4 (BC546) with an ‘A’ on the board. the underside of the PCB.
plus Q5 and Q6 (BC556). Leave Q25 Fit the 75pF 200V capacitor now, You can now solder in the 12 0.47Ω
and Q26 off at the moment, as these along with the 1nF, 10nF, 100nF, 470nF 5W resistors. These should be mounted
need to be mounted against the heat- and 1μF MKT capacitors. Follow with about 2mm proud of the PCB so that
sink. However, you can fit the two trimpot VR1, then VR2 with its adjust- cooling air can circulate beneath them.
TL431 references now, also in TO-92 ment screw towards the bottom of the A cardboard spacer slid under the resis-
packages (REF1 and REF2). Read board, as shown (right edge in Fig.6). tor bodies before soldering their leads
the device markings carefully, and The four M205 fuse clips are next. can ensure consistent spacing.
be sure to install the correct type at Press them down fully onto the board Now fit the connectors, ie, the RCA
each location. before soldering and ensure that the socket (CON1), the two-way socket for
Wind wire on
bobbin clockwise be slipped over the collar, after which the scrap PCB end
cheek is slipped over the bolt, ie, the bobbin is sandwiched
into position between the washer and the scrap PCB.
Align the bobbin so that one of its slots lines up with
T he winding jig consists of a 70mm M5 bolt, two M5
nuts, an M5 flat washer, a piece of scrap PCB material
or similar measuring approximately 40 x 50mm and a scrap
the exit hole in the end cheek, then install the first nut and
secure it tightly. Next, fit the handle by drilling a 5mm hole
piece of timber (about 140 x 45 x 20mm) for the handle. through one end, slipping it over the bolt and installing
In use, the flat washer goes against the bolt’s head, the second nut.
after which a collar is fitted over the bolt to take the bob- These photos show how the winding jig is used to make
bin. This collar should be slightly smaller than the inner the 2.2μH inductor.
diameter of the bobbin and can be made by winding insu- First, slip the bobbin over the collar on the bolt (1),
lation tape onto the bolt, or from tubing. The collar needs then attach the end cheek and thread the wire through
to be of sufficient diameter for the bobbin to fit snugly the exit slot (2). Next, attach the handle and wind the coil
without being too tight. tightly onto the bobbin using 13.5 turns of 1mm-diameter
Drill a 5mm hole through the centre of the scrap PCB enamelled copper wire (3). Finally, secure the finished
material, plus a 1.5mm exit hole about 8mm away that will coil (4) around the outside using 20mm diameter heat-
align with one of the slots in the bobbin. The bobbin can shrink tubing.
the loudspeaker connection (CON3) Mini heatsinks the solder to realign if necessary. Then
and the 6-way power connector Before fitting Q7 and Q9, you must solder the remaining pins.
(CON2). For CON3, first insert the ter- first attach the heatsinks. Do this by The metal tab needs to be soldered
minal block plug into the socket and inserting the mounting posts into to the PCB right next to the heatsink.
then install the socket into the PCB the PCB holes and soldering these to Again, you will need to heat it with
holes with the wire entries toward the the underside of the PCB. These will your iron for an extended period due
outside edge of the PCB. require a lot of heat from your solder- to the heatsink drawing heat away.
Now mount the 100nF X2 class ing iron before the solder will success- Once the solder melts, though, sol-
capacitor located near CON3. The fully melt to secure the heatsink. Take der the tab as quickly as possible to
47μF, 470μF and 2200μF electrolytic care to avoid burning yourself on the avoid overheating the device. Now
capacitors can then go in. The 47μF hot heatsinks; wait until they are cool install transistor Q9 (FZT458) in the
NP (non-polarised) electrolytic can go before mounting Q7 and Q9. same manner.
in either way around, but the others Now tackle Q7 (FZT558). It would
must all be oriented correctly. help to spread a little flux paste on Winding inductor L1
Note that the 47μF capacitor above all four of its pads before placing the The inductor (L1) is wound using a
Q5 and Q6 must be rated to handle part. Align the device with the PCB 0.9m length of 1mm diameter enam-
at least 50V (eg, a 63V type would be pads and solder one of the pins to the elled copper wire on a plastic bobbin
acceptable). PCB. Check for alignment and reheat (not 2m/1.25mm wire – an error in last
The next step is to lightly solder so that the PCB is maintained at right If you don’t do this, it will sag under
the transistor leads from the top of angles to the heatsink. its own weight and remain in this con-
the PCB, or at least as many leads as If you don’t have anything handy dition after the leads are soldered.
you can easily access from the top. that you can stack to a suitable height, Now you can solder the remaining
Then carefully turn the whole assem- you can cut a couple of cardboard cyl- transistor leads and add extra solder to
bly upside down and prop the front inders to 63mm (eg, from discarded any that need it. Make sure the joints
edge of the board up by placing books paper towel rolls) to use as tempo- are good since they can carry many
or something similar under the board rary supports. amps at full power. When finished,
trim the leads and turn the board right- Q25 (BC546) and Q26 (BC556)
way-up again. can be mounted now. These are held
Next, tighten the transistor mount- in position using transistor clamps
ing screws to ensure good thermal attached to the heatsink by 15mm M3
coupling between the devices and screws and nuts.
the heatsink. They need to be tight, Apply a smear of heatsink com-
but don’t get out your breaker bar or pound to the flat face of each, mount
impact driver. the transistor clamps and position
each transistor so the clamps will Now you must remove the three
Checking device isolation hold them in place at approximately support spacers from the edge of the
Now check that the transistors are all the centre of the transistor body. Then board adjacent to the heatsink. This
electrically isolated from the heatsink. tighten the screws. Turn the PCB edge of the board must be supported
Do this by switching your multimeter assembly upside-down and solder and only by the heatsink transistor leads.
to a high-ohms range and measuring trim the transistor leads. This avoids the risk of eventually
the resistance between the heatsink
mounting surface and the collectors
of the heatsink-mounted transistors.
For transistors Q13-Q24, it’s simply
a matter of checking between each of
the fuse clips closest to the heatsink
and the heatsink itself on each side
of the Amplifier. That’s because the
device collectors in each half of the
output stage are connected together
and run to their respective fuses. You
should get a reading above 10MΩ, and
quite likely ‘OL’ because it should be
too high for your DMM to read.
Testing shorts for transistors Q10 (the
VBE multiplier), Q11 and Q12 is differ-
ent. In this case, you have to check for
shorts between the centre (collector)
lead of each device and the heatsink.
If you do find a short, undo each
transistor mounting screw in turn until
the short disappears. It’s then simply When finished, our
a matter of locating the cause of the 500W Amplifier will
problem and remounting the offending have fans attached at the
transistor. Be sure to replace the insu- back of the heatsink via a
lating washer if it has been damaged in metal bracket on the base of
any way (eg, punched through). the case.
VERSION
• NOW FREE 10
FOR HOBBYISTS •
• NOW FREE FOR HOBBYISTS •
10% off your first Flowcode purchase using code: EPE20
VERSION 10
Use code at checkout: flowcode.co.uk/buy
• NOW
10% off your FREE FOR
first Flowcode HOBBYISTS
purchase • EPE20
using code:
Use code at checkout: flowcode.co.uk/buy
ELECTRONICS
£8.99
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 Machine n Battery Voltage Checker n Solar- The techniques of project construction
Surgery, EPE/PE’s regular clinic dealing with readers’ Powered Charger n Versatile Theft Alarm n Spooky
i Over 40 different circuit ideas PIC ‘N MIx
Starting out with PIC microcontrollers
regulation to using SPICE circuit simulation software. iPod Speaker n Logic Probe n DC Motor Controller
im
TEACH-IN 2
t
W
1
TWO TEACH-INs FOR
Elec
©
TWO TEACH-INs FOR
THE PRICE OF ONE!
The second section – Practically Speaking – n Egg Timer n Signal Injector Probe n Simple Radio
THE PRICE OF ONE !
i The free CD-ROM provides cal
Plus:
MikroElektro
nika,
PLUS
Inc.
3 09:59:25
components is covered. Finally, our collection of PIC’n’ Mix – starting out with the popular range of PIC
Ingenuity Unlimited circuits provides over 40 circuit designs submitted by readers. microcontrollers and Practically Speaking – tips and techniques for project construction.
The CD-ROM also contains the complete Electronics Teach-In 1 book, which
provides a broad-based introduction to electronics in PDF form, plus interactive The CD-ROM also contains:
quizzes to test your knowledge and TINA circuit simulation software (a limited n Complete Teach-In 2 book, a practical introduction to PIC microprocessors
version – plus a specially written TINA Tutorial). n MikroElektronika, Microchip and L-Tek PoScope software.
The Teach-In 1 series covers everything from electric current through to
microprocessors and microcontrollers, and each part includes demonstration circuits
to build on breadboards or to simulate on your PC.
£18.95
ELECTRONICS FROM THE PUBLISHERS OF
What a Bargain!!
if not, open double-click
and
Explorer f
index.pd
This CD-ROM
requires
Reader™ an d w eb l i n k s
UAL
dable Free
Downloa be.com
MAN.co.u
www.ado
BA SE .epe mag
k
2011
www ne Publishi
ng Ltd.
Audio Out – an
FR -RO
ELECTRONICS ELECTRONICS
£8.99 £8.99 £8.99
D CD
RASPBERRY Pi ®
DISCRETE LINEAR CIRCUIT DESIGN
the necessary software A COMPREHENSIVE GUIDE TO RASPBERRY Pi
Practically Speaking – INTRODUCING THE ARDUINO
The CD-ROM includes
• Understand linear circuit design
• Pi PROJECT – SOMETHING TO BUILD • Design simple, but elegant circuits • Hardware – learn about components and circuits
Smartscope software.
interface boards
building PIC-based projects
PRECISION
AM-FM DDS
SIGNAL GENERATOR
This Signal Generator aims to provide very high calibrated accuracy with an
error of just ten parts in a billion (1 in 108), which translates to 0.1Hz at 10MHz.
It also has plenty of features, including amplitude and frequency modulation.
N
umerous cheap signal Those have several problems, start- processing power.
generators are available online, ing with the crystal oscillator module, The display needs to convey lots of
but their accuracy leaves a lot to which is just a standard cheap 30MHz information, but a large screen is ruled
be desired. So I decided that if I wanted unit. The accuracy and temperature out by the need for a small cutout to
to have a maximum error of 0.1Hz at stability is dubious and does not fit give low RF leakage. That’s why I chose
10MHz, which would be ideal, I would my design criteria. a 0.96-inch (24mm) diagonal OLED. It
have to design one. Yes, you can remove it and add a does have rather small characters, but
The first decision I had to make was wire link to an accurate temperature- conveys all the needed information.
what I wanted it to look like. This compensated crystal oscillator By eliminating ready-made mod-
would determine the type of enclosure (TCXO) on the main board, but it’s ules, the final PCB size (and thus the
needed, the display and the controls. not ideal. Applying amplitude mod- enclosure) is much smaller. Diecast
With the current worldwide shortage ulation requires access to the RSET boxes are expensive, so using a smaller
of many components, choosing these pin on the AD9851 chip, meaning one does make it considerably cheaper.
parts can be difficult. There is no another wire link to the main board. The final major component needed
escaping the fact that most advanced The type of output I want to use is another DDS chip, the AD9833. This
components are only available in requires a wideband transformer from only comes in a tiny 10-pin MSOP
surface-mount packages, some with two pins on the DDS chip. This is now package but it is available on a small,
very small lead pitch. getting into the ‘too hard’ category and ready-made module. I was tempted to
Good shielding is essential for a sig- is the final reason for rejecting the pre- use such a module in my design, and
nal generator. You want the signal to built module. could have fitted it in, but I did not
be via the output connector and not The cheapest Arduino modules want yet another oscillator running in
radiated from the device itself. For mostly use an ATMega328 chip running the unit (the module has an onboard
this reason, I chose a diecast alumin- at 16MHz. All the I/O pins are brought 25MHz oscillator).
ium box with a minimum number of out, so there are no changes needed. So I am just using the bare, stand-
apertures that need to be cut. The larg- But with my design, the number of pins alone chip. It gets its 20MHz clock
est of these is for the display, and by available from the ATmega328 are inad- source from the clock output pin on
using a small OLED module, RF leak- equate, so a fancy pin-sharing arrange- the ATmega644 processor.
age is cut down substantially. ment would be necessary.
Next, I had to decide whether to use Also, much processing is needed to Component Selection
ready-made modules or individual apply frequency modulation, and the Given the present severe shortage of
parts. Let’s take the frequency generat- 16MHz clock speed is marginal for electronic components, I paid particu-
ing chip, the Analog Devices AD9851. this. So instead, I am using a 44-pin lar attention to being able to source parts
This is available on a prebuilt module ATmega644. This gives me more than from several suppliers. The AD9851
with its own clock generator and out- enough I/O pins and I can arrange for DDS chip is available from several sup-
put filtering. it to run at 20MHz for a 25% boost in pliers on AliExpress for about £10-12
delivered. The AD9833 DDS chip is also May, so they are well worth checking. Make sure you read the included
available for about £2 plus delivery from Wherever you get it, make sure it’s the text file that describes the fuse values,
numerous AliExpress sellers. 20MHz, 44-pin TQFP variant. which need to be set after loading the
If you want to stick to more reputa- This is quite a sophisticated project HEX file (your programming software
ble – but pricey – suppliers, Digi-Key and one that is not aimed at beginners. should have a mode to do that).
and Mouser have the AD9851 for £31 I am assuming that if you are interested The 30MHz TCXO is best obtained
and the AD9833 for £10 in this level of DDS then you know from AliExpress, around £13.50 deliv-
The ATmega644 chip is a little how to program a processor. The board ered. I have found none suitable at
unpredictable and varies enormously includes a 3x2 ICSP header for you to Mouser, Digi-Key or element14.
in price, ranging from well under £10 connect a programmer (AVR ISP) and The OLED is a 0.96in, 128 x 64 pixel
to many multiples of that. Mouser load the firmware (CSE21100A.hex) type with the SSD1306 controller.
and Digi-Key are surprisingly inex- which is available for download from There are multiple suppliers for this,
pensive but currently out of stock. the May 2023 page of the PE website: and it comes in different colours. The
However, they estimate delivery from https://bit.ly/pe-downloads one I have has the top quarter yellow
Fig.3: here’s what the 100kHz output signal looks like with Fig.4: as expected, the spectrum of the signal from Fig.3 has
5kHz AM (yellow). The AM signal output from the AD9833 a single prominent peak at 100kHz with two smaller peaks,
is shown below (cyan). 5kHz on either side (ie, at 95kHz and 105kHz).
Here frequency
modulation has
been applied. This
results in many - USB - PWM
small peaks of all - Ethernet - Encoders
sorts of multiples of - Web server - LCD
modulating waves - Modbus - Analog inputs
either side of the - CNC (Mach3/ 4) - Compact PLC
- IO
carrier wave, but this
spectrum analyser
doesn’t have the
resolution to separate
them.
- up to 256 - up to 32
Spectral analysis of a microsteps microsteps
75MHz output signal. - 50 V / 6 A - 30 V / 2. 5 A
Because of how a DDS - USB configuration
works, you not only - Isolated
get spurious peaks
at multiples of the
signal frequency but
PoScope Mega1+
also at fractions. The
most significant in
PoScope Mega50
this case is at 30MHz,
35dB below the
fundamental.
A 100kHz output
signal modulated
by 1kHz at 10kHz
- up to 50MS/ s
deviation. This - resolution up to 12bit
doesn’t show on my - Lowest power consumption
digital scope, but my - Smallest and lightest
old analogue scope - 7 in 1: Oscilloscope, FFT, X/ Y,
provides this pattern. Recorder, Logic Analyzer, Protocol
decoder, Signal generator
Handyscope
Handyscope HS5 Key specifications
8, 12, 14, 16 bit resolution, 0.25 % DC vertical
accuracy, 0.1 % typical
Up to 500 MSa/s sampling, up to 250 MHz
bandwidth
Up to 32 Mpts memory per channel Handyscope HS5
20 MSa/s, 14 bit continuous streaming
The 500 MSa/s 14 bit dual channel High Resolution
1 ppm time base accuracy
Oscilloscope with function generator.
Arbitrary Waveform Generator
WiFiScope
Using a computer based oscilloscope was
never easier than with the WiFiScope WS6
DIFF: simply switch it on and start the
software on the computer:
no power cables required as it is battery
powered and can operate hours on a fully
WiFiScope WS6 DIFF charged battery
no interface cables required as it uses WiFi
The 1 GSa/s 14 bit quad differential channel
to connect to the computer
High Resolution WiFi Oscilloscope.
Automotive
Automotive Test Scope ATS605004D-XMS
Key specifications
14 bit (0.006 %) resolution (16 bit enhanced
resolution)
Up to 500 MSa/s sampling
250 MHz bandwidth
Up to 100 MSa/s continuous streaming
Up to 256 Mpoints memory per channel
0.25 % DC vertical accuracy, 0.1 % typical Automotive Test Scope
1 ppm time base accuracy
ATS605004D-XMS
All models and configurations can be found
on our website: itp101.com/tiepie-price-list
Handyscope HS5
Automotive
Improved Test
SMD Tweezers
T
he 2022 SMD Tweezers are the micro; the analogue-to-digital con- part shortages mean that avail-
a simple but clever design. A verter (ADC) and watchdog timer that ability is patchy. (For example,
PIC12F1572 eight-pin micro- the software requires are found in most Mouser expects to have stock of the
controller powered from a button cell PIC microcontrollers. The low-power PIC16F15214-I/SN by 1 May 2023,
is used to probe resistors, diodes and sleep mode is quite standard too, and which is annoying, but not the terri-
capacitors and then display its find- is essential for standby operation when ble 12-month lead times we endured
ings on a tiny OLED screen. powered from a cell. This allows the at the height of the pandemic!)
The PIC12F1572 does a respectable Tweezers to be left idle but ready to Importantly, the PIC16F15214 is
job, but the Test Tweezers software work at a second’s notice. available in the SOIC package and
takes up all but 42 bits of the avail- The I2C interface to the OLED dis- has twice the Flash memory of the
able Flash memory, leaving no room play is emulated in software by tog- PIC12F1572. Microchip does a pretty
for expansion. gling GPIO (general purpose input/ good job of maintaining pin compatibil-
We used the PIC12F1572 for the output) pins, a technique often known ity between parts, and the PIC16F152xx
2022 SMD Test Tweezers as it was the as ‘bitbanging’. This all means that just series is no exception.
cheapest available at the time, apart about any 8-pin microcontroller with The upshot is that the PIC16F15214
from its close relative with less mem- more program memory could be used is both cheaper and fully capable of
ory, the PIC12F1571. Until recently, for the SMD Test Tweezers. replacing the PIC12F1572 as the con-
the PIC12F675 and later PIC12F617 After developing the original SMD troller for the SMD Test Tweezers, while
were our 8-pin micros of choice, but Test Tweezers, we became aware of the also having the larger program space
Microchip keeps bringing out new PIC16F152xx series of microcontrol- needed for us to add new features.
parts with better performance and lers. The range spans parts from eight
more features at lower prices, so we to 40 pins. While the range has features Tweezers 2.0
try to keep up. that are modest by current standards, We have implemented three major
The PIC12F1572 is more capable they are still more capable than older updates to the SMD Test Tweezers.
than the older PIC12F675. However, devices such as the PIC12F675. First, we expanded the capacitance
when we looked into upgrading the The PIC16F15213 and PIC16F15214 measurement range in both directions
Test Tweezers with some software are the 8-pin parts in the range, (it can measure both larger and smaller
improvements, we realised that the and they are cheaper than the capacitances than before).
PIC12F1572 did not have enough PIC12F1572, although the current Second, we added a calibration and
free memory to add new features or setup procedure.
improve the existing ones. For that, Finally, we improved usability for
we would have to move to the latest left-handed people (or those who want
generation of PICs. Caution to hold something like a soldering iron
So when a new family of PICs in their right hand) by allowing the
Like any project that uses coin cells,
became available, we began to investi- screen display to be rotated by 180°.
the Tweezers should be kept well
gate what we could add by using them. These improvements have all been
away from children who may ingest
made in software, so apart from chang-
them. The Tweezers also have quite
A new PIC ing the PIC12F1572 to the PIC16F15214,
pointy tips, another reason to keep
The original (2022) SMD Test Tweezers the hardware is identical and the general
them out of reach of young fingers.
don’t use any exotic peripherals within operation is much the same.
By Tim BlyThman
Practical Electronics | May | 2023 39
Low-capacitance measurements
Features and specifications Values lower than 1nF are measured
in an entirely different fashion. This
∎ Uses identical hardware to the original Tweezers (PE, October 2022) method is so sensitive that it can mea-
apart from the PIC microcontroller sure the capacitance of the touch of a
∎ Identifies component type (resistor, capacitor, diode or LED) and hand, in the order of picofarads.
measures critical values It’s called shared capacitance sens-
∎ Resistors: value from 10Ω to 1MΩ ing, and we used it to detect finger
∎ Diodes: forward voltage up to about 3V touches in the ATtiny816 Breakout
∎ Capacitors: value from (approximately) 10pF to 150μF Board of July 2021.
∎ Cell voltage with nothing connected It works by comparing the relative
∎ Low power sleep when idle avoids the need for an on/off switch magnitude of two capacitors by ini-
∎ Instant wake-up by touching probe tips together tially charging one and discharging the
∎ Option to select left-handed or right-handed display other, as shown in Fig.2. When they
∎ Calibration of internal and contact resistance are connected, the charge present is
shared between the two in proportion
to their capacitances.
Circuit details time needed to charge and discharge The ratio of the initial and final
Fig.1 shows the circuit, which is the a larger capacitor becomes unreason- voltages relates directly to the ratio
same as last time (PE, October 2022), ably long, in the order of several sec- of the capacitances. The theory and
besides IC1. All the readings are dis- onds between readings. mathematics are explained further in
played on a tiny OLED module con- The only way to overcome this the ATtiny816 Breakout Board article.
nected to CON2. would be to change the series test In the case of our new SMD Test
IC1 drives its RA5 (pin 2, IOTOP) resistor, which would affect the other Tweezers, a capacitor connected to
and RA4 (pin 3, IOBOT) pins high and readings too. CON+ and CON− is charged up via the
low and measures the voltage present The relatively high value of the 10kΩ resistor. The second capacitor is
on pin 5 with its ADC peripheral. For series test resistor also means that actually the tiny internal capacitor that
example, it can determine the resis- capacitance readings can be dis- is used to sample and hold the voltages
tance of a resistor connected between torted by leakage current. Since read by the microcontroller’s ADC.
the CON+ and CON− points using the leakage is typically higher in high- This capacitor is nominally 5pF, and
voltage divider equation. er-value parts, especially in electro- it is discharged by sampling an ADC
Diodes will present their forward lytic capacitors, the accuracy and channel connected to ground.
and reverse voltages between CON+ usefulness of these higher ranges Fortunately, the ADC peripheral has
and CON− when the micro applies are less than what seems theoreti- a selection to make an internal ground
a voltage. The micro determines the cally possible. connection, so this doesn’t need an
diode’s orientation, showing its polar- So higher-value capacitors can be extra pin. The external capacitor is dis-
ity and forward voltage. measured and will return a reading, pos- connected from its resistor, and the two
Capacitors are first charged by sibly after a brief delay, but the accuracy capacitors are connected by taking an
bringing IOTOP high and IOBOT low will not be as good as for lower values. ADC reading from the external capacitor.
and then characterised by measuring
the rate of discharge when IOTOP is
brought low. The Tweezers can even
measure their own supply voltage
by reading the voltage of its internal
1.024V reference relative to that sup-
ply voltage.
These features are already present
in the original SMD Test Tweezers, so
we suggest you refer to the original
October 2022 article for more detail
on how these features work and how
the values are calculated.
Improvements
The upper limit of the capacitance
range was limited by the use of an 8-bit
counter to time the discharge. With
more Flash memory and RAM available,
we can instead use a 16-bit counter.
In theory, this expands the range by
a factor of 256, but in practice, using
this entire range is not possible. The
upper limit is around 150μF now, Improved SMD
equivalent to about 12 bits or a factor Test Tweezers
of 16 higher.
The first reason for this is that Fig.1: the circuit for the updated Tweezers is practically the same as the old
higher values would overflow the version, except IC1 is now a PIC16F15214. It can perform all its tests by
32-bit mathematical calculations that applying different voltages to the IOTOP and IOBOT pins and testing the voltage
are required. The second is that the on the IOTEST pin.
An equation similar to the volt- Construction towards the curved end of the board.
age divider equation is used on the The assembly procedure is identical Align the part within the pads, clean
ADC result to calculate the value of to the October 2022 design, but we’ll the iron’s tip, apply fresh solder and
the external capacitor. The way the go over it again for those who haven’t tack one lead in place.
capacitors share the charge is analo- seen that article. The SMD Test Twee- Adjust the IC if necessary to ensure
gous to how resistors share voltage in zers are built using three PCBs, with it is flat against the PCB and aligned
a divider chain. the main one coded 04106211, mea- to the pads. Then solder the remain-
The software also makes minor suring 28 x 26mm and available from ing pins, cleaning your iron’s tip and
adjustments to account for some of the the PE PCB Service. Refer to the PCB adding solder as necessary.
stray capacitance that is present and sig- overlay diagrams, Fig.3 and Fig.4, Use the braid to remove any sol-
nificant at these magnitudes. We made during construction. der bridges by adding more flux, then
tests on real capacitors in the picofarad The main PCB is not hard to build, press the braid against the excess sol-
range to fine-tune these readings. even if the parts are all surface-mount- der with the iron. Carefully drag both
The lower limit is fairly arbitrary ing types. Gather your SMD tools and iron and braid away when the solder
and is chosen to avoid the SMD Test supplies. We recommend a fine-tipped has been absorbed.
Tweezers detecting stray capacitance soldering iron, a magnifier, some flux The remaining three components
as a component to be measured, which paste, solder wicking braid and twee- are not polarised, so their orienta-
could cause them not to power down zers, at a minimum. tions are unimportant. The capacitor
correctly. At these scales, even the way The small PCB needs something to sits near CON−, while the two identi-
the Tweezers are held can change the hold it in place. If you don’t have an cal resistors flank IC1 at its other end
reading substantially. appropriate vice tool, you can use an and side.
As the ADC reading nears its upper adhesive putty like Blu-Tack instead. Use a similar technique to IC1. Tack
limit for larger capacitances, the res- If possible, set up some fume one lead, adjust the part, then tack the
olution is poor around 1nF, and steps extraction to deal with the extra smoke other lead. You can also go back and
grow to be as far as 100pF apart. So the that comes from working with flux, or refresh any leads if the joint doesn’t
readings using this method are always work near an open window or outside. look right. It should be smooth and
shown as pF, and other methods are A tip-cleaning sponge is handy too. glossy; you can add more flux at any
used for measurements in nF or μF. Apply flux to the top PCB pads for stage to help improve solderability.
We will detail the calibration and IC1 and the three passive components, Then solder the single component
setup process after the construction then rest IC1 in place using tweezers, to the back of the PCB. Centre the cell
is complete. ensuring the pin 1 dot or bevel is holder to align the two external pins
to their pads. If your iron is adjust-
able, turn it up while soldering this
larger part. You should also ensure that
the wider opening on the cell holder
faces the rounded edge of the PCB to
allow access for the cell to be fitted
and removed.
As before, apply flux, tack one lead
in place and adjust the position. Then
solder the other lead. For these much
larger pads, it can help to apply extra
solder directly to the pad to create
a robust fillet, which you can see in
Fig.2: Cx is the device under test (DUT) connected to the Tweezer probes, while
C1 is the ADC sample-and-hold capacitor inside the microcontroller. The our photos.
capacitors are connected by sampling Cx with the ADC. If the value of Cx equals With the surface mounted parts fit-
C1, the resulting voltage is half the initial voltage. It’s analogous to a resistive ted, you can clean up the PCB using
voltage divider, and the formulas are much the same, with the capacitor charge the flux cleaner designated by the
replacing the voltage across the resistors. flux’s data sheet. Methylated spirits or
isopropyl alcohol are good all-round apply power. Then click ‘Program’ The other advantage of using the
alternatives for cleaning many fluxes and check that the part programs and header pins is that they are a good
too, while general-purpose flux clean- verifies correctly. fit for breadboards and jumper wires,
ers are also available (and generally making it very easy to connect the SMD
work better than plain alcohol). Tweezer arms Test Tweezers to other components for
Just ensure that any flammable sol- The two arm PCBs should be attached hands-free readings.
vent has fully evaporated before mov- next, as the OLED module covers much We recommend fitting the arms
ing on to the next steps. of the main PCB, limiting access. roughly in line with the edges of the
Our first version of the SMD Test PCB but slightly tilted inwards with
Programming IC1 Tweezers used small pieces of brass around 15mm separation at the tip
You have two options for loading IC1’s strip to give the arms finer tips than ends. Like the SMD parts, roughly tack
firmware. First, you can buy a prepro- just the bare PCBs would provide. the arms in place and adjust them to
grammed PIC from the PE PCB Service; If you can’t find a brass strip, then your liking.
or, you can buy and program a PIC your- we suggest an alternative that will We prefer fitting the arms with the
self. (Skip the following if your micro- provide your Tweezers with gold- writing and main contact trace running
controller has been preprogrammed.) plated tips! down the inside. This helps shield and
As we noted in the panel, the Many header pins are gold-plated isolate the trace from outside contact
PIC16F15214 is a much newer part and are a good size for working with or stray capacitance.
than the PIC12F1572, so you will small components. These can be used Test the action/pressure of the Twee-
need a fairly new programmer and a instead of the brass strip, but unlike zers when the arms are positioned.
new version of Microchip’s MPLAB the brass strip, we found it easier to When you are happy, apply a generous
X IPE (integrated programming envi- solder these to the arms after attaching amount of solder on both sides of the
ronment). It can be downloaded the arms to the main PCB. main PCB to secure them firmly in place.
as part of the MPLAB X IDE from:
https://bit.ly/pe-may23-ide Parts List – Improved SMD Test Tweezers
We’ve tested with versions v5.40
and later. You may also need to down- 1 double-sided PCB coded 04106211, 28 x 26mm (main PCB)*
load a DFP (device family pack); this 2 double-sided PCBs coded 04106212, 100 x 8mm (Tweezer arms)*
can be downloaded from within the 1 PIC16F15214-I/SN or PIC16F15214-E/SN 8-bit microcontroller
IDE, and the IPE then detects that the programmed with 0410621B.HEX, SOIC-8 (IC1) ●*
DFP is installed. You should look for 1 0.49-inch 64x32 I2C OLED module [eBay, AliExpress – for example, at the
the PIC16F152xx family. time of writing eBay item 154706482381]
You will also need a recent pro- 1 surface-mount coin cell holder (BAT1) [Digi-key BAT-HLD-001-ND,
grammer such as a Snap or PICkit 4 Mouser 712-BAT-HLD-001 or similar]
as the older PICkit 3 is not supported 1 CR2032 or CR2025 lithium coin cell
for these parts. 1 5-pin right-angle male pin header (CON1; optional, for programming IC1
Connect the programmer to the PCB in-circuit)
at CON1, aligning the arrows that mark 1 100nF SMD 50V X7R ceramic capacitor, 3216/M1206 size [Altronics
pin 1. You could solder on a header, R9935]
but we find that holding a short header 2 10kΩ 1% SMD resistors, 3216/M1206 size [Altronics R8188]
strip in place and pressing it firmly 2 15 x 2mm short pieces of thin (eg, 1mm) brass sheet for tips (optional)
against the pads to make contact is OR
usually sufficient. 2 gold-plated header pins for tips (see text) ●
Select the PIC16F15214 part and 1 40mm length of 30mm diameter clear heatshrink tubing (optional)
open the 0410621B.HEX file, which 2 100mm lengths of 10mm diameter heatshrink tubing (optional)
is available for download from the 1 4-way low-profile female header strip (optional, for CON2; can be cut from
May 2023 page of the PE website: Altronics P5398) ●
https://bit.ly/pe-downloads ● These parts have been changed compared to the original Tweezers
You may need to change the set- * Available from the PE PCB Service
tings to allow the programmer to
To fit the tips, find a strip of about Testing battery from being removed.
six pin headers (to maintain the 15mm Fit a CR2025 or CR2032 3V coin cell The 10mm heatshrink can be put
separation) and while the pins are still into the cell holder, noting the polarity over the arms, leaving just the tips
in the plastic holder, solder the tips of on the cell holder. After about a sec- exposed. It should be pushed up
the arms to the short ends of the head- ond, the OLED should show R HAND firmly against the main PCB before
ers. Using the holder will keep the pins as per Screen 1. If not, check your sol- being shrunk with a heat gun.
parallel and even. dering and that 3V is present on either The wider heatshrink fits over the
Again, apply a generous amount the OLED module’s header pins or pins main PCB and should overhang the
of solder when you are happy with 2 and 3 of CON1. end enough to prevent the cell from
the tips, then carefully and evenly If 3V is not present, the cell may be being removed. Of course, you will
pull the arms and their tips out of flat or there is a short circuit. Remem- have to remove and replace the heat-
the plastic holder. We find that some ber to check the reverse of the PCB, as shrink to replace the cell.
pointy-nosed pliers are handy to help the cell holder, arms and OLED header Also, be careful to not shrink the
in this situation. are all very close together. large heatshrink too tightly around the
Before you proceed to use the SMD OLED, as its glass screen can be frag-
OLED screen Test Tweezers, you might like to go ile. Aim heat along the edges to avoid
The final step is to fit the OLED dis- through the calibration procedure, as heating the OLED and battery, and
play module. You can solder the mod- detailed in the panel overleaf. only shrink enough to secure every-
ule directly to the main PCB. But since thing in place.
we had to do a lot more testing for this Operation
new version, we used a low profile With the calibration and setup com- Parts availability and upgrading
header socket to allow the OLED to plete, normal operation will start. You Apart from the PIC, the hardware is
be removed. This is necessary because should see a display indicating the bat- the same as before. The PCBs can be
the programming pins are also used tery voltage preceded by the letter B. bought from the October 2022 section
to interface with the OLED screen. After five seconds, the Tweezers will of the PE PCB Service, and the new
We used the PIC Programming enter sleep mode and can be woken version PIC from the May 2023 page.
Helper from June 2022 to help with by touching the tips together. While we think the parts cost is
our testing. But we also needed to do At this point, the new SMD Test low enough that it’s worthwhile sim-
some testing and tweaking on the final Tweezers work much the same as the ply building new Tweezers, if you
design, so having a removable display older version, apart from the expanded really want to upgrade a pair you’ve
was handy for these later stages. We capacitance range. already built, you can just order the
used a low-profile (5mm high) header If you close the tips to measure the programmed micro from us and swap
socket to keep the unit compact, and Tweezers’ short-circuit resistance, you it over.
it’s what you can see in our photos. should see a value jumping around We suggest you only do this if you
But we recommend using the direct between 0Ω and 1Ω if everything is are confident in removing SMDs and
mounting method unless you are con- working correctly.
sidering designing your own firmware. We measured the current consump-
So we’ll describe that. tion on our prototype as much the
If the OLED module’s header is not same as the original SMD Test Twee-
attached, solder it now, at right angles zers. The new Tweezers use around
to the module’s PCB. Then mount 4mA when working and 5μA when
the module onto the PCB. You might sleeping. So the cell life will depend
find that the back of the OLED mod- mainly on how much they are used,
ule touches IC1. In this case, use Blu- tending towards the cell’s shelf life.
Tack or a cardboard shim to keep the
two apart until the module is securely Finishing touches
soldered. Like we did with the original SMD Test Screen 1: the first display when the
That leaves the long pins protruding Tweezers, you might also consider add- Tweezers are powered on is the HAND
setting, oriented in correspondence
at the back of the PCB. You can trim them ing some heatshrink to the device to to the setting. Leaving the tips open
carefully with a sharp pair of sidecutters. add some protection and to keep the selects right-handed operation.
It helps to apply extra solder directly The tips might look a bit wonky, but when the arms are squeezed to bring them
to the pad of the Tweezer arms to together they become parallel at about the distance you would typically use
make a robust fillet. them (wide enough to hold a typical SMD component).
Screen 2: at various times during Screen 3: the first prompt is to Screen 4: when the tips are closed
setup, you may be prompted to complete the calibration process and is on this screen, it will increase the
RELEASE the Tweezers by opening the accompanied by a nominal five-second saved value of the series test resistor
tips to ensure that multiple settings timer. If the tips are left open during in 1Ω steps. See Fig.5 for a flowchart
are not inadvertently made. this time, calibration is skipped. explaining the process.
Screen 7: this screen shows while the Screen 8: you are prompted to close Screen 9: the contact resistance is
value is saved to confirm that your the tips to calibrate their contact measured around 20 times to get an
selection has been acknowledged. resistance. If you don’t, the saved average. The value shown here is
value is not changed. higher than the default value of 16Ω.
Screen 5: similarly, this screen allows Screen 6: this prompts you to confirm
the series test resistor value to be that you wish to save the entered
decreased. If any change occurs, these value to non-volatile flash memory.
two steps are repeated until no change Close the tips to do so.
is detected.
Screen 10: if you don’t get this Screen 11: finally, the actual value
message, the Tweezers have detected saved in flash memory is reloaded so
that the tips may have been opened, that you can confirm that the saved
so the measured value is inaccurate. value is correct.
T
here are numerous smart- The concept was simple; incorporate a
home devices available today, touchscreen so that the user can select
from lighting, security cameras and a single smart light from a list of all the
alarm systems to speakers, TVs, personal available lights and turn the light on or
gadgets and even kitchen appliances. off, or even alter the brightness. How
Typically, smart technology devices are hard can that be?
controlled from a smartphone (or tablet)
via an installed app. In the early days of Philips Hue
smart tech, each manufacturer had its own There are a lot of choices when it comes
eco-system, meaning that you could end to smart lighting. My preference is the
up with several different apps, each of Philips Hue range. Yes, it’s at the more
which controlled only certain devices, expensive end of the price scale, however,
and they couldn’t talk to each other. their technology always works, and
As smart devices matured, their there are other benefits, as we shall see Fig.1. The surface-mount version of the
manufacturers incorporated compatibility as we work through this project. I have ESP32-WROOM module.
with another branch of smart technology, found that a lot of other smart lighting
voice control. Today, virtually all that is available varies considerably in the readily available ESP32), we should
smart-home devices can be set up to be quality, often resulting in having to buy be able to achieve our goal of a PicoMite
controlled with your voice using (at least) replacements earlier than expected. Just Smart-light Controller.
one of the three main systems: Google recently I had two LED strip-lights fail
Home, Amazon Alexa and Apple Siri. from a no-brand manufacturer. These The ESP32 module
Voice control effectively results in one were used as bedside lights, so they have There are many variations of the ESP32,
common interface for all smart devices in now been replaced with Philips Hue strip- both in terms of hardware and firmware. If
a home, irrespective of the manufacturer. lights, meaning that the whole house (and you search online for ‘ESP32 WROOM’, you
It is worth noting here that some garden) incorporates 100% Hue lighting. will see that there are two main variations
devices also include a touchscreen for Without going into too much detail available – a smaller surface-mount module
user control. However, these tend to be here, the Philips Hue smart lights can (see Fig.1), and a slightly larger through-
limited to the more expensive kitchen be controlled either by BlueTooth, or by hole version (which is essentially an ESP32
appliances and smart speakers. Wi-Fi (Zigbee). Bluetooth control is very surface-mount module mounted on a
Now the dilemma – you may not always limited, and hence won’t provide the daughterboard that in turn provides header
have your smartphone at hand to control, functionality that we’re trying to achieve. connections – see Fig.2). We recommend
for example, a smart light. Likewise, it On the other hand, Wi-Fi provides full
may not be suitable to use voice control control of the smart lights, but the
(perhaps late at night) to instruct your version of Zigbee Philips adopted is
smart speaker to switch off a smart light, overly complex to implement. However,
and you certainly don’t want the smart Wi-Fi control is made much easier when
speaker confirming it has understood your a centralised low-cost Philips Hue Hub
command… or not! (This is even worse is built into the setup; something that
when the confirmation is spoken loudly.) Philips have documented reasonably
Granted, there are portable smart- well. So, rather than communicating
button light switches available, but when directly with the smart lights via a version
you have numerous smart lights in the of the Zigbee protocol, the Hue Hub
home these buttons can quickly become makes it possible for developers to use a
muddled up, especially when children standard Wi-Fi protocol (non-Zigbee) to
like to play jokes with each other and control every aspect of the setup simply
swap them all around. by communicating directly with the Fig.2. Through-hole version of the module is
This led to an idea for a project; a low- centralised Hub. Hence, by incorporating an SMD ESP32 mounted on a
cost PicoMite-based smart light controller. a Wi-Fi module into our project (such as daughterboard with header connectors.
BOOT
GND
IO0
EN
RX
TX
EN
NC NC to connect three GPIO pins as that contains the executable file:
RST NC follows; along with 3.3V power flash_download_tool_3.9.4.exe
CS TX
(ideally 300mA capable) and Launch it, and the initial screen will be
the Enable pin: as shown in Fig.8a. The top option (Chip
NC RX
Type) will be set to ‘ESP8266’, and this will
NC NC
ESP USB need changing. Click on the drop-down
NC NC
GPIO0 0V arrow (Fig.8b) and select ‘ESP32’ so that
3V3 NC GPIO1(TX) Rx the screen now looks like Fig.8c. The other
GND GND GPIO3(Rx) Tx two options should be left set to ‘Develop’
Wifi BLE click EN 3.3V and ‘UART’.
0V 0V On clicking the ‘OK’ button, you will see
3.3V 3.3V (ideally 300mA) a screen like that shown in Fig.9. At the
bottom, you should select the appropriate
3.3V Note: when GPIO0 is low (0V), COM port (the one Windows assigns to the
0V the ESP32 enters ‘Bootloader’ USB-to-Serial module) and the correct baud
USB-to-serial
module TX mode, and this is exactly what we rate (115200).
RX need to be able to load the new Next, in the top empty line near the
ESP32 AT firmware. However, top of the screen, select the three dots
when GPIO0 is high (3.3V), the to open a file browser and select the
ESP32 will be in normal execution extracted file factory_WROOM-32.bin
mode. GPIO0 has an internal pull- from the firmware folder from Step 2 in
up resistor, so when this pin is your Downloads folder: Downloads\
unconnected, the ESP32 is in ESP32-WROOM-32_AT_Bin_V2.4.0.0\
Normal mode. ESP32-WROOM-32-V2.4.0.0\factory
Now that the ESP32 is In the smaller empty box on the right,
connected to the computer, we enter the value 0x00. Now check all the
can load the new AT firmware. other settings so they match that shown in
Fig.10 (in particular, ensure ‘DoNotChgBin’
Step 4: Upload Firmware is ticked).
Before running the ESP Flash With the settings configured, press
Fig.6. The six connections shown here connect the Tool, make sure that you close the ‘START’ button. This will start the
USB-to-Serial module to the MIKROE ESP32 module any open terminal app program. uploading process with a green progress bar
and put it into Bootloader mode. It connects to This ensures that Windows frees at the bottom of the screen (Fig.11). Note
UART0 on the ESP32. up any COM port that would that the ‘DetectedInfo’ box (left of screen-
use two of them. To flash the firmware otherwise be assigned to to the USB-to- centre) will also show some information,
file into the ESP32 we have to connect Serial module. along with some other data shown in the
our USB-to-Serial module to UART0. To launch the ESP Flash Tool, box below that is not relevant, but confirms
On the MIKROE ESP32 module, UART0 go to the folder unzipped in Step 1 things are happening as expected.
is accessed via a dedicated row of
pins (along with the other pins
we need to connect for flashing
the firmware). Fig.6 shows how to
connect the MIKROE ESP32 module
to the USB-to-Serial module.
If your module does not
have a dedicated set of pins for
flashing the firmware, then all the
relevant pins on the module will
be labelled with GPIO numbers
(plus power and others for basic
control, such as ‘Enable’) – Fig.7 Fig.8. On launching the ESP Flash Tool (left to right): a) change from the default ESP8266 option;
shows an example. You will need b) use the drop-down; and c) select the ESP32 option.
Step 5: Testing
To test that the ESP32 firmware upload has been successful, we
need to alter the way that the ESP32 module is connected. We
now need to connect our USB-to-Serial module to UART2 on the
ESP32, and also ensure that we don’t put the ESP32 into Bootloader
mode by removing the connection to GPIO0 (the internal pull-up
resistor on this pin will ensure that the ESP32 is in Normal mode).
Now make the four connections shown in Fig.13 and then launch
your terminal app to communicate directly with the ESP32 and
begin sending AT commands to it.
For the following demonstration, we will be using TeraTerm
as our terminal app. Begin by connecting TeraTerm to the COM
port that Windows assigns to the USB-to-Serial module. Note that
there are two settings within TeraTerm that you may need to alter:
1. In the ‘Setup-Terminal…’ menu, ensure ‘Receive’ is set to ‘CR’,
‘Transmit’ is set to ‘CR+LF’, and ‘Echo’ is unticked (see Fig.14).
2. In the ‘Setup-Serial port…’ menu, ensure that ‘Speed:’ is set to
115200, and the other settings on this page match those shown
in Fig.15.
With the settings configured correctly, simply type AT and then
press enter. The ESP32 should respond with OK. If so, then all is
good. However, if you don’t see the OK response then first check
the four connections (Fig.13), and then re-check the terminal app
settings (Fig.14 and Fig.15).
EN
IO0
RX
TX
NC NC
RST NC
CS TX
NC RX
NC NC
NC NC Two common mistakes are an incorrect baudrate (speed) setting (115200), and
3V3 NC also the Tx and Rx connections swapped over. Remember, Tx on the USB-to-
GND GND Serial module goes to Rx on the ESP32 (GPIO16), and Rx on the USB-to-Serial
Wifi BLE click module goes to ESP32 Tx which is GPIO17.
If it still doesn’t work, then it is likely to be a power issue. As explained, a
3.3V power supply is required; ideally, capable of supplying a minimum of
250mA. So, if connections and settings are correct but you are still not seeing
3.3V the OK response, then power the ESP32 module from the 3.3V output from the
0V
PicoMite (Pin 36).
USB-to-serial
module
When you’ve achieved an OK response after sending the AT command, you
TX
can proceed to check that the version of the ESP32 firmware is correct (ie, the
RX
firmware update has worked). To do this, type the command AT+GMR and it
will respond with the version number of the installed firmware (see Fig.16). If
all has worked, then you will see something similar to:
OK
If you don’t see the updated firmware version number, then repeat the upload
process. However, if you have followed the above process step-by-step then
this is unlikely to be incorrect.
Fig.13. The four connections above put the ESP32
Congratulations, you have successfully updated the ESP32 with the required
into Normal mode, allowing it to receive AT commands
firmware version in preparation for Part 2 next month.
directly from a terminal app such as TeraTerm.
Next time
Next month, we’ll configure the Philips Hue Hub and assemble a test
circuit – based on a PicoMite and ESP32 – to check we can communicate
with the Hue Hub via Wi-Fi. Until then, stay safe, and have FUN!
Fig.16. To test if the ESP32 firmware upload was successful, use the
AT+GMR command, and check the version number – here, 2.4.0.0.
I
’m currently ambling around (DPD) – more efficient than 8421 BCD; now Fig.2. On Off
with a bounce in my stride and a implemented in hardware and software, Example Open Close
great big sloppy grin slapped on https://bit.ly/3l3V1lq – and lots more at: 7-segment Play Pause
my face. I just received an email that https://bit.ly/3JaZwCF ’ messages Stop Error
brought a flush to my cheeks (my face
went red as well). The reason for my OH NO! a sort of graphical binary count, as illus-
jaunty jocularity is that the commu- Toward the end of my previous column trated in Fig.1.
nication in question came from Mike (PE, April 2023), we noted that – since we There are two questions you should be
Cowlishaw, who is a visiting professor can individually control the segments on asking about Fig.1. First, why reference the
at the Department of Computer Science our 7-segment display – we can use them six right-hand columns using the letters
at the University of Warwick, a Fellow to represent characters other than the nu- ‘A’ through ‘F’ rather than the numbers
of the Royal Academy of Engineering, merals 0 through 9. As an example, we 10 through 15. Second, why highlight (in
and a retired IBM Fellow, to name but took the current latest and greatest version green) the two segments associated with
a few of Cowlishaw’s cornucopia of of our program, which repeatedly counts the character in row 5, column 0.
credentials. Suffice it to say that Mike and displays the values 0 through 9, and There are two answers with respect to the
is something of a legend in certain we modified it to commence by first bid- first question: (a) This figure looks crowded
circles (possibly triangles and squares ding us a cheery, ‘HELLO.’ if we use the numbers 10 through 15 and
too) – see: https://bit.ly/400Br8x We’re going to use this version of the pro- (b) this leads us into the topic of hexadec-
In his communique, Mike spake as fol- gram as the starting point for this month’s imal numbers, which is introduced later
lows: ‘Hi Max, as usual, I thoroughly en- experiments. Just to ensure we’re all tap- in this column.
joyed your article in the April 2023 PE. Es- dancing to the same skirl of the bagpipes; In the case of the second question, I
pecially so because decimal representations you can download a copy of our current highlighted these two little rascals to
and arithmetic are dear to my heart. I’ve breadboard layout (file CB-May23-01.pdf) illustrate the fact that some of our seg-
been working on them, off and on, since along with the latest version of our pro- ment combinations may not appear to
1981. I found out in 2001 that there was gram (file CB-May23-02.txt). As usual, have any meaning when considered in
no standard way of doing decimal arith- all the files mentioned in this column are isolation, but their significance becomes
metic. Different software and hardware available from the May 2023 page of the apparent when viewed in the context of
could give different results for a multiply PE website at: https://bit.ly/pe-downloads other combinations. For example, these
on the same arguments (even within the Paste the program into your Ardui- two segments are immediately appar-
same company). However, I was able to no’s integrated development environ- ent as representing a lowercase ‘r’ when
fix that, and decimal arithmetic is now in ment (IDE) and then save it with a name seen in the context of the ‘Error’ message
the IEEE 754 standard for floating-point of your choosing along the lines of: shown in Fig.2.
arithmetic, as well as in hardware. Here Auto_Dec_Count_Up
are a couple of references you might find We closed the aforementioned column Tick tock
interesting: Decimal Floating-Point: Al- by asking you to try to think of other char- Although this is a bit of a (short) diver-
gorism for Computers (some history and acters and symbols and messages we could sion, the topic of controlling individual
rationale, https://bit.ly/3JzMOz6), A Sum- create. Since we have seven segments (ex- segments on 7-segment displays just re-
mary of Densely Packed Decimal encoding cluding the decimal point), and since each minded me of the awesome project created
segment can be in one of two states (on by EE Student Frugha, as documented on
and off), this means we have 27 = 128 dif- Hackaday.io – see: https://bit.ly/3JxO8lS
0 1 2 3 4 5 6 7 8 9 A B C D E F ferent possibilities. The best way to start This little rascal (the project in Fig.3,
0 is to enumerate these possibilities using not Frugha) involves a 6-row x 12-column
1
– 1100 1100 12 C
with 0x or 0X (I prefer the former), for means this is a non-latching switch that
– 1101 1101 13 D
example, 0xA5E9. Also, we can use causes a temporary change in the state
– 1110 1110 14 E
– 1111 1111 15 F A
F B
(a) B CD (b) B inary, Decimal, G
E C
(8421 F ormat) and Hexadecimal D
Fig.4. Introducing hexadecimal. Fig.5. Segments used to represent 0 through 9. Fig.6. 7-segment A through F.
Op amps as comparators
A
n EEWeb forum post by user +5V +5V
Maddan417 describes problems
with a voltage comparator circuit R1
330Ω
using the LM741 op amp (see Fig.1),
which does not operate as hoped. The U1
VIn – LM741
circuit needs to switch at 1.2V for inputs
VOut
ranging from 1V to 3.5V, but switches at +
2.5V. Maddan417 is attempting to do this
using an LM741 op amp, L7805 voltage
R2
regulators, a voltage divider, and a tran- 1kΩ
sistor. The 741 is supplied from a single
5V rail from the regulator, with the power
source being an automotive alternator.
Maddan417’s problems also included the
Fig.1. Maddan417’s circuit.
op amp output not being 0V when the cir-
cuit has switched to a ‘low’ output state. Op Amp Applications Handbook, 2005 –
Another contributor pointed out that see: https://bit.ly/pe-may23-op1
the incorrect switching voltage is at least Robert Widlar, the designer of the
partly due to swapped or incorrectly uA702 and uA709, moved to National
calculated values for the resistors used Semiconductor and produced the LM101,
to set the switching point. The values which, like the LM741 is still in production.
shown set the comparator threshold to Dave Fullagar improved on the LM101 to
5 × 1kΩ/(1kΩ + 330Ω) = 3.76V, swapped produce the uA741, which quickly became
they give 5 × 330Ω/(1kΩ + 330Ω) = 1.24V. very popular. As part of IEEE Spectrum’s
The design used two regulators for the ‘Chip Hall of Fame’ series of articles –
supply and potential divider, which is https://bit.ly/pe-may23-op2 – you can
not necessary. see a letter from Fairchild’s marketing
The more fundamental problems are department in 1968 which concludes,
related to the use of the 741 – it is an op ‘We’ve got a winner’. The various
amp, not a comparator, its performance versions of the 741 have sold in hundreds
is poor, and it is used outside its of millions.
recommended operating conditions in The 741 deserves its place as an iconic
Maddan417’s circuit. In this article we electronic component, but its popularity
will discuss use of the 741, and op amps and ubiquitousness in textbooks and
in general, as comparators. online tutorials can lead to problems when
inexperienced designers assume that it
The 741 will be suitable in circuits where it isn’t. A
The 741 is a very old op amp – the uA741 common example of this is use at relatively
was designed by Dave Fullagar of Fairchild low supply voltage circuits – the 741
in 1968. At the time, there were very few datasheet (Texas Instruments, Rev D, 2015)
other op amps on the market. The 741 specifies a recommended minimum supply
was preceded by the uA702 in 1963 and voltage of ±10V. Maddan417’s circuit
uA709 in 1965, also both from Fairchild. runs on 5V, so the 741 is well outside its
The uA702 was the first monolithic (single recommended operating conditions in
chip) IC op amp, previously op amps this application.
were modular solid-state devices using Of course, the 741 will be OK in plenty
discrete transistors, or hybrid circuits of circuits where high performance and
using chip transistors, or combination relatively low supply voltages are not
of ICs and discrete components. Before required, and it is still likely to be found in
Op amp evolution: (top) GAP/R K2-W: a that there were valve / vacuum tube op commercial designs, many of which may
vacuum-tube op amp from 1953; (below) amps. If you would like a long, detailed have been around for a long time. On the
uA741 IC op amp, first produced in 1967. read on op amp history try Chapter H: other hand, the performance of the 741 is
(Images: Wikipedia) Op Amp History by Walt Jung from the poor compared to more modern devices,
Overdrive
VRef
tpd
Output
VOH 90%
50%
VOL 10%
tr Time
.lib D:\LTSpice\Comparator741\lm741.lib
(Do remember to use the path to the file on your computer.) Click
to place the directive text on the schematic.
Simulation files
Most, but not every month, LTSpice
is used to support descriptions and
analysis in Circuit Surgery.
The examples and files are available
for download from the PE website.
L R
O
ver the last few issues, such as HobbyTronics Ltd – Fig.1, https://
Pin 1 for 14-pin
we’ve described some general- bit.ly/pe-may23-dil – and I will produce socket under board
purpose audio op amp boards one of these too.
IC1
Pin 1
designed for single and dual op amps. IC1
While I was designing these, it also Replacements and upgrading
seemed like a good idea to make some Audio engineers don’t like to waste
Pin 1
general-purpose adaptor boards to allow money, and like grumpy farmers, they IC2
different package op amps to be adapted expect all equipment to last at least 50
IC2
to any socket. For example, for the years. Unfortunately, some op amp de-
dual op amp board covered last month signs become obsolete and can be hard Pin 9 for 14-pin
I wanted to compare a pair of single to find, but on the up side, new versions socket under board
op amps with a dual device without may well have much better noise and dis-
changing anything else. To achieve this, tortion figures. There’s no point scouring Fig.2. Overlay for the two-duals-to-quad
I designed a special adaptor board to eBay for replacement NOS (new-old- op amp adaptor board.
allow two 8-pin single op amps to be stock) quad-pack 741-style devices – it’s
plugged into a socket with the pinout much better to replace expired op amps
for one 8-pin dual op amp. with some NE5532s.
I liked the idea and decided to take this
concept further, producing a board that J-FET replacements
enables two 8-pin dual op amps to be A quick word or two of advice here. If
plugged into a 14-pin quad op amp socket. you’re working on old equipment that
Once I had sorted that out for DIL (du- uses J-FET input op amps, such as the
al-in-line) ICs I realised that it would be 1980s Texas Instruments TL0xx Bi-Fet
just as useful to have SMD (surface-mount series, then it’s essential to use J-FET
device) versions of these adaptors. This replacements because bipolar input
would not only make the assemblies more op amps have much higher input bias
compact, but also allow the use of some currents. If a bipolar NE5532 is used
new op amps that are only available in to replace a TL072 in a mixer channel Fig.3. The two-duals-to-quad adaptor
SMD packaging. One important point to or preamplifier then then the result is board assembled.
note here: there are quite a few varieties likely to suffer from switch clicks and
of SMD packaging, I have opted to use pot scratching. While the bias currents
the most-common 8-pin SOIC. could be blocked by adding extra cou-
The result is four adaptor boards. (Note pling capacitors and DC path resistors,
that 8-pin-op-amp-SMD-to-DIL adaptor it is a lot of work, probably involving
boards are also available from companies track cutting. Good audio J-FET op amps
tend to be very expensive, such as the
Burr Brown designs. There is only one
relatively low-cost replacement for the
TL072, the SMT-only Nisshinbo NJM8087,
distributed by Profusion. Mouser also
stock them, but they are pricey.
Texas Instruments have taken over a lot
of the National Semiconductor, Analogue
Devices and Burr Brown op amps. The TI Fig.4. The two-duals-to-quad adaptor
OPA134 SoundPlus FET series are one of installed in an old Audio Developments
the best, but they’re expensive. mixer channel strip.
Discontinued early Fairchild J-FET
Fig.1. The original inspiration for these op amps (eg, the µA771 and 772) occa- and Soundcraft. Likewise, the LF351,
adaptor boards: an SMD-to-DIL op amp sionally pop up in late-1970s equipment LF353, LF356, LF441 and TL082 are
adaptor board from HobbyTronics. such as mixing desks from Electrosonic similar second generation Bi-Fets. All
Pin 1
IC2
Fig.5. SMD dual-to-quad DIL adaptor Fig.6. Component overlay of the SMD Fig.7. Surface-mount version of the quad
close-up. These are dual NE5532s – note version of the two-duals-to-quad DIL adaptor shown in a mixer. SMD versions
that the pin 1 end is identified with a bar. socket adaptor. are smaller, so they are often easier to fit.
these resemble the TL072 and can be When all the op amps were replaced with Fig.10, installed in the dual RIAA board
satisfactorily replaced with the NJM8087 5532s the hiss dropped 12dB and the described last month. Note the use of
(maximum supply voltage ±16V). distortion dropped to a tenth at 0.002%. solid wire (25 SWG) to raise the adaptor
However, there were some op amp up- board above neighbouring capacitors.
Practical adaptor – quad devices grade side effects, mainly high-frequency The SMD version is shown in Fig.11
If you want to replace an old quad ‘741- instability. This was fixed by putting and Fig.12.
style’ device, such as the LM324, then a 47pF capacitors on the feedback resistors
two-times-dual-to-quad adaptor board, and several 100nF capacitors across the Soldering the adaptors
which simply plugs into the original 14 power rails from positive to negative. Standard square-pin 0.1-inch headers
pin DIL socket, is the solution. Its overlay Also, the power consumption for each (eg, BKL from Rapid, part 50-8086) act
is shown in Fig.2. An assembled unit is channel tripled from 12 to 36mA using as the ‘plugs’ into normal leaf spring IC
shown in Fig.3, and it is shown installed the current-hungry 5532s. sockets. If turned-pin sockets are used
in an Audio Developments broadcast on the ‘motherboard’ then you have to
mixer channel in Fig.4. Quad SMD use round-pin headers on the adaptor
It produced a marked improvement I’ve also created an SMD version of this
in the signal-to-noise ratio of the mixer. adaptor, which is smaller and easier to
install, as shown in Fig.5. The overlay is
shown in Fig.6 and its mixer installation
in Fig.7. Using these boards, I was able to
compare the OnSemi SMD versions with
their Texas DIL counterparts. Strangely
the distortion of the SMD parts was 30%
higher. I suspect the die may have been
shrunk, a common cost-cutting procedure.
If you are interested in comparing op
amp distortion figures, Swiss audio en-
gineer Samuel Groner plotted the results
for dozens of devices in his epic analysis
at: https://bit.ly/pe-may23-ao
Fig.10. Two-singles-to-dual adaptor
Two-singles-to-dual adaptor board installed in an RIAA preamplifier.
In Fig.8 you can see the little board for Note the use of tinned copper wire to plug
Fig.8. Two-singles-to-dual op amp
adapting a dual op amp to two single into turned-pin sockets.
adaptor board.
op amp ICs. This is a handy option for
many applications – for example, if
you wanted to replace a dual NE5532 Pin 1 for 8-pin
socket under board
Pin 1 for 8-pin with two NE5534As, which would pro-
Pin 1
socket under board vide lower noise, lower distortion and IC1
IC1
Fig.13. The best way to solder pins to an adaptor board is to first put them in a socket on the ‘motherboard’. This holds the pins in alignment
and provides a stable platform for soldering the adaptor and op amp(s). Note the 8087, which replaced a TL072 in a mixer channel.
I
n previous articles, we’ve looked Pololu Micro Maestro the board can be powered by the USB
at selecting actuators (PE, October/ The Pololu Micro Maestro is a tiny (just connection and the servos powered by
November 2022); controlling stepper 28 x 22mm), light weight (3g) board that a power supply (or batteries, of course).
motors using an eBay pushbutton-pro- packs a lot of capability into a small The servo power supply connection
grammable standalone module (PE, footprint. All connections are by header (power and ground) makes available
December 2021); and controlling linear pins – there are no screw terminals. It power to all the servo channels, so only
actuators using the Pololu Jrk 21v3 costs around £40 and is available from one pair of connections is needed. See
PC-programmable module (PE, June/ a wide range of sources. Fig.1 for these connections.
July 2022). In both the linear actuator and Part of a family of different Maestro With 4.8-6V connected to the module’s
stepper motor articles, set-up and wiring servo motors controllers, the Maestro servo power feed, the next step is to
were straightforward, putting control of has six channels (other Maestros connect a servo itself. The three-pin
these actuators into the hands of people have up to 24 channels). They’re female plug provided on RC servos
who may not want to learn to code. called ‘channels’ rather than ‘outputs’ plugs straight into the board header
This month, we look at the Pololu because each channel on the Micro pins at any of the six channel positions
Micro Maestro board, a PC programmable can be used as an RC servo drive or (labelled 0-5). However – and this is
device than can simultaneously control as an analogue input channel. The important – the servo must be connected
up to six RC servos. Again, we’re going channel function is selected in the PC with the correct polarity. Servo wiring
to take the simplest approach: using a configuration software – more on the is typically:
pot (a manual control knob) or a switch software in a moment.
to control servo position. However, in Each servo control channel can be set Ground Power Signal
addition, we’re also going to look at how for maximum speed and acceleration, black red white
a sequence of instructions can be used to and if an error is detected, channels can brown red orange
automatically cycle the servos through a be configured to go to a specified servo black red blue
series of movements. position or turn off. The servo(s) can be
controlled from a PC via a USB cable,
by a serial connection or by an internal
program (called a script) that also
allows user control via external pots or
switches. It’s the ‘script’ approach that
we will be covering here.
Fig.2. The Status tab allows you to easily control the movement of the servo by dragging the slider back and forth. Five different servos
can be controlled but here only one output channel has been activated.
Fig.3. In Channel Settings the speed, acceleration, minimum and maximum positions of each servo can be set. Each channel can also
be named (not done here).
Fig.6. Here, Channel 5 has been altered in function to become an input. Rotation of the added pot moves the Input slider, so that it’s
easy to checking that the pot input is working.
Now that we have the PC controlling the servo, let’s However, you might notice that some movements don’t
program some sequences of movements. have enough time to be completed before the next one
starts. To fix this, highlight a frame and then click on Frame
Automatic sequential movements using frames properties. The time available for each frame can then
The Pololu software can be used to program a sequence of be changed, with this time expressed in milliseconds, as
movements, called ‘frames’. The software can then be used shown in Fig.4.
to test and (if necessary) edit that sequence, before uploading Pressing Copy sequence to script and then, in the Script
the collection of frames (called a script) to the Maestro. If tab, Apply Settings lets you both see the code you’ve just
the script is configured to operate as a loop after switch-on, created and upload it to the Maestro, respectively. This
the Maestro will then act as a standalone controller (no PC sequence of servo movements is now programmed into the
connection needed), the sequence of servo events repeating module and can run continuously once power is applied,
until power is cut. even without a PC connection. (Note: the speed and
To achieve this programmed movement, go to the Sequence acceleration of all the movements in the sequence can be
tab. The Frame name box will be empty at this stage, but adjusted in Channel Settings.)
you will be able to see that there are various editing tools For sequences of movement, especially those that are
and other controls available for manipulating the frames. To repetitive like making a robot walk, this approach is fast
create the frames, go back to the Status tab – the one with and easy. But what if you don’t want a pre-programmed
the sliders. Set the position of the servo(s) for the first of the movement sequence? Then you can use an external pot or
sequences of movement, then press Save Frame 0. Change switch to control the servo rotation.
the servo position and then press the Save Frame button
again. Continue with this process until you have all your External manual control
movements saved in a sequence of frames. Now return to the Let’s now add a pot to give manual control over the servo
Sequence tab and you’ll find the new frames listed there in position. First, a 2-pin header needs to be soldered into the
order. Press Apply Settings and then when you press Play GND and 5V out PCB holes. These then provide the two end
Sequence, the servo will make appropriate movements. If connections to a 10kΩ pot, while the wiper connects to the input
you tick Play in loop, the sequence will run continuously. of one of the free channels (we will use Channel 5) – see Fig.5.
ability means that they’re now used of the pulses can vary over a wide VCC
2ms
in a broad range of hobby activities. range without affecting the servo’s pulse
width
Mechanically, a servo comprises behaviour. (Standard frequency is 0V
a small DC motor connected to a about 50Hz – a 20ms period.) 20ms period
–90°
geartrain, with the output shaft The pulse width determines VCC
splined to take various levers the servo’s position, with 1.5ms 1ms
pulse
and disks to which other linkages corresponding to the servo’s neutral 0V
width
can be connected. A servo is a point. That is, shorter pulse widths 20ms period
‘smart’ device – it contains control than 1.5ms causes the servo to rotate
electronics. An internal pot is used one way, and pulse widths longer
Servo control signals use pulse width to control
as a position sensor, and the motor than 1.5ms cause the servo to rotate
servo position. 1.5ms is the neutral position;
rotates until the shaft reaches the the other way. The normal pulse shorter pulse widths rotate the servo in one
required angular position. This width range is 1.0ms to 2.0ms, which direction and longer ones rotate it in the other
position is then held – if the shaft corresponds to an output shaft rotation direction. The full range is typically 1-2ms. The
is mechanically rotated from its set of up to 180° degrees (maximum – but frequency of the pulse train can vary but is
position, it actively resists. in practice, often less than this). typically around 50Hz (a 20ms period).
begin
5 get_position
4 times 4000 plus
0 servo
repeat
Type this directly into the Script tab, tick Run script on
startup, run the script and then press Apply Settings and
the servo should move as directed by the external pot –
and continue to do so, even when disconnected from the
PC. Incidentally, if you wish to better understand the code,
Fig.8. A switch allowing the servo to be set to two positions. The
the PDF manual has a good explanation. For example, if
input is pulled up to 5V via the resistor when the switch is open;
you change the endpoints of the servo movement, you can the input is pulled to ground when the switch is closed.
change the pot scaling to suit, so that there’s no dead travel
in the pot’s movement. can be made to occur smoothly by using the Acceleration
Even when controlled by a pot in this way, the maximum and Speed controls.
speed and acceleration of the servo can still be set by the
previously described controls. It’s therefore easy to give a Conclusion
progressive and smooth servo movement, even if the pot is The Pololu Micro Maestro has a lot more capability than
turned quickly and/or jerkily. has been covered here (the manual is over 100-pages long).
To move over its full rotation, a switch can replace the However, in this article I have been aiming at giving you fast
pot. Pull the input up to 5V via a 1-100kΩ resistor and and practical ways of controlling servos – methods than can
then use the switch to pull the input to ground – see Fig.8. be put into immediate effect. Whether that’s opening and
Operation of the switch will now cause the servo to rotate closing household vents, building a walking robot or even
from one extreme to the other – perfect for things that need operating active aerodynamics on a car, the Micro Maestro
to be open or closed, such as a vent. Again, this movement and RC servos can help achieve all that.
EE
FR -ROM
GET T
LATES HE
T CO
Order direct from CD
ELECTRONICS
£8.99
TEACH-IN 9
FROM THE PUBLISHERS OF
OF OU PY
TEACH R
-IN SE
Electron Publishing GET TESTING!
Electronic test equipment and measuring
techniques, plus eight projects to build
FREE
CD-ROM
TWO TEACH
-INs
FOR THE PRICE
RIES OF ONE
AVAILA
• Multimeters and a multimeter checker
• Oscilloscopes plus a scope calibrator
• AC Millivoltmeters with a range extender
BL PRICE £8.99
NOW! E
• Digital measurements plus a logic probe
• Frequency measurements and a signal generator
• Component measurements plus a semiconductor
junction tester
PLUS...
YOUR GUIDE TO THE BBC MICROBIT
A LOW-COST ARM-BASED SINGLE-BOARD
COMPUTER
Teach-In 9
Get Testing
PLUS
Teach-In 2 -Using
PIC Microcontrollers.
In PDF format
This series of articles provides a broad-based introduction to choosing and using a wide range © 2018 Wimborne Publishing Ltd.
www.epemag.com
of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints
and tips on using, and – just as importantly – interpreting the results that you get. The series
deals with familiar test gear as well as equipment designed for more specialised applications.
The articles have been designed to have the broadest possible appeal and are applicable to all branches of electronics.
The series crosses the boundaries of analogue and digital electronics with applications that span the full range of
electronics – from a single-stage transistor amplifier to the most sophisticated microcontroller system. There really is
something for everyone!
Each part includes a simple but useful practical test gear project that will build into a handy gadget that will either
extend the features, ranges and usability of an existing item of test equipment or that will serve as a stand-alone
instrument. We’ve kept the cost of these projects as low as possible, and most of them can be built for less than £10
(including components, enclosure and circuit board).
PLUS! You will receive the software for the PIC n’ Mix series of articles and the full Teach-In 2 book – Using PIC
Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit De-
bugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4 Debugger User’s Guide.
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.
MARCH 2021 For the many pre-2016 PCBs that we stock please see the
Nutube Guitar Effects Pedal .............................................. 01102201 £12.95
Programmable Thermal Regulator (Peltier Interface)........ 21109181
PE website: www.electronpublishing.com
£18.95
Programmable Thermal Regulator (Peltier Driver) ............ 21109182
Tunable HF Preamp .......................................................... CSE190502 £8.95
PE/EPE PCB SERVICE
FEBRUARY 2021 Order Code Project Quantity Price
4G Remote Monitoring ...................................................... 27111191 £9.95
.........................................................
JANUARY 2021
Nutube Valve Preamplifier ................................................. 01112191 £12.95 .........................................................
Arduino DCC Controller ..................................................... 09207181 £10.95
.........................................................
DECEMBER 2020
Pseudo-Random Sequence Generator ............................. 16106191 £7.95 .........................................................
Clever Charger .................................................................. 14107191 £11.95
PE Theremin Amplifier ....................................................... AO-1220-01 £8.95 .........................................................
NOVEMBER 2020
LED Christmas Tree (1 off) ................................................ 16107181-1 £6.95
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LED Christmas Tree (4 off) ................................................ 16107181-2 £14.95 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LED Christmas Tree (12 off) .............................................. 16107181-3 £24.95
LED Christmas Tree (20 off) .............................................. 16107181-4 £34.95 .........................................................
USB/SPI Interface Board ................................................... 16107182 £5.95
45V/8A Power Supply PCB plus acrylic spacer ................. 18111181 £14.95 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45V/8A Power Supply front panel five-way display bezel .. 18111181-BZ £3.95
Five-way LCD Panel Meter/Display ................................... 18111182 £7.95
Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
OCTOBER 2020
Digital Audio Millivoltmeter................................................. 04108191 £9.95 payable to: Practical Electronics
Precision Signal Amplifier .................................................. 04107191 £7.95
Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEPTEMBER 2020
PE Theremin PSU ............................................................. AO-0920-01 £5.95 Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . .
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95
Micromite Explore-28......................................................... 07108191 £6.95 Card Security No . . . . . . . . . .
Ultrabrite LED Driver ......................................................... 16109191 £6.95
You can also order PCBs by phone, email or via the shop
AUGUST 2020 on our website: www.electronpublishing.com
Micromite LCD BackPack V3 ............................................ 07106191 £9.95
Steering Wheel Audio Button to Infrared Adaptor .............. 05105191 £7.95
No need to cut your issue – a copy of this form is just as good!
All prices include VAT and UK p&p. Add £4 per project for post to Europe; £5 per project outside Europe.
Orders and payment should be sent to:
Practical Electronics, Electron Publishing Ltd
113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU
Tel 01202 880299 Email: [email protected]
On-line Shop: www.epemag.com
Cheques should be made payable to ‘Practical Electronics’ (Payment in £ sterling only).
NOTE: Most boards are in stock and sent within seven days of receipt of order, please allow up to 28 days delivery if we need to restock.
Practical
Electronics
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
AO SHOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Advertisement offices
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 16 Matt Pulzer
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 16
FLOWCODE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Electron Publishing Ltd
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1 Buckingham Road
iTP (INNOVATIVE TECHNOLOGY PROJECTS LTD) . . . . . . . . . . 36
Brighton
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 East Sussex BN1 3RA
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) Tel 07973 518682
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . Cover (iv) Email [email protected]
POLABS D.O.O.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Web www.electronpublishing.com
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 For editorial contact details see page 7.
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
PLUS!
All your favourite regular columns from Audio Out, Cool Beans and Circuit
Surgery, to Make it with Micromite, Techno Talk and Net Work. On sale 4 May 2023
Content may be subject to change
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: £33.99 (6 months); £59.99 (12 months); £114.99 (2 years). EUROPE: airmail service, £38.99 (6 months); £69.99 (12 months);
£129.99 (2 years). REST OF THE WORLD: airmail service, £46.99 (6 months); £84.99 (12 months); £164.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box
6337, Bournemouth BH1 9EH, United Kingdom. Email: [email protected]. PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the
Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold,
hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.
PLUS!
P
LUS! May 2023Am£5.99
Techno Talk – Prophecy can be perplexing
Techno p05lifier
Cool Beans – Arduino Bootcamp: bits, nibbles
Talk –and bytes C l i p
s... dow9 772632 573030 ping In
Cool B Robot
Net Work – EV trends and updates on e an generation
power dicato
Net Wo s – Arduino no
rk – Sm Bootca n the farm! r
www.electronpublishing.com @practicalelec mp: 7-
art dev practicalelectronics
www.e ices wit segme
lectro h ‘Plug a n t displays Apr 2023
npubli nd Pla £5.99
shing
.com y’ simp 04
licity 9
@prac 77263
2 573
ticalele 030
c
practi
calele
ctronic
s
You read that right! We now sell the current issue of your favourite electronics
magazine for exactly the same price as in the High Street, but we deliver it
straight to your door – and for UK addresses we pay the postage. No need to
journey into town to queue outside the newsagent. Just go to our website, set
up an account in 30 seconds, order your magazine and we’ll do the rest.
www.electronpublishing.com