This is only a preview of the March 2025 issue of Silicon Chip. You can view 49 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Power LCR Tester, Part 1":
Articles in this series:
Items relevant to "RF Remote Receiver":
Videos relevant to "RF Remote Receiver":
Articles in this series:
Articles in this series:
Items relevant to "Versatile Waveform Generator":
Articles in this series:
Items relevant to "Pico 2 Audio Analyser":
Items relevant to "Transitioning to the RPi Pico 2":
Purchase a printed copy of this issue for $13.00. |
Project by Tim Blythman
We have updated the Pico Audio Analyser
design from November 2023 to use
the Pico 2, which has improved its
performance in some areas. A followup article also examines how the Pico
2 would work in some of our other Pico
projects and some other hints for using
the Pico 2.
2
PICO Audio Analyser
T
he Pico Analyser project from
November 2023 (siliconchip.
au/Article/16011) is a compact
handheld device that offers many useful features for analysing audio frequency signals.
It includes a signal generator, oscilloscope and spectrum displays and
can perform harmonic and sweep frequency response analyses. The Pico
Analyser is by no means a high-end
device, but it was let down somewhat
by a defect in the RP2040 chip used
on the original Pico.
We discussed this in detail in a
panel in that earlier article. To sum it
up, the 12-bit ADC (analog-to-digital
converter) on the RP2040 chip has
errors in the tiny capacitors used to
perform the conversion. This means
that the ENOB (effective number of
bits) of the ADC is only eight; less than
the nine or so that would be expected.
This affects the accuracy of measurements and in particular limits the
THD (total harmonic distortion) measurements to no better than around
0.4%. We were able to apply some
Features & Specifications
> Audio signal generator (up to 3V peak-to-peak/1.06V RMS) with selectable
frequency
> Sine, square, triangle, sawtooth and white noise waveforms
> Audio signal input with switchable 3.6V and 34V peak-to-peak ranges
(1.27/12V RMS)
> Oscilloscope and spectrum displays
> Harmonic analysis with THD measured down to 0.2% (1.2V RMS, 1.2kHz)
> Can measure and monitor mains distortion with a suitable plugpack
> Sweep analysis with frequency response display
> RCA sockets for input and output
> Runs from USB power or an internal rechargeable battery
> Uses 128×64 OLED display and pushbutton controls
> Compact and portable
> Controllable from a virtual USB serial port
> Typical current draw around 50mA
> Operates for around 12 hours with a fully charged 600mAh battery
82
Silicon Chip
Australia's electronics magazine
compensation to the ADC readings,
improving it to 0.3%.
The Pico 2 uses an RP2350 microcontroller instead of the RP2040, and
the RP2350 data sheet notes that the
spikes in differential nonlinearity
should not be present in the newer
part. It claims an ENOB of 9.2, which
should theoretically allow total harmonic distortion (THD) to be measured
below 0.2%.
So it’s clearly worthwhile to update
the Pico Audio Analyser with the Pico
2. We’ll also look at whether the Pico
2’s increased flash memory, increased
RAM or faster processor clock will
provide any other opportunities for
improvement.
A straightforward update
The Pico Analyser was intended
to be simple and inexpensive, so we
have not made any radical changes to
the circuit.
In fact, the only change in the Pico
2 Audio Analyser hardware is substituting a Pico 2 for the Pico. Fig.1 is the
circuit for the Pico Analyser with this
small change.
To briefly recap, the Pico 2 generates a PWM (pulse-width modulated)
audio signal on GP16 that has its
higher frequency components attenuated by a pair of 2.2kW/1nF low-pass
filters. The signal is then buffered by
the op amp, AC-coupled and biased
to circuit ground before being delivered to CON2.
siliconchip.com.au
Fig.1: the circuit for the Pico 2 Analyser has not changed much from the original Analyser, with the exception of a
Pico 2 now being used for MOD1.
The other half of the op amp is
arranged to provide a mid-rail 1.65V
reference. The audio input at CON1
is filtered to remove ultrasonic components before being AC-coupled and
biased to the 1.65V rail to centre it
within the ADC’s input range.
The processed input voltage is sampled at the Pico 2’s GP26 pin. The
510W resistor switched in by S6 can
be used to attenuate the incoming
signal, allowing for input voltages up
to 34V peak-to-peak. That’s ideal for
using something like an isolated 9V
AC (RMS) mains transformer to check
mains power distortion.
IC2 and its associated components
form a charging circuit for a rechargeable lithium battery, with LED1 providing a status display. The Pico 2 is
powered either from its USB socket or
the battery if S5 is closed.
The Pico 2 connects to four tactile
switches (S1-S4) for user input and
MOD2, an I2C OLED display. The
22kW/22kW voltage divider allows
siliconchip.com.au
the Pico 2 to also monitor the battery’s
voltage at its GP28 analog input.
Software features
The software has numerous modes
and means to set some calibration
parameters. Much of the calibration is
done automatically once a multimeter
is connected externally to set the output level correctly.
A WAVE OUTPUT screen allows
the frequency, amplitude and waveform (eg sine, square, triangle, sawtooth or white noise) to be
set. Most of the remaining
screens provide analysis
of the input signal.
SCOPE and SPECTRUM
screens provide displays
of the input waveform. A
HARMONIC ANALYSIS
screen determines the fundamental
frequency of the input and the amplitude of the fundamental and its harmonics, as well as reporting a THD
figure.
Finally, a SWEEP page drives the
output with a sinewave at varying frequencies and measures the received
response back at the input. These last
three screens make use of a fast Fourier
transform (FFT) to extract frequency
information about the waveform at the
input connector.
There was no need to
update the Analyser PCB,
so it looks the same as the
original.
Australia's electronics magazine
March 2025 83
The fully assembled PCB
of the Pico 2 Analyser looks much
the same as its predecessor, with the Pico 2
silkscreen on MOD1 being the only visible difference. Note the
unusual mounting arrangements for the LED and OLED.
If you’d like to read about the circuit and software operation in greater
depth, we recommend reading the
original Pico Analyser article from
November 2023. That article also contains the detailed construction notes
for the Pico Analyser.
The construction of the Pico 2 Analyser is the same, with the proviso that
a new binary file (0410723B.UF2) is
needed to program the RP2350 processor on the Pico 2. In any case, the
Pico 2 should ignore a binary file for
a different processor (such as one prepared for the Pico), so there is little
chance of damage, even if the wrong
file is inadvertently used.
If you’re more interested in simply
building the Pico 2 Analyser, you can
follow the instructions in the older
article with those two minor amendments to the build process.
Hardware differences
The Pico 2 offers slightly different hardware features to the Pico,
so we have investigated what can be
improved by using these. The ADC is
the first of these to address. While the
Pico 2’s RP2350 corrects the erratum
present in the Pico’s RP2040, there
is otherwise not much difference in
the peripherals that are used in the
Analyser.
Both parts are capable of 500kS/s
ADC operation at 12 bits of sampling
depth and can use the DMA (direct
memory access) peripheral to capture
samples without bogging down the
processor. In the Pico Analyser, the
ADC is run at 490kS/s, taking 12-bit
samples using DMA, and we have done
the same for the Pico 2 Analyser.
So both parts are run very close to
their respective limits in that regard;
we cannot do much to improve the
effective sampling rate. The software
binary for the Pico Analyser required
less than 10% of the Pico’s flash memory, so the extra flash memory doesn’t
help here.
The ARM Cortex M33 processor on
the Pico 2 can run at up to 150MHz,
about 10% faster than the 133MHz of
the Pico’s ARM Cortex M0+. While the
Pico Analyser was not constrained by
processing speed, this provides one
advantage in that the processor on the
Pico 2 can generate the audio samples
at a higher rate.
The PWM outputs now run at
around 73kHz instead of 64kHz, so
there is an improvement in the attenuation of higher-frequency PWM
artefacts by the low-pass filters. This
shaves about 0.05% from the final THD
reading when the signal is looped back
into the Analyser. It’s a small but tangible improvement.
To test the impact of the different
ADC, we fed in a sinewave from an
Audio Precision System One Audio
Analyser. It typically deals with THD
levels below 0.001%, so its output can
be considered close enough to pure
for the purposes of testing the Pico 2
Analyser.
Under the same conditions as our
tests on the Pico Analyser (a 1.2V sinewave at 1.2kHz), the Pico 2 Analyser
reported a THD of 0.20%, better than
the 0.30% that we saw with the Pico
Here are the internals from the Pico 2 Analyser, just
before the case is closed up. Note the mounting of the LED and
OLED. You should apply some glue or sealant wherever the wires meet the PCB; this
will help to prevent them from coming loose if a solder joint breaks.
84
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
Analyser. Note that this is almost, but
not quite, what we expected based on
the figures provided in the data sheet
and is a definite improvement.
Of course, our tests on the Pico 2
Analyser required disabling the code
we added that corrects the Pico’s ADC
readings for the error in the RP2040
silicon. We’ve also changed the initial
splash screen to help tell the two apart.
Porting the code
Our Pico 2 Review in the December
issue (siliconchip.au/Article/17316)
noted that much of our existing code
for projects based on the Pico required
little more than recompiling to work
with the Pico 2. The RP2350 in the
Pico 2 is from a different family of
ARM processors, so the two are not
‘binary compatible’.
We found that the same was true
for the Pico Analyser code. We used
the Arduino IDE and the arduino-pico
board profile (https://github.com/
earlephilhower/arduino-pico) to compile the code for the Analyser.
Since the Pico and Pico 2 are easy
to program using their USB flash drive
bootloader, if you just want to use the
compiled UF2 binary file, then you
don’t need to worry about the steps
involved in compiling the software,
and you can jump to the next section.
The first step in porting the code is to
update the board profile. We are using
version 4.1.1 of the arduino-pico board
profile, which is the latest at the time
of writing. v4.1.0 version was the first
to provide the option to compile the
code to use the RISC-V processor cores.
If you have not installed the board
profile previously, the process is
to add the appropriate Additional
Boards Manager URL (noted in the
We have changed the splash screen
for the Pico Audio Analyser Mk2,
so that you can tell it apart from the
older version.
GitHub repository above) to the Preferences menu of the Arduino IDE and
use the Boards Manager to install the
package.
The external libraries can be installed
from the versions we included with the
software download or via the Library
Manager. We found that the existing
code compiled without changes, but as
we noted above, we needed to disable
the ADC corrections needed for the
RP2040, and we also took the opportunity to increase the PWM frequency
for audio generation.
Since writing the original Pico Analyser article, it has become clear that
the RP2040 chip used in the Pico is
capable of being overclocked, that is,
operated at a frequency above its specified maximum.
There are reports that the Pico 2
is similarly overclockable. We tried
compiling the code at higher processor speeds to see if this could improve
the output audio further, but the gains
were negligible. So we opted to run
the Pico 2 Analyser at its maximum
design speed of 150MHz for the sake
of stability; it is much newer and so
has not been as thoroughly tested as
its predecessor.
Some parameters were tied to the
133MHz processor clock, so they
needed adjusting to work at 150MHz.
However, running the Pico 2 at
133MHz was sufficient to get the same
code working without changes.
We also tracked down a minor bug
that was giving odd readings when
no signal was applied to the Pico 2
Analyser. It was present in the Pico
Analyser, but for reasons we could not
determine, did not result in spurious
readings. We suspect it is due to differences in the underlying library code.
We’ve also updated the splash
screen graphic shown when the Pico
2 Analyser starts up. While it might
appear purely decorative, it also gives
time for the internal biases to settle.
Construction
Construction of the Pico 2 Analyser is much the same as for the Pico
Analyser. While we won’t give the full
details here for brevity, experienced
constructors should be able to work
from the overlay diagram reproduced
here as Fig.2.
As well as using a Pico 2 instead of
a Pico, the firmware image is different.
Otherwise, assembly and operation are
much the same.
First, fit the surface-mounting parts
(excluding the six switches) to the PCB
in the usual fashion. Before fitting the
switches, clean off any excess flux.
Note that the reverse-mount tactile
switches can benefit from having their
leads splayed slightly before soldering.
The Pico 2 (MOD1) and OLED
(MOD2) modules are each fitted in a
non-standard way. MOD2 is attached
first, with its front side visible through
the large hole in the front of the PCB.
Don’t forget to remove the screen’s
protective film! Four wires are used to
connect the GND, VCC, SDA and SCL
Fig.2: this overlay diagram shows the locations of the parts on the Pico 2 Analyser PCB. If you need detailed assembly
instructions, refer to the original Pico Analyser article.
siliconchip.com.au
Australia's electronics magazine
March 2025 85
Silicon Chip
PDFs on USB
¯ A treasure trove of
Silicon Chip magazines on a
32GB custom-made USB.
¯ Each USB is filled with
a set of issues as PDFs –
fully searchable and with
a separate index – you just
need a PDF viewer.
¯ Ordering the USB also
provides you with download
access for the relevant
PDFs, once your order has
been processed
¯ 10% off your order (not
including postage cost) if
you are currently subscribed
to the magazine.
¯ Receive an extra
discount If you already
own digital copies of the
magazine (in the block you
are ordering).
EACH BLOCK OF ISSUES COSTS $100
NOVEMBER 1987 – DECEMBER 1994
JANUARY 1995 – DECEMBER 1999
Parts List – Pico 2 Audio Analyser
1 double-sided PCB coded 04107231, 83 × 50mm, with black solder mask
1 UB5 Jiffy box (83 × 53 × 30mm)
2 chassis-mount RCA sockets (CON1, CON2) [Altronics P0161]
1 single AA cell holder with flying leads
1 14500 (AA-sized) Li-ion rechargeable cell with nipple
1 Raspberry Pi Pico 2 board, programmed with 0410723B.UF2 (MOD1)
1 1.3-inch (33mm) OLED module (MOD2) [Silicon Chip SC5026]
4 reverse-mount SMD tactile switches (S1-S4) [Adafruit 5410]
2 SPDT SMD slide switches (S5-S6)
4 M3 washers, 1.5mm thick
2 20cm lengths of hookup wire (eg, white and black)
1 4cm length of fine bare wire (eg, lead offcuts from LED1)
1 small tube of neutral-cure silicone sealant
1 short RCA-RCA cable (for testing & calibration)
Semiconductors
1 MCP6002 or MCP6L2 rail-to-rail dual op amp, SOIC-8 (IC1)
1 MCP73831-2ACI/OT Li-ion charge regulator, SOT-23-5 (IC2)
1 bi-colour red/green 3mm LED (LED1)
1 SS34 40V 3A schottky diode, DO-214 (D1)
Capacitors (all M3216/1206 size, X7R ceramic)
6 10μF 16V+ 3 1nF 50V
Resistors (all M3216/1206 size, 1% 1/8W)
4 100kW
2 2.2kW
2 22kW
2 1kW
Use this photo as a
3 10kW
1 510W
guide to fitting the
3 4.7kW
smaller components.
This stage of assembly
is a good point to
clean off any excess
flux in preparation
for adding the final
components like the
switches, LED, Pico 2
and OLED.
Pico 2 Audio Analyser Kit
SC6772 ($50): includes the PCB and
everything that mounts directly on
it. The Pico 2 is supplied blank and
will need to be programmed using a
computer and USB cable.
A loopback cable like this can be
used to test and calibrate the Pico 2
Analyser.
JANUARY 2000 – DECEMBER 2004
JANUARY 2005 – DECEMBER 2009
JANUARY 2010 – DECEMBER 2014
JANUARY 2015 – DECEMBER 2019
OUR NEWEST BLOCK COSTS $150
JANUARY 2020 – DECEMBER 2024
OR PAY $650 FOR THEM ALL (+ POST)
WWW.SILICONCHIP.COM.
AU/SHOP/DIGITAL_PDFS
86
Silicon Chip
Fig.3: the UB5 case needs holes for the USB socket and RCA sockets, as well as
notches for the slide switches.
Australia's electronics magazine
siliconchip.com.au
pads, with two extra wires providing
mechanical support.
Fig.3 shows the case cutting diagram. We recommend you prepare the
case before fitting the Pico 2, since it
will allow you to check the switch slots
and also that the Pico 2 is aligned correctly with the hole for its USB socket.
MOD1 is mounted on its edge,
using only pins 21-40. At this stage,
you can program the Pico 2 using the
0410723B.UF2 file, and you should
see a display on the OLED screen if
all is working well. You can refer to
the earlier photo to see the state of the
board after these steps.
The LED has its leads bent 180° to
allow it to point downwards at the hole
in the PCB solder mask, while the battery holder and RCA sockets are soldered to the PCB via flying leads. Use
glue to help secure the battery wires
to the PCB and affix the battery holder
to the case.
Once the glue has cured, the cell can
be fitted to the holder. The Analyser
should start up when S5 is closed. If
all is well, close up the case using the
Nylon washers to space the lid off the
pillars slightly.
Ideal Bridge Rectifiers
Choose from six Ideal Diode Bridge
Rectifier kits to build: siliconchip.
com.au/Shop/?article=16043
28mm spade (SC6850, $30)
Screen 1: pressing OK on the WAVE
OUTPUT screen cycles between the
parameters, while UP and DOWN
modifies them. The USB serial port
can also control the output waveform.
21mm square pin (SC6851, $30)
Screen 2: the SPECTRUM display
uses UP and DOWN to change the
horizontal scaling, while OK toggles
the vertical scale between peak and
total energy.
siliconchip.com.au
5mm pitch SIL (SC6852, $30)
mini SOT-23 (SC6853, $25)
Screen 3: the SCOPE display also
uses UP and DOWN to change the
horizontal scaling. The OK button
changes between dot and line
displays.
Width of W02/W04
2A continuous, 40V
Connectors: solder
pins 5mm apart
at either end
IC1 package: MSOP-12
Mosfets: SI2318DS-GE3 (SOT-23)
D2PAK standalone (SC6854, $35)
Screen 4: HARMONIC ANALYSIS
provides information about the
harmonic content of a waveform.
Connecting the input to the output is a
good way to check this feature.
Conclusion
The Audio Analyser wasn’t the
only Pico-based project we had a
go at updating. In fact, we tested all
our Pico code on the Pico 2 and also
decided to look into taking advantage
of some of the Pico 2’s new features,
like the RISC-V cores. The following
article explains what we found and
gives a few hints to those keen to use
the Pico 2.
SC
Compatible with PB1004
10A continuous (20A peak),
72V
Connectors: solder pins on
a 14mm grid (can be bent
to a 13mm grid)
IC1 package: MSOP-12
Mosfets: TK6R9P08QM,RQ
Compatible with KBL604
10A continuous (20A peak), 72V
Connectors: solder pins at
5mm pitch
IC1 package: MSOP-12
Mosfets: TK6R9P08QM,RQ
Calibration and use
Cycle through the screens using the
MODE button and press OK to enter
calibration mode. Follow the instructions on the screen to complete the
calibration. For the OUTPUT LEVEL,
you will need a true RMS voltmeter to
trim the output from CON2.
You will also need an RCA-RCA
cable (connected between CON1 and
CON2) to complete the INPUT LEVEL
calibrations, since the Analyser reads
back its own output to establish that
its input is correct.
Ensure that the calibration values
are saved before using the Analyser.
You can check its operation by running
a SWEEP with the RCA-RCA cable connected; it should be flat at 0dB with
slight dips at each end.
Compatible with KBPC3504
10A continuous (20A peak),
72V
Connectors: 6.3mm spade
lugs, 18mm tall
IC1 package: MSOP-12
(SMD)
Mosfets: TK6R9P08QM,RQ (DPAK)
Screen 5: in this display, the UP and
DOWN buttons change the vertical
scaling; the unlabelled horizontal line
is the -3dB point compared to the set
level at the output.
Australia's electronics magazine
20A continuous, 72V
Connectors: 5mm screw
terminals at each end
IC1 package:
MSOP-12
Mosfets:
IPB057N06NATMA1
(D2PAK)
TO-220 standalone (SC6855, $45)
40A continuous,
72V
Connectors:
6.3mm spade lugs,
18mm tall
IC1 package: DIP-8
Mosfets:
TK5R3E08QM,S1X
(TO-220)
See our article
in the December
2023 issue for more details:
siliconchip.au/Article/16043
March 2025 87
|