Practical Electronics 2023-01
Practical Electronics 2023-01
Practical Electronics 2023-01
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out Make it with Micromite
Simulating digipots Further circuits for the Multiple displays
in LTspice Universal op amp board for a PicoMite
WIN!
Microchip
Remote Control
PIC32CX-BZ2
and WBZ451
Range Extender
Curiosity
Development
Board
Classic LED
Metronomes
35MHz-4.4GHz
Signal Generator
Multi-Channel
Speaker Protector
PLUS!
Jan 2023 £5.49
Techno Talk – Raudive voices revisited 01
Cool Beans – Introducing the Arduino Bootcamp
9 772632 573023
Net Work – Smart light bulbs and Alexa’s skills
www.electronpublishing.com @practicalelec practicalelectronics
Built for Robust Wi-Fi
Microchip’s Industrial Grade Embedded Wi-Fi® Performs
Under Pressure
Industrial controllers, PCs, and sensors are built to operate in harsh environments. Your Wi-Fi solution
should be built for robustness too. Our solutions are built to thrive in these conditions whether it’s nearby
motor noise, radio interference, or extreme environmental conditions.
Electronics Contents
Projects and Circuits
Classic LED Metronomes by Randy Keenan 14
These two Metronomes use only discrete components and simple logic chips, making
them easy to understand and build. They are both great projects for a beginner.
Geekcreit’s 35MHz-4.4GHz Signal Generator by Jim Rowe 27
This self-contained module uses a wideband digital synthesiser chip, onboard
microcontroller, OLED display and pushbuttons to set the desired frequency.
Remote Control Range Extender by John Clarke 32
Convert an IR remote to use UHF and it will work at much longer ranges – even
when something is between the remote and the device.
Multi-Channel Speaker Protector by Phil Prosser 41
If you’re driving a lot of speakers you need a matching compact speaker
protector to prevent driver destruction should something go wrong.
Volume 1 and Volume 2 cover transmitters Volume 4 covers clandestine, agent or ‘spy’
and transceivers used between 1932-1948. radio equipment, sets which were used by
An era that starts with positive steps special forces, partisans, resistance, ‘stay
taken to formulate and develop a new behind’ organisations, Australian Coast
series of wireless sets that offered great Watchers and the diplomatic service. Plus,
improvements over obsolete World War I selected associated power sources, RDF and
pattern equipment. The other end of this intercept receivers, bugs and radar beacons.
SUBSCRIBE NOW!
Mastering electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
Make it with Micromite
Small displays and using JFETs as electronically
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Circuit Surgery Audio Out
Using audio
KickStart
Low-voltage
Make it with Micromite
Building GPS into
Circuit Surgery
Practical
Electronics
The UK’s premier electronics and computing maker magazine
Audio Out Electronic Make it with Micromite
Using JFETs limiters Using audio Building Blocks Adding a PS/2 keyboard and
Circuit Surgery
Understanding
Audio Out
Practical
Electronics
The UK’s premier electronics and computing maker magazine
01202 087631
controlled resistance transformers infrared to synchronise time controlled resistors transformers op amps PicoMite systems and compressors transformers Using actuators TFT display to a PicoMite and using digipots (optimised for audio) fingerprints with a PicoMite in LTspice Universal op amp board for a PicoMite
WIN! WIN!
WIN!
Microchip
Remote Control
Microchip
PIC32CM LS60
Microchip
MPLAB Snap
WIN! Hummingbird WIN!
Microchip
PIC32CX-BZ2
and WBZ451
Range Extender
Curiosity Pro
Evaluation Kit
In-Circuit
Debugger
Microchip
AVR-IoT
Amplifier PIC32MM
Curiosity
Curiosity
Development
Cellular Mini Development Board
WIN! WIN! Board
WIN!
Cool Beans – Mechanical control with a servo Cool Beans – Lixie displays and magnetic core memory Cool Beans – Investigating rotary encoders Cool Beans – LogiSwitch debounce breakout board Cool Beans – Introducing the Arduino Bootcamp
9 772632 573023 9 772632 573023 9 772632 573023 9 772632 573023 9 772632 573023
Net Work – Li-ion battery fires, Win 11 and What3Words Net Work – Whole-home mesh wireless systems Net Work – Technology and the Queen Net Work – Energy-saving and monitoring resources Net Work – Smart light bulbs and Alexa’s skills
www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics www.electronpublishing.com @practicalelec practicalelectronics
Take out a one-year subscription and save more than £10 over the year.
Even better – save over £1 per issue if you subscribe for two years – a total saving of £26.
Electronics
Rest of the World £41.99 (Airmail)
1 Year: UK £54.99, Europe £63.99 (Airmail),
Rest of the World £77.99 (Airmail)
2 Years: UK £104.99, Europe £119.99 (Airmail),
SUBSCRIPTION PRICES Rest of the World £149.99 (Airmail)
Subscriptions for delivery direct to any address in: To: Practical Electronics Subscriptions
PO Box 6337
UK: 6-months £29.99, 12-months £54.99, 24-months £104.99 Bournemouth BH1 9EH
Europe Airmail: 6-months £33.99, 12-months £63.99, United Kingdom
24-months £119.99 Tel: 01202 087631
Email: [email protected]
Rest Of The World Airmail: 6-months £41.99, 12-months
£77.99, 24-months £149.99 I enclose payment of £ ..............
(cheque/PO in £ sterling only)
Cheques (in £ sterling only) payable to Practical Electronics payable to Practical Electronics
and sent to: Practical Electronics Subscriptions, PO Box 6337,
Please charge my Visa/Mastercard
Bournemouth BH1 9EH, United Kingdom
My card number is: .......................................................................
Tel: 01202 087631 Please print clearly, and check that you have the number correct
Email: [email protected]
Card Security Code .................. Valid From Date........................
Also via our online shop at: www.electronpublishing.com (The last 3 digits on or just under the signature strip)
Subscriptions start with the next available issue. We accept Card Ex. Date ......................................
MasterCard or Visa.
Name ............................................................................................
(For past issues see the Back Issues page.)
Address ........................................................................................
9 771030 266001
12
11
$ 50* NZ $1290
INC GST INC GST
SMD
Trainer
and how to solder surfac
e-mount parts
The small but powerful
Hummingbird
Amplifier
Hands-on with the
Raspberry Pi Pico
The smallest Raspberry
Pi yet!
• Combined subscriptions include both the printed magazine and online access.
• Prices are in Australian dollars (AUD) unless otherwise specified. Hummingbird Amp;
• Prices listed are for everywhere in the world except Australia and New Zealand. December 2021
View siliconchip.com.au/Shop/SubRates for a full list of current prices.
• Price estimates are just that and should only be used as a guide, we primarily
take payment in the form of Australian dollars.
Raspberry Pi Pico;
Try our Online Subscription – now with PDF downloads! December 2021
An online issue is perfect for those who don’t want too much
clutter around the house and is the same price worldwide.
Issues can be viewed online, or downloaded as a PDF.
Electronics Editorial
Editorial offices
Practical Electronics Tel 01273 777619
Electron Publishing Limited Mob 07973 518682 SMD tips and tricks
1 Buckingham Road Fax 01202 843233
Brighton Email [email protected]
I hope you enjoyed last month’s article and project on soldering
East Sussex BN1 3RA Web www.electronpublishing.com SMDs. As a follow up, I was pleased to hear from reader Mike
Cowlishaw, who emailed me with a very neat SMD soldering tip.
Advertisement offices Like all great ideas it’s completely obvious – but only after you’ve
Practical Electronics Adverts Tel 01273 777619
1 Buckingham Road Mob 07973 518682
seen it! Mike wrote:
Brighton Email [email protected]
East Sussex BN1 3RA ‘I have been using SMD devices
Editor Matt Pulzer
since the 1980s. I often made my
General Manager Louisa Pulzer own SMDs from through-hole
Digital subscriptions Stewart Kearn Tel 01202 880299 devices by bending the leads 90°
Online Editor Alan Winstanley and snipping them off at surface
Web Systems Kris Thain
Publisher Matt Pulzer level; this saved much hole-
drilling! I was surprised, however,
Print subscriptions to read (on p.43) that “Fine-tipped
Practical Electronics Subscriptions
tweezers are ideal” for holding
PO Box 6337
Bournemouth BH1 9EH Tel 01202 087631 SMD parts in place while soldering.
United Kingdom Email [email protected] I have the regulation two hands, but
two hands are not enough to hold
Technical enquiries the device, the solder, and the iron
We regret technical enquiries cannot be answered over the
telephone. We are unable to offer any advice on the use, purchase, in the right places at the same time.
repair or modification of commercial equipment or the incorporation
or modification of designs published in the magazine. We cannot ‘Accordingly (mid-1980s, I think) I came up with the simple device
provide data or answer queries on articles or projects that are
more than five years old. shown. The spring arm (a piece of wire from a coat hanger, or
similar) holds the device to the circuit board and the board to the
Questions about articles or projects should be sent to the editor wooden base while you tweak the device’s position, and it then
by email: [email protected]
holds it there while soldering (and helps ensure the device doesn’t
Projects and circuits get too hot). This leaves both hands free for soldering, cleanup and
All reasonable precautions are taken to ensure that the advice and inspection. I’ve used one of these for well over 30 years and found it
data given to readers is reliable. We cannot, however, guarantee makes the process easier, faster and more precise.’
it and we cannot accept legal responsibility for it.
A number of projects and circuits published in Practical Electronics Thank you, PE writers!
employ voltages that can be lethal. You should not build, test, Another year, another 12 issues – I’ve said it before, and I’ll say
modify or renovate any item of mains-powered equipment unless
you fully understand the safety aspects involved and you use an
it again, Practical Electronics is nothing without its loyal band of
RCD (GFCI) adaptor. fantastic writers. They work very hard every month to bring you
original content that makes electronics accessible and inspiring. So,
Component supplies in no particular order – a huge 2022 ‘thank you’ to Alan Winstanley,
We do not supply electronic components or kits for building the
projects featured, these can be supplied by advertisers. We Mike Tooley, Ian Bell, Mark Nelson, Mike Hibbett, Clive ‘Max’
advise readers to check that all parts are still available before Maxfield, Phil Boyce, Julian Edgar, Barry Fox and Jake Rothman.
commencing any project in a back-dated issue. Also, many thanks go to the hard-working ‘back-office boys’, Stewart
Kearn, Alan Winstanley and Kris Thain, who keep the shop and
Advertisements
Although the proprietors and staff of Practical Electronics take website running smoothly... most of the time!
reasonable precautions to protect the interests of readers by
ensuring as far as practicable that advertisements are bona fide, Just what I wanted!
the magazine and its publishers cannot give any undertakings
in respect of statements or claims made by advertisers, whether
‘What can I get you for Christmas?’ It’s no one’s favourite question,
these advertisements are printed as part of the magazine, or in but for PE readers the answer is easy – ‘I just want a subscription
inserts. The Publishers regret that under no circumstances will to my favourite magazine.’ You can choose paper or online, and
the magazine accept liability for non-receipt of goods ordered, or
for late delivery, or for faults in manufacture.
as a subscriber you can be sure that you will never miss a copy (or
endure any price rises over the year). If you are already subscribed
Transmitters/bugs/telephone equipment then we have a huge stock of PCBs for projects suitable for all levels
We advise readers that certain items of radio transmitting and of skill, ability and experience.
telephone equipment which may be advertised in our pages
cannot be legally used in the UK. Readers should check the law
before buying any transmitting or telephone equipment, as a fine, From all of us at PE, thank you for your support over 2022, have a
confiscation of equipment and/or imprisonment can result from very happy Christmas, and a healthy and peaceful 2023.
illegal use or ownership. The laws vary from country to country;
readers should check local laws.
Matt Pulzer
Publisher
It’s 13 years since we discussed electronic communication with folk who have departed this life. The
emergence of a new hobby product for conducting your own experiments offers a great excuse for
examining this ‘weird wireless’ topic afresh.
T
he topic of ‘Raudive Voices’ people. Some of these recordings were you will find chapter and verse on how
(or Electronic Voice Phenomena conducted in a laboratory screened these mysterious voices can be record-
– EVP) is somewhat ethereal and against electromagnetic signals. They ed and enhanced, as well as listen to
controversial, often (strongly) associated contained words that Raudive said were sample recordings and read more on
with the words ‘debatable’ and ‘alleged- identifiable and the clarity of the voices the subject. The page warns that intense
ly’. Some folk are firm believers, and in heard in his recordings was such that concentration is required in order to
a research project conducted under lab- they could not be readily explained by hear the voices on the tape, which usu-
oratory conditions and involving more normal means. It is in recognition of his ally has to be replayed several times in
than 400 people, each of the participants efforts that the name ‘Raudive Voices’ is order to decipher the speech. You are
claimed to hear mysterious voices. The now given to this phenomenon. recommended to work in a quiet room,
sincerity of experimenters in this field wear headphones and confine your re-
is probably not in doubt. On the other The Ghost of 29 Megacycles cording to a few minutes.
hand, some commentators classify EVP EVP was discussed in 1970 in the en- If you are feeling flush, you can buy
with the paranormal, life after death and cyclopaedia Man, Myth and Magic, and a ready-made ‘Raudive Diode Receiver
assorted other-worldly dimensions. during the early-1980s a new British and Microphone for Paranormal Research
If, like me, you enjoy having your in- magazine on the paranormal was issued Ghost Hunting’. Check out the specifica-
telligence insulted now and again, and with a cover-mounted flexi-disc (remem- tion at: https://bit.ly/pe-jan23-ken
are willing to waste half an hour listen- ber them?) of EVP recordings. However, This improved version connects to al-
ing to total weirdness, then why not give it was not until a few years later that the most any type of digital voice recorder
this mind-bending ‘science’ a hearing? subject attracted truly significant attention and now incorporates a switched micro-
when the American investigative writer phone to allow you to record your voice,
What’s it all about? and broadcaster John Fuller wrote a book calling out to the spirits, along with the
Michael Daniels, whose PsychicScience. called The Ghost of 29 Megacycles. This output from the diode receiver.
org website is possibly the most ac- substantial and seemingly level-headed
cessible introduction to the subject, paperback introduced the subject of EVP Is that all?
explains that EVP effects are now to the public at large. American inves- Seemingly not. Interest in the subject
considered by researchers as one of a tigators were convinced the dead could has not gone away and apparently many
broader range of phenomena known communicate with us by radio, setting people around the world are members
as ‘Instrumental Transcommunication’ up a half-million-dollar project called of electronic voice societies (see https://
(ITC). Inconsequential experiments to Spiricom to establish the proof. bit.ly/pe-jan23-evp). They remain con-
capture spiritual voices by electronic It was pretty obvious that they would vinced that they can record the voices
means began in 1941, with the first ac- never establish scientific proof, even if of the dead, receiving messages from the
ademic discussion being published by they believed their findings were real. other side. The growing new wave of such
the Journal of the American Society for They argued that if it had been legitimate belief systems is ‘a seemingly irrational
Psychical Research in 1959. for Marconi to investigate the subject in response to an increasingly irrational
The real ‘breakthrough’ came in the the 1930s, then why should they not do world,’ as one commentator puts it.
same year when the Swedish painter and so now using more sophisticated equip-
film producer Friedrich Jürgenson was ment. Where credibility broke down And finally
recording birdsong. When he replayed was that for some reason the ‘transmis- Earlier this year, I mentioned a recre-
the tapes, he heard faint but intelligible sions’ from the dead were confined to ation of Ceefax, the BBC’s teletext service
voices in the background, even though the 29MHz band, used actively by ra- (https://worldofpaul.com). Now there is
there was no-one else in the vicinity dio amateurs in the UK and elsewhere. Telstar, an emulation of BT’s erstwhile
when the recordings were made. He in- Even the book’s author was not entirely viewdata service, Prestel. Its creator John
terpreted what he heard to be his dead convinced, conceding on the first page, Newcombe says: ‘The aim of the system
father’s voice, and after making more re- ‘This is a strange story. It is either true is to provide a viewdata experience for
cordings, he subsequently claimed he’d or it is not.’ The book is still available at anyone who is interested in how things
heard a message from his late mother. affordable prices, and you can also read ‘used to be’. Services in the past typically
Following this, Konstantin Raudive, it online at: https://bit.ly/pw-jan23-29 provided access via the public switched
a Latvian psychologist who had taught telephone network (PSTN) connection,
at Uppsala University in Sweden, and Don’t try this at home? and this is indeed how Telstar works.
who had worked in conjunction with I must admit that I don’t feel like dis- However, Telstar also makes use of a
Jürgenson, went on to make more than turbing the dead, but if you feel like simple internet connection for modern
100,000 recordings which he described having a go, please feel free to visit internet modems.’ Take a visit to https://
as being communications with deceased https://psychicscience.org/evp, where glasstty.com/telstar/ and be impressed.
The PIC32CX-BZ2 and WBZ451 Curiosity Development Microchip’s PIC32CX-BZ2 family includes System-on-Chip
Board, based on the WBZ451PE module, is the (SoC) devices as well as global regulatory-certified,
best development platform for evaluating RF-ready modules. In addition to BLE functionality,
the PIC32CX-BZ2 family of MCUs. It comes Worth the family includes Zigbee stacks and Over-the-
preconfigured with an out-of-the-box multi- Air (OTA) update capabilities. Hardware features
protocol demo application and features a $67.00 include a 12-bit analogue-to-digital converter
temperature sensor, a current measurement (approx £59.49) (ADC), multiple timer/counters for control (TCC)
header, an RGB LED and a MikroElectronika channels, an on-board encryption engine, and
mikroBUS socket to attach a plethora of sensors each a broad set of interfaces to touch, CAN, sensor,
and add-on boards. display and other peripherals.
Wireless connectivity has become a mandatory The family’s 1MB of Flash memory supports large
feature for many products but often increases the cost application codes, multiprotocol wireless stacks and OTA
and complexity of system design since generally it must be updates. AEC-Q100 Grade 1 (125°C) qualified packages further
added as part of the larger application. To solves this wireless- simplify wireless connectivity integration where highly robust
connectivity design challenge, Microchip introduced its first solutions are required.
Free-to-enter competition
Microchip PIC32CX-BZ2 and WBZ451 Curiosity Development Board
Microchip
EV96B94A
T
he search engine giant browser extension uses a private search translate foreign text such as instruc-
Google has attracted its fair share engine to eliminate a user’s web surf- tion manuals or packaging, or read text
of criticism and ire over the years, ing trails, or you can search the web out loud. I can use the mobile app to
morphing from a search index with the directly at: www.duckduckgo.com translate foreign signs that appear on-
motto ‘Don’t be evil’ into an advertising However, Google Search reigns su- screen, and desktop Google Chrome
broker that tries to monetise every preme, with Microsoft’s Bing still a can search by image as well.
corner of our online lives. Armed with distant runner up, at least as far as Despite bringing us these positive
your valuable profile data, advertisers breadth and accuracy of search re- benefits, Google can be a source of
can target web visitors with ‘relevant’ sults are concerned. There are some irritation and it increasingly seems
commercials. The Internet Advertising Google functions that users would like it’s grown too big to care. Google
Bureau (IAB) pre-dates Google and is the probably struggle to live without: Maps, for example, does not recog-
self-help trade body that helps online Google Street View gives an insight nise the common English habit of
media to comply with the EU’s fearsome into the contemporary street scene, giving a house a name as well as a
General Data Protection Regulations and it can wind the clock back over number, or sometimes just a name.
(GDPR). Many big brand names are IAB a decade or more, so we can see our There are countless British homes
members, and Internet marketing is big landscape changing over the years. called Dunroamin or Yew Tree Cot-
business: in the early days of online Google Maps is the author’s desktop tage for example. In my case, one
advertising, UK commerce spent a mere go-to guide for finding addresses and day a map pin suddenly appeared on
£8m in the whole of 1997, compared planning journeys, and many use the Google Maps over someone else’s lo-
with £12.5bn (yes, billion) in the first free app for in-car navigation. cation in town, wrongly labelled with
six months of 2022 alone, says the IAB. my house name! It was nearly impos-
Some very sophisticated techniques Looking at Planet Earth sible to change Google Maps’ error as
are used to profile a web user when More than 98% of the planet has now their mindless ‘Suggest an Edit’ form
they hop from one web page or social been mapped by Google, including did not accommodate English house
media post to another. Cookies are cen- (surprisingly) Russia though, (unsur- names. Suspecting a case of identity
tral to this, and some benign cookies are prisingly), not China. Germany all but theft, I seriously considered engag-
necessary anyway to enable a website banned Street View outside Berlin and ing a solicitor. After drawing a blank,
or shopping cart to function proper- regional capitals on privacy grounds eventually I logged into my Gmail ac-
ly. We tend to shrug off such creepy (see the blog at: https://tinyurl.com/ count for a change, before going over
and silent monitoring when we visit, 2j2275he). Surfing around on Street to Google Maps and using the ‘Suggest
say, a furniture website, only to then View can be quite engrossing and it an Edit’ link yet again. This time I got
see banner ads for the same furniture offers a taste of different worlds and an automated email acknowledging
popping up after we jump to anoth- cultures, whether in Britain or Bang- receipt and promising a follow-up,
er website. Tellingly, Google’s legacy kok. There is also no disputing the but that never happened. However,
‘Urchin Web Analytics Software sup- educational and informative value of the erroneous map pin silently dis-
port’ page admitted that, ‘In attempting Google Earth, which offers a 3D satel- appeared a few days later, though an
to identify and track unique visitors lite-eye view of our place in the world: online login still shows my complaint
and sessions [this way], we are basi- https://earth.google.com as ‘pending’ – many months later.
cally going against the nature of the Another handy
web, which is anonymous interac- app is Google Lens
tion.’ (If ever you see ‘?UTM_blah=...’ (see June 2022,
in a lengthy URL, it stands for ‘Urchin Net Work), which
Tracking Module’ – it’s Google’s track- will try to match
ing system hard at work.) images on a phone
or tablet camera,
Duck! or a photo gallery.
With online privacy concerns in mind, Once the mobile app
British TV viewers recently saw an is installed, a Google
ad campaign by DuckDuckGo (see: Lens icon appears in
https://youtu.be/QWpPyYlZXNI), an the Google search
alternative privacy app that claims bar for easy access,
to offer snoop-free web browsing and and it’s great for
email protection. DuckDuckGo is at identifying flowers,
pains to remind web users how Google plants, bugs, artwork
is ‘watching them’ and so their desktop and more. It can also DuckDuckGo offers private web searching without any snooping.
By Randy Keenan
I
dislike typical ‘modern’ electronic forward and reverse, to mimic the Two designs
metronomes that only click and/or swing of an inverted pendulum. A The slightly simpler 8-LED Metro-
blink once per beat. I came up with click at each end of the LED arc fur- nome uses 74HC-series logic ICs and
these designs to better simulate the ther simulates a mechanical metro- can be battery-powered, while the
mechanical metronomes that I know nome. A typical metronome tempo 10-LED Metronome uses CD4000-
and like. Both designs light a series of range is 40-208 beats/minute, a ratio series logic ICs and is intended to be
LEDs, accompanied by a speaker that of 5.2 to one; in these Metronomes, powered from a plugpack. The two cir-
produces beat sounds. the range is extended to 36-216 beats/ cuits operate similarly: a pulse gener-
The first design uses eight LEDs minute, a ratio of six to one. ator clocks an up/down counter IC at
and fits in a standard plastic case, Either project is excellent for a begin- the rate required for the desired tempo.
while the second, slightly more ner; there are no high-frequency sig- Another IC decodes the counter value
complicated design has 10 LEDs nals, high voltages or tricky wiring to light the LEDs sequentially.
and is housed in an elegant custom- involved. Nor is there any need to pro- A set/reset flip-flop (SR-FF) switches
made timber case. So the latter is a gram a chip with software. However, the counter direction when either end
good project for those readers who some measurements and adjustments LED is lit, giving forward and reverse
have some woodworking experience. will be needed to calibrate the instru- LED sequences. The click is produced
In both cases, the LEDs are arranged ments after construction, given the by ORing the signals to the end LEDs,
in an arc and light up in sequence, expected component tolerances. followed by a differentiator to shorten
Fig.1: the 8-LED Metronome is based around three 74HC-series digital logic ICs. The 74HC132 generates pulses at a
selectable frequency. These clock the 74HC191 counter, and its three-bit output drives the eight LEDs via the 74HC137
decoder chip. The remaining three gates in the 74HC132 quad NAND package are used to form a set-reset flip-flop to
reverse the LED chaser’s direction each time it reaches one end, and to generate a pulse from the speaker.
Fig.2: the 10-LED Metronome uses a 555 timer IC instead of a logic-gate-based oscillator as the pulse generator. The remaining
logic ICs are from the 4000-series. A 4029 acts as the up/down counter, while a 4028 is the 4-to-10 decoder that drives the
LEDs. Two of the gates of the 4001 quad NOR IC form the set-reset flip-flop, and the other two gates form the click pulse.
VR5 and some fixed resistors. VR4 Click generation and circuit vari- Construction
adjusts the brightness of the middle ations are the same as for the 8-LED Fig.5 is the PCB layout diagram for
LEDs relative to the brightness of the Metronome design. The higher sup- the 8-LED version, while Fig.6 is for
two end LEDs. See the adjacent panel ply voltage of this version provides a the 10-LED version. Most components
for an explanation of how this works. louder click. mount on the boards. A few might need
Fig.h: the circuit shown in Fig.g can suffer from excessive base current problems when the loads can be switched on
and off independently. This circuit solves that by swapping the NPN transistors for PNP and keeping the current-
setting resistor connections at the transistor emitters.
is to connect several in series, along make a direct comparison of several Finishing the 8-LED Metronome
with an appropriate current-limiting candidate LEDs over a useful range Measure the resistance across VR1’s
resistor, then power the entire string of brightnesses. track (from one end pin to the other) and
from the bench supply and slowly The construction approach now divide the reading by five. This is the
wind its voltage up. That way, you can diverges for the two versions. value you should aim for with R1 + R2.
We’ve specified two 10kW resistors in lengths and shorten them as needed Next, paying close attention to
the parts list because VR1 should be for your knobs. their orientations (see the A and K
close to 100kW. The shaft-gripping sections of the markings on the PCB), insert the LED
If VR1 does not measure close to knobs that I used were recessed by leads into the board without solder-
100kW, vary the values of one or both of several mm. So for pots VR2 and ing them. If using oval LEDs, they
those 10kW resistors (eg, changing one VR3, I sanded down the backs of the will need to be twisted slightly to
to 9.1kW or 11kW) to get their total as knobs to about 12.5mm total height conform to the arc.
close as possible to 20% of VR1’s value. to enable the knobs to grip the shorter Again, attach the PCB to the front
The 8-LED version fits in a Serpac pot shafts adequately. half of the enclosure and manoeuvre
131-BK plastic enclosure, but other If the knobs are not tight enough, each LED into its proper hole in the
enclosures could be used instead. If the plastic shafts of the potentiome- front of the enclosure. It’s best to have
using the 131-BK, use the side with ters can be deformed a little by pinch- them protruding slightly. Check the
the best appearance as the upper end. ing them with pliers. Solder the three LEDs’ appearance and adjust as nec-
After selecting the LEDs, drill the LED pots now, after re-checking they have essary, then solder the LEDs to the
and potentiometer holes in the front the correct values. PCB while it is in place. The LEDs
half of the enclosure. Fig.7 may be used
as a drilling template. Fig.7: a drilling template
You can print the guide onto card for the front panel of
stock, punch out the mounting holes the 8-LED version.
to 5mm and temporarily glue the Eleven holes need to
guide to the inside of the front half be drilled: eight for the
of the enclosure. LEDs (size and shape
If using the recommended oval to suit the LEDs you
LEDs, you will need to carefully elon- are using, marked ‘A’)
gate the holes after drilling. Note that and three 8mm holes
for the potentiometer
the illuminated line from an oval LED
shafts, marked ‘B’.
is perpendicular to the larger dimen- The dashed circles
sion of the LED body. Decide which show the positions of
orientation you want and orient the mounting posts within
LEDs and holes accordingly. When the specified case; do not
drilling or adjusting the LED holes, drill those.
check that the LEDs fit into the holes
snugly but do not require excessive While we specify 3mm
insertion force. diameter holes for ‘A’, the
Fit the three pots to the PCB without size will depend on what
type of LEDs you are using.
soldering them, and attach the PCB to
the front of the enclosure. I removed This is available to
the small protruding bits on the front download as a PDF from
of each pot. To allow space for the com- the January 2023 page of
ponents on the PCB, you might need the PE website (https://
spacers on the screws. Check the shaft bit.ly/pe-downloads
will probably not be seated on the This assumes that VR1 is equivalent this is because pots typically have a
PCB but spaced away from it by sev- to the type specified in the parts list; dead zone at each extreme where the
eral millimetres. it needs to rotate through a 280° arc. resistance changes very little.
Fig.8 is the tempo dial; this can be Align the dial to the tempo pot shaft NPN transistor Q1, the 4700μF
downloaded from the January 2023 and glue it to the front of the enclo- capacitor, switch S1, the speaker and
page of the PE website (https://bit.ly/ sure. Fit the knob to the tempo pot the battery holder are not mounted on
pe-downloads). It is a good idea to print such that its rotation extends equally the PCB but attached to the rear half
it on photo paper for a good appearance. beyond the 36 and 216 tempo lines; of the enclosure (see the photo). The
120
120
using small screws and nuts. The bat-
tery holder and speaker are held in
place with clips made from a large,
heavy-duty paper clip.
Q1 and the 4700μF capacitor are
mounted close to the speaker and
wired directly to the speaker termi-
nals to minimise parasitic resistances;
they are not switched by S1, likewise Fig.9: there are two dials for the 10-LED Metronome to suit the larger 300°
to reduce parasitic resistance. This can potentiometer (left), or the standard 280° potentiometer (right). Unlike the 8-LED
version, these are printed on transparent film and connected to the rotating pot
be important since the supply volt-
shaft. Thus LED10 behind can shine through and illuminate the selected tempo.
age is relatively low and the speaker
impedance is 8W.
When the Metronome is switched wiring of these components carefully: in the photos. If you don’t want to use
off, there will be only a minuscule a mistake can cause excessive current a terminal block, you can solder the
leakage current through these com- and damage Q1 or cook the speaker wires directly to the PCB pads.
ponents. However, if the Metronome coil and cone.
is unused for an extended period, it’s Cut a timber base to suit the enclo- Adjustments
best to remove the cells. sure and attach the rear half to it using The tempo and its range will likely
Solder the emitter lead of transistor screws, giving the enclosure a slight need adjustment. Eight different
Q1, the negative lead of the capacitor, backward tilt. 74HC132 ICs showed a spread of
and a wire to a solder lug before fit- Finally, attach the off-PCB parts to a few percent, with one about 7%
ting them to the enclosure. Check the the 3-way terminal block, as shown above the average. The tempo may
54 60 72
48 88
44 104
120 50mm
40
38 160
36 216
66 7.70 9.90
72 8.40 10.8
80 9.33 12.0
88 10.3 13.2
104 12.1 15.6
120 14.0 18.0
160 18.7 24.0
216 25.2 32.4
coil or cone. Compare your wiring to (even a very basic one as found in
that shown in our photos. many DMMs) or scope is helpful for
Because of variations in compo- adjusting the tempos. Reproduced by arrangement with
nents, the tempo will likely need to be Turn VR2 to the slowest tempo (36 SILICON CHIP magazine 2022.
brought into line. A frequency meter beats/min) and measure the pulse www.siliconchip.com.au
Geekcreit’s
35MHz-4.4GHz
Signal Generator
I
f the ADF4351 sounds familiar, diagonal screen, and seven pushbutton external master clock, an alternative to
that’s because it was also used in switches. The five at lower right con- the onboard 100MHz crystal oscillator.
the digitally-controlled oscillator trol the module, while the one in the The ADF4351 chip at the heart of
we reviewed (May 2019). But whereas centre resets the MCU. The one near the module is a digital ‘phase-locked
the earlier unit needed to be con- the upper left with a square body and loop’ or PLL device, and a pretty
trolled via a separate microcontroller blue actuator is the ON/OFF switch. fancy one at that. But there isn’t space
such as an Arduino or a Micromite, The ADF4351 synthesiser chip and here to give you a full explanation
this one is a self-contained instru- its surrounding components are all of PLLs and how the ADF4351 itself
ment, delivered ready to use. in the upper right-hand corner of the works. So if you want to know more
It is larger than the earlier one, mea- PCB. The two nearby edge-mounted about these aspects, refer to the May
suring 88 x 67mm compared to 48 x SMA sockets are the RF outputs, while 2019 article: 35MHz-4.4GHz digitally
36.5mm. But the price isn’t all that the vertical SMA socket near the centre controlled oscillator, which has a
much higher, currently setting you of the PCB is an input for an optional comprehensive explanation.
back £30 including shipping to the
UK. It can be purchased from Bang-
A close-up of
good (https://bit.ly/pe-dec22-bg). the 1-inch OLED
As shown in the photos, it comes screen when
with two cables: a USB Type-A to using the ‘Point’
mini-B cable and a 240mm-long DC command from the
cable with a plug on one end to match main screen.
the module’s DC input socket.
It also comes fitted with four
5mm-long nylon mounting spacers
and matching screws. But no case is
supplied, so you’ll either need to use
it as a ‘bare’ module, or come up with
your own arrangement.
On the PCB, there’s an STM32F103
MCU (lower left), a small OLED
(organic light-emitting diode) display
with a 128 x 64 pixel 25mm (1-inch)
Lack of instructions
The Geekcreit 35-4400MHz signal gen-
erator module comes with very little
user information, so you have to work a
lot out for yourself. All you get is a brief
Fig.2: plot of the output level vs frequency when terminated by 50W. summary of its main specs and features,
and you can download a circuit dia- filter (to optimise its performance), CON2, or 5-15V DC from concen-
gram that is not easy to decipher. while the capacitors at pins 19, 23 tric DC socket CON1. This flows via
So before I began testing the mod- and 24 bypass key reference points on-off switch S7 to power indicator
ule, I spent a couple of hours redraw- in its internal circuitry. LED1 and the rest of the circuit. The
ing the circuit so that we can all see The digital control signals from incoming supply powers REG1 and
how it works – see Fig.1. IC1 that direct IC2’s operation are REG2, both of which are LT1763 LDO
Like the earlier module, this one fed to pins 1, 2, 3 and 4 at centre left, (low drop-out) 3.3V linear regulators.
is fairly closely based on Analog labelled CLK, DATA, LE and CE. The REG1 provides 3.3V to the control
Devices’ evaluation board for the only other signal that passes back circuitry, while REG2 generates a
ADF4351. That is described in their from IC2 is the LD (lock detect) signal separate 3.3V supply for synthesiser
User Guide UG-435, which you from pin 25, which is high when IC2 IC2. The incoming supply to REG2
can download from their website: is locked to the requested frequency. is via T1-T2, a balanced decoupling
https://bit.ly/pe-dec22-ad2 As well as being fed back to the transformer wound on a small ferrite
MCU, this signal is also used to illu- balun core.
How it works minate LED2, the blue lock indicator. As mentioned earlier, the control
In Fig.1, the ADF4351 (IC2) is on the The power supply section is at circuitry is based around IC1, an
right, with its onboard 100MHz mas- upper left in Fig.1. This accepts STM32F103C8T6 microcontroller,
ter clock oscillator to its left. These either 5V DC from mini USB socket and the 128 x 64-pixel OLED display
form the actual VHF-UHF RF synthe-
siser ‘heart’ of the module. The two
complementary RF outputs emerge
from pins 12 and 13 of IC2, and are
fed via 1nF capacitors to the two SMA
output sockets at far right. The 3.3V
DC supply to pins 12 and 13 flows
via inductors L2 and L3.
Only the RF output from pin 12 of
IC2 (RFOUT+) has an onboard 51W ter-
minating resistor.
The other components on the right-
hand side of Fig.1 are to provide IC2
with power, set its operating mode,
or feed it control signals. For exam-
ple, the components between pins
7 and 20 at upper right form the
ADF4351’s low-pass loop feedback On starting the module, the OLED display lists the five available functions.
M
ost of the time, infrared using the projector screen, but that the light from a single transmitter can
remote controls work very doesn’t always work reliably. reach all their receivers.
well. But there are times Regardless of why the IR signal
where they are woefully inadequate. doesn’t work well, this device is a Concept
This could be because there is an great solution. It allows you to convert Fig.1 shows the general arrange-
obstruction between the remote con- the infrared remote to transmit using ment for the Range Extender. Fig.1(a)
trol and appliance to be controlled. UHF radio signals rather than infrared shows how the IR-to-UHF Converter
Or the receiver on the device may be light. Another small box positioned works, while Fig.1(b) shows the
awkwardly placed, making it difficult in front of the infrared receiver on UHF-to-IR Converter.
to direct the infrared beam to it. the appliance picks up these radio The IR-to-UHF Converter monitors
Sometimes you might even want to signals and transmits IR directly into the signal that would normally be fed
use the remote control in a different room the device’s receiver. to the IR LED. When a button on the
from the appliance being controlled. Note that if you have more than one remote control is pressed, it produces
Or you might need to position the appliance to be controlled, you could a ~36kHz modulated signal to drive
appliance so that the receiver is not convert all their remotes to transmit on that LED. IC1 instead demodulates
facing where you will usually be UHF and use a single UHF-to-IR con- that signal, and its output (waveform
located, such as a projector, where it verter to relay the signals to all those B) is shown in scope grabs Scope 1 and
will typically be behind you. Some- devices. That’s provided the appli- Scope 2 (which can be seen overleaf,
times you can reflect the IR signals ances are in the same vicinity, so that with the other scope grabs).
Fig.1(a): the Remote Control Range Extender has two parts. The first is the IR-to-UHF Converter which runs from the
remote’s battery and converts its IR LED drive signal to a UHF transmission. The second is the UHF-to-IR Converter which
picks up those UHF signals and drives an infrared LED with appropriate modulation to control the appliance(s).
UHF-to-IR Converter
n
Valid transmission detection: requires 3ms minimum quieting period
n
Acknowledge LED lighting: 654ms time-out after a valid signal
n
Modulation frequency: 32.4kHz to 41.4kHz in 32 steps
n
Modulation duty cycle: 33.3%
n
Current consumption: close to 50mA during signal reception
n
IR transmission range: typically 2m to appliance receiver
By John Clarke
‘Demodulation’ converts the series onto the appliance(s) via their onboard a small remote control for an LCD pro-
of brief 36kHz pulses to a signal that’s IR receivers. jector. There just wasn’t any room for
high when the pulses are present and Note that 36kHz is a typical modula- it. Subsequently, the entire IR-to-UHF
low otherwise. tion frequency used in infrared remote circuit has been redesigned using sur-
When IC1 detects it is receiving a controls. You can adjust the modula- face mount components.
signal, it powers the UHF transmit- tion frequency of the final infrared out- Instead of using a large pre-built
ter (IC2) and sends the demodulated put to match that of the original remote UHF transmitter module, we use a
signal to the UHF transmitter’s input. control, since the remote control could very small UHF transmitter IC with a
The result is that the UHF transmitter use another frequency between about few discrete components.
produces a 433.92MHz modulated sig- 32kHz and 41kHz.
nal to the transmitting antenna. This Overall, the original handheld Remote’s battery life
is waveform C. remote signal is duplicated at the One question that arises is what hap-
So overall, the original 36kHz output of the UHF-to-IR Converter. pens to the battery life of the modified
modulated signal is converted to a The appliance receiving the signal is remote. Will the battery be flattened in
433.92MHz modulated signal for wire- none the wiser that any processing a short time when the UHF transmitter
less transmission. has occurred. circuitry is added?
The corresponding UHF-to-IR Con- We have made sure that there will
verter has a UHF receiver (RX1) that Previously be a negligible effect on battery life by
provides the demodulated waveform, Note that we published a similar proj- keeping the circuitry in a sleep mode
shown as waveform D. This matches ect named Add a UHF link to a univer- when the remote is not being used. A
the B waveform – see Scope 3. Pro- sal remote control (PE, August 2014). typical infrared remote control draws
cessor IC1 on the second board then While that project is still valid, this about 1-2μA from the battery contin-
uses a new 36kHz carrier to produce one has a much smaller transmitter uously and around 10-20mA during
a modulated waveform, waveform E, circuit that can be fitted into small infrared transmission. The UHF trans-
that matches the original waveform infrared remote controls, unlike the mitter’s added power draw has almost
A, as shown in Scope 4 and Scope 5. one from 2013. no effect on these figures.
This modulated signal then drives This became apparent when we With the IR-to-UHF Converter
an infrared LED that sends the signal tried to install our earlier design inside installed, we measured the standby
Fig.1(b): the waveforms at right, both here and in Fig.1(a) opposite, show how the original IR LED drive signal is
demodulated, then remodulated to 433.92MHz, then demodulated, and then finally remodulated to around 36kHz to drive
the IR LED.
current increasing by a mere 90nA 9-12V DC plugpack or USB power demodulated output at pin 4. That pin
(0.09μA)! The current drain when a source should be suitable. goes high when a modulated signal is
button is pressed is essentially unal- present and low when the modulation
tered and possibly even a little less Circuit details is absent.
than before, as the remote’s IR LED is Fig.2 shows the circuit of the IR-to- IC2 is a UHF transmitter that sends
not used and replaced by UHF trans- UHF Converter that’s designed to be digital data using two different car-
mission, which is on average 8mA built into the remote control. It com- rier wave amplitudes. This is known
when active. prises a PIC10LF322 microcontroller as Amplitude Shift Keying (or ASK).
By the way, we measured the 90nA (IC1), a MICRF113 UHF transmitter For our purposes, there is no UHF
figure by connecting a 100kW resistor (IC2) and associated components. transmission when the digital signal is
in series with the device’s supply and IC1 monitors the infrared LED drive low (near 0V) and a 433.92MHz carrier
shorting it out until it went into sleep signal originally used to drive the transmission when the digital signal
mode. We then measured 9mV across infrared LED. The handheld remote is high (near 3V).
this resistor, which equates to 90nA output will drive either low or high IC1’s demodulated signal at pin 4
(9mV ÷ 100kW). to power the LED. is suitable for driving IC2 at its ASK
An open-collector driver transistor input (pin 6). Note that the pin 3 out-
Receiver or MOSFET in the remote control IC is put of IC1 drives the supply input for
The companion UHF-to-IR Converter normally used. This output requires a IC2, at its pin 3. This way, IC2 can be
is housed in a small plastic case. One pull-up resistance to turn it into a digi- shut down when not needed, drawing
end of the case has a red acknowledge tal signal for sensing, which is supplied no power at idle.
LED and an IR LED to re-transmit the by a MOSFET we enable inside IC1. The transmission frequency is set
received UHF signal as an IR signal. A 1kW pull-down resistor is shown using a crystal oscillator that is multi-
There is also a 3.5mm jack socket to on the circuit, but this is only required plied by 32 within IC2 to produce the
allow the connection of an external IR if the remote control has an open-col- UHF carrier. So the 13.56MHz crys-
LED via a cable. lector (or open-drain) output that tal gives a carrier at 433.92MHz. This
This device either draws power from drives high to power the LED. We will matches the carrier frequency used in
a 9-12V DC plugpack or from USB 5V. describe how to check for this later. most UHF ASK transmitter/receiver
The circuit draws a maximum current IC1 converts the LED drive mod- modules that are available for low-
of 50mA when transmitting, so any ulation (typically 36kHz) into a power UHF data transmission.
IR-to-UHF Converter V2
Fig.2: the IR-to-UHF Converter section circuit deliberately uses few components to make the PCB as small as possible.
It’s powered by the typically 3V supply of the remote control (from two 1.5V cells). IC1 demodulates the drive signal that
would normally go to an infrared LED. When it detects a button press, it powers up UHF transmitter IC2 and feeds it the
demodulated signal that is then radiated by the antenna at 434MHz.
Fig.3: the UHF-to-IR Converter PCB uses a pre-built UHF receiver module
(RX1) to pick up the signals from the transmitter, then microcontroller
IC1 adds modulation at a frequency adjustable by VR1, and drives
onboard infrared LED1 plus an external LED when plugged in via CON3.
It can run directly from a 5V USB source via CON2 or 9-12V DC from
barrel socket CON1, regulated to 5V by linear regulator REG1.
UHF-to-IR Converter V2
36 Practical Electronics | January | 2023
capacitors are generally very cheap
and sold in useful sets which are well
worth investing in.
Incidentally, we recommend that
you mount the 68nH inductor after
fitting the 12pF and 5pF capacitors;
otherwise, you might accidentally
desolder this inductor.
Now turn your attention to the
underside of the PCB. There are two
18pF capacitors, one 1kW resistor
and diode D1. Take care to position
the diode correctly, with the cathode
stripe, as shown in Fig.4(b). Note that
the resistor might not be required, so
leave it off for the moment.
If you want to be sure that the
components have been soldered cor-
rectly, you can trace the connections Before mounting the IR-to-UHF
to the other sections of the PCB to Converter inside a remote, you will
where there should be continuity. need to check whether a pull-down
For example, pin 3 of IC1 should pro- resistor is needed.
vide a low resistance reading to pin 3
of IC2. Additionally, check that there
are no short circuits between compo- with a thin implement to separate Wire up the supply connections: ‘+’
nent pins on the PCB that shouldn’t the two halves. to the +3V on the remote, GND to the
be connected. Once inside, locate the positive and 0V terminal and IN to the LED drive
negative battery terminals. To check pin on the remote’s IC (eg, to the pad
Pull-up or pull-down whether the resistor is needed, it is where the LED was soldered). You
As mentioned, the handheld remote just a matter of making some measure- might need to trace out the PCB to fig-
control might drive its output high ments with a multimeter. ure out which one to connect.
or low to turn the IR LED on. The First, check the resistance between Now place the PCB in a suitable
way the LED is driven determines the battery’s positive terminal and the spare space within the remote. Next,
whether you need to install the 1kW anode (+) of the LED. If it is low (less solder the antenna wire, and route
pull-down resistor. The internal than 30W), you can expect that the pull- this around the case in a position
pull-up within IC1 is automatically down resistor is not needed. That is where it will not be caught when it
activated if the pull-down resistor because the cathode of the LED would is reassembled.
is not fitted. be pulled down to power the LED. Note that while we specify a 170mm
To determine this, first you will If the resistance between the cathode length of antenna wire, the transmis-
need to open the remote control case. (–) of the LED and the negative battery sion range does not suffer signifi-
Some remote cases are secured using terminals is low (less than 30W), that cantly if it is shortened. We found that
screws that are easy to spot, but they means the LED drive is active-high, so a 53mm length of antenna wire only
also could be hidden under the cells. the 1kW pull-down resistor is needed. reduced the range by 5m compared to
Open the battery compartment and After the pull-down resistor is sol- the 170mm length.
remove the cells to check for screws. dered in place (if needed), the assem- Finally, clip the case together and
Once these are out, open the case bled PCB can be mounted in the remote’s reinstall the securing screws if they
by gently working around the sides case. The IR LED should be removed. were present.
Fig.4 (right): the IR-to-UHF converter PCB is packed so it can fit inside just about any
remote control case. Don’t worry too much about bridging the pins of IC1 and IC2 when
soldering them as that can be fixed quite easily using solder wick and flux paste, but
do be careful to orient those ICs correctly and don’t mix them up. The 68nH inductor
is minuscule, so be careful not to lose it. After soldering it, check for a low resistance
reading between the antenna terminal and left end of the 12pF capacitor.
►
The UHF-to-IR PCB can
be mounted inside a UB5
case and placed near the
The DC socket hole can be drilled receiving device. You will
first. This is positioned 6.5mm down need to drill holes in the
from the top lip of the base at the left- UB5 case for the sockets and
hand end. LEDs, as shown in Fig.6.
Start this hole using a small pilot
page of the PE website: (https://bit.ly/
drill, then carefully enlarge it to 6.5mm
pe-downloads) printed onto a suitable
using a tapered reamer. The 3.5mm
label and affixed to the lid. The four cable with a 3.5mm jack plug at one
socket hole is centred along the hori-
corner holes for the case screws can end and an external IR LED at the
zontal axis at the other end of the case,
be cut out using a sharp hobby knife. other. Fig.7 shows the details. You
10.5mm down from the lip. Again, use
will need to use a suitable length of
a pilot drill to start it, then enlarge it
Making an extension cable single-core shielded cable, while the
to 6.5mm.
Depending on how your gear is LED leads should be insulated from
The hole for LED1 can then be
arranged, you may want to make up a each other using heatshrink tubing.
drilled 3.5mm down from the lip,
directly above the socket hole. Drill
this hole to 3mm, then drill a simi-
lar hole for LED2 about 12mm to the
right. The rectangular USB cut-out can
be first drilled and then filed to shape
with needle files.
Now clip the PCB into the slots The front panel
in the side ribs of the box (push the label for the Remote
3.5mm jack socket into its hole first). Control Range
Extender can be
Once it’s in place, bend the two LEDs
downloaded as a
over and push them through their
1-1 scale PDF from
respective holes in the adjacent end.
the January 2023
Secure the assembly by fitting the nut
page of the PE
to the jack socket.
website: (https://bit.
The lid label can be downloaded
ly/pe-downloads).
(in PDF format) from the January 2023
Fig.5: the assembly of this board is straightforward as the components are much larger than on the other board. Watch
the orientations of the UHF receiver, IC1 and diode D1.
►
to-IR Converter needs to have its IR
LED pointing towards the appliance at
a range of about 1m. If it doesn’t work,
adjust VR1 as you operate the remote
control until the appliance responds.
Usually, setting VR1 mid-way (cor-
responding to a carrier frequency of
around 37kHz) will be suitable.
Once it’s operating correctly, try
using the remote to control the appli-
ance from another room. You should
get a free-air range of 20-25m, but the
range will be less than this inside a
house, depending on any obstacles
(walls, doors, furniture and so on)
between the remote and the UHF-
to-IR Converter.
Multi-Channel
Speaker Protector
If you’re driving a lot of speakers, you will need a matching compact speaker
protector to prevent driver destruction, should something go wrong. Our
Speaker Protector, when combined with our Hummingbird Amplifier module
(published last month), is excellent when driving stereo loudspeakers with
an active crossover or for surround sound systems where you have many
speakers to drive.
A
re your expensive speaker subsonic filtering. This is a surefire off the first time it activates, but we all
drivers protected if the worst way of killing a bass driver.(It can hope this is one project that you never
happens, and an amplifier be addressed in active crossovers by see ‘work’.
module failure results in them hav- including a subsonic filter.) There are many ways of approaching
ing direct current applied? This very 2. By DC from the output of an ampli- a speaker protector. This design aims
simple and effective board matches fier, either due to a failure in the to keep it simple and small by keeping
our Hummingbird Amplifier modules, amplifier or finger trouble by the the parts list to a minimum.
protecting between one and six chan- builder. (Have you ever left a fuse
nels with a switch-on delay in a PCB out or forgotten to connect a wire?) Circuit details
measuring just 67 x 120mm for up to The circuit used is straightforward, as
six channels, or 67 x 91mm for the This project solves #2. But, you might shown in Fig.1, with three duplicated
four-channel version. ask, what about over- powering a stereo sections providing the six pro-
Over a few years of building Hi-Fi speaker? Won’t it blow up that way tection channels.
and PA equipment, it would be fair to too? In my experience, that takes a The main part of the Speaker Protec-
say that this author has not destroyed heroic effort if your crossover is set tor circuit is elegant, but it might not
that many speaker drivers. But when up correctly, so we leave the volume be obvious how it works at first glance.
I have, it has always been expensive, control to your discretion. Its first job is to detect the presence
painful and inconvenient. of DC at an amplifier output, connected
The experience of watching a 60W The impetus to one of the AMP x OUT terminals at
amplifier deliver 40V DC to the voice When I built an active crossover com- right. This is done by the 100kW input
coil of a very expensive driver that rep- bined with six Hummingbird Ampli- resistor and 47μF bipolar capacitor,
resented months of savings is burnt in fier modules, I found myself running which form an RC low-pass filter with
my memory. This was a 250W driver out of room. To fit this lot with power a −3dB point (corner frequency) of
but it was no match for 40V DC! In a supplies into a 330mm-deep 2RU case, 0.25Hz. The output of this filter feeds
matter of seconds, the voice coil turned I had to move from beer mat sketches a DC detector that triggers at the VBE
into smoke, much faster than a human to CAD and ‘the computer said’ that I voltage of a transistor, around 0.6V.
being could turn the power off—all for needed to make the speaker protector So for regular operation, the ampli-
the sake of a 50p insulator. small. So I did. fier must generate less than 0.6V at the
There have been two main destruc- This device will protect your output of this filter. Choosing 10Hz as
tors of my drivers: speaker from most amplifier failures. a ‘safe’ low frequency limit and assum-
1. Over-excursion of drivers, partic- The modest investment will pay itself ing an amplifier that can deliver 100W
ularly in vented enclosures below into 4W, we can calculate that only
resonance without appropriate By Phil Prosser 135mV would appear on the output
L R
2 7 22µF
shown, only the red Cold – 0V
6
+
R5
IC1
components and green 10kΩ
+
3 4
Hot + R12
links are used. C2 8 47Ω R13
5 C10
10µF R6 +input 100nF 100kΩ
Gnd V+
R2 10kΩ pad Power on 3-pin
R1 100kΩ connection
Vb bias C6
100kΩ R9 22pF V–
C5
100pF C12
Vb
100nF
+ 0V
C13 R8 Link pads
Link Used Not used
L
ast month, we introduced C7
0V
C1 R1
our Universal Single Op Amp –input
+input
Board, a really useful op amp- R
R R5 R2
12 R C2
based amplifier PCB that is perfect for 14 6
R4
both design/development and finished
C5 R13
products. It takes a through-hole or SMD
C C 0V
op amp, around which you have lots of 6 10 IC1
Output
options for adding passive components C11
so that you can build a whole host of C9 0V
V+
common amplifier configurations. + V–
I’m an audio engineer, so it’s not C12 Power
surprising that I’ve designed the
board with audio in mind, but there
is absolutely no reason why it can’t be
used for instrumentation or any other
high-quality op amp application that
requires a quick and easy PCB solution.
We’ve already covered the op amp
non-inverting, inverting and summing
amplifier configurations, and this month
we will look at three more handy designs.
Fig.22. Phono
RIAA
5.23kΩ 63.4kΩ amplifier circuit –
network if you are using
14.32nF 50.15nF only one op
Basic circuit
*Can be scaled
(see text)
R14* amp (as here) to
Sum input 220Ω accomplish the
C4 R7 C7 C8
–
+
14.32nF* 50.15nF*
+ RIAA equalisation,
Input IC1
220µF
+ Output then odd RC
Feedback R10 R11
components 5.23kΩ* 63.4kΩ* 0V values are needed
0V R3
Bias 10kΩ
for the negative
V+
R3 –input feedback network.
C3 R4 pad C11 0V
C1 220µF 220Ω 10µF
25V (Solid aluminium) Output
+
2 7
– 0V
6
+
IC1
R5
+
3 4
Input + R12 C9
8 47Ω 100µF
C2 5 C10
100µF R6 +input 100nF 25V
Gnd V+
R1 10V 68kΩ pad Power on 3-pin
C6 connection R13
Vb bias 100kΩ
R2 R9 4.7pF V–
C5
180kΩ 100pF C12
Vb 10µF +
25V (Solid aluminium)
+ 0V
C13 R8 Link pads
Link Used Not used
Cherry low-frequency
compensation
I put this capability on the board because
it’s a current interest of mine and I
think the technique needs to be more
Fig.24. (above) Phono amplifier construction – a bit untidy, but it can at least be
widely known. DC coupled circuits
accommodated on the board; (below) Alternative RIAA amplifier construction. Single
give a perfect square-wave response at
capacitors are used for C7 and C8, but half the value. Resistors R10, R11 and R4 are
low frequencies, but can suffer from
scaled up to 10.5kΩ, 127kΩ and 442Ω respectively.
dangerous DC offsets. Placing a capacitor
in the lower arm of the feedback network
if you buy a lifetime’s supply of 100! 1.3nF. I rescued these caps out of a skip of a non-inverting amplifier offers
Mouser are cheaper, supplying the 1% at the end of a production run of filters protection by reducing DC gain to unity,
Yeago MFR-25FBF52 series. (Often, and they are all still spot-on. Of course, but a low frequency square wave, such
E96 resistors are 0.1% and can cost a five 10nF capacitors, or any other as 20Hz, will suffer from a pronounced
fortune, so these 1% options are well combination could be used for C8. ‘tilt’ at the top and bottom of each cycle.
worth considering). These were the original Doug Self Professor Ed Cherry devised a scheme
Getting accurate capacitors is more values. For a simpler version (Fig.24, to compensate for this by adding an
difficult and ±1% or 2.5% tolerance lower), I decided to double the resistor extra RC network (see ETI magazine,
devices are considered top-notch, values and halve the capacitors, so 60W NDFL Amplifier, May 1983). This
but here in Wales, home of the UK’s only two capacitors, one of the 24.76nF technique can also be used to minimise
‘capacitor cluster’, LCR (who absorbed and an LCR 7.15nF were needed. The the value of the capacitor, which can
Suflex) still make excellent polystyrene noise increases by about 1dB by doing often be hundreds of microfarads in
capacitors, available from the author this because of the higher impedance. a power amplifier, down to say 47µF.
– see contact details in the AO Shop To provide the final part of the RIAA This then allows longer-life tantalum
ad on p.50. curve, −20dB at 20kHz relative to 1kHz, capacitors to be used. For those worried
To aid constructors I’ve made a further low-pass filter is required. about distortion, the capacitor can
available some low-cost kits of these This is due to the op amp’s response then be configured as a bipolar part by
odd-value resistors and capacitors flattening off to unity, since the non- putting two capacitors back-to-back and
(also via the AO Shop). The 50.15nF inverting configuration has a minimum applying a 5V bias voltage to the centre
capacitor (C8) can be made up using gain of one. This is achieved with a 4.7nF connection. A demonstrator circuit is
two surplus Suflex 1% 24.76nF capacitor inserted in R13’s position in given in Fig.25, the overlay in Fig.26 and
capacitors in parallel (giving 49.52nF) conjunction with a higher-than-normal the finished board in Fig.27.
using the extra pads as shown earlier value for R12 (510Ω). This network
in Fig.6. You can add an extra 680pF should be omitted if a roll-off at 66kHz Positive feedback
as well for more precision. The other is provided further on, as is usually the The vast majority of op amp circuits for
capacitor (C7) needs to be 14.32nF and case, such as with stabilising capacitors audio, as well as instrumentation and
I made mine out of a parallel 13nF and or an output balancing transformer. The other signal-processing designs, use
+
C7 C8 Basic circuit 15kΩ 33kΩ
2.2µF
R10 R11 Polyester
Feedback
components 15kΩ 33kΩ 2.2µF
R1
750Ω
V+
C1 C3 –input –
100µF Bias 100µF R4 pad + IC1
Input
20V 20V 750Ω C11
+ Output
Output
+
+
2 7 47µF
– 0V 0V
6
R3 IC1 Gain = 1 + (Rf/R1)
+ R5 3
Input + 4 R12 C9
8 47Ω
C2 5 C10
R6 0V
Gnd 10µF V+ 100kΩ +input 100nF
10V pad Power on 3-pin
R9 C6 connection R13 With compensation
Output
R2 1MΩ V–
100kΩ C5
Vb C12
0V Time
Vb bias
+ +5V
0V
C13 Link
R8 pads
470kΩ Link Used Not used Without compensation at 20Hz
Fig.25. Circuit for demonstrating Cherry low-frequency compensation. Feed with a 20Hz square wave and short out the
compensation network C8 and R11 to see the effect. The ‘scope must be set to DC input coupling. Gain is 21x or 26dB.
+
C7 C1
0V
–input
+input
R R R2
12 C2
C8 6 +
R4
C5 R R
10 11
+
C C3 0V
10 IC1
Output
C11 +
0V
R R
V+
9 8
V–
+ Power
C12
ELECTRONICS
£8.99
SERIES
FOR
THE TEACH-IN
8
This CD-ROM version of the exciting and popular Teach-In 8 series INTRODUCING THE ARDUINO
• Hardware – learn about components and circuits
• Programming – powerful integrated development system
has been designed for electronics enthusiasts who want to get to • Microcontrollers – understand control operations
• Communications – connect to PCs and other Arduinos
SOFTWARE
The CD-ROM contains the software for both the Teach-In 8 and PICkit 3 series.
Station Road
Cullercoats Visit our Shop, Call or Buy online at:
North Shields
Tyne & Wear
www.cricklewoodelectronics.com
NE30 4PQ Visit our shop at:
Tel: 0191 2514363 [email protected] www.esr.co.uk 020 8452 0161 40-42 Cricklewood Broadway
London NW2 3ET
O
K, so this month’s title Concept n
Connect all display modules (effectively
is probably not what you were The thought process when exploring this in parallel) to the PicoMite in the usual
expecting, especially if you had topic was as follows. If MMBASIC can manner apart from the ‘enable’ pin of
started building Part 1 of the Fingerprint send data to successfully drive a single each display
Reader. Now for a confession, I seem display, then what is preventing a second n
Connect each ‘enable’ pin from each
to have somehow destroyed a second identical display (connected to the exact display to a dedicated PicoMite I/O pin.
fingerprint module, and hence I’ve had same PicoMite pins) from displaying
to purchase yet another replacement. the exact same ‘image’? Providing the Then, before using any graphical command,
This is all rather ironic bearing in mind displays are just receiving data from enable only the display module(s) that we
the first unit I received for free (since my the PicoMite (and not sending data back want to receive that command by setting
supplier had sent it in error in place of a to the PicoMite), then in theory you the relevant I/O pins to the correct state.
GPS module that I’d ordered – but said I could connect multiple identical display Now that the concept has been covered,
could keep it). So, while I await delivery modules to the PicoMite and they will all we next need to understand any restrictions
of what will be the third fingerprint display the exact same image when the when choosing and using multiple displays
module, this month we’ll be discussing data is simultaneously received by them. with a PicoMite.
an alternative topic, one that I hope you’ll The reason we don’t want to concern
find useful: how to use multiple displays ourselves with data sent from a display Restrictions
with a PicoMite (or MicroMite). Why is module back to the PicoMite is because 1. The first restriction is that all displays
this of interest? Remember, by design, it makes the overall design much easier used in a multi-display project must be
MMBASIC’s firmware is only capable (and also eliminates any potential shorts exactly the same type. This is because
of driving a single external display (the that could occur between conflicting the MMBASIC firmware can only be set
specific type being configured with OPTION logic levels). to a single type of display via the OPTION
LCDPANEL). So, how can we connect more Now for an important point: the LCDPANEL command.
than one display to a PicoMite? image on a display is only updated by 2. The second restriction is the type of
MMBASIC graphical commands, such interface that the identical displays use.
Examples of use as TEXT, BOX, CIRCLE, PIXEL, LINE, Referring to the PicoMite User Manual
First, let’s acknowledge that there are some CLS, RBOX, POLYGON and so on. Once (available for download from the January
restrictions as to what is achievable when the MMBASIC firmware has processed a 2023 page of the PE website: https://
driving more than one display – but, once graphical command and the PicoMite has bit.ly/pe-downloads), you will see that
these limitations are understood, it will sent the relevant data to the display(s), MMBASIC supports various LCD and
be possible to achieve some very creative the updated image on the display(s) will OLED displays that use either a serial
multi-display projects. For example, how remain in place until the next graphical SPI, a serial I2C or a parallel interface.
about adapting a project that uses multiple command is sent (or until power is However, the way that serial I2C and
7-segment LED modules and replacing each removed from the display modules). parallel interfaces work means that the
one with a small LCD display module. This Put another way, there is no need to data line(s) are used for both writing to and
would allow each ‘digit’ to offer endless continually write data to the display(s) reading from the display modules, and
options in terms of colour and font. Or to maintain the image. hence there will likely be contradictory
how about building a data logger that has Having the same image on all displays logic levels present on the ‘common’ data
multiple sensors, and providing each sensor isn’t very useful since ideally we will lines when connecting displays together
with a dedicated mini-display to show want to control each display separately. to the same pins. Only the SPI interface
relevant data. Another idea would be to However, if each display also has some has a dedicated signal for writing data to
modify the Micromite Robot’s animated form of ‘enable’ pin, then in theory, only the display. Thus, the second restriction
eyes (that originally used two 8x8 LED the displays that are enabled would is that only displays that use a serial SPI
matrix modules) and replace them with process the data sent out by the PicoMite. interface will work with the technique
two coloured LCD displays; this would So, theoretically, all we need to do for we’re using here. To see this, think
allow much more detailed eye effects to multiple display control is the following about the serial SPI interface as having
be animated. in terms of hardware: three connections: SPI-Clk, SPI-Out and
single large LCD screen. If the large 8-way pin header 8-way sockets
screen is used in landscape mode,
then it would allow for a sufficient Fig.3. Four ST7735S modules are mounted in parallel on a piece of stripboard.
Demo 2
BACK ISSUES
Once the CS signal modifications have been made on the
stripboard, and everything has been connected, you should Practical
test that everything works correctly by running the Demo2.txt Electronics
program (available for download from January 2023 page of the
PE website). Install the program into your PicoMite and observe
what happens when you RUN the program. If all is working, BACK ISSUES – ONLY £6.49
you will see a counter like that shown in Fig.7. Do makes sure
D NA –
D NA –
IG E
IG E
PE
Practical
ES M
N
ES M
N
Practical
N NEW E
N NEW E
–
–
EW
EW
Ultrabrite LED
PIC n’ Mix
Software tools for
the PIC18F
Circuit Surgery
Understanding
Differential amplifiers
The UK’s premier electronics and computing maker magazine
Make it with Micromite
Analogue inputs and
using servomotors
Random
Audio Out
Constructing the PE
Theremin amplifier
Circuit Surgery
Micro-Cap 12
simulator review
Frequency Reference Mastering Nutube Guitar WIN! Touchscreen WIN! WIN! Don’t miss WIN!
Clever Controller
Meet the for dumb chargers
In essence, before issuing any graphics command, ensure Make your own PCBs
with our precision
Solder Reflow Oven
PLUS!
Techno Talk – Tin whiskers scourge Apr 2021 £4.99
04
Tunable HF
Preamplifier
PLUS!
Techno Talk – No blame, no shame? Mar 2021 £4.99
03
PLUS!
Techno Talk – Bad science and good
Fabulous low-cost
Concrete speakers!
Jun 2021 £4.99
06
PLUS!
Cool Beans – Even cooler ping-pong ball lights!
Building the
Low-noise
theremin PSU
Sep 2020 £4.99
PLUS!
Making a
splash with
NeoPixels!
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
disable all the others. Note that one, some or all can be
We can supply back issues of PE/EPE by post.
We stock magazines back to 2006, except for the following:
Fig.7. Our simple 4-digit 2006 Jan, Feb, Mar, Apr, May, Jul
counter comprises 2007 Jun, Jul, Aug
four ST7735S display 2008 Aug, Nov, Dec
modules assembled on 2009 Jan, Mar, Apr
2010 May, Jun, Jul, Aug, Oct, Nov
stripboard – all controlled 2011 Jan
by a single PicoMite. 2014 Jan
2018 Jan, Nov, Dec
2019 Jan, Feb, Apr, May, Jun
Issues from Jan 1999 are available on CD-ROM / DVD-ROM
If we do not have a a paper version of a particular issue,
then a PDF can be supplied – your email address must be
included on your order.
Please make sure all components are still available before
commencing any project from a back-dated issue.
I
n this issue, we continue our
series on electronically controlled re-
sistance. Last month, we started looking
digipots – digital potentiometers – which
are integrated circuits providing a similar
function to mechanical potentiometers
and trimmers. They are commonly inter-
faced to microcontrollers to adjust system
parameters such as gain and bias voltage.
We introduced the basic principles of di-
gipots and discussed some example ICs
which demonstrate some of the character-
istics and functionality that are available.
Prior to digipots we were looking at
JFETs as voltage-controlled resistors,
including a number of simulation examples
using LTspice. There was no significant Fig.3. LTspice digipot schematic using basic SPICE elements.
issue with setting up simulations using
JFETs as electronically controlled resistors because JFETs are basic devices in SPICE non-ideal digipots characteristics (and
simulation, and models for both generic how to simulate them as well).
and specific commercial devices are Fig.1 shows the structure of a digipot
A
readily available. Digipots are more resistor ladder and switch network, which
SN
complex integrated circuits for which was discussed in some detail last month.
models may not be available from the In this schematic we have included the
RN–1 manufacturer (although some are). This wiper resistance, which is a non-ideal
SN–1 month, we will consider some approaches characteristic exhibited by real digipots.
to simulating digipots in LTspice and at The wiper resistance is due to the on
the same time discuss a couple of key resistance of the MOSFET transistors used
RN–2
SN–2
RW
RN–3 Wiper (W)
R1
S1
R0
S0
Control input
RW
(wiper position)
RAB Wiper
B
Potentiometer
Fig.2. Digipot equivalent circuit. Fig.4. Results from simulation of the circuit in Fig.3.
Using analogue
multiplexer switches
The results of the simulation are shown
in Fig.4, and Fig.5 shows a larger view of
the output waveform so that the amplitude
steps obtained by different wiper positions
can be more clearly seen. The circuit in
Fig.3 works well but is not particularly
convenient – it requires each switch to be
individually controlled, when ideally, we
want a digital code or a voltage to represent
the code value as the control input. This
issue can be overcome by using an analogue
multiplexer integrated circuit model to
implement the switches. There are a few of
.param Rdigipot=10k
R = {Rdigipot}*V(N)
R = {Rdigipot}*(1-V(N))
R = limit(1m,{Rdigipot},{Rdigipot}*V(N))
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.
Fig.17. LTspice circuit to investigate the effect of wiper resistance when using rheostat mode.
which could be fixed by refining the timing. memory, then microcontroller software - USB - PWM
- Ethernet
Fig.15 shows a circuit in which the digipot could use the value in calculations to set - Encoders
- Web server - LCD
is placed between two fixed resistors. This the required control value. - Modbus - Analog inputs
technique narrows the proportion of the - CNC (Mach3/ 4) - Compact PLC
potential divider output which is controlled Wiper resistance - IO
by the digipot – it is not unusual to require Previously, we mentioned that digipots
an adjustment range significantly smaller have a wiper resistance – this can affect
than 0 to 100% of the input (as provided by the performance of circuits. For example,
the circuit in Fig.11). For a given number if a digipot is used in rheostat mode (single
of taps (wiper steps) this increases the variable resistor) the wiper resistance will
resolution with which the output can be contribute to the total resistance. Fig.17
controlled. This simulation is run with shows three circuits using a digipot in
value variation for the digipot of ±20% rheostat mode. The top two circuits have
for a nominal value of 10kΩ using the a relatively large wiper resistance (500Ω)
- up to 256 - up to 32
approach discussed earlier. The input is to show its effect and the lower circuit microsteps microsteps
simply 8V DC so the output will be a DC has minimal wiper resistance (1mΩ) as a - 50 V / 6 A - 30 V / 2. 5 A
value as set by the potential divider formed reference for comparison. In rheostat mode, - USB configuration
by the four resistors. one terminal of the potentiometer is not used - Isolated
– it can either be shorted to the wiper (top
Digipot resistance variation left in Fig.17) or left disconnected (top right). PoScope Mega1+
The results are shown in Fig.16. Here The results in Fig.18 show that the two
we can see that the variation in digipot spare terminal options produce different PoScope Mega50
resistance results in a variation in the behaviours. The top pane plots the resistance
range of output voltages that can be set. of all three rheostats against time as the
This is potentially a major problem – if control input is stepped from 0 to 1 (zero
the circuit was designed to utilise the full to maximum resistance in 256 steps). The
control range available with the nominal reference rheostat (green trace) has the lowest
10kΩ resistance, individual digipots with total resistance, and the others are larger due
smaller resistance would not be able to to the wiper resistance being included in
control the full range of output levels. The the total value. The lower pane shows the
design should be based on the worst case difference between the reference value and
(in this case 8kΩ gives the smallest control the top two circuits. The circuit with the
range – green trace for V(out)@1). Another disconnected spare terminal has a constant
problem here is that different control difference equal to the wiper resistance.
- up to 50MS/ s
inputs give different output levels with The circuit with the shorted spare terminal - resolution up to 12bit
different digipot resistance values. This has a lower difference (is closer to the - Lowest power consumption
could be accounted for using calibration ideal value) but the difference varies with - Smallest and lightest
procedures in software. For example, if wiper position, which would make it more - 7 in 1: Oscilloscope, FFT, X/ Y,
Recorder, Logic Analyzer, Protocol
the individual digipot resistance value difficult to account for the wiper resistance decoder, Signal generator
was known and stored in non-volatile in software calibration.
A
s I happily meander (some number crunching and decision making discharge (ESD) more times than I care to
may say ‘blunder’) my way takes place. An MPU is essentially an remember, so I strongly recommend that
through life, I meet a lot of people integrated circuit (IC) – also known as you take appropriate anti-static precautions.
with ages ranging from youthful sprogs a silicon chip – containing only a CPU, Is this mandatory? No. Is it a good idea?
to venerable golden-agers who are in- with everything else (eg, memory and Yes. Suppose you are ambling your way
terested in learning about computers in peripheral functions) being presented around your home after making a refresh-
the form of microcontrollers. externally as separate devices. By com- ing cup of tea, and you build up an electro-
These people come from all walks of life. parison, in addition to its CPU, an MCU static charge on your way. (For modelling
A few years ago, for example, I was intro- also contains on-chip memory and on- the effect of ESD on sensitive electronic
duced to an ex-army attack helicopter pilot chip peripheral functions. devices, a human being is represented as
whom we’ll call Mike (because that’s his The MCU’s on-chip memory comes in a capacitor of 100pF (picofarads) charged
name). Mike was in the process of build- two main forms: Flash and RAM. The Flash to a voltage of up to 35kV (35,000 volts).
ing a gigantic model railway. He wanted is non-volatile, which means it retains its Suffice it to say, it can be a monumental
to be able to illuminate the streetlights and contents when power is removed from the pain if you zap yourself. It can also make
houselights in his miniature world, but he system. In turn, this means we can store a your eyes water if you end up destroying
didn’t want them to all simply turn on and program in the Flash memory and, when one of the elements – a pin on your nice
off at the same time. Mike’s wish was that power is applied to the system, the MCU new Arduino, for example – of a project on
when he dimmed the lights in the room will wake up and immediately start to ex- which you’ve been working for hours, before
housing the layout, the streets in his model ecute that program. By comparison, the you’ve even had a chance to play with it.
would light up at slightly different times. RAM, which stands for ‘random-access To prevent any such unfortunate oc-
Also, that the lights in the houses would memory’, is volatile, which means it for- currence, may I make so bold as to sug-
start to turn on in a random fashion. This gets its contents when power is removed gest that you invest in an anti-static mat
was, of course, a perfect task for a micro- from the system. When the MCU is run- (https://amzn.to/3g1YH4A) and an anti-stat-
controller, so I gave Mike a crash course ning, the RAM is used by the program to ic wrist strap (https://amzn.to/3WYZ9Bu).
and helped him get things up and running. store temporary values, intermediate re- Both typically come with crocodile clips
There are vast amounts of training re- sults from any calculations, and data read (a.k.a. ‘alligator clips’ in the US), which
sources already available for this sort of from the outside world. you can pull off to reveal banana plugs. My
thing in the form of books, websites and The microcontroller with which we preferred modus operandi is to plug these
YouTube videos, but sometimes it can be will be playing is an ATmega328P. This banana plugs into an anti-static grounding
hard to take that first trepidatious step device was originally created by a com- plug (https://amzn.to/3hDIcML), which is
(don’t worry, I’m right behind you and I’ll pany called Atmel, which was acquired – in turn – plugged into a wall socket or
be happy to give you a push). by another company called Microchip a power strip. To be clear, the connection
It’s also true that there are many ways into Technology in 2016. is just to ground – never to the bitey ter-
this topic, and everyone teaches things dif- A microcontroller development board is minals (live/active or neutral)!
ferently, so if you’ve already tried dipping a printed circuit board (PCB) that contains
your toes in the microcontroller waters, a microcontroller along with other devices Let’s get started
only to find them cold, confusing and un- and connectors. The microcontroller de- An Arduino Uno (Fig.2) requires 5V to per-
inviting, perhaps I can persuade you to try velopment board we will be using for our form its magic. One possibility is to use
once more with your humble narrator as experiments is an Arduino Uno R3 (Fig.1) a 9V supply plugged into the Arduino’s
RESET
POWER ANALOG IN
IOREF
Power
GND
GND
3.3V
Vin
5V
A0
A1
A2
A3
A4
A5
Jack
POWER ANALOG IN
IOREF
Vin
5V
A0
A1
A2
A3
A4
A5
Jack
characters for this sort of constant
definition because this makes it
Fig.8. Setting up the breadboard. obvious to me what they are when
I’m reading my code at a later date
(a) Driving the LED’s anode (b) Driving the LED’s cathode
pin to the LED’s cathode, a HIGH (5V) turns the LED Off and a
LOW (0V) turns it On.
Fig.9. Different ways of driving the LED.
Assuming we prefer our original short On flashes, one way in
(speaking of which, you can see my version of this program in which we could address this would be to simply swap the two
file CB-Jan23-03.txt). delay values. Another approach would be to leave the delay values
Once you’ve made these changes, click the Verify icon to ensure ‘as-is,’ but to swap the HIGH and LOW arguments. A better option,
that all is as it should be, then click the Upload icon to upload however, would be to create two new definitions for LED_ON and
this new program into the Arduino. If you’ve wired everything LED_OFF (Listing 2 and file CB-Jan23-04.txt).
correctly, the LED on your breadboard should start to display a This means that if we wish to return to driving the LED’s
1/10th second flash once a second. anode at some time in the future, all we will have to do is swap
the LOW and HIGH assignments associated with our LED_ON and
Controlling the LED’s cathode LED_OFF definitions.
An alternative way of controlling the LED is to leave its anode
connected to 5V via its current-limiting resistor, and to use one Phew!
of the Uno’s digital I/O pins to drive its cathode. Once again, we ‘Wanger gadangers,’ as one of my old friends used to say, there’s
will use pin 6 for this purpose. Rewire the breadboard as shown a lot to wrap our brains around here. On the one hand, all we’ve
in Fig.9b (remember to remove the black wire connecting the learned thus far is how to use a microcontroller to flash a single
LED’s cathode to ground). LED. On the other hand, WE’VE LEARNED TO FLASH AN LED!!!
Observe that, this time, using our current program, the LED is (Break out the party hats!)
On for 9/10th of a second and it flashes Off for 1/10th of a second. In reality, we’ve covered a lot of ground and we’ve set our-
The reason for this is that when we use our digitalWrite() selves up for some exciting experiments when next we meet.
function to output logical values of LOW or HIGH, these appear on As a helpful hint, without giving too much away, you may wish
the pin as physical values of 0V and 5V, respectively. to get a head start by ordering one or more common-cathode
When the Arduino’s pin was connected to the LED’s anode as 1-digit 7-segment displays. I just found a pack of 10 for £7.49 on
discussed above, a HIGH (5V) turned the LED On and a LOW (0V) Amazon at: https://amzn.to/3Afm8yu
turned it Off, all of which tends to be the way in which we think As always, I welcome your insightful comments, perspicacious
about things. However, now that we’ve connected the Arduino’s questions and sagacious suggestions.
Online resources
For the purposes of this series,
I’m going to assume that you
are already familiar with fun-
damental concepts like volt-
age, current and resistance. If
not, you might want to start
by perusing and pondering
a short series of articles I
penned on these very topics
– see: https://bit.ly/3EguiJh
Similarly, I’ll assume you
are no stranger to solderless
breadboards. Having said
this, even if you’ve used these
little scamps before, there are
some aspects to them that can
Listing 1. (above) Defining PIN_LED. trap the unwary, so may I sug-
gest you feast your orbs on a
Listing 2. (right) Defining LED_ON and column I wrote just for you
LED_OFF. – see: https://bit.ly/3NZ70uF
Last, but not least, you will
Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he
find a treasure trove of resourc-
surveys at CliveMaxfield.com – the go-to site for the latest and greatest
es at the Arduino.cc website,
in technological geekdom.
including example programs
Comments or questions? Email Max at: [email protected] and reference documentation.
BACK ISSUES
Practical
Electronics
BACK ISSUES – ONLY £5.95
D NA –
D NA –
IG E
IG E
Practical
PE
ES M
N
ES M
N
Practical
N NEW E
N NEW E
–
–
EW
EW
Frequency Reference Mastering Nutube Guitar WIN! Touchscreen WIN! Ultrabrite LED WIN! Don’t miss Random WIN!
WIN!
Signal Distributor RFID tags for Microchip Overdrive and Superb PE PIC Microchip Wide-range Microchip bike light Microchip
Explorer 16/32 our Super Number Microchip
MPLAB Starter Kit
PIC24F LCD and
your projects
Curiosity HPC
Development Distortion Pedal Development USB Curiosity
RCL Box
MCP19114 Flyback
Standalone
Development
Kit Summer Sale! Generator for Serial Memory
Products
Development
Board
WIN!
Board Board
Evaluation
Board WIN! WIN!
Clever Controller
Meet the for dumb chargers
Meet the Cricket: Mastering stepper Micromite
making IoT designs motor drivers Explore-28 Hi-Fi amp on
super easy! the cheap!
Tunable HF
Preamplifier
Programmable
Thermal
Regulator
Roadies’ Test
Signal Generator
Fabulous low-cost
Robot Buggy
Ultrasound
sensing!
Building the
Low-noise
Making a
splash with
NeoPixels!
Completing the
High-power 45V/8A
Variable Linear Supply
Fun LED
Christmas
Tree offer!
JTAG Connector Plugs Directly into PCB!!
Concrete speakers! theremin PSU
PLUS! PLUS! PLUS! PLUS! PLUS!
Apr 2021 £4.99 Mar 2021 £4.99 Jun 2021 £4.99 Dec 2020 £4.99
No Header! No Brainer!
Techno Talk – Tin whiskers scourge 04
Techno Talk – No blame, no shame? 03
Techno Talk – Bad science and good 06 Cool Beans – Even cooler ping-pong ball lights! Sep 2020 £4.99 Techno Talk – Triumph or travesty? 12
09
Cool Beans – Bouncing around the Maxiverse Cool Beans – Round-up of NeoPixel effects Cool Beans – Smoothing LED colour transitions Net Work – IP security cameras Cool Beans – Mastering NeoPixel programming
Net Work – Hydrogen: a viable alternative to batteries? 9 772632 573016
Net Work – Videoconference cameras 9 772632 573016
Net Work – Lockdown technology and how we now work 9 772632 573016
Techno Talk – The perils of an enquiring mind... 9 772632 573016 Net Work – The (electric) car’s the star! 9 772632 573016
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
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.
OCTOBER 2020
Digital Audio Millivoltmeter................................................. 04108191 £9.95
PE/EPE PCB SERVICE
Precision Signal Amplifier .................................................. 04107191 £7.95 Order Code Project Quantity Price
SEPTEMBER 2020 .........................................................
PE Theremin PSU ............................................................. AO-0920-01 £5.95
PE Theremin PSU transformer .......................................... AO-0920-02 £7.95 .........................................................
Micromite Explore-28......................................................... 07108191 £6.95
Ultrabrite LED Driver ......................................................... 16109191 £6.95 .........................................................
JULY 2020
AM/FM/CW Scanning HF/VHF RF Signal Generator ........ 04106191 £13.95 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Speech Synthesiser with the Raspberry Pi Zero ............... 01106191 £5.95
Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PE Mini-organ PCB ........................................................... AO-0720-01 £14.95
PE Mini-organ selected parts ............................................ AO-0720-02 £8.95 .........................................................
High-current Solid-state 12V Battery Isolator – control ..... 05106191 £6.95
High-current Solid-state 12V Battery Isolator FET (2oz) ... 05106192 £9.95 Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
JUNE 2020 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arduino breakout board – 3.5-inch LCD Display ............... 24111181 £6.95 I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only)
Six-input Audio Selector main board ................................. 01110191
£10.95
Six-input Audio Selector switch panel board ..................... 01110192 payable to: Practical Electronics
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Advertisement offices
CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . 51 Matt Pulzer
ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 51
HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Electron Publishing Ltd
iTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (iv)
1 Buckingham Road
JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Brighton
MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) East Sussex BN1 3RA
PEAK ELECTRONIC DESIGN. . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Tel 07973 518682
POLABS D.O.O.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Email [email protected]
QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Web www.electronpublishing.com
STEWART OF READING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 For editorial contact details see page 7.
TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
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 5 January 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: £29.99 (6 months); £54.99 (12 months); £104.99 (2 years). EUROPE: airmail service, £33.99 (6 months); £63.99 (12 months);
£119.99 (2 years). REST OF THE WORLD: airmail service, £41.99 (6 months); £77.99 (12 months); £149.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box
6337, Bournemouth BH1 9EH, United Kingdom. Email: [email protected]. PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the
Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold,
hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever.
A
r electr
udio O
onics a
nd com
puting
sing d g U n u t maker
WIN! igipots
Remote Control iversal
(optim op amp b
magaz
Microchip ised fo oard Make it
wit
ine
PIC32CX-BZ2 Range Extender r audio
) Detec
tin
h Micro
m
and WBZ451
Humm fingerp g, comparin ite
rints w g
Ampli ingbird
Curiosity
Development ith a P and storing
icoMite
Board
fier
WIN
Microc !
PIC32Mhip
Curios M
Develo ity
pm
Board ent
Classic LED
Metronomes
35MHz-4.4GHz
Signal Generator
SM D T
rainer
board
B uild
a
finger PicoMite
Multi-Channel print r
ea d e r
Speaker Protector U SB
PLUS! Ca b l e
P
LUS! Jan 2023 £5.49
Techno Talk – Raudive voices revisited
Techn
Tester
01
Cool Beans – Introducing the Arduino oBootcamp
Talk –
Cool B Giant
eans skills b 9 772632 573023
Net Work – Smart light bulbs and Alexa’s
Net W – LogiS oost for ba
witch d tte
www.electronpublishing.com
ork – E eboun ries
nergy- practicalelectronics
@practicalelec
www.e sa ving a c e brea Dec 2
nd mo kou
nitorin t board
lectro 022 £5.49
npubli
shing
.com g reso
urces 9 772
12
@practica 632 5
73023
lelec
practi
calele
ctronic
s
You read that right! We now sell the current issue of your favourite electronics
magazine for exactly the same price as in the High Street, but we deliver it
straight to your door – and for UK addresses we pay the postage. No need to
journey into town to queue outside the newsagent. Just go to our website, set
up an account in 30 seconds, order your magazine and we’ll do the rest.
www.electronpublishing.com
innovative Technology Projects
WiFi OSCILLOSCOPE
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 charged battery
no interface cables required as it uses
WiFiScope WS6 DIFF WiFi to connect to the computer
The 1 GSa/s 14 bit quad differential channel
High Resolution WiFi Oscilloscope. Base model: Options:
WiFiScope WS6 DIFF-1000 Extended memory (XM)
Prices start from WiFiScope WS6 DIFF-500
WiFiScope WS6 DIFF-200
EMI (E)
SureConnect (S)
Five year warranty (W5)
£1,581*
Key specifications
Differential inputs
8, 12, 14, 16 bit resolution, 0.25 % DC
vertical accuracy, 0.1 % typical
Up to 1 GSa/s sampling, up to 250 MHz
bandwidth
Up to 256 MSamples memory per
channel
Up to 200 MSs/s continuous streaming
WiFiScope WS6 DIFF Carry Case and Accessories 1 ppm time base accuracy