This is only a preview of the February 2026 issue of Practical Electronics. You can view 0 of the 80 pages in the full issue. Articles in this series:
Items relevant to "Power LCR Meter, part one":
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
Max’s Cool Beans
By Max the Magnificent
Weird & Wonderful
Arduino Projects
Part 14: enough playing games, it's time to play games!
H
ello there. But that's enough
of the pleasantries. Hold on
to your hat because I have exciting news. Believe it or not, we are
finally ready to take all the disparate
elements we’ve worked on in previous columns and bring them together to form our retro games console.
As a reminder, in addition to our
Arduino Uno, we have the 14 × 10
array of tri-colour light-emitting
diodes (LEDs) that we created in
Part 3 (March 2025). We also have
our six 7-segment displays (implemented as three two-digit prebuilt
modules) that we already mounted
on the front panel in Part 13 (January 2026).
Last, but not least, we have our
switches, which we’ve already attached to the front panel, but have
not yet wired up.
As a further reminder, in these discussions I’m assuming that (like me)
you will be using a laser-cut front
panel and a 3D-printed enclosure. As
previously noted, you could simply
attach everything to a timber board
using hot glue. If anyone asks, you
can tell them it’s a prototype and then
fix them with a steely glare (my dear
old mother could give lessons in the
art of the steely glare).
A rush of power
When running in standalone mode
(not connected to a host computer
via a USB cable), the Arduino Uno
requires a 9V supply. This can be
presented using its power jack or via
its VIN pin. The Arduino will use its
onboard voltage regulator to drop the
9V supply to the 5V it requires for
its internal operations.
Way back in the mists of time (April
2025), we decided to power our console using an external 9V supply. In
my case, I’m using a very tasty NAN4
KADF (gesundheit) 30V 10A bench
power supply. On the off chance you
are in the market for one of these little
beauties, the same unit is available
on Amazon UK (https://pemag.au/
link/ac48).
Our 14 × 10 LED array and our
7-segment display modules both require 5V to power them. To address
this, we decided, in the April 2025
issue, to use a cheap-and-cheerful DCto-DC converter module (see Photo 1).
These devices, available from
Amazon UK (https://pemag.au/link/
ac2m), accept input voltages from 9V
to 24V and claim to deliver up to 5A
at 5V. In reality, the ones we tested
struggled to deliver more than 2A.
Happily, we require only around 1.5A
for our games console, well within
its capabilities.
A high-level view of our proposed
power supply setup is shown in Fig.1.
Bits and pieces
Before we leap into action, let’s take
a moment to remind ourselves where
all the bits and pieces go (Fig.2). When
you look at the front of the console, as
illustrated in Fig.2(a), you may note
that I’ve transposed the Action and
Direction control buttons compared
to our original prototype.
This wasn’t intentional. It was
only after I’d attached the 7-segment display modules
th at I r ealised
I’d mounted
them on
the wrong side of the panel. I could
have fixed this, but then I thought,
“What the heck!”.
When we look at the back of the
console, shown in Fig.2(b), we see
that I decided to mount the DC-toDC converter on the back of the 14
× 10 LED array panel (I used trusty
hot glue for this purpose).
Tips and tricks (and other stuff)
Don’t forget that when you’re working with semiconductor devices, including LEDs (like our 7-segment display modules and our 14 × 10 array),
you should always use an antistatic
mat and an antistatic wrist band. Of
course, these need to be properly
grounded. We discussed this in our
first Arduino Bootcamp column (January 2023).
I’m assuming that you know how
to solder. If not, may I be so bold as
to recommend The Basic Soldering
Guide Handbook (pemag.au/link/
ac9o), written by my friend and fellow
PE contributor Alan Winstanley.
Photo 1: this DC-toDC converter module can
efficiently produce a regulated
5V output from a 9-24V input.
Practical Electronics | February | 2026
9V
VIN+
0V (GND)
VIN-
5V
DC-DC
Converter
14x10 LED
Array
0V
MCU
(Arduino)
7-Segment
Displays
Fig.1: our power supply configuration.
Whenever possible, use heatshrink
tubing to protect your soldered joints.
For example, in a moment, we’ll be
soldering wires to a 25-way D-sub
connector, and you should apply
heatshrink tubing to each connection. This serves two purposes: it
prevents unwanted short circuits,
and it provides strain relief for the
connections when the wires flex as
you work with them.
When I first embarked on this project, I imagined a solid enclosure
with a removable front panel. The
more I thought about it, however,
the more I realised what a pain that
was going to be.
As you’ll see in the photos of the
finished unit later in this column, I
eventually decided to permanently
mount the front panel to the front of
the enclosure, leaving the rear open,
with just a band of material around
the back edge. My plan is to add a
proper back panel later, but for now,
this open rear gives me full access to
wire everything from the back.
Delightfully different
Back in the 1980s and 1990s, most
home game consoles were built around
the concept of plug-in game cartridges. This was long before the age of
the internet, digital distribution or
downloadable content. If you wanted
a new game, you bought a physical
cartridge, slid it into the slot, and—
assuming you’d chanted the correct
incantations—off you went.
In those days of yore, commercial
game cartridges didn’t include processors. The main processor was built
into the console itself. The cartridges
were essentially clever little boxes of
read-only memory (ROM) that held
the game code and data. When you
inserted a game, the console’s processor executed the code directly from
the cartridge’s ROM.
Having said that, some cartridges
did get a bit fancy. To work around the
limitations of the host console, manufacturers occasionally added extra
hardware into the cartridges, such as
bank-switching ‘mapper’ chips, additional RAM, custom audio chips,
or even the occasional co-processor
(the most famous being the Super FX
chip used in Star Fox for the Super
Nintendo).
Even so, the core idea remained
the same: the console provided the
brainpower, while the cartridge provided the instructions.
We dare to be different. In our case,
each plug-in game cartridge will
contain its own Arduino microcontroller with the game code stored in
its flash memory, thereby making it
an independent computing node. In
this case, the console itself becomes
more of a shared backplane that supplies power, buttons, and displays.
The cartridge plugs in, commandeers
the hardware, and away we go.
The bottom line is that, although
25-way D-sub connector
(game cartridges plug in here)
7-Segment
Displays
Power
Jack
From external supply
VIN- (0V)
Reset
Button
VIN+ (9V)
14 x 10
Tricolor
LED Array
9V
0V
DC-to-DC
converter
0V
5V
To array and displays
R
Y
Action
Controls
N
W
G
B
E
Direction
Controls
N
(a) Front view
15-way D-sub connector
(additional controls can plug in here)
(b) Back view
Fig.2: the main elements of the retro games console.
Practical Electronics | February | 2026
5
9V
0V
N
S
RCLK
W SER
E
Vin 0V
5V D3 D5 D7 D9 D11 D13
1
3
2
4
5
6
7
8
9
Inside
the case
A1
A3
A5
10 11 12
13
14 15 16 17 18 19 20 21 22 23 24 24
0V
0V
D2 D4 D6 D8 D10 D12 RES A0
R
Y
G
A2
A4
SRCLK
B
To/from
Arduino
outside
the case
Inside
the case
NEOS RESET
Fig.3: the connections that need to be made on the 25-way connector.
our design isn’t a faithful recreation
of how retro game cartridges worked
internally, it does capture the spirit
of slotting in a physical game module
and instantly transforming the experience. And, honestly, that’s half
the fun.
Feeling connected
Let’s start with the 25-way D-sub
connector mounted at the top of the
enclosure (Fig.2). If we imagine ourselves peering at it from the inside
of the enclosure, the pinout we’d see
is shown in Fig.3. In this first pass,
I’m only going to wire (and use) the
connections shown in black. I’ll add
Photo 2: just call me a soldering fool.
6
the connections shown in red at a
later date.
The 9V and 0V (GND) power supply
signals inside the enclosure will be
wired to pins 1 and 2 on the connector,
respectively. In turn, these supplies
will be fed to the Arduino’s VIN and
0V (GND) pins on the game cartridge.
The north (N), south (S), east (E) and
west (W) direction control switches
inside the enclosure will be wired to
connector pins 4, 5, 6, and 7, respectively. In turn, these signals will be
fed to the Arduino’s digital D3, D5,
D7 and D9 pins on the game cartridge.
The red (R), yellow (Y), green (G)
and blue (B) action control switches
inside the enclosure will be wired to
connector pins 16, 17, 18, and 19,
respectively. In turn, these signals
will be fed to the Arduino’s digital
D2, D4, D6 and D8 pins on the game
cartridge.
The black reset button on the side
of the enclosure will be wired to pin
22 on the connector. This signal will
be fed to the Arduino’s RESET input
on the game cartridge.
Meanwhile, the Arduino will con-
trol the 14 × 10 array of tri-colour
LEDs (aka Neopixels) using its digital
pin D10, which will be fed from the
cartridge to pin 20 on the connector.
In turn, we will wire this pin to the
input of our array.
Similarly, the Arduino will control
the 7-segment display modules using
its digital pins D11, D12, and D13,
which will be fed from the cartridge
to pins 8, 21, and 9 on the connector.
In turn, we will wire these pins to
the SER (serial data in), SRCLK (shift
register clock), and RCLK (output
register clock) pins on our display
modules, respectively.
I messed up here because I started
by jotting down my connection plans
on a piece of paper, which eventually
became Fig.3. I then wired things up
as per my jottings (Photo 2). It was
only after I’d finished that I realised
I’d transposed the SRCLK and RCLK
signals on my original diagram.
That is, in our earlier programs,
we used to drive each of these signals with the other’s pin (if you see
what I mean). Fortunately, the solution to this was easy-peasy lemon
squeezy; all I had to do was swap
these pins in my code, but we will
return to that later.
For future reference
For this initial trial, I didn’t bother
wiring up the 15-way D-sub connector mounted at the bottom of the enclosure. As you may recall, this is intended to allow additional controls
and sensors mounted on a mini console to be plugged in at some point
in the future.
You can, of course, wire your
system up as you wish. For the sake
of interest, the way I’m currently
planning to wire my 15-way connector is illustrated in Fig.4. Once
again, I’m imagining that we are peering at this connector from inside the
enclosure.
The way I’m envisaging things, we
Outside
5V 0V
N
S
E W
would feed 5V and 0V
the case
(GND) from the main
console to power any5V 0V A1 A5 D3 D5 D7 D9
thing that needs powering on the mini console.
We could have a
Inside
1 2 3 4 5 6 7 8
second set of action
the case
9 10 11 12 13 14 15
and direction buttons mounted on the
mini console, perA0 A2 A4 D2 D4 D6 D8
haps for use in twoplayer games. Alternatively, we could
Outside
R
Y
G
B
mount two four-way
the case
momentary-c ontact
joystick switches on
Fig.4: the connections to the 15-way connector.
Practical Electronics | February | 2026
0V
RESET
22, RES
5
0V
N
4, D3
6
0V
0V
0V
0V
S
E
W
R
5, D5
7
6, D7
8
7, D9
12
16, D2
13
0V
0V
Y
G
17, D4
14
18, D6
15
0V
B
19, D8
25-Way
15-Way
Fig.5: the console switch wiring.
the mini console. In both these cases,
the signals from these switches/joysticks would be wired in parallel to
the switches inside the main console.
Instead of using 4-way momentary-
contact joystick switches, we could
add two two-axis analog joysticks to
the mini console. Each of these joysticks would have two analog outputs. We could feed these to the A0,
A1, A2 and A4 pins on the connector.
Inside the main console, these pins
would be wired to the corresponding A0, A1, A2, and A4 pins on the
25-way connector, which would then
feed them into the processor on the
game cartridge.
Did anything catch your eye in
Fig.4 and in the preceding paragraph?
You’re right; there’s no A3 pin. That’s
because I ran out of pins on the connector. We could move to using a
bigger connector, but I’m happy with
the 15-way one we currently have.
So, why do I show A0, A1, A2, A4,
and A5 in Fig.4 (as opposed to A0,
A1, A2, A3, and A4)? The reason is
that on the Arduino Uno R3 (which
we are using), the primary I2C pins
are A4 (the data line, SDA) and A5
(the clock line, SCL).
Maintaining access to these lines
means we have the ability to deploy
all sorts of I2C sensors (such as a threePractical Electronics | February | 2026
Photo 3: wiring is fun…
axis accelerometer and/or a threeaxis gyroscope) via our mini-console.
As one final point, just as we can
create multiple plug-in game cartridges, we can also create multiple
plug-in mini consoles. The world
truly is our lobster (or crustacean of
your choice).
The old switcheroo
Last, but certainly not least, we have
to wire our switches to the 25-way
connector (and the 15-connector, at
some stage), as illustrated in Fig.5.
Switches are usually reliable. It’s
relatively rare in the scheme of things
that you end up with a duff switch.
On the other hand, it can happen, so
…but not as fun as finishing!
it’s a good idea to use the continuity
tester on your multimeter to verify
that your switches work before you
attach them to the console (or, at least,
before you start soldering wires to
them). This takes only a minute, and
it can save much hair-pulling later.
The result of my wiring frenzy is
shown in Photo 3.
A plan of action
Once all the wiring was completed, the next thing I did was to create
a plan of action (“If we don’t have a
plan, we’re no better than the French”,
as the old saying goes). [No doubt
there’s a French saying that translates
as “If we don’t have a plan, we’re
7
no better than the English” – Editor]
There are three main aspects of the
console that we need to test before
proceeding further:
• The 7-segment displays
• The 14 × 10 array
• The switches
I decided to start with the low hanging fruit in the form of the 7-segment
displays. I took the final program from
our previous column (January 2026)—
the one that displayed a level from 1
to 9 coupled with a score counting
up from 0000 to 9999—and I tweaked
the pins to match my wiring ‘gotcha’
as discussed earlier in this column.
This means we now have the SER,
SRCLK and RCLK signals connected
to Arduino pins 11, 12, and 13, respectively.
I uploaded this new program into
the Arduino before I connected it to
the console, just to be sure I had a
clue what it would do when I powered everything up. I’ve made a copy
of this updated version of the code
available in the file named CB-feb26code-01.txt (as usual, all files mentioned in this column are available
as part of the February 2026 download package from the PE website at
https://pemag.au/link/ac9p).
A roll of drums
In our next column, we will create
our Arduino-Uno-based game cartridge. In the meantime, I just happened to have a DB25 male-to-barewire connector in my treasure chest
of parts (Photo 4).
These are available on Amazon
(https://pemag.au/link/ac9q). The
great thing is that all the wires are
different colours, and each end has a
little band with the pin number printed on it. They are quite expensive, so
I wouldn’t suggest buying one just for
this project. On the other hand, if you
happen to have one lying around…
I chopped the existing pins off the
ends of the wires (they were too big
to plug into my Arduino’s headers),
used my crimping tool to attach appropriate pins, and then plugged them
into my Arduino. Next, I plugged the
other end of the cable into my console. Remember that the Arduino will
now be powered from the console, but
we’ll still need to use the USB cable
to upload future programs into it.
This is the point in a project when
one’s heart is in one’s mouth. When
you apply power, will everything work
as planned (hey, it could happen!),
will your creation simply sit there
sadly, or will it add a little excitement
to your life by bursting into flames?
When you’ve been at this game as
long as I have, you’ll have sampled
8
Photo 4: a handy-dandy DB25
male-to-bare-wire connector.
the delights of all three scenarios.
The first thing I did was power up
my bench power supply and set the
voltage to 9V and the current to 2A. I
connected the supply to the console,
then I pressed the “Output” button. I
was poised to power down if I heard
or smelled anything untoward and…
nothing happened. “Oh, bother”, I
said (or words to that effect).
I looked at the displays on the bench
power supply. The voltage showed
9V, but the current showed 0A. Then
I looked lower and realised that the
positive wire had somehow become
disconnected from the supply. Phew!
So I powered it down, reconnected
the errant wire, and repeated the
power-up process.
It worked! The count commenced
as expected. I was wearing my happy
face. I pressed the reset button on the
console. That worked too. I felt a roll
of drums was in order, but there’s
never a drummer around when you
need one, so I had to make do with
an imaginary drum roll in my head
(my ears are still ringing).
Testing the main 14 × 10 array
The next step was only a little
more complicated. First, I took the
latest and greatest program we created to drive our 14 × 10 array, from
the May 2025 issue. This is the one
that repeatedly draws randomly sized
rectangles at random locations on
the display. Furthermore, each rectangle has a random outline colour
and a (different) random fill colour.
I changed the pin number driving
the Neopixel string to 10 to match the
wiring in the console. I also copied
just enough of the 7-segment display
test code to clear the 7-segment displays and set their control pins to
their inactive states. If I hadn’t done
this, the control pins would have been
left in high-impedance states, which
would have resulted in the 7-segment
Practical Electronics | February | 2026
If all 0s
WFZ
Note: All switches are active-low
JGA
If not
all 0s
Names of states
If not
all 1s
WFZ = WAITING_FOR_ZEROS
JGA = JUST_GONE_ACTIVE
WFO = WAITING_FOR_ONES
JGI = JUST_GONE_INACTIVE
WFO
Names of functions
JGI
UpdateSwitches()
ProcessSwitches()
If all 1s
Fig.6: our new switch debounce state machine
displays flickering annoyingly with
random values.
Oh Joy! This program also worked
the first time. I was on a roll. I’ve
made a copy of this code available in
the file named CB-feb26-code-02.txt.
Testing the switches
My final test involved the switches.
When we last looked at debouncing
switches (August 2025), we were working with three breadboard-mounted
momentary pushbuttons with a mix
of active-high and active-low states.
Since all the switches on our console
are active low, I decided to update the
state machine we are using. The new
version is depicted in Fig.6.
Next, I took a copy of our latest
switch debounce code (August 2025)
and modified it to handle our eight
switches using our new state machine.
VERY IMPORTANT: I don’t know
if you noticed in Fig.5 that we aren’t
using any pull-up resistors with our
switches. In this case, we declare these
pins as INPUT_PULLUP in our code,
which activates the Arduino’s internal pull-up resistors (yes, of course
we could have done this before, but
where would the fun be in that?).
Once again, I copied just enough
of the 7-segment display test code to
clear the 7-segment displays and set
their control pins to their inactive
states. Also, I copied just enough of
the 14 × 10 array code to ensure that
the array was initialised and deactivated. I’ve made a copy of this code
available in the file named CB-feb26code-03.txt.
As you may recall, in our switch
handling code, we first call our
UpdateSwitches() function, which
cycles through all the switches,
reads their states, and updates their
state machines. Then we call our
ProcessSwitches() function, which
deals with any game-specific actions.
For example, the game-specific
code associated with the north (N)
switch in our current test program
is shown in Listing 3(a). Remember,
we’re using the convention that the
listing number (3 in this case) corresponds to the numerical part of the
matching code file name (“03” here).
The way we’ve architected this means
we can use the same code across all
our future game programs. All we will
need to do is modify the ‘Optional
(game-specific)’ part of the code. For the
moment, all we are doing is pressing
the switches and ensuring that the appropriate messages appear in the serial
monitor window. In my case, I’m seeing:
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
:
Switch North just went active
Switch North just went inactive
Switch South just went active
Switch South just went inactive
Switch East just went active
Switch East just went inactive
Switch West just went active
Switch West just went inactive
:
This is where we ensure the switches are wired to the correct pins on the
connector. If we’ve made any mistakes,
we can easily rectify them by tweaking
the pin definitions in our code.
Next time
We’ve made great progress in getting
the games console working this month!
Our next column will be the final
one in this project (although we will
still add new games and things in the
future). We will start by building our
first game cartridge and creating our
first game. In the meantime, you could
create a test program of your own.
How about a simple Etch-A-Sketch
program? You could start by flashing a
cell in the middle of the array with one
of our four action button colours (red,
yellow, green, or blue). Pressing one of
the north, south, east, or west direction
buttons could lock this colour into this
cell and advance the cursor (the active
flashing cell) in the specified direction.
Pressing one of the action buttons
could change the selected colour.
If you have any thoughts on anything
you’ve read here, please feel free to email
PE
me at max<at>clivemaxfield.com
// Switch North
if (Switches[SW_NORTH].swState == JUST_GONE_ACTIVE)
{
// Mandatory
Switches[SW_NORTH].swState = WAITING_FOR_ONES;
// Optional (game-specific)
Serial.println("Switch North just went active");
}
else if (Switches[SW_NORTH].swState == JUST_GONE_INACTIVE)
{
// Mandatory
Switches[SW_NORTH].swState = WAITING_FOR_ZEROS;
// Optional (game-specific)
Serial.println("Switch North just went inactive");
}
Listing 3(a): a portion of our new switch handling routine.
Devices and components used in this issue
Arduino Uno R3 microcontroller module
Dual 7-segment display modules
PCB spacer kit (black, M3)
Pushbuttons (assorted colours)
2.1mm panel-mount DC power socket
2.1mm standard DC power plug
25-way D-Sub panel-mount socket
15-way D-Sub panel-mount socket
22 AWG multicore wire kit
Practical Electronics | February | 2026
https://pemag.au/link/ac2g
https://pemag.au/link/ac8i
https://pemag.au/link/ac4u
https://pemag.au/link/ac2t
https://pemag.au/link/ac2v
https://pemag.au/link/ac2w
https://pemag.au/link/ac2x
https://pemag.au/link/ac2z
https://pemag.au/link/ac3m
9
|