This is only a preview of the January 2019 issue of Silicon Chip. You can view 40 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 "DAB+ Tuner with FM & AM and a touchscreen interface!":
Items relevant to "ATtiny816 Breakout and Development Board with capacitive touch":
Items relevant to "Zero Risk Serial Link":
Items relevant to "The PicoPi Pro Robot":
Purchase a printed copy of this issue for $10.00. |
A WORLD-FIRST DIY PROJECT FROM SILICON CHIP!
TUNER
with
FM
&
AM
and a touchscreen interface!
By
Duraid Madina
and
Nicholas Vinen
We believe this is the
first build-it-yourself digital
radio published in any magazine –
certainly here in Australia, if not the world.
It receives, as you would expect, DAB+. It also receives FM (mono/
stereo). But (again to our knowledge!) this is THE FIRST to also receive
AM radio (not many, if any, commercial DAB+ receivers can do that!)
It’s simple to use, thanks to the 5-inch touchscreen and graphical
interface provided by the powerful Explore 100 processor. It has many
audio output options and offers outstanding sound quality, too.
T
his is, without doubt, the most
capable build-it-yourself radio
design ever published – anywhere!
It can receive DAB+ digital radio
in stereo, FM in mono or stereo and
28
Silicon Chip
AM in mono. It also has a really intuitive colour touchscreen graphical
user interface (GUI) and lots of other
great options such as remote control,
headphone and speaker outputs, digital audio outputs and more.
Australia’s electronics magazine
You just need to glance at the features and specifications to get an idea
of how comprehensive this design is.
We’ve tried to take advantage of all
the features of the digital radio receiver
IC that we’ve used, as well as the GUI
siliconchip.com.au
capabilities of the Explore 100 module,
to make the user interface experience
as smooth as possible.
The radio incorporates an onboard
headphone amplifier with digital volume control, so you can plug headphones or earbuds straight in. There’s
also a small onboard stereo power amplifier, with decent sound quality, allowing a pair of passive speakers to be
driven at up to two watts per channel.
In AM and FM modes, you also have
the option of using one of the digital
outputs (S/PDIF or TOSLINK) to feed
audio to a hifi receiver or DAC.
The radio incorporates a ferrite rod
antenna for AM but an external AM
loop antenna can also be used, for better reception.
To receive FM and DAB+ broadcasts, an antenna is connected to the
SMA socket. This can be a proper roofmounted VHF antenna, or a telescopic
whip attached directly to the side of
the radio.
As well as using the intuitive touchscreen interface, you can also control
major functions such as changing channels, modes and volume via an infrared
remote control.
You can easily enter station frequencies if you use a remote control with a
numeric keypad.
The whole thing is powered off 5V,
so you can use a standard plugpack.
You can even use a USB power bank,
making the radio fully portable.
We’ve also made the design upgradeable in future, so that internet radio could potentially be added using a WiFi “daughter board”.
The whole thing is housed in a custom
laser-cut acrylic case.
Design challenges
We’ve been working on this radio
design for more than six months. There
are several reasons that it has taken so
long, besides the fact that it is an ambitious project.
For example, there is little publicly available information on the main
chip, the Si4689 radio receiver IC. And
some of the information that we found
turned out to be incorrect.
We bought a development kit to
get the chip up and running initially,
which included the firmware needed
for that chip to operate, along with information on how to configure it.
We then had to develop MMBasic software to drive that chip, along
with other parts of the circuit such as
siliconchip.com.au
the serial flash (which is used to store
firmware), the digital audio transceiver and so on.
We had hoped to produce a radio
which could also receive Digital Radio Mondiale (DRM), the long-range
digital radio broadcasting standard.
This is not yet available in Australia but there are DRM stations in New
Zealand and we figured that one day,
we would get it too.
Unfortunately, while the Si4689
supports DRM in theory, the firmware
supplied does not have a DRM mode.
The hardware as presented supports
DRM reception but we don’t know if
or when firmware will be released to
enable it.
For more information on DRM, see
our articles in the November 2013
(siliconchip.com.au/Article/5448) and
September 2017 (siliconchip.com.au/
Article/10798) issues.
Another unfortunate limitation has
to do with the Si4689’s digital audio
output. Our board has support for
converting the digital data to both
common consumer formats – S/PDIF
and TOSLINK – so you can feed it to
a DAC or receiver. But again, the firmware lets us down, as it disables the
digital output in DAB+ mode; something not mentioned in any of the documentation.
So we can only guarantee that the
digital outputs work in the AM and
FM modes. That may be fixed in a future firmware update, but we can’t say
when that might happen.
We are guessing that the digital output is disabled in DAB+ mode due to
concerns over users making copies of
the audio data.
Regardless of those problems, this
is still a very capable radio. And it
can be easily upgraded in future if
any of the above firmware gremlins
are resolved.
Features
• DAB+, FM and AM reception
• Eight favourite station presets per
mode
• 5-inch colour touchscreen interface
• SMA socket for external FM/DAB+
(VHF) antenna or telescopic whip
• Internal AM antenna (ferrite rod)
plus terminals to connect external
loop antenna
• Stereo line outputs, headphone
driver and onboard stereo audio
amplifier
• Digital audio outputs (S/PDIF and
TOSLINK)
• Digital volume control, with
separate settings for line out/
headphones and speakers
• Signal strength reported in all
modes
• AM/FM modes report signal-tonoise radio (SNR); DAB+ mode
reports error count
• Optional infrared remote control
• Auto-mutes speakers when
headphones are plugged in
• Stereo amplifier can drive two
4-8speakers at 1W+ each
• FM RDS/RBDS decoding
• Automatically scans for channels
(services) in DAB+ bands
• Channel name and currently playing
program displayed
Surface-mount components
• Upgradeable firmware
The Si4689 radio chip has many
great features and there really aren’t
any equivalent chips available, so it’s
the obvious choice for this project.
But it’s only available in a 48-pin QFN
(quad flatpack no leads) package.
The “no leads” part of its name may
give you a hint that this is not a particularly friendly package for handsoldering.
Having said that, we succeeded in
soldering two of these chips by hand
(out of two that we tried), using two
• Possibility for future expansion (eg,
WiFi internet radio support)
Australia’s electronics magazine
• Powered from 5V DC regulated
plugpack
• “Quiet” mode for AM reduces
digital pickup
• DAB+ frequencies default to
Australian channels
• Optional laser-cut acrylic case
January 2019 29
1 F
FB4
INTB
IR
TO CON7/8
+3.3V
9
7
5
3
1
(TO & FROM
EXPLORE 100)
SMODE
TO CON8
TO IC6 PIN9
TO IC6 PIN10
+5V
CON3
2
5
SO
SI
4.7 F
8
Vdd
HOLD
CS
34
1
1
2
4
48
3
3x
47
4
5
29
6
T1
5t
TVS1
21t
EXTERNAL 9 H
AM LOOP
ANTENNA
7
ANT1
XGD10603NR
362 H
10nF
FERRITE ROD
L1 22nH
TVS2
X1
19.2MHz
33pF L3 18nH
TVS3
XGD10603NR
2.7pF
8
9
10
11
15
XGD10603NR
VHF
IN
CON7
47pF
47pF
4.7 F
47nF
6
47
CON6
47nF
7
IC3 SCLK
AT25SF3
AT
2 5SF3 2 1 WP 3
Vss
MISO
MOSI
RSTB
FLHD
SS
FLWP
FLSO
FLSI
FLCK
FLCS
IC2CSB
IC2IFM
IC2RST
IC4DN
IC4DP
IC4SD
SCK
40
38
36
34
32
30
28
26
24
22
20
18
16
14
12
10
8
6
4
2
39
37
35
33
31
29
27
25
23
21
19
17
15
13
11
TO CON8
REG4SD
HPSW
16
13
14
12pF
L2
120nH
0
12pF
35
47pF
12
37
VA
VIO VMEM VCORE
NVSSB
NC
46
NVMOSI
45
44
NC
43
NVMISO
NC
47nF
4.7 F
NC
NVSCLK
NC
INTB
DBYP
RSTB
DOUT
SMODE
MISO
SSB
MOSI
SCK
IC1
Si4 6 8 9
LOOP_N
LOOP_P
LOUT
ROUT
RFREF
DCLK
RFREF
DFS
VHFI
DACREF
VHFSW
NC
XTALI
NC
NC
XTALO
NC
ABYP
NC
NC
NC
PAD
NC
GNDD GNDD GNDD GNDD
39
40
41
42
38
36
33
32
47
31
30
18
19
27
28
17
26
25
24
23
22
21
20
1 F
SCK
MOSI
MISO
IRR1
+3.3V
100
3
1
IR
L4
120nH
10 F
1 F
7
2
1
2
3
4
5
6
9
X2
12MHz
10
11
PVdd
15pF
19
DVdd
LRCLK
SCLK
BCLK
SWIFMODE
DIN
SDIN
SDOUT
IC2
WM 8804
CSB
RESETB
DOUT
MCLK
15
14
13
12
16
IC7f
CLKOUT
XOP
TXO
XIN
RXO
PGND
15pF
10 F
8
17
13
20
14
12
7
DGND
18
100nF
IC4SD
IC4DP
IC4DN
SC
20 1 8
DAB+/FM/AM DIGITAL RADIO RECEIVER
Fig.1: at the heart of this radio board is IC1, the Si4689 digital radio receiver IC. Its crystal oscillator timebase and
antenna matching components are shown to its left, with the analog audio switching and filtering parts to its right. The
digital audio processing chip (IC2), expansion headers and audio amplifier (IC4) are arrayed along the bottom of the
diagram, with the serial flash chip (IC3) and power supply components along the top.
30
Silicon Chip
Australia’s electronics magazine
siliconchip.com.au
REG4SD
REG4SD
HPSW
HPSW
+5V
+5V
+1.8V1
REG1
MCP1700–1.8
REG2
MCP1700–1.8
FB3
+1.8V2
OUT
47 F
8
1
IN
GND
10 F
IN
GND
10 F
OUT
3.3
7
10 F
6
10 F
V+
REG4
LM2663
OSC
2
CAP+
47 F
4
CAP–
LV
–5V
5
Vout
SD
1 F
EXT_AUD_L
4 Yb3
150pF
10k
2 Yb2
2.2k
Zb 3
5 Yb1
680
1 Yb0
FB1
+5V
6
6.8nF
2.2k
IC5b
5
2.2k
14 Ya1
680
12 Ya0
8
100 F
10k
E
S0
Vee
Vss
7
8
TO CON3 PIN31
10
14
IC5d
12
TO CON3 PIN29
3
C
1
Q3
1 F
2
E
B
150pF
+3.3V
Q4
TOSLINK
OUT
100nF
C
2.2k
2
+3.3V
1
IC7: 74HC14
3
+5V
TO CON3 PIN21
TO CON3 PIN19
CON7 CON8
1
1 SCK
2
2 MISO
3
3 MOSI
4
4
5
5 COM2TX
6
6 COM2RX
7
7 COM3TX
8
8 COM3RX
5
9
IC7a
IC7b
IC7c
IC7d
11
2
1
IC7e
220
10
5
1 F
9
100nF
RIGHT CH AUDIO
1
2
100nF
IC4SD
3
IC4DP
4
TO CON3 PIN37
IC4DN
5
TO CON3 PIN33
LEFT CH AUDIO
TO CON3 PIN27
100nF
7
74HC4052/
DG4053E
TO CON3 PIN25
EXPANSION
HEADERS
8
100nF
16
Vdd
Vdd
RINP
ROUTP
RINN
SD
ROUTN
UP
DOWN
IC4
PAM
M8
84
407
07
LOUTP
LINP
LOUTN
LINN
GND
GND
GND
6
12
13
8
16
110
1 F
AUX.
5V
6
15
SPEAKERS
4
14
10
7 B
14
1
BAV99, CM1213A
C
E
MCP1700
3
1
2
GND
OUT
R–
2
L+
L–
IRR1
2
AT25SF321
IN
R+
3
11
1
BC807, BC817
CON4
1
1
74HC14
S/PDIF
OUT
+5V
+
TO CON3 PIN23
CON1
100nF
CON9
8
TX1
3
–5V
2.2k
+3.3V
4.7
E
1k
2x
10k
CON5
B
11
–5V
EXT_AUD_L
+5V
D2
BAV99
13
9
4.7
2.2k
2.2k
6
HEADPHONES
–5V
Q1, Q3: BC817
Q2, Q4, Q5: BC807
FB2
S1
C
2.2k
IC5c
10
Q5
C
100k
Q2
2.2k
9
6.8nF
15pF
270k
E
B
150pF
10k
Za 13
47k
E
1 F
1M
RIGHT
LINE
OUT
B
Q1
B
1
2
1k
E
C
IC5: OPA1679IDR
11 Ya3
15 Ya2
3
1
IC5a
150pF
8.2pF
D1
BAV99
4
3
IC6
74HC4052/
DG4052E
EXT_AUD_R
EXT_AUD_R
2.2k
7
2
8.2pF
CON2b
47
16
Vdd
LEFT
LINE
OUT
47 F
+5V
–5V
100 F
CON2a
47
GND
3
10k
TO CON7 PIN1
100k
+3.3V
+3.3V
8
LM2663
4
1
3
8
4
1
Be sure to read next month’s article on the DAB+/FM/AM Radio for construction details, as well as a special offer. We will be
producing a limited run of radio PCBs with the tricky parts (IC1 and some associated components) pre-soldered, making the
assembly substantially easier for you.
siliconchip.com.au
Australia’s electronics magazine
January 2019 31
Specifications
• Power supply: 5VDC (regulated) <at> 2A
• AM tuning range: 520-1710kHz
• FM tuning range: 76-108MHz
• DAB+ tuning range: 168-240MHz
(suits Australia, New Zealand and
rest of world using DAB+ standard)
• Line level outputs: 2 x 775mV RMS
(~11dBm)
• Headphone output power:
~20mW into 32, ~40mW into 16,
~80mW into 8 (can be increased)
• Speaker output power: 1-2W
(depending on speaker impedance
and power supply)
different techniques. So it isn’t as difficult as you might think
But you will definitely have a better chance of success if you already
have some SMD soldering experience.
Since the key part is an SMD, and
since the Explore 100 which we’re
using to drive the radio also involves
a few SMDs, we figured that the remainder of the parts might as well be
surface-mounting types too.
Actually, for the critical parts required by the Si4689 IC, we really
don’t have a choice since through-hole
parts would be too large to get close
enough to the radio chip for good RF
performance, and many of those parts
would not be available in through-hole
packages anyway.
The good news is that where possible, we’ve used larger and easier-tosolder parts, meaning that once you’ve
gotten the Si4689 and its surrounding
components in place, the remainder
of the board is not too difficult to assemble.
We’ll give detailed instructions on
how to successfully solder the tricky
parts in this project in a future article.
We are also planning to get the more
difficult parts pre-soldered to a batch
of PCBs and then make these available to our readers who would prefer
to avoid the trickier parts of the build
– more details next month!
Circuit description
The full circuit of the radio, except
for the components mounted on the
Explore 100 module, is shown in Fig.1.
It’s based around IC1, a Si4689 digital
radio receiver IC.
32
Silicon Chip
The board containing all the components shown on Fig.1 piggybacks on
the Explore 100 module and the two
are connected via 2x20 header CON3.
This carries both control signals from
the Explore 100 and also power for the
radio circuitry.
IC1 requires relatively few components to operate and these can be broken down into a few categories: antennas and matching networks, a crystal
oscillator, supply bypass capacitors, a
serial flash chip used to store its firmware and audio filter circuitry.
Antennas & matching networks
AM signals are picked up either by
an external loop antenna connected
across terminal block CON6, or via an
onboard ferrite rod antenna. The external antenna (if fitted) is connected in
parallel with the ferrite rod via a small
1:6 turns ratio transformer wound on
a ferrite core.
This is necessary since the external antenna will typically have an
inductance in the range of 10-20µH
while IC1 expects an inductance in
the range of 180-450µH, as is typical
for a ferrite rod.
We couldn’t find any source of prewound transformers but found it was
quite easy to wind one using standard
parts. The instructions for doing so
will be in a subsequent article.
Ideally, you should use an external
antenna for AM since the ferrite rod,
being relatively close to the digital circuitry, inevitably picks up some noise
and will only work well if you have a
strong signal.
Transient voltage suppressors
TVS1 & TVS2 are low-capacitance
devices that do not affect the RF signal
but will conduct to protect IC1 from
electro-static discharge and lightninginduced energy.
That is provided that the lightning
strike is not too close; it certainly will
not do much if there is a direct strike
on the antenna!
The Silicon Labs literature suggested using a single CM1213 dual diode
clamp rather than TVS1 & TVS2 but we
found that these reduced the received
RF signal strength whereas the XGDseries polymer clamps do not.
The AM antennas are both connected between the AM dedicated pins on
IC1, LOOP_N and LOOP_P.
FM and DAB+ reception use a different, VHF antenna. This is connected
Australia’s electronics magazine
via CON7, which can be either an SMA
connector (as on our prototype) or a
PAL connector, which is difficult to
find these days, but we have a source.
You can use an extendable whiptype antenna, a rooftop antenna, or
any other antenna suitable for the relevant frequency range, ie, 88-206MHz.
The same transient voltage suppressor device is fitted to CON7, again
for ESD and lightning protection of
the main chip. The recommended
CM1213 had an even more drastic affect on FM/DAB+ signal strength so
again, we have used a polymer clamp
,TVS3.
The signal is fed into IC1 via a
matching and tuning network (mostly
as per the data sheet), to the VHFI pin
on IC1 (pin 10).
While developing this circuit, we
ran into some differences between
the recommendations in the SiLabs
literature and their actual implementation of the circuit, in the form
of the demonstration/development
board. One of the differences is that
the 2.7pF capacitor is recommended
in the literature but not fitted on the
demo board.
We left it out of our final prototype,
with no apparent ill effects. Hence
the dotted connections shown in the
circuit diagram. We suggest that constructors leave this part out, but we
left its pads on the PCB in case it is
needed.
The VHFSW pin (pin 11) of IC1 is
pulled to ground when the radio is in
DAB+ mode. This connects 22nH inductor L1 in parallel with the 120nH
inductor, re-tuning the matching network to better suit the higher DAB+
frequencies (203-206MHz), compared
to FM (88-108MHz).
All of the FM/DAB+ matching components are carefully chosen small
SMDs placed close to IC1 and in a
line between it and CON7. This minimises signal loss from parasitic effects
such as PCB track capacitance and inductance.
Crystal oscillator
A high-precision 19.2MHz crystal
is connected between pins 15 and 16
of IC1 and this is used both for tuning
and to provide clock signals for the
internal digital circuitry in IC1. The
crystal we’re using has a specified load
capacitance of 18pF but we are using
two 12pF load capacitors, since IC1
also has software-programmable load
siliconchip.com.au
capacitance on those two pins.
By using lower-than-specified value
load capacitors, we were then able to
program the tuning capacitors within
IC1 to get the crystal frequency very
close to nominal.
Bypass capacitors
IC1 has four supply pins: VIO, which
defines the external I/O pin voltage
levels, VCORE, which powers its digital circuitry, VMEM, which powers its
internal memory and VA which powers its analog RF circuitry.
All of these are designed to run at
1.8V but VIO can go as high as 3.3V.
Since the Explore 100 has 3.3V I/Os,
we decided to run VIO at 3.3V too, allowing the two chips to communicate
without signal level translation.
All four rails have three bypass capacitors each, ranging in value from
47pF to 4.7µF. The 47pF capacitors are
physically smaller than the others and
located right up near the IC.
The reason for this is that low-value, physically small capacitors have
a very high resonant frequency and
keeping them close to the IC minimises
the parasitic inductance of the tracks.
Therefore, these small capacitors are
very effective at bypassing very highfrequency signals, while the larger
capacitors provide bulk bypassing at
lower frequencies. The combination
gives each supply rail a very low impedance from DC up to around 4GHz.
This is important since IC1 contains
a PLL (phase-locked loop) which includes a VCO (voltage-controlled oscillator) that runs at between 2.88GHz
and 3.84GHz.
Good bypassing on the supply pins
is essential both for proper operation
of the VCO and other internal circuitry,
and to prevent this VCO from “leaking out” of the chip and being radiated into the surrounding environment
(and possibly also interfering with radio reception).
This is also why we have four ferrite beads in the circuit. FB1 and FB2
(along with the 8.2pF capacitors from
the audio outputs to ground) shunt any
VCO signals present at the audio outputs to ground, so that these signals
cannot be radiated from the tracks and
audio circuitry.
Similarly, FB3 and FB4 prevent
leakage of any high-frequency signals
which may make their way back out of
the supply pins from getting very far
away from the IC, where the supply
tracks may become antennas. Again,
these ferrite beads have been carefully selected to be effective at suppressing the range of frequencies that we’re
concerned about.
Serial flash chip
IC3 is a 32Mbit serial flash chip
which runs from a 3.3V supply and
can operate at up to 104MHz. IC1 requires a 512KB firmware image to be
loaded into the chip for each operating
mode, ie, AM, FM or DAB+.
So we need to provide it with a minimum of 1.5MB (12Mbit) of firmware
for the radio.
This firmware can come from the
Explore 100 but loading it this way
is quite slow – it takes a few seconds.
Since it’s annoying to have to
wait several seconds to change radio
modes, we instead use the Explore 100
to load the firmware into IC3 before
the radio is first used.
It’s read off the SD card and then
fed to serial flash chip IC3 via a dedicated SPI interface on pins 8, 10, 12
and 14 of CON3. These are not connected to either of the Explore 100’s
hardware SPI ports, so they are con-
Simple l Economical I Great Performance
Shockline 1-Port Vector Network Analyzer
TM
Simplify your testing while capitalizing on
performance with a 1-Port USB VNA.
The MS46121B Shockline VNA from
Anritsu provides price, performance
and space saving advantages when
testing passive devices up to 6GHz.
NOW AVAILABLE
from $3,995 + GST#
(laptop not included)
# Exclusive special price for
SILICON CHIP readers.
Valid to Feb 28, 2019
Web: www.anritsu.com/en-AU/
Email: AU-sales<at>anritsu.com
siliconchip.com.au
Australia’s electronics magazine
January 2019 33
trolled via software. We have written
a CFUNCTION to communicate over
those pins using SPI since it was too
slow in MMBasic.
While IC1 supports programming
flash chips, its support is quite limited and IC3 has write-protect features
which IC1 cannot handle. Hence, we
have to program it separately in this
manner.
The SPI bus on the aforementioned
pins of CON3 also connects directly to
IC1, to pins 1, 2, 47 and 48, so it can
read the firmware off the flash chip;
hence we only drive those pins while
IC1 is in reset, before it has started
operating.
Once the firmware is stored in IC3,
IC1 can load it very quickly on request, so it takes less than one second
to change radio modes. And unless
you want to upgrade the firmware in
future, you only need to load it into
the flash chip once.
The only extra component required
for IC3 is its 1µF supply bypass capacitor. It has two extra control pins:
WP (pin 3), which can be used to prevent modification of the contents of
the flash, and HOLD (pin 7), which
is used to pause SPI communications
temporarily.
We don’t really need these functions
but the pins are connected to the Explore 100 header anyway (at pins 16
and 20 respectively).
The Explore 100 can then set its
digital outputs to a high level to disable these functions. This gives us the
flexibility to modify the software to
use them in future if it ever becomes
necessary.
After all, the Explore 100 has plenty of free I/O pins and it’s easier to
program these pin states in software,
rather than to tie them to GND or 3.3V
and then have to re-make the board if
we make a mistake
Audio switching and filtering
Analog audio from radio chip IC1
appears on pins 18 (left channel output) and 19 (right channel output).
As recommended in the Silicon Labs
literature, we have 8.2pF filter capacitors connected between these pins
and ground, plus series ferrite beads
close to the chip.
This is necessary because signals
from the high-frequency internal PLL
may “bleed out” through these pins
and radiate back to the antenna(s)
and radio input circuitry. This filter34
Silicon Chip
ing does not affect audio signals but
eliminates any RF components which
may be present.
The Si4689 has internal volume
control, so we don’t need to provide
an external volume control for the line
outputs or headphone amplifiers.
The audio signals are AC-coupled
via two 100µF electrolytic capacitors
to remove the half-supply DC bias
which is present, then fed to the input pins of IC6, a dual four-way analog
multiplexer. It’s controlled by the Explore 100, via pins 29 and 31 at CON3.
Its default state, set by the pulldown resistors on the S0 and S1 pins,
is for the left and right channel audio
sources to come from pins 1 and 12.
These are connected to ground, so by
default, the analog output is muted.
The Explore 100 must drive one
of the S0/S1 pins high for the audio
from IC1 to be fed through, and if S1
is high, the left and right channels are
swapped.
If both S0 and S1 are driven high,
the audio source instead comes from
expansion header CON7. So if we later
develop, say, an internet radio module
that plugs into CON7/CON8, the Explore 100 can be programmed to feed
its audio through to the outputs when
it is activated.
The audio signals which have been
selected by IC6 are fed through to op
amps IC5b and IC5c, which provide
23.35dB of gain (14.7 times) and also
operate as third-order low-pass filters
to remove any supersonic DAC switching artefacts from the audio signals.
The gain is quite high because the
audio signals eminating from IC1 are
low in level – only about 50mV RMS.
The filter’s -3dB point is 33.6kHz, resulting in a loss of less than 0.5dB at
20kHz, the upper threshold of human
hearing.
It’s a Butterworth type, for a flat
passband, hence the minimal loss
within the audible frequency range
but it’s still good at eliminating supersonic signals.
We’ve used a multiple-feedback
type filter, rather than a Sallen-Key
type because it is more effective at
filtering out signal frequencies well
above the bandwidth of the op amp
being used. It is therefore more suitable for getting rid of the very highfrequency artefacts which are typical
of delta-sigma type audio DACs.
You can get frequency response,
Bode plots and other data on this
Australia’s electronics magazine
type of filter at the following website: http://sim.okawa-denshi.jp/en/
OPtazyuLowkeisan.htm
We’ve kept the impedances of the
components in the filter relatively
low, to reduce the chance of any digital interference being picked up there.
Headphone drivers
The filtered audio signals are fed
to dual line output RCA socket CON2
via 47 isolating resistors, to prevent
any capacitance on these outputs from
destabilising the op amps. They’re
also fed to the other two op amps in
the quad package, IC5a and IC5d, via
2.2kresistors.
These operate as headphone drivers, in conjunction with transistors
Q1-Q4, which boost the output current capability.
The outputs of IC5a and IC5d (pins 1
& 14) are connected to the headphone
socket directly via 1kresistors,
which helps to linearise the headphone amplifier, but these outputs
also drive transistors Q1-Q4 via dual
diodes D1 and D2.
The purpose of these diodes is to
bias the output transistors into conduction, so that there is always some
current flowing through both (the quiescent current).
In the case of D1, Q1 and Q2, current flows from the +5V rail, through
a 2.2k resistor, then both diodes in
D1, through another 2.2k resistor
and then to the -5V rail.
The current through these diodes
is approximately 2mA, resulting in a
forward voltage of around 600mV per
diode, or 1.2V total. That 1.2V is also
across the bases of Q1 and Q2, so they
are biased with around 600mV each.
That’s enough to bring them into
conduction, resulting in a flow of
around 5mA per transistor pair from
the +5V to the -5V supply. Therefore,
there is little to no “crossover distortion” as the audio signal crosses the
0V point.
A 1µF capacitor between the transistor bases keeps this bias more constant
as the output swings away from 0V,
despite the changing current through
the bias resistors.
The headphones are driven through
4.7 resistors, again to isolate any capacitance at the output from the op
amps. The values are lower because
headphone impedances tend to be
low, so higher value resistors would
reduce the volume and also reduce
siliconchip.com.au
To whet your whistles,
here is the completed
DAB/FM/AM receiver
prototype PCB
shown very close to
life size (actual
board size is 135 x
84mm). For such a
huge circuit
diagram, there is
virtually nothing
on the rear side of
the PCB except
the Explore 100
connector socket
seen top centre.
the damping factor, leading to
increased distortion.
Like the audio filter, the headphone
amplifier section is inverting. This
means that the line outputs and headphone outputs are 180° out of phase
but it’s difficult to think of any reason
why that would cause any problems.
150pF capacitors connected across the
2.2kfeedback resistors help to stabilise the headphone drivers despite
the extra phase shift from the buffer
transistors.
While the headphone driver section has no gain, most headphones/
earphones are sensitive enough that
a few hundred millivolts is all that’s
required.
If you have headphones which need
a much higher voltage swing, you
could increase the 2.2k feedback
resistor values to say 4.7k (to get
2.1 times gain) or to 10k(to get 4.5
times gain). We don’t suggest you go
any higher than 10ksince maximum
volume with 4.5 times gain would be
approaching the maximum swing of
around ±4V (2.8V RMS) that the circuit is capable of.
Headphone plug insertion
detection
The extra components connected
to the headphone socket, including
Q5, are to detect when headphones/
earphones are plugged into the socket, so that the speaker outputs will be
automatically muted.
These are necessary because the
connector only switches the signal
pins when a plug is inserted, so we
need to be a bit tricky to sense the plug
siliconchip.com.au
insertion.
When a plug is absent, the switched pin is connected to the ring, which carries the
right channel audio. Since the audio
signal voltage is normally well below
the 5V supply, that means that current
can flow from the base of PNP transistor Q5 and through the 270k resistor
to the switch contact and so transistor
Q5 is switched on.
Current can therefore flow from
the +5V supply, into its emitter and
out of its collector, and through a
47k/100k voltage divider, producing a ~3.3V signal. This goes to pin 39
on CON3 (“HPSW”), and on to the Explore 100, to be interpreted as a high
level, indicating that the headphones
are not plugged in.
When headphones are plugged in,
this connection is broken and so Q5’s
base is pulled up to the +5V supply
by the 1M resistor, switching Q5
off. The HPSW signal is pulled down
to 0V by the 100k resistor, and this
is sensed as a low level by the Explore 100.
The 15pF capacitor prevents RF or
EMI pick-up across the 1M baseemitter resistor from switching Q5 on
in this condition.
The reason for the use of relatively
high resistor values is to prevent this
circuit from loading the headphone
amplifier and introducing distortion.
Audio amplifier
The same filtered audio signals
that are fed to the line outputs and
Australia’s electronics magazine
headphone amplifier also go
to power amplifier IC4. This device
(PAM8407) runs off 5V and can deliver about 2W to a pair of 4speakers,
or about 1W to 8speakers, with reasonably low distortion (below 0.1%).
It also has an internal digital volume
control, activated via pulses delivered
to pins 4 (UP) and 5 (DOWN), plus a
shutdown pin at pin 3 which allows
the amplifier to be switched off, saving power and muting the speakers.
This is activated when headphones
are inserted, both to save power and
to provide the required muting.
This chip was chosen because it is
delightfully simple but can deliver reasonable power and without the hassles
of a Class-D amplifier (eg, the risk of
EMI affecting the radio receiver). It has
differential inputs but the inverting inputs are simply terminated to ground
with the same value (100nF) coupling
capacitors that are used to feed audio
to the non-inverting inputs.
Its volume/gain is programmable in
32 steps from -80dB to +24dB. This is
controlled via pulses fed into pins 3
and 4 from the Explore 100 via CON3
pins 32 and 34, while the shutdown
function goes to pin 30 of CON3. It
defaults to 12dB gain on power-up or
after the chip it shut down.
At power-up or when the headphones are unplugged, the software
January 2019 35
divider and 100nF AC-coupling capacitor, to remove the DC bias from
the signal.
This arrangement is used to obtain
the correct output voltage (about 0.5V
peak-to-peak) and source impedance
(about 75) to suit the S/PDIF standard. A 75 coaxial cable can be wired
from CON1 to the S/PDIF input on a
DAC or home theatre receiver, which
will internally terminate the signal
with a 75 load. You need to keep
that in mind when calculating the
voltage at CON1.
This photo shows how the PCBs are “stacked” within the clear acrylic case,
designed to suit the DAB+/FM/AM Radio. The radio board is at the bottom of the
stack, upside down. It plugs into the Explore 100 control board, with the LCD
touch screen at the top. Construction details, along with the parts list, will be
presented next month.
running on the Explore 100 mutes
the audio (using IC6) and then sends
however many up/down pulses are
required to set IC4’s volume to the desired level, before unmuting the audio.
There are two advantages to IC4 having its own volume control, separate
from IC1. One is that it makes it easy
for the user to choose comfortable volume levels for both the headphones
and speakers.
As soon as you unplug the headphones, IC4’s volume is set to the desired speaker volume level before audio is applied to the speakers. And
when you plug the headphones back
in, the volume on the socket is already
suitable for headphone listening; IC4
is simply shut down as soon as the
software notices that the headphones
have been plugged back in.
The second advantage is that IC4
provides enough gain to get plenty of
volume from the speakers (assuming
they have reasonable efficiency) even
if the audio signals from IC1 are relatively quiet.
However, there is a limit to how low
you can set the headphone volume before the maximum speaker volume is
reduced. So it’s a bit of a balancing act.
We didn’t fit any speakers in the Radio itself, to keep it compact; instead,
it has a 4-way pluggable terminal block
(CON4), which is externally accessible, to make it easy to wire speakers
up and plug/unplug them as required.
Digital audio interface
In some modes, the Si4689 can be
programmed to produce I2S format
digital audio data as well as analog
audio. This digital data appears in se36
Silicon Chip
rial format at the DOUT pin (33), which
is fed to digital audio transceiver IC2,
along with the corresponding clock
signal (DCLK, pin 27) and framing signal (DFS, pin 28).
IC2 is a Wolfson WM8804 which
converts between I2S and S/PDIF formats. It’s controlled by the Explore 100
over the same SPI bus as the Si4689,
except that it has a separate chip select line (CSB, pin 5) which is driven
from I/O pin 40 on CON3. IC2 also has
a reset pin, pin 6, which is driven from
pin 36 of CON3, plus a mode control
pin (SWIFMODE, pin 2), wired to pin
38 of CON3.
The Explore 100 sets up the interface mode pin during its start-up sequence, then releases reset and sends
SPI signals to IC2 to configure it to
operate as an I2S to S/PDIF translator.
IC2 uses a separate 12MHz crystal
for its timebase. It can use a variety of
frequencies but we decided to use the
frequency suggested in the data sheet.
When valid I2S data is being produced by IC1, an S/PDIF data stream
appears at pin 17 of IC2 (TXO) and
this is buffered by schmitt trigger inverter IC7f.
Its output pin 12 then feeds the signal to the input of another inverter,
IC7e (pin 11) and its output feeds the
input of TOSLINK transmitter TX1.
This provides the optical digital audio output.
The same signal from IC7f is also
inverted by the four remaining inverters in the hex package, IC7a-d, which
are wired in parallel to increase drive
strength. That’s because these inverters drive the S/PDIF coaxial output,
CON1, via a 220/110 resistive
Australia’s electronics magazine
Infrared receiver
All of the Radio’s functions are controllable using the Explore 100’s 5-inch
colour touchscreen, but in case that
isn’t enough, we’ve also included an
infrared remote control receiver, IRR1.
It’s powered from a filtered 3.3V supply rail and its output signals are fed to
pin 7 of CON3, the designated infrared
receiver input pin of the Explore 100.
MMBasic can therefore receive and
decode standard infrared protocol
commands and pass them on to the
BASIC software.
As a result, you can use a universal
remote to change modes, channels,
input frequencies, adjust the volume,
mute, switch the radio into and out
of standby mode and various other
functions. The full list of remote control commands will be described in a
later article.
Power supply
The radio runs off a regulated 5V DC
supply which is fed into the Explore
100 board, and then onto the radio
board via pin 3 of CON3. This powers the audio amplifier (IC4) directly,
as well as op amp IC5 and the headphone amplifier transistors.
As mentioned earlier, the Si4689 radio IC (IC1) has four supply pins: VI/O,
VMEM, VCORE and VA. For compatibility with the Explore 100, we are using
3.3V for VI/O, which is drawn from pin
5 on CON3 after passing through a ferrite bead to prevent EMI from radiating back from the radio chip into the
Explore 100 board.
VMEM and VCORE are powered from
one 1.8V rail, derived from the 3.3V
supply by REG1, a 1.8V low-dropout
linear regulator.
VA is used to power IC1’s internal
PLL and its stability is critical, so this
supply is fed from a separate but identical regulator, REG2.
siliconchip.com.au
All three supplies are extensively
decoupled, as recommended by Silicon Labs.
A switched capacitor inverter IC
(REG4, LM2663) generates a -5V rail
from the +5V supply, both of which
are fed to the op amps and headphone
amplifier.
This has three benefits over using a
single-ended 5V supply:
One, it provides more than double
the potential signal swing for driving
headphones;
Two, it allows us to use op amps
with lower distortion and noise; and
Three, it means we don’t need to
apply a DC bias to the various audio
signals in our analog circuitry, eliminating the possibility of supply noise
injection.
REG4 has a shutdown pin (SD)
which is wired to pin 35 of CON3;
however, REG4 needs to be kept powered most of the time to prevent DC
voltages from appearing at the analog
audio outputs.
But the SD pin is used, because we
found that if REG4 was left enabled at
power-up, it could “latch up”, drawing a lot of current without actually
producing a -5V output.
The solution is to tie the SD pin
high, to +5V, via a 100k resistor so
that REG4 is shut down initially. Then,
after the Explore 100 “boots up”, we
wait a short period for the 5V rail to
stabilise before activating REG4. That
solves the latch-up problem.
Like IC1, digital audio transceiver
IC2 also has an internal PLL and this
is powered from the PVdd pin, but it
must be the same voltage as the DVdd
pin, which is 3.3V in this case.
For stability, we have isolated the
two supplies using a low-value inductor and this forms a low-pass filter
with the 10µF bypass capacitor, helping to smooth out the PLL operation.
Expansion headers
We briefly mentioned CON7 and
CON8 earlier. We thought that at a
later date, it might be a good idea to
add internet radio capability using an
ESP-01 (or similar) WiFi module and
some extra processing circuitry.
CON7 and CON8 are provided for
such a board to plug into. Power is
supplied to the add-on module in
the form of 5V DC between pins 1
and 8 of CON7, and 3.3V DC at pin
2 of CON7.
The Explore 100 can control the
ESP-01 and any other devices on the
add-on board using two bidirectional
serial ports (pin 5-8 of CON8) and/or
SPI (pins 1-3 of CON8, with pin 4 of
CON8 or pins 3/4 of CON7 used for
chip select).
Audio can be fed back into the radio board via pins 6 and 7 of CON7,
which are connected to the spare inputs of multiplexer IC6, with a signal
ground on pin 5.
Finally, pins 3 and 4 of CON7 and
pin 4 of CON8 provides some generalpurpose digital I/O lines which may
be used to control aspects of the addon board (eg, power up and down);
as mentioned earlier, one or more of
these may also be used as chip select
lines for the SPI interface.
Coming next month
That’s all we have room for this
month. Next month we will present
the parts list and PCB overlay diagram,
show more photos of the final prototype PCB and describe in detail how
to assemble the board.
A third article will then describe the
software operation, final assembly and
how to use the radio.
SC
AUSTRALIA’S OWN
MICROMITE
TOUCHSCREEN
BACKPACK
Since its introduction in February
2016, Geoff Graham’s mighty
Micromite BackPack has proved
to be one of the most versatile,
most economical and easiest-to-use systems available – not only here in Australia but around the world!
Now there’s the V2 BackPack – it can be plugged straight into a computer USB for easy programming or re-programming –
YES, you can use the Micromite over and over again, for published projects, or for you to develop your own masterpiece!
The Micromite’s colour touchscreen BackPack can be programmed for any of the following SILICON CHIP projects:
Many of the
HARD-TOGET PARTS
for these
projects are
available
from the
SILICON CHIP
Online Shop
(siliconchip
.com.au/
shop)
GPS-Synched Frequency Reference (Oct18 – siliconchip.com.au/Series/326)
FREE
Tariff Super Clock (Jul18 – siliconchip.com.au/Article11137)
PROGRAMM
ING
Altimeter & Weather Station (Dec17 – siliconchip.com.au/Article/10898)
Buy either
tell us whichV1 or V2 BackPack,
Radio IF Alignment (Sep17– siliconchip.com.au/Article/10799)
pr
oj
ec
t
yo
u
for and we’ll
program it fowant it
Deluxe eFuse (Jul17 – siliconchip.com.au/Series/315)
r you,
FR
EE
O
F CHARGE!
DDS Signal Generator (Apr17 – siliconchip.com.au/Article/10616)
Voltage/Current Reference (Oct16 – siliconchip.com.au/Series/305)
Energy Meter (Aug16 – siliconchip.com.au/Series/302)
Micromite
Super Clock (Jul16 – siliconchip.com.au/Article/9887)
V2 BackPack:
Boat Computer (Apr16 – siliconchip.com.au/Article/9977)
*
Ultrasonic Parking Assistant (Mar16 – siliconchip.com.au/Article/9848)
JUST $7000
See May 2017 (Article 10652)
P&P: Flat $10 PER ORDER (within Australia)
*Price is for the Micromite BackPack only;
not for the projects listed.
siliconchip.com.au
Australia’s electronics magazine
January 2019 37
|