This is only a preview of the December 2024 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 "Capacitor Discharger":
Articles in this series:
Items relevant to "Compact HiFi Headphone Amp":
Articles in this series:
Items relevant to "WiFi weather logger":
Items relevant to "The Pico Computer":
Items relevant to "Variable Speed Drive Mk2, Part 2":
Purchase a printed copy of this issue for $13.00. |
By Tim Blythman
THE PICO COMPUTER
A computer terminal using a Raspberry Pi Pico
Turn a Raspberry Pi Pico, Pico W or Pico 2 board
into a standalone computer with a USB keyboard and
HDMI monitor. With the Pico Computer PCB, all the required
circuitry fits in a compact and handy enclosure.
I
n April 2024, we presented the Digital Video Terminal (siliconchip.au/
Series/413) that can connect to a monitor via HDMI, a USB keyboard and a
Raspberry Pi Pico or other device with
a serial port. It provides a freestanding terminal console, ideal for working
with many single-board computers. Its
block diagram is shown in Fig.1.
The Pico Computer Board can plug
onto the Digital Video Terminal’s PCB,
turning it into the Pico Computer with
many features.
For example, the Computer Board
includes (among other features) an
RTCC (real-time clock and calendar chip), a microSD card slot, an IR
receiver and a 3.5mm stereo jack for
audio. This turns the Terminal into a
fully-fledged standalone Pico-based
computer, fitting in the same compact
footprint as the Terminal alone.
Fig.2 shows the block diagram of the
Computer Board integrated with a Digital Video Terminal. The new hardware
is shown in the centre. The Computer
Board replaces MOD2 of the Terminal
and adds many extra features.
Digital Video Terminal
functions
The earlier Digital Video Terminal is
compact at just 105 × 80 × 25mm and
Fig.1: the original Digital Video Terminal required a Pico (or similar device) to be connected externally via USB (shown
at top centre) to access the keyboard and display facilities.
66
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
Features & Specifications
► Digital display and USB keyboard
► I2C header and onboard I2C real-
time clock with battery
► Audio DAC with 3.5mm socket
and header for output
► Options for onboard SPI flash
(4MiB) and PSRAM (8MiB)
► microSD card slot
► USB host for devices like flash
drives
► Optional PWM audio module
► Infrared remote receiver
► All Pico I/Os are broken out on a
handy header
► Two user-controlled LEDs
► Digital Video Terminal for input
and display
► Can use a Pico, Pico W or Pico 2
► Fits in an Altronics H0192
instrument case
includes three Pico microcontroller
boards (MOD1-MOD3) that provide
three distinct functions.
MOD1 is the serial video display
interface. It accepts serial data from
MOD2 and interprets that according to
the VT100 standard, generating video
that is delivered via the HDMI socket
for display on a modern monitor or TV.
MOD3 is configured as a USB host
supporting a USB keyboard. It receives
keystrokes and sends them as VT100
data to MOD2.
MOD2 works as a USB host that
expects a USB-serial device to be connected. Devices like the Pico microcontroller board are recognised, as are
various others. MOD2 simply channels data to and from the connected
USB device, MOD1 and MOD3. The
idea was to provide a video terminal
with a keyboard that could interface
with just about any USB/serial device.
However, it occurred to us that
MOD2 could be replaced by a Pico (or
Pico W) board running different firmware and communicating directly with
its keyboard and display controllers,
turning it into a standalone computer.
For example, a Pico loaded with the
PicoMite firmware would turn the Terminal into a standalone BASIC computer with its own HDMI-compatible
display and USB keyboard. We provided a few ideas in this vein in the
Digital Video Terminal article.
While many readers might be happy
tinkering with such a machine, we
thought it would be nice to flesh the
concept out and provide plans to build
such a computer. That is the idea
behind the Pico Computer.
Pico Computer
The Pico Computer, like many of
our similar projects, combines a microcontroller with a set of useful other
devices. While they typically use an
LCD panel as the display, in this case,
it connects to a modern HDMI display
device.
It uses a similarly shaped PCB to the
Digital Video Terminal that accepts a
Pico microcontroller board. Thus, it
can stack above a Terminal PCB and
fit in the Altronics H0192 enclosure.
While it is designed to be used with
the Digital Video Terminal, it could
have other applications. We are planning a project where it is used in a
standalone capacity.
It’s made from a mix of modules,
through-hole parts and SMDs (surface-
mounting devices). The SMDs are in
SOIC or M3216 (imperial 1206) packages or larger, so it is straightforward
to build as long as you have the correct
tools and reasonable soldering skills.
Circuit details
The circuit of the Pico Computer
Board is shown in Fig.3. Since it is
intended to replace MOD2 in the Digital Video Terminal, we needed to provide a means to connect the two boards.
A pair of 20-way headers labelled
CON11, on the underside of the PCB,
connects to the Digital Video Terminal where MOD2 would normally go.
You can see that CON11 only connects a small subset of the available
pins. There are numerous ground pins
and the VBUS 5V rail so that the whole
thing can be powered by a single USB
connection.
The Pico/Pico W/Pico2 (MOD11)
connects to all the peripherals that
were shown in Fig.2. Its GP0 and GP1
pins, used for the serial console, connect to CON11 to interface with the
keyboard & HDMI-compatible display.
Fig.2: replacing MOD2 in the Digital Video Terminal, the Pico Computer results in a single device that has all the
features shown here.
siliconchip.com.au
Australia's electronics magazine
December 2024 67
Fig.3: nearly all the Pico’s I/O pins connect to the numerous peripheral
hardware devices, but most are optional. You can choose the accessories you
need and access the remaining I/O pins via CON15.
The 3V3EN line (pin 37) is also
connected, allowing S2 on the Digital Video Terminal to reset this Pico.
While pads for all 40 pins of CON11
are present, it will be sufficient in most
cases to provide the three topmost pins
on each side, connecting serial data,
power and ground.
The 3V3EN line also connects to
S11, a tactile switch, which shorts
this line to ground, resetting the Pico.
Also available to power the shared 5V
VBUS rail is CON18, a USB-C connector with two 5.1kW resistors between
its CC lines and ground, as required
by the USB standards.
The Pico includes an onboard 3.3V
buck regulator that can provide up to
68
Silicon Chip
800mA, which provides the 3.3V rail
on the Computer Board.
breaks out 3.3V, ground and the
I2C lines for connection to external devices if desired. The pinout
I2C and I2S
matches a number of I2C-based modThe remaining circuitry is self- ules, one of which could be mounted
contained within the Computer Board. directly to the Computer Board inside
MOD11 pins GP2 (SDA) and GP3 the enclosure.
(SCL) are configured for the I2C bus,
There are also headers to suit
with the two necessary 4.7kW pullup MOD12, a PCM5102A-based stereo
resistors.
audio DAC module. It takes power
IC1 is a DS3231 or DS3231M real- from the 5V VBUS rail via a 10W resistime clock & calendar (RTCC) chip; tor, with 10μF of bypassing capaciit connects to coin cell holder BAT1, tance. This combination helps to supwhich provides battery backup for its press any noise that might otherwise
timekeeping when the circuit is pow- reach the module.
ered off. A 100nF capacitor bypasses
The I2S digital audio data comes
its 3.3V supply provided by MOD11.
from the GP4, GP5 and GP6 digital outFour-way header CON14 also puts of MOD11, which are configured
Australia's electronics magazine
siliconchip.com.au
as DIN (data), BCK (bit clock) and
LRCK (left-right clock) respectively.
MOD12’s configuration pins are tied
to +3.3V or GND as required, and
the resulting audio signals are fed
to CON16, a three-way header, and
CON17, a 3.5mm stereo jack socket.
Data storage
The Computer Board offers four
options for data storage. Two SPI memory chips can be fitted as IC2 and IC3.
They each have a 100nF bypass capacitor and connect to the Pico’s SPI1
peripheral. It uses the GP11 I/O pin
as MOSI (master out/slave in), GP8 as
MISO (master in/slave out) and GP10
as SCK (clock). IC2’s CS (chip select)
pin is driven by GP7, while IC3’s is
driven by GP9.
There are numerous options available for these ICs, but we have chosen
a 64Mbit (8MB) PSRAM chip for IC2.
PSRAM stands for pseudo-static RAM;
it is actually a dynamic RAM (DRAM)
that has an integrated refresh controller, meaning it can be treated like static
RAM (SRAM). This provides volatile
storage, which is fast, but the data is
lost when power is removed.
We also used a W25Q32 32MBit
(4MB) flash memory chip for IC3,
which provides non-volatile storage.
The AT25SF321B-SSHB-T is another
compatible 32MBit flash chip that
could be used.
The interfaces are electrically identical between the flash and RAM chips,
so the amounts of volatile and non-
volatile memory can be changed to
suit different applications.
The other two storage options
are removable. A microSD card slot
(CON13) is connected to the other
(SPI0) interface, which uses GP19 for
MOSI, GP16 for MISO and GP18 for
SCK, with GP21 wired as chip select.
It has 100nF and 10μF bypass capacitors on its 3.3V rail.
Digital I/Os GP26 and GP27 are
wired to USB-A socket CON12 via
22W resistors, along with 5V (VBUS)
and ground connections. These pins
are configured in software to provide
a USB host interface so a USB flash
drive can be connected here, although
the software could be changed to suit
other USB devices.
Below MOD11 are LED11 and
LED12; they are be driven by the GP15
and GP20 digital outputs via 1kW
series resistors. They are intended to
show the status of the microSD card
siliconchip.com.au
and USB flash drive, but you could
use them for any purpose.
of the peripheral connections; they are
also printed on the PCB silkscreen.
Other parts
Options
These devices use up most of the
I/O pins of the Pico, but we still had
some room to fit an IR receiver (IR1),
which is powered from 5V (VBUS) via
a 100W resistor and 10μF capacitor for
bypassing. The demodulated output
connects to the Pico’s GP22 I/O pin via
a 1kW resistor that limits the current
into that pin if the IR receiver output
is pulled up to 5V.
A 28-pin header (CON15) breaks
out all the Pico’s accessible I/O pins,
as well as providing ground and
power connections. The voltage of
the power connection on this header
is set by JP11 and can be either the
nominally 5V VBUS rail or the regulated 3.3V rail.
Table 1 provides a concise summary
The Computer Board can be used
with various software platforms that
we’ll discuss in detail a bit later. For
now, we’ll point out some important
points that might be relevant as you
come to construction.
Not all software platforms will support all the hardware features; in particular, there is no universal support
for I2S audio (eg, MMBasic does not).
To this end, we have designed a small
drop-in PCB module that allows the
Computer Board to use PWM signals
to generate audio instead.
The construction and use of that
module is discussed in the panel titled
“A PWM audio module”. The circuit is
quite similar to the PWM audio circuit
used on the Pico BackPack from March
Table 1: peripheral connections for the Pico Computer Board
Feature
I/O pins/peripherals Comments
Notes
Serial console
GP0/GP1 (UART0)
Can connect to MOD1 and
MOD3 on Digital Video
Terminal
Check the
jumpers on the
Terminal
I2C
GP2/GP3 (I2C2)
I2C RTC chip onboard, also
broken out to 4-pin header.
DS3231 or
DS3231M IC
I2S
GP4/GP5/GP6 (PIO) Connects to onboard
Not supported
PCM5102A module with audio by the PicoMite
fed to a 3.5mm socket on
front panel and an internal
3-pin header
PWM audio
GP4/GP5 (PWM2)
Custom module converts
PWM signals to audio for
3.5mm socket on front panel
and internal 3-pin header
SPI memory
GP7-11 (SPI1 and
two CS pins)
Connects to onboard IC2 (eg,
PSRAM) and IC3 (eg, flash)
microSD card
GP16/GP18/GP19/ microSD card socket on the
GP21 (SPI0 and one front panel
CS pin)
USB Host
GP26/GP27 (PIO)
USB-A socket on the front
panel
IR receiver
GP22
On the front panel
User LEDs
GP15/GP20
Adjacent to microSD socket
and USB socket, respectively
I/O breakout
GP0-GP22, GP26GP28, power,
ground
28-pin R/A header accessible
from rear panel. A separate
link allows selection of 3.3V
or 5V power.
Power input
VBUS
Can be powered via the USB-C
power-only socket, the microUSB socket on the Pico or via
the Digital Video Terminal.
Australia's electronics magazine
Option of PWM
audio or I2S but
not both
Not supported
by the PicoMite
1kW series
resistors
(~3mA)
December 2024 69
2022 (siliconchip.au/Article/15236).
You may wish to use this instead of
I2S audio, even if your software platform supports I2S. We suspect some
readers might even find it a useful
module for other projects.
PicoMite BASIC does not appear to
have a means of interfacing to a PIO
USB host, so the CON12 USB interface
will not be usable with MMBasic. You
could keep the USB socket and leave
off the two 22W resistors, freeing up
the I/O pins and turning CON12 into
a USB power-only charging port.
None of the internal features are
mandatory; you might even wish to
simply use the Computer Board as
a way of breaking out the Pico’s I/O
pins at the CON15 header. JP11 must
be fitted to provide power to CON15.
If some features are omitted, other
components can also be left off; generally, these will be the passives that
are immediately adjacent to that part.
For example, leaving off IC2 or IC3
K
CON13
microSD
CD
1kW
12 3 4 5 6 78
15
14
28
13
32
MOD11
8
7
35
6
36
5
37
4
+
38
6 PIN USB-C
POWER
SOCKET
L
10
9
33
34
CR–1220
11
SCK
BCK
DIN
LRCK
GND
VIN
31
5.1kW 5.1kW
G R G
12
RP2040
MCU
3
MICRO
USB–B
PORT
39
40
2
1
CON18
K
IR1 1kW
3 2
1
12 3 4 5 6 78
21
20
3.3V
GND
SCL
SDA
4.7kW
26
15
14
28
13
29
31
12
RP2040
MCU
100nF
IC3
18
27
30
1kW CON17
100nF
10mF
SWCLK
IC1
SWDIO
Silicon
100nF 4C
.7hip
kW
1
19
CON11
RASPBERRY 17
25
PI Pico 16
24
CON14
S11
GND
22
23
A
LED11
1kW
CON12
22W
22W
Pico Digital
Video BackPack
07112234D
70
K
CON13
microSD
CD
4
100W 10mF
A
LED12
11
10
32
9
33
8
100nF
IC2
CON16
L
4.7kW
26
27
29
BAT1
18
RASPBERRY 17
PI Pico 16
30
IC1
19
G R G
3.3V
GND
SCL
SDA
SWCLK
100nF 4.7kW
1
SWDIO
25
GND
24
CON14
S11
20
22
23
3.3V
21
Pico Digital
Video BackPack
07112234D
3.3V
100nF
10mF
CON12
22W
22W
PCM5102A
MOD12
V+
VBUS
JP11
GP0/1: TX/RX
GP2/3: SDA/SCL
GP4/5/6: DIN/BCK/LR
GP7/9: CS IC2/IC3
GP8/10/11: SPI1
GP16/18/19: SPI0
GP15/20: LED11/12
GP21: SD CS
GP22: IR RX
GP26/27: PIO USB
Australia's electronics magazine
10W
SCK
BCK
DIN
LRCK
GND
VIN
1
3 2
4
100W 10mF
A
LED12
We’ll then detail the modifications
that are needed for the Digital Video
Terminal to allow it to connect to the
Computer Board. In simple terms,
this involves leaving off one of the
Raspberry Pi Picos (MOD2) and all
its associated parts, plus fitting headers to suit.
Finally, we’ll assemble all these
parts together into the enclosure. Combining the Computer Board with the
Digital Video Terminal requires the
tallest enclosure of that series, the
Altronics H0192.
Start by fitting the Computer Board
PCB (coded 07112234 and measuring
Construction
68 × 98mm) with the surface-mounting
We’ll start by working through the components that are needed, using the
assembly of the Pico Computer Board, PCB overlay diagram (Fig.4) as a guide.
since there may be readers who wish We will mention all parts; simply skip
to build it as a standalone device. By any you do not require.
itself, it should comfortably fit in the
We recommend you have on hand
larger of the two Altronics cases that flux paste, solder-wicking braid, tweewe used for the Digital Video Termi- zers and a fine-tipped soldering iron
nal (Altronics H0191).
(or medium if you’re more experienced and prefer it). A magnifier and
good illumination will be helpful, and
K
A
GP0/1: TX/RXproper ventilation is mandatory so you
LED11
GP2/3: SDA/Sdon’t
CL
inhale flux fumes.
GP4/5/6: DIN/BCK/LR
The
microSD card socket (CON13)
G
P
7
/
9
:
C
S
I
C
2
/
I
C
3
C
O
N
1
7
1kW
GP8/10/11: SPI1 and USB-C socket (CON18) are the
CON16
100nF
GP16/18/19: SPI0 most challenging to solder, so start
IC3
GP15/20: LED11/12
GP21: SD CSwith them. Apply flux to the PCB pads
V+
GP22: IR RX and rest the components in place. The
100nF
V
B
U
S
PCM5102A
GP26/27: PIO UScard
B
IC2
JP11
socket has locating pegs on its
MOD12
underside, while the USB-C socket
will not and will require a bit more
10W
care in its placement.
Clean the iron’s tip and apply some
10mF
fresh solder, then tack one lead. Check
that the connectors are flat and within
their marked pads, adjusting if necessary, then solder the remaining
leads. Use extra flux and the braid to
draw away any excess solder or solder bridges.
You could also add some extra solder to the shell of both connectors to
give mechanical strength.
Follow by installing the three ICs.
IC1 can be in the 8-pin narrow SOIC
package (DS3231M) or a wider 16-pin
SOIC package (DS3231). In both cases,
its pin 1 marking must be in the
GP0
GP1
GP2
GP3
GP4
GP5
GP6
GP7
GP8
GP9
GP10
GP11
GP12
GP13
GP14
GP15
GP16
GP17
GP18
GP19
GP20
GP21
GP22
GP26
GP28
GP27
V+
GND
CON15
IR1 1kW
means that the corresponding 100nF
capacitor can be omitted too.
The two resistors and 10μF capacitor below IR1 are only needed if it is
fitted. Similarly, the 100nF and 10μF
capacitor next to the CON13 microSD
card socket are only needed if it is
installed.
The 100nF capacitor near IC1 is only
needed if it is fitted, although the two
4.7kW resistors should be kept if you
intend to connect anything to the I2C
bus at CON14. The two passives above
MOD12 are needed only if an audio
module is fitted.
10mF
Figs.4 & 5: we have used
slightly larger M3216 (imperial
1206) SMD parts in this design
since there was plenty of room.
Check these overlays and the
photos to confirm how the parts
are fitted, especially CON11,
since it needs to align with the
header on the PCB below.
siliconchip.com.au
upper-left corner. The narrower part
should be fitted to the upper eight
pins. Make sure not to mix this up
with the other ICs, which will also be
8-pin SOIC parts.
If you cannot see a pin 1 marker,
there will also be a bevel along the
edge belonging to pin 1; it is best
viewed from the end of the IC. Apply
flux, place the part, tack one lead and
check that the part is flat and square
before soldering the other pins.
We recommend fitting a PSRAM
chip for IC2 like we did. It will be
noticeably narrower than the Winbond
flash memory chip, but both will fit on
either sets of pads for IC2 and IC3. Solder these like the other parts, observing the correct orientations.
Follow with the seven capacitors.
They won’t be marked, but the 10uF
parts should be quite a bit thicker than
the 100nF parts. Add flux paste, tack
one lead, check the position and then
solder the other lead. You can also go
back and touch the iron on the first
lead to refresh the solder joint.
There are 11 resistors of various
values; solder them as per Fig.4. Coin
cell holder BAT1 is the last SMD part.
Rest it in place, being sure that the
opening faces the edge of the PCB.
Tack one lead, adjust, then solder the
other. It’s also worth adding a decent
fillet to each side to give it mechanical strength.
Use this opportunity to thoroughly
clean away any excess flux from the
PCB using your solvent of choice. Your
flux’s data sheet might suggest a specific solvent, but isopropyl alcohol or
Chemtools Kleanium G2 work well in
most cases.
Dry the board and examine it thoroughly for solder bridges, dry joints
or pins that are not connected to the
pad below. It will be easier to fix these
now, before any other parts are fitted.
Through-hole parts
Now we can start on the throughhole parts. Some of these show
through the front panel, so you can use
the front panel PCB to check that they
are correctly aligned, although they
should both simply snap into place.
Fit the USB-A socket CON12 now,
checking that it is flat against the PCB
before soldering its pins. Add a good
amount of solder to the shell pins to
give it strength. CON17, the 3.5mm
socket, sits along this edge too, so solder it in place next.
siliconchip.com.au
Kits available for this project
To build the project as shown in our photos, you should purchase the SC6917
and SC7374 kits from us and the enclosure from a retailer such as Altronics,
plus accessories like the USB keyboard, HDMI monitor and appropriate USB
cables. When ordering the kits, you may want to also get the optional PSRAM
chip (SC7377) and PWM Audio Module kit (SC7376) if you don’t plan to use
the included DAC module.
The Pico Computer Board kit can be used standalone, although you will have
to purchase an enclosure and arrange your own panels. In this case, you can
order the SC7378 kit ($50 + P&P), which is the same as the SC7374 kit plus
an unprogrammed Pico.
Pico Computer Board Kit (SC7374, $40) ___________________
This kit contains the PCB (07112234) and almost all the parts needed to fully
populate it (except the PSRAM & RTC chip, available separately, and coin cell).
It also includes the new front panel and the hardware needed to connect the
PCB to the Digital Video Terminal (which is already available as a kit, see blow).
The SC7374 kit does not include a Raspberry Pi Pico because the SC6917
kit has three.
The Pico Computer Board fitted with all parts except the I/O
breakout headers at bottom right. Note the silkscreen guide at top right
for the GPIO pinouts. The only parts needed on the underside of the Computer
Board are pin headers to connect it to the Digital Video Terminal underneath.
Leave these off when using the Computer Board on its own.
Pico Digital Video Terminal Kit (SC6917, $65) ______________
Includes everything to build the Digital Video Terminal, except the case. The
Raspberry Pi Picos are supplied unprogrammed. For building instructions, see
the original article in the March & April 2024 issues (siliconchip.au/Series/413).
PWM Audio Module Kit (SC7376, $10) _____________________
The PWM Audio Module is available as a kit with all parts listed in the panel,
including the PCB.
Australia's electronics magazine
December 2024 71
The infrared receiver and LEDs also
show through the front panel, so use
the mounted components and front
panel as a jig to align them correctly.
Bend the LED leads right behind the
body by 90°, being sure to bend the
correct way to align the cathode with
the K marks on the PCB.
As well as being short for the German word “Kathode”, the letter K also
looks like the cathode end of the LED
symbol.
Locate each component into the
front panel and tack one lead wherever is convenient. Gently bend the
leads slightly to achieve your desired
placement. The IR receiver might need
to be kinked forward slightly to show
through the hole in the panel.
Once you are happy with the front
panel components, solder the remaining leads and trim the excess from the
underside. Slot switch S11 into place
and solder it as well.
You will only need a pair of fourway headers to connect the Computer
Board to the Digital Video Terminal,
but we decided to use six-way headers since the corresponding stackable
headers are commonly available in a
six-way part.
If you plan to use the Computer
Board as a standalone board, these
headers are not needed. Otherwise,
fit them to the underside of the PCB,
closest to the Pico’s USB socket.
You should check this carefully in
the photos and make sure they are
mounted squarely.
Another option is to run insulated
wires for the handful of lines that are
needed: ground, VBUS, GP0 and GP1.
These are pins 1, 2, 3 and 40 on the
Pico footprint.
We’ve specified low-profile headers
for mounting the Raspberry Pi Pico
(MOD11), as it will be too tall for the
intended enclosure if it is fitted on
standard 8.5mm-tall socket headers.
There is also the option of soldering
it directly (with header pins to clear
CON11) to the PCB, although you will
not have access to the CON11 headers on the underside of the PCB after
doing that.
So, if you plan to hard-solder
MOD11, ensure that you have the
CON11 headers in place first. Then
rest the header pins in place and tack
a few pins on both the PCB and Pico,
check their alignment, then solder all
pins as needed.
If you plan to fit low-profile headers,
72
Silicon Chip
A PWM Audio Module
The PicoMite has long supported PWM audio, but there doesn’t appear to be any
support for I2S audio using a higher-quality external DAC. PWM audio involves
supplying a pulse-width modulated signal of varying duty cycle. An external circuit filters and buffers the signal, converting it to an analog voltage so it can be
fed to the headphones, an external amplifier or other devices.
Many 8-bit microcontrollers will have no trouble generating PWM audio, so
this module could also be an attractive option for anywhere that a cheap and
simple audio output is needed. It’s cheap for a reason, though; the audio will
not be as clean as that from an I2S DAC. Still, it will be good enough for many
purposes.
This module is designed to fit in the same footprint as the popular PCM5102A
DAC modules. Instead of expecting I2S (serial) data, it receives a PWM signal
on two of the pins, one for each channel.
The circuit (Fig.a) is much the same as the one we used on the Pico BackPack
from March 2022 (siliconchip.au/Article/15236), with a minor alteration to allow
it to run from a single 5V supply. The external connectors match the pin locations
of the PCM5102A module, allowing this module to be mechanically equivalent.
5V power comes in on the Vcc and GND pins and feeds directly to dual low-
voltage rail-to-rail op amp IC1, bypassed by a 100nF capacitor. A low-pass filter
comprising a 10kW resistor and 10μF capacitor provides a biasing rail, VF; its DC
level is set to around 4V by other biasing components downstream.
The two PWM signals come in on pins 4 and 5 of the six-pin header (L_IN &
R_IN). Each are treated identically as they pass through the filter and buffer circuitry, so we will look at one channel only.
Assuming an average 1.65V level (as expected for 50% duty cycle PWM from
a 3.3V microcontroller), the biasing and filter circuit consisting of the 47kW and
22kW resistors and 1nF capacitor brings the level closer to the middle of the op
amp’s range. They also attenuate the higher frequency elements of the squareedge PWM artefacts.
Fig.a: this simple circuit filters and buffers two PWM signals from the Pico to
provide a basic stereo audio output. You could also connect it to an Arduino or
other microcontroller; the output should be able to drive headphones or a small
speaker.
as recommended, solder the corresponding pin headers to the Pico. You
can then use them as a jig to ensure
that the low-profile header sockets are
square and aligned as you solder them
to the PCB.
MOD12 should be mounted directly
Australia's electronics magazine
to the PCB or on low-profile headers
only. We opted to solder it directly to
the PCB, even though that blocks off
access to one of the mounting holes.
The remaining headers are optional,
and you can fit socket or pin headers to
suit your purposes. The demonstration
siliconchip.com.au
There are just a few resistors and
capacitors on the top side of the
PCB. Take care with the orientation
of IC1. We used standard pin
headers, which can be soldered
directly to the other PCB or plugged
into socket headers.
The op amp is configured for unity
gain, so it simply buffers the signal
that reaches its inputs, while the 10μF
capacitor, 100W resistor and 100kW
resistor provide AC coupling and biasing to ground. The output is suitable
for driving headphones or an external
amplifier.
As long as the supply voltage suits the op amp and is not less than the incoming PWM amplitude, we expect the circuit will work fine. For example, a 5V PWM
signal will work with a 5V supply. Those will with some expertise might tweak
the component values to suit their application.
Assembly
The parts are SOIC and M3216 (imperial 1206), so you will need the standard
surface-mount assembly tools (see the construction section in the main article). The top of the PCB is populated with pairs of components that are mirrored
across channels, so each silkscreen marking corresponds to the two adjacent
passive components. The PCB overlay diagrams shown in Fig.b depict the placement of the components. Work through them on the top side, taking care with
the capacitors, since they will not be marked.
Flip the PCB over and carefully align and solder the solitary IC, being sure to
match the edge bevel to the silkscreen marking, then fit the remaining components on this side. Clean the PCB with an appropriate solvent and dry thoroughly.
Solder headers to suit the application.
The PWM Audio Module can now be fitted to the
Computer Board PCB for testing. We have provided
sample code in the PicoMite BASIC examples to use
this module.
Fig.b: assembly of the module is straightforward.
The main thing to watch out for is to avoid mixing up
the unmarked capacitors with different values.
Parts List – PWM Audio Module
1 double-sided PCB coded 07112238, 32 × 17mm
1 3-way header, 2.54mm pitch (for audio output)
1 6-way header, 2.54mm pitch (power and signal inputs)
1 MCP6002 or similar low-voltage rail-to-rail op amp, SOIC-8 (IC1)
3 10μF M3216/1206 size 10V X7R SMD ceramic capacitors
1 100nF M3216/1206 size 50V X7R SMD ceramic capacitor
2 1nF M3216/1206 size 50V X7R, C0G or NP0 SMD ceramic capacitors
2 100kW SMD M3216/1206 size ¼W 1% resistors
4 47kW SMD M3216/1206 size ¼W 1% resistors
2 22kW SMD M3216/1206 size ¼W 1% resistors
3 10kW SMD M3216/1206 size ¼W 1% resistors
2 100W SMD M3216/1206 size ¼W 1% resistors
software does not need to connect to
any external circuitry apart from the
likes of a microSD card, USB flash
drive or headphones.
You can even test the Computer
Board without the Digital Video Terminal; as long as you have a serial
siliconchip.com.au
terminal program you can use to view
the output and enter commands.
Building the Digital Video
Terminal
If you are connecting the Computer
Board to a Digital Video Terminal, a
Australia's electronics magazine
few minor changes are needed for the
Terminal. It’s helpful to refer to the
original Digital Video Terminal articles (March-April 2024; siliconchip.
au/Series/413), although experienced
constructors should get by following
the silkscreen markings.
The MOD1 and MOD3 Picos will
need to be mounted on low-profile
headers or directly to the Digital Video
Terminal (07112231) PCB, since fullheight headers will be too tall and
interfere with the Computer Board.
You can load the firmware onto
MOD1 and MOD3 before installing
them. Be sure to load 0711223A.UF2
onto MOD1 and 0711223C.UF2 onto
MOD3. To load the firmware, hold the
BOOTSEL button on the Pico while
connecting it to your computer, then
copy the firmware UF2 file to the
RPI-RP2 virtual drive that the Pico
provides.
Apart from omitting S2, MOD2,
CON2, LED2, and the adjacent 1kW
and two 22W resistors, most of the
assembly proceeds without changes.
Refer to our photo of the assembled
Terminal; note that we’ve also left off
some of the other components that we
are not using.
We used stackable headers to allow
a 15mm spacing between the PCBs.
You will need to have the headers fitted to the underside of the Computer
Board PCB (07112234) to complete
the alignment.
Slot the stackable headers onto the
headers on the underside of the Computer Board PCB, then temporarily fix
the two PCBs together using 15mm
spacers and machine screws. This
will set the right spacing and align the
boards squarely.
The tips of the stackable headers
should protrude through the matching MOD2 holes in the Terminal PCB.
You can also check that the front panel
PCB aligns with all the sockets that it
presents on both boards.
Solder the tips of the stackable
headers to the Terminal PCB, then
trim them to a neat length. Remove
the screws and detach the two boards.
To test the Terminal, power it from the
USB-C socket (or one of the microUSB sockets if you have no USB-C
cables).
The LEDs onboard MOD1 and
MOD3 should light up any time the
board is powered; this shows they are
running their firmware. Connecting a
USB keyboard to CON3 should cause
December 2024 73
LED3 to light up, while typing on the
keyboard should make LED3 flicker.
Plug your HDMI monitor or display
into CON1 and check that LED1 lights
and that you can see a flashing cursor
in the top-left corner of the connected
display. Place a single jumper on LK1,
connecting pins 2 and 3 and matching
the INT markings on the silkscreen.
TERMINAL BACKPACK PICOMITE DEMO
I2C2 DEVICE SCAN
x0 x1 x2 x3 x4 x5 x6 x7 x8
0x ..
1x .. .. .. .. .. .. .. .. ..
2x .. .. .. .. .. .. .. .. ..
3x .. .. .. .. .. .. .. .. ..
4x .. .. .. .. .. .. .. .. ..
5x .. .. .. .. .. .. .. .. ..
6x .. .. .. .. .. .. .. .. 68
7x .. .. .. .. .. .. .. .. ..
1 DEVICES FOUND
x9
..
..
..
..
..
..
..
If all is well, power off and detach
the Digital Video Terminal, then plug
the Computer Board into the Terminal and reconnect the keyboard and
monitor.
Demonstration software
You can try the two software demos
quite easily thanks to the Pico’s
xA
..
..
..
..
..
..
..
xB
..
..
..
..
..
..
..
xC
..
..
..
..
..
..
..
xD
..
..
..
..
..
..
..
xE
..
..
..
..
..
..
..
xF
..
..
..
..
..
..
..
Screen 1: the PicoMite BASIC
example (seen here in the
TeraTerm serial terminal
IC2 ID:&H00000C0D. IC2 IS ESP PSRAM
IC3 ID:&HEF401600. IC3 IS WINBOND 25Q32
program) scans for devices and
READY
displays what it finds. Various
A:/>ir
commands can be used to interact
WAITING FOR IR SIGNAL
with the PicoMite’s internal file
PRESS ANY KEY TO EXIT
system or that of a microSD card.
Received device = 255 key = 162
Starting Pico Digital Video Terminal BackPack
SD OK
A: SD card root has 32 files totalling 171393622 bytes.
USB MSC OK
B: USB MSC card root has 50 files totalling 175713 bytes.
RTC found
RTC started OK
Time is 14:19:46 on 2/9/2024
Screen 2: This display is produced
IC2 ID is 0xD.
by the Pico Computer’s Arduino
IC3 ID is 0xEF401600.
demo software on the Digital Video
Audio started OK
Terminal. It provides a status report
I2C scan:
and also provides commands to
0x68
I2C scan done.
access the included hardware.
A:/> ir
Waiting for IR signals
Press any key to exit
Protocol=NEC Address=0x0 Command=0x16 Raw-Data=0xE916FF00 32 bits LSB first
Unknown IR Signal
Protocol=NEC Address=0x0 Command=0x5E Raw-Data=0xA15EFF00 32 bits LSB first
Protocol=NEC Address=0x0 Command=0x5E Repeat gap=40000us
A:/> tone
Playing tone. Done.
A:/> ▇
MPY: soft reboot
MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico with RP2040
Type “help()” for more information.
>>> #Serial console
>>> import uos
>>> from machine import UART, Pin
>>> repl_uart = UART(0, baudrate=115200, tx=Pin(0), rx=Pin(1))
>>> uos.dupterm(repl_uart, 0)
>>>
>>> #I2C
>>> from machine import Pin, I2C
>>> i2c = I2C(1, scl=Pin(3), sda=Pin(2), freq=100000)
>>> i2c.scan()
[104]
>>> ▇
Screen 3: These commands can be used with MicroPython to configure it for use
with an integrated Digital Video Terminal. They redirect the console to a serial
terminal as well as the virtual USB serial port. It’s also straightforward to run
an I2C scan, showing the RTC chip at address 104 (0x68)
74
Silicon Chip
Australia's electronics magazine
bootloader. Connect the Pico Computer to a computer using the microUSB socket on the Pico. If you do not
see the RPI-RP2 virtual drive, hold its
BOOTSEL button while pressing and
releasing S11.
You can then copy the UF2 file to
the virtual drive. You can view the
operation of the software either from
a serial terminal program connected to
the Pico’s virtual USB-serial port, or
using the keyboard and monitor connections of the Terminal.
The USB-serial port name or number might change due to the way that
different operating systems handle
these things. The source code (and
other code such as libraries and BASIC
OPTIONs) is also available in the software download package at siliconchip.
au/Shop/6/528
To try out the external features,
you will need to connect appropriate devices, like a USB flash drive or
microSD card. These should be FAT
formatted (FAT16 or FAT32, although
the latter is more standard these days)
and inserted before powering on the
hardware.
Connect some headphones to
CON17 to try out the audio. We recommend not connecting an amplifier
until you are sure that the audio is
working properly. The sections below
will detail which features are supported and what to expect.
There are several firmware (UF2)
files in the UF2 folder of the software
downloads, including the three files for
the Digital Video Terminal and “flash_
nuke.UF2”, which can be used to completely wipe a Pico’s flash memory.
PicoMite BASIC
The PicoMite BASIC (MMBasic)
example demonstrates most of the
available peripherals. There are several OPTIONs that can be configured
from the BASIC prompt, plus a demonstration program that has its own interactive command prompt.
The “Terminal BackPack BASIC.
UF2” file is configured with PicoMite
BASIC, the required OPTIONs and the
BASIC program. You can load it using
the RPI-RP2 bootloader and immediately try it out using a keyboard and
monitor attached to the Pico Computer. Once the PicoMite firmware
is loaded, it should flash the Pico’s
onboard LED.
Alternatively, the PicoMite BASIC
UF2 file, OPTIONS.BAS and BASIC_
siliconchip.com.au
DEMO.BAS files can be individually
loaded and edited as needed. Note that
the AUDIO option (for PWM audio) is
configured; you will want to disable
that if you have the I2S DAC module
fitted instead.
The demo starts by running an I2C
scan and the RTC chip should be found
at address 0x68, assuming it is fitted.
The memory chips are also interrogated for their IDs. Screen 1 shows
the boot sequence followed by the
IR command, which displays codes
received by IR1.
The available commands can be
listed by entering the HELP command.
The TONE command will play audio
(if the PWM audio module is fitted),
while accessing B: drive allows you to
examine the microSD card contents.
The A: drive is an internal drive stored
in the Pico’s flash memory.
The PicoMiteV5.08.00.UF2 file is
the same file we installed before applying the necessary OPTIONs and loading the program file. It is the current
version available from https://geoffg.
net/picomite.html at the time of writing this.
Arduino demo
The Arduino demo is loaded in similar fashion with the “Terminal BackPack Arduino.UF2” file. The source
code for this, along with the libraries
we used, can be found in the Arduino
folder. There are other libraries that
are included with the Pico Arduino
board profile.
More information about the board
profile and its integrated libraries
(including those for I2C, SPI and I2S)
can be found at https://github.com/
earlephilhower/arduino-pico
There is also a PWMAudio library,
which should work with the PWM
audio module.
The Arduino demo is similar to that
for PicoMite BASIC, but offers a different set of features. The A: drive refers
to the microSD card, while the B: drive
is the USB flash memory.
The interface is meant to resemble a
command prompt, although the commands are not comprehensive, but
rather intended to be a simple demonstration of the hardware features. The
HELP command lists the available
commands.
Screen 2 shows the output of this
demo. The first 14 lines are automatically produced after it boots up, while
the remaining lines show the IR and
siliconchip.com.au
Parts List – Pico Computer
1 modified Digital Video Terminal (see below)
1 Pico Computer Board (see below)
1 black front panel PCB coded 07112235, 37 × 99mm
2 4-way, 6-way, 8-way or 10-way stackable headers (CON11)
2 4-way, 6-way, 8-way or 10-way headers (CON11)
1 105 × 80 × 40mm Hammond RM2005LTBK or Multicomp MP004809 ABS instrument
case [Altronics H0192]
1 micro-USB cable for power, communication and programming
4 15mm-long M3 untapped spacers
4 20mm-long M3 panhead machine screws
Pico Computer Board parts
1 double-sided PCB coded 07112234, 68 × 98mm
1 Raspberry Pi Pico microcontroller module (MOD11)
2 20-way low-profile socket headers (for MOD11) [Adafruit 5585]
2 20-way low-profile header strips (for MOD11)
1 PCM5102A DAC module (MOD12) OR
1 PWM audio module (see panel)
1 1220 surface-mounting coin cell holder (BAT1) [BAT-HLD-012-SMT]
1 CR1220 Lithium coin cell (BAT1)
1 USB Type-A through-hole right-angle socket (CON12)
1 SMD microSD card socket (CON13) [Altronics P5717]
1 4-way 2.54mm pitch socket header or pin header (CON14; optional, for I2C breakout)
1 2×14-way 2.54mm pitch right-angle header (CON15; optional, for I/O breakout)
1 3-way 2.54mm pitch pin header (CON16; optional, for audio)
1 3.5mm stereo jack socket (CON17) [Altronics P0094]
1 USB-C power-only SMD socket (CON18) [GCT USB4135 or similar]
1 3-way 2.54mm pitch pin header and jumper shunt (JP11; optional, for I/O breakout)
1 6mm through-hole tactile pushbutton switch (S11)
4 small self-adhesive rubber feet
Semiconductors (all optional)
1 DS3231 (wide SOIC-16) or DS3231M (SOIC-8) real-time clock & calendar (IC1)
1 64Mbit SPI PSRAM, SOIC-8 (IC2) [SC7377, Adafruit 4677, ESP-PSRAM64H or similar]
1 32Mbit SPI flash memory, SOIC-8 (IC3)
[Winbond W25Q32JVS, AT25SF321B-SSHB-T or similar]
1 3-pin infrared receiver (IR1)
2 3mm green through-hole LEDs (LED11, LED12)
Capacitors (all SMD X7R, M3216/1206 size)
3 10μF 10V 4 100nF 50V
Resistors (all ¼W SMD M3216/1206 size, 1%)
2 5.1kW
2 4.7kW
3 1kW
1 100W
2 22W
1 10W
Parts for modified Digital Video Terminal
1 double-sided PCB coded 07112231, 98 × 68mm
1 Raspberry Pi Pico programmed with 0711223A.UF2 (MOD1)
1 Raspberry Pi Pico programmed with 0711223C.UF2 (MOD3)
1 HDMI-compatible socket (CON1) [Stewart SS-53000-001]
1 USB-A through-hole right-angle socket (CON2)
1 USB-C power-only SMD socket (CON4) [GCT USB4135 or similar]
3 6mm through-hole tactile switches (S1-S3)
4 2-pin headers, 2.54mm pitch (JP1-JP4)
1 4-pin header, 2.54mm pitch (LK1)
5 jumper shunts (JP1-JP4 & LK1)
4 20-way pin headers, 2.54mm pitch (for MOD1 & MOD3)
4 20-way low-profile header sockets (optional; for MOD1 & MOD3)
Semiconductors
2 2N7002 SMD N-channel Mosfets, SOT-23 (Q1, Q2)
2 green 3mm through-hole LEDs (LED1, LED3)
Resistors (all ¼W SMD M2012/0805 size, 1%)
6 10kW
2 5.1kW
2 1kW
8 270W
Australia's electronics magazine
2 22W
December 2024 75
TONE commands. The TONE command assumes an I2S DAC is fitted and
will not work with the PWM module.
During operation, the LED on the
Pico should be lit, as should that on
the I2S DAC module.
MicroPython and C SDK
When used with the Pico Computer Board, the Digital Video Terminal only
needs to be partially populated, as shown here. Set LK1 to the INT position.
All of these photos have been shown enlarged for clarity.
Since we do not use MicroPython
much, we have not deeply investigated its usage with the Pico Computer, although we were able to work
out some basics such as duplicating
the USB-serial terminal to the connected Terminal hardware and running an I2C scan.
There is a MicroPython folder in
the software downloads with some
brief notes and sample code to get you
started. That includes links to recommended libraries, along with a copy of
the MicroPython UF2 file we tested.
Screen 3 shows the Digital Video
Terminal being configured, followed
by an I2C scan identifying the RTC
chip at address 104 decimal (0x68 in
hexadecimal).
Note that you will have to run the
first command to configure the terminal from the USB serial port, since that
is what makes the hardware serial port
available. Subsequently, the USB keyboard and HDMI monitor attached to
the Terminal can be used to interact
directly with MicroPython.
We have not created any demonstrations using the C SDK. There are not
many integrated high-level libraries
for the peripherals on the Pico Computer, so we have focused our attention
on the Arduino code (which is based
on the C SDK anyway).
Using a Pico W or Pico 2
Take your Digital Video Terminal to the next level by adding a real-time
clock, multiple storage facilities and stereo audio. The Pico Computer is the
perfect basis for a custom computer project.
Although we have not tested them,
the examples presented here should
work fine with a Pico W in place of
the Pico. However, note that the LED
on the Pico W is driven differently, so
it will probably not light up. None of
the Pico Computer peripherals depend
on the WiFi or Bluetooth features the
Pico W provides.
At the time of writing, the Pico 2 has
just became available, with a much
faster processor and twice as much
RAM. We performed some quick tests
by recompiling the Arduino code for
the Pico 2 and uploading it to the Pico
Computer. Everything seemed to work
as expected, so if you’re after a more
powerful computer, the Pico 2 may
be for you!
Australia's electronics magazine
siliconchip.com.au
76
Silicon Chip
Completion
Disconnect all the cables and fit a
1220 cell in BAT1 if you have fitted
an RTC chip. Slot in the front panel
PCB and secure the two boards into
the base of the enclosure by threading
machine screws through the top PCB,
spacer, then bottom PCB and into the
enclosure’s lower half.
If the I2S DAC module is permanently affixed and blocking that hole,
a short screw can be used to affix the
lower PCB directly to the enclosure.
We have not designed a rear panel,
since there are a few options for which
sockets to use. If you don’t need access
to any of the Pico USB connections or
the rear USB-C socket, no rear panel
holes are needed and the Pico Computer can be powered from the front
panel USB-C socket.
If you need access to the CON15 I/O
breakout header, you might decide to
leave the rear panel off completely.
In that case, you should glue a small
piece of plastic to the enclosure to
restrict access to the coin cell. You
will need to have the case fitted to
ensure that the coin cell is inaccessible. The Pico Computer is not a toy,
so it should be kept away from children in any case.
Since the included panels are translucent, you could easily mark them by
eye and then cut the required holes
out. One option is to drill 3mm holes
at each end of the desired cut-out, then
This shows how the two PCBs
are stacked. We recommend mounting
the modules on low-profile headers or directly to
their respective PCBs. 15mm spacers separate the two PCBs. You
could use a different height but 15mm is required to match our front panel PCB.
use a sharp knife or files to remove the
remainder of the plastic.
Now you can affix the top half of the
enclosure using the included screws
and reattach any necessary cables and
accessories.
Standalone use
If you are using the Computer
Board PCB without the Digital Video
Terminal, it can mount directly to the
base of any enclosures in the series we
are using (Altronics H0190, H0191 or
H0192). Which you choose depending
on the height of the assembled PCB.
Figs.6 and 7 are panel cutting diagrams for this scenario. We expect that
readers doing this will have a specific
project in mind that might create other
panel requirements, so we have not
created a panel PCB for this use case.
Note that the heights of the LEDs
and IR receiver could vary, depending
on how exactly you solder them. The
heights shown match the PCB panel.
Conclusion
Fig.6 & 7: these panel cutting diagrams are for using the Pico Computer PCB
on its own without connecting it to the Digital Video Terminal PCB. If using
them combined, either move all the cut-outs up by 16.6mm (15mm for the
spacers and 1.6mm for the PCB thickness), or use our PCB-based front panel
and save yourself the effort.
siliconchip.com.au
Australia's electronics magazine
The Pico Computer is a great way
of adding numerous features to the
Pico Digital Video Terminal. It’s also
a handy combination of accessories
that work well with the Pico, meaning that it will have numerous applications on its own.
Combined with the Digital Video
Terminal, the Pico Computer has the
potential to become a very interesting
standalone computing device. Those
skilled in programming may be interested in porting an emulator to the
hardware or even writing a standalone
operating system.
We plan to produce another project using this hardware, and we look
forward to seeing what devices other
readers create.
SC
December 2024 77
|