This is only a preview of the January 2025 issue of Practical Electronics. You can view 0 of the 80 pages in the full issue. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Items relevant to "Raspberry Pi-based Clock Radio, part two":
Articles in this series:
Items relevant to "Secure Remote Mains Switch, part two":
|
Max’s Cool Beans
By Max the Magnificent
Weird & Wonderful
Arduino Projects
Part 1: DIP LED bar graph displays
W
ell, hello there. It’s so nice to
see you. I can’t believe we’re
meeting in the January 2025
issue of Practical Electronics.
I don’t want to scare you, but do
you realise that we are now a quarter
of the way through the 21st Century?
I graduated from high school towards
the tail-end of the last millennium.
That was in the summer of 1975, when
the year 2000 was still a quarter of a
century into my future.
It feels like I only recently recovered
from my enthusiastic contributions to
the Y2K celebrations, yet I now find
them to be well in the rearview mirror of
my life, rapidly receding at a pace that
appears to be irresponsibly increasing.
I’m too young for all this excitement!
Originally aimed at the experimenter, PE began publication in the UK in
December 1964. My parents took out
a subscription for me starting on my
They call me “Mad
Max”, but I’ve never
been able to figure
out why...
twelfth birthday, in May 1969. At that
time, I envisaged the authors of the articles I was eagerly devouring as being
an august ensemble of stately scientists, distinguished technologists, and
erudite engineers.
I visualised them in deep discourse,
capturing their cunning circuits on
colossal chalkboards, wearing crisp
white lab coats, sporting pocket protectors, wielding slide rules and boasting super-size brains.
It never struck me that I would one
day count myself as a member of their
guild. I even have my own lab coat, as
shown in the photo on my driver’s license, reproduced below!
When I became a member of the PE
community in 1969, the introduction
of the first commercial microprocessor, the Intel 4004, was still two years
away. Most of the magazine’s construction projects in those halcyon days fea-
tured discrete (individually packaged)
resistors, capacitors, inductors, diodes,
and transistors. Some of the projects
still employed vacuum tubes.
Now we’re going to turn our attention to the shiny new series we have
promised above. If you’ve been a fan
of our Arduino Bootcamp series, fear
not, for towards the end of this article, we shall turn our attention to it
one last (?) time.
We will help out a reader who ran
into some difficulty driving the 7segment LED displays (Fig.1) in our example clock circuit. We’ll also ponder
what could be done to enhance the
clock we finished creating last month.
Weird and wonderful
The subtitle to this section does
not, in fact, refer to me. Rather, it reflects the fact that, as our new column
banner suggests, this article marks the
first in a series of Weird & Wonderful
Arduino Projects.
As usual, my poor old noggin is buzzing with ideas. At some stage, we might
even decide to use our existing chronometer as the foundation for our very
Fig.1: a trusty 7-segment display.
Practical Electronics | January | 2025
7
own Vetinari Clock (to be discussed later
in this column), for example.
In addition to building some mindboggling devices, mad scientist style,
we will also consider the code required
to power them. Along the way, we will
explore fundamental hardware and
software concepts.
The more we know, the easier things
become, and I don’t recall ever learning
anything that didn’t eventually come
in handy (sometimes when I least expected it).
And, just for giggles and grins, we
are going to peruse and ponder any
nuggets of knowledge and tidbits of
trivia that tickle my fancy, commencing with…
LED bar graph displays
If you’ve been implementing the circuits in our Bootcamp series, you are
already the proud processor of a collection of useful bits and pieces, such
as breadboards, jumper wires, resistors,
capacitors, LEDs etc. By comparison, if
you are starting from scratch, then I’ve
listed the parts we are going to reuse
in the “Components” table towards
the end of this column.
I should note that the experiments
we are going to perform in this column
could be implemented using discrete
LEDs from your existing ‘box of bits’.
For myself, however, I really, really
like LED bar graph displays presented in dual in-line (DIL) packages (DIL
package can be abbreviated to “DIP”).
These little rascals come in many
versions and colours, such as 5segment displays (https://pemag.
au/link/ac28), 10-segment displays
(https://pemag.au/link/ac29), threecolour 10-segment displays (https://
pemag.au/link/ac2a), and four-colour
10-segment displays (https://pemag.au/
link/ac2b), to name but a few.
We are going to use yet another variation, a single 8-segment red LED display
(Fig.2), but it’s always a good idea to get
one or more spares. I found a five-pack
of these little scamps on Amazon for
£7.66 (https://pemag.au/link/ac2c), but
I’m sure you can obtain them cheaper
elsewhere (eg, try AliExpress).
Setting up our breadboard
For the purposes of these experiments, we are going to employ a single
full-size breadboard. We will set this
up in the usual way (Fig.3).
Any newcomers to our party who
are unfamiliar with breadboards can
peruse a handy-dandy column on the
subject “wot I wrote earlier” (https://
pemag.au/link/ac17).
There’s a lot going on in this diagram,
so let’s take things step-by-step, starting with the fact that I like to orientate my breadboards such that I have
a red power rail at the top and a blue
ground rail at the bottom. In this case,
we’re bringing the power (5V) and
ground (0V) from our Arduino Uno
into the lower left-hand corner of the
breadboard.
The first thing we do is use jumper
wires to connect the lower pair of
power and ground rails to the upper
pair. Also, we insert a 16V 100µF electrolytic capacitor straddling the power
and ground rails, as close as possible
to where the wires from the Arduino
enter the breadboard.
As we discussed in an earlier column
(PE, August 2024), this type of capacitor looks like a small drink can
with two legs. It’s a polarised component, which means there are two ways
around you could connect it, but only
one is correct.
The longer lead is the ‘anode’, which
must connect to the more positive rail
(the 5V rail, in our case). The shorter
lead is the ‘cathode’, which is connected to the more negative rail (the
0V rail, in our case). The cathode side
of the can is also marked with a stripe
with minus signs, to give us a clue.
This capacitor filters out any electrical noise from the power source, which
is the Arduino in our case. It will also
help to smooth out any power dips
caused by components switching and
briefly drawing extra current.
With some breadboards, the power
and ground rails span the length of the
board. Other boards have split rails, in
which the rails on the left- and righthand sides of the board are separated.
Split rail boards are useful if we wish
to employ multiple power supplies (eg,
5V and 3.3V) and/or multiple ground
rails (eg, analog and digital grounds).
However, they can be a pain in the
rear if you don’t realise you are working with this type of board.
If you aren’t careful, you can spend
an inordinate amount of time trying
to debug a seemingly faulty project,
only to discover that one side of your
circuit is without power! Even worse,
the unpowered part of the board can
‘appear’ to have at least partial power
for a variety of reasons, such as power
flowing into chips via their signal
inputs.
I learned this at my cost, which is
why I always add wires linking both
sides of the power and ground rails in
the centre of the board ‘just in case’.
Another thing I do is add a longtailed header pin somewhere on the
lower ground rail. I’ve shown this on
the right-hand side of the rail in Fig.3,
but I typically locate it as close as possible to the ground wire coming from
the Arduino.
This pin often proves useful later
for probing things with our multimeter (it doesn’t hurt to have a few more
distributed around the ground rails).
Last, but not least, I like to add LEDs
at the opposite ends of the power and
ground rails to where the power is
coming into the board. Whenever I
power my board up in the future, these
Links in case this happens to be a split rail board
Top view
a
Side view
k
a = anode
k = cathode
a
k
Soldered joints
0.1" pitch header pin pair
Top
view
16V 100µF Electrolytic Capacitor
+5V
GND
Fig.2: an 8-segment red LED bar graph.
8
From Arduino
Header pin
(GND connection)
16V 100µF
Electrolytic
Capacitor
16v100uF
Side
views
a
k
k
a = anode (+ve)
k = cathode (-ve)
Fig.3: our initial breadboard setup.
Practical Electronics | January | 2025
LEDs immediately inform me that all
is right with the world (at least, my
breadboard world from a power and
ground perspective).
I’m showing green and blue LEDs
here. I’m also showing current-limiting
resistors of 470Ω (with yellow-violetbrown colour bands).
I’m assuming that these green and
blue LEDs have a forward voltage drop
of 3V (we discussed the concept of a
diode’s forward voltage drop in PE,
March 2024).
Our Arduino Uno gives us a 5V
supply, so using Ohm’s law of V = I
× R, and rearranging things to give I
= V / R, we know that I = (5V – 3V) /
470Ω = ~4mA, which will make our
LEDs bright enough to be seen without making our eyes water.
We could connect these LEDs and
their current-limiting resistors directly
into the breadboard. However, as we
discussed in a previous column, and
as illustrated in Fig.3, it’s a good idea
to build a bunch of little LED-resistor
assemblies, each mounted on a pair
of 0.1-inch (2.54mm) pitch long-tailed
header pins, that can be quickly and
easily reused in future projects.
It doesn’t matter whether the resistor is soldered to the anode or cathode
terminal of the LED; they just need to
be in series with each other. Having
said that, I always connect the resistor in-line with the anode terminal
because it makes it easy for me to remember which way to plug them into
my breadboard.
As we discussed in a previous
column, and based on what is to come,
if you aren’t used to soldering, now is
a good time to start learning. A great
resource is The Basic Soldering Guide
Handbook, which was written by PE’s
a
14
1
2
3
4
13
5
12
6
7
8
9
1
2
3
4
16
5
6
7
8
9
k
15
11
10
(a) 8-segment bar display
very own Alan Winstanley and is available on Amazon (https://pemag.au/
link/ac2d).
To aid in setting up our breadboard,
you can download a PDF of our new
setup (with a file name of CB-Jan25brd-01.pdf). As usual, all the files mentioned in this column are available
from the January 2025 page of the PE
website: https://pemag.au/link/ac2e
Testing, testing…
If you don’t already own a digital
multimeter, now would be a really
good time to invest in one (we discussed different types, tradeoffs, and
how to use these in PE, August 2024).
For what we are doing here, I suggest a cheap-and-cheerful manualranging device, such as the ULTRICS
Digital Multimeter, which is available
for only £7.99 from Amazon at the time
of writing (https://pemag.au/link/ac2f).
Let’s start by verifying the probe connections at the multimeter end. The
black wire should be plugged into the
“COM” port and the red wire should be
plugged into the “VΩmA” port.
Plug the USB cable into your Arduino to power everything up and verify
that the green and blue LEDs straddling
the power and ground rails at the top
and bottom of the breadboard light up.
Now, set your multimeter to the 20V
DC range and use its probes to check the
voltage across the power and ground
rails. The easiest (most accessible)
points to probe are the header pin connections forming the LED assemblies.
As a rule-of-thumb, I typically apply
the black probe first (although the multimeter doesn’t ‘care’ which you connect first). Start with the pair of rails
at the bottom of the board and then the
pair at the top of the board.
Ideally, you should
get 5V readings, but the
Arduino’s supply isn’t
ferociously robust, so
you may have a slightly lower reading, like
4.9V, for example. If
your reading is sub(c) 8-resistor SIP
stantially lower than
that, you have a problem, possibly even a
bad breadboard. If you
get a negative reading
like –5V, you’ve probably applied your probes
the wrong way around.
Adding our bar graph
(b) Using discrete resistors
(d) Using an 8-resistor SIP
Fig.4: adding an 8-segment bar graph display.
Practical Electronics | January | 2025
Before you do anything else, unplug the
USB cable from your
Arduino to power everything down. Remember that LEDs can be
damaged by electrostatic discharge
(ESD), so make sure you are doing
everything on your antistatic mat and
that you are wearing your antistatic
wristband (all this was discussed in
PE, January 2023).
Observe the 8-segment bar display
illustrated in Fig.4(a). As we previously
discussed, this is in a DIP.
It can be tricky to determine which
is pin 1 on the package. If you look
closely, you’ll discover that there’s a
slight chamfer on the pin 1 corner of
the plastic. I’ve shown a zoomed in
view of this chamfer in Fig.4(d).
To the best of my knowledge, the
LEDs are always presented as shown
in Fig.4(a), with their anodes on the
left and their cathodes on the right.
However, I don’t know if this is a rule
that’s set in stone, and it can be tortuously tricky to track down the data
sheets for these components, so I always
test things first.
Happily, if you do happen to deploy
the device the wrong way around, the
only thing that will happen is that your
LEDs won’t light up.
Plug your bar display and resistors into your breadboard as shown
in Fig.4(b). I’m going to use discrete
560Ω resistors (with green-blue-brown
bands) as shown.
Why 560Ω? In the future, we are
going to use a 74xx595 shift register to
drive this display. As we know from our
previous column (PE, December 2024),
the 74xx595’s outputs can supply only
6mA. We know that the supply voltage from the Arduino Uno is 5V. We
also know that our red segment LEDs
have a voltage drop of 2V.
Using Ohm’s law of V = IR, and rearranging things to give R = V / I, our
ideal resistors would be (5V – 2V) /
0.006A = 500Ω, and 560Ω is the closest
(higher) value I have on hand.
And why am I using discrete resistors, instead of the DIL resistor packs we
used before? When we look at Fig.4(b),
we see that we would have to add a
second breadboard to use those devices
(we will require the remainder of our
current board for future experiments).
There is another alternative: single
in-line (SIL) resistor package, where SIL
package can be abbreviated to “SIP”.
These come in myriad sizes and flavours. The one we would use would
be a 9-pin package containing eight
560Ω resistors sharing a common pin,
as in Fig.4(c).
Using a SIL package would make
our lives easier, but I don’t have one
to hand, which is why I’m using discrete resistors.
Next, add a flying lead as shown in
Fig.4(b) and Fig.4(d). Power up your
Arduino and use the flying lead to
9
probe each segment anode as indicated by the red circles.
If only one or two LEDs fail to light,
you may have a bad display, so try
swapping it with your spare. If none
light up, the three prime possibilities
are: (a) you have a broken flying lead,
(b) you’ve inserted your display the
wrong way around, or (c) your display has the anodes and cathodes in
the opposite orientation than expected.
Once you have everything up and
running and you’ve verified that all
your LEDs are working as expected,
power everything down and proceed
to the next section.
Connect your Arduino
This is where things start to get even
more exciting. Connect digital outputs
D2 through D9 from your Arduino to
your breadboard as shown in Fig.5
(you can download a PDF of our new
setup with a file name of CB-Jan25brd-02.pdf).
Next, let’s create a simple program as
illustrated in Listing 1 (you can access
this code in the file named CB-jan25code-01.txt).
Most of this is self-explanatory.
The interesting part occurs in the
for( ) loop that starts on Line 36. The
index to this loop, iSeg, will count
from 0 to 7. For each index value, we
call the digitalWrite() function.
This function has two arguments.
The first is the pin to which we wish
to write a value. In this case, we are
using the current value of iSeg to
retrieve the required pin number from
our PinsSegs[] array.
The second argument is the value
we wish to write to the selected pin.
In this case, we are using Arduino’s
built-in random() function to generate
a random value between 0 and 1 (like
flipping a coin).
So, why are we using random(0,2)?
This function generates a random integer between the minimum value (0
in our case) and the maximum value
minus 1 (don’t ask). Since we’ve defined our maximum value to be 2, the
result will be a random 0 or 1.
The bottom line is that our for( ) loop
will assign random 0 and 1 values to
the 8 pins driving our display. As we
discussed in PE, March 2023, the Arduino treats 0 and 1 as being synonymous with LOW and HIGH, respectively.
Once we’ve assigned these random
values and activated or deactivated the
segments on our display, the delay on
Line 40 causes it to pause for a second
before it does it all again. The result
is to present a never-ending series of
random bit patterns on the display.
While we’re waiting for next month’s
column, let’s all think about some other
interesting patterns to display—we can
compare ideas when next we meet.
A retro games console
We still have some more experiments
to perform before we proceed to our
first Weird and Wonderful creation. To
give you a tiny teasing taste of what
is to come, I just tossed a metaphorical penny in the air. Wow! Our virtual coin landed furble side up, which
means our first project is going to be a
retro games console. I was hoping this
would be the case (what are the odds?).
I feel the use of the word “retro”
adds a certain something to the proceedings. However, “retro” in this context may be taken to mean “big, bulky,
and somewhat ungainly” while, ironically, combining a lack of processing
power with a huge hunger for electrical power).
In addition to boasting a 14 × 10
array of tri-coloured LEDs, this will
also involve six 7-segment displays
// 8-Segment Displays (General)
#define NUM_SEGS
8
#define SEG_ON
HIGH
#define SEG_OFF
LOW
// Extras
#define CYCLE_TIME
1000
// Declare pins driving the display
int PinsSegs[NUM_SEGS] =
{2, 3, 4, 5, 6, 7, 8, 9};
// Do this one time
void setup ()
{
// Initialize everything
{
for (int iSeg = 0; iSeg < NUM_SEGS; iSeg++)
{
pinMode(PinsSegs[iSeg], OUTPUT);
digitalWrite(PinsSegs[iSeg], SEG_OFF);
}
}
~10
~9
8
7
~6
~5
4
~3
2
TX-1
RX-0
}
DIGITAL I/O (PWM ~)
Arduino
Fig.5: connecting the Arduino.
10
delay(1000); // Just because
// Do this over and over again
void loop ()
{
for (int iSeg = 0; iSeg < NUM_SEGS; iSeg++)
{
digitalWrite(PinsSegs[iSeg], random(0,2));
}
delay(CYCLE_TIME);
}
Listing 1: our first test program!
Practical Electronics | January | 2025
Photo 1: an early version of our
retro games console (courtesy Joe Farr).
driven by… wait for it… wait for it…
you’ve guessed it… shift registers! (It’s
almost as if we have a clue where we
are going and what we are doing, but
let’s not get carried away).
We will, of course, be powering this
beast with our trusty Arduino Uno.
However, my chum, Joe Farr, has already implemented a PIC-based version
of this bodacious beauty (see Photo 1).
Apart from anything else, once we’ve
built the base, we can use it as a platform to experiment with various sensors and actuators.
I’m already researching all the bits
and pieces we’ll need. We’ll reconvene
in next month’s column and commence
work on this awesome device that will
make you the envy of your family and
friends. You will be the first on your
street to own one of these soon-to-be
collector’s items!
Now let’s have a look at some of the
leftovers relating to last month’s final
Arduino Bootcamp instalment.
Tick, tock, tick…… TOCK!
It probably won’t surprise you to
learn that I’m a huge fan of the Discworld novels by the late, great Terry
Pratchett. One of Terry’s characters,
Lord Vetinari, is the dictator of the
city-state of Ankh-Morpork.
The clock in Lord Vetinari’s waiting
room maintains accurate time overall,
but it sometimes ticks and tocks out of
Practical Electronics | January | 2025
sync: “tick-tock, tick-tock… tick-tocktick… … tock.” In fact, it occasionally
misses a tick or a tock altogether.
According to the author, the result is
somewhat discombobulating for those
for whom an audience is looming.
Why am I waffling on about clocks?
Well, if you’re a long-standing subscriber to PE, you’ll know that we’ve
just finished a series of Arduino Bootcamp columns.
In those, we used an Arduino Uno
R3 microcontroller board and two
breadboards to connect various bits
and pieces, including a real-time clock
(RTC) breakout board (BOB) and four
7-segment displays.
In turn, we used our displays to present the current time in HH:MM format.
Internally, these displays are implemented using light-emitting diodes
(LEDs). While LEDs are a relatively
recent development, a 7-segment display illuminated by incandescent bulbs
was used on a power-plant boiler room
signal panel as far back as 1910.
Useful Bits and Pieces from Our Arduino Bootcamp series
Arduino Uno R3 microcontroller module
Solderless breadboard
8-inch (20cm) jumper wires (male-to-male)
Long-tailed 0.1-inch (2.54mm) pitch header pins
LEDs (assorted colours)
Resistors (assorted values)
Ceramic capacitors (assorted values)
16V 100µF electrolytic capacitors
Momentary pushbutton switches
Kit of popular SN74LS00 chips
74HC595 8-bit shift registers
https://pemag.au/link/ac2g
https://amzn.to/3O2L3e8
https://amzn.to/3O4hnxk
https://pemag.au/link/ac2h
https://amzn.to/3E7VAQE
https://amzn.to/3O4RvBt
https://pemag.au/link/ac2i
https://pemag.au/link/ac2j
https://amzn.to/3Tk7Q87
https://pemag.au/link/ac2k
https://pemag.au/link/ac1n
Other stuff
Soldering guide
Basic multimeter
https://pemag.au/link/ac2d
https://pemag.au/link/ac2f
Components for Weird & Wonderful Projects, part 1
4-inch (10cm) jumper wires (optional)
8-segment DIP red LED bar graph displays
https://pemag.au/link/ac2l
https://pemag.au/link/ac2c
11
Before we proceed, it’s worth reminding ourselves that so-called
7-segment displays have an eighth decimal point segment that, as we will discuss, can reflect additional information.
During our Bootcamp columns, we
experimented with various components. We practised making sounds and
playing notes using a passive piezoelectric buzzer. We detected the level of
ambient light using a sensor called a
light-dependent resistor (LDR), then we
used the readings from this sensor to
control the brightness of our displays.
We also employed an ultrasonic
sensor to annoy our household pets
measure distances and present the resulting values on our displays.
Of particular interest were the different techniques we used to drive our
displays. We commenced by using eight
pins from the Arduino to directly drive
the segments on one of our displays.
Next, we learned how to multiplex
multiple displays.
We then took an in-depth look at
binary coded decimal (BCD) and used
BCD decoder integrated circuits (ICs) to
drive our displays. Finally, we moved
to using shift register ICs to control our
displays (phew!).
Wait! What?
Literally as I was scribing the preceding section, I received an email from a
PE community member we’ll call Ian
(because that’s his name).
It seems that Ian had just battled his
way through the PE November 2024
column in which we transitioned from
using 74LS48 (TTL technology) BCD
decoders to using CD4511 (CMOS technology) BCD decoders. In his plaintive
plea for assistance, Ian spake as follows:
Hi Max, I need some help. I’ve had
significant success with my clock over
the last couple of months, but this
latest incarnation is driving me mad.
Apart from its other faults, it hates
the number 8. Below is an example
of what it displays (the dash characters appear as blanks on the displays).
Actual time
14:30
14:31
14:32
14:33
14:34
14:35
14:36
14:37
14:38
14:39
14:40
14:41
14:42
Displayed time
14:30
14:31
14:37
14:37
14:34
14:37
14:37
14:37
14:3–
14:3–
14:44
14:41
14:47
Every time it gets to an 8, the display
goes blank. It’s even worse at 8am
when it is supposed to display 8:00
but I get 9:9–. This continues until 8:07
when it displays 9:97, then at 8:10 it
displays 8:11.
Every component on the board has
been replaced at least once, but it made
no difference. I have even completely
rewired the board. See the attached
photo. I have checked this a million
times and am convinced there are no
errors. If you have any suggestions as
to what I can try, I would be extremely grateful.
Best regards, Ian.
Ian’s photo is reproduced below with
his permission. Take a few moments to
ponder this image. Can you perceive
any potential problems?
I did what I usually do at times like
this. I FaceTimed my chum Joe Farr
This sort of pattern repeats itself.
Photo 2: see if you can figure out
why it doesn’t work...
12
Practical Electronics | January | 2025
because (a) debugging someone else’s
project can be a real pain, (b) “two
heads are better than one,” as they say,
and (c) Joe and I are constantly bouncing ideas back and forth, so this was a
good excuse for a chat.
In fact, resolving this one proved to
be easy-peasy lemon squeezy (which
is rarely the case). When we looked
closely at Ian’s photo, several problems became apparent:
1. The use of wood screws to secure
the breadboards and their power
strips to the wooden baseboard is
a big “No-No!” These are short circuits waiting to happen. Ian is lucky
he didn’t short out his power and
ground rails.
2. Ian is powering his Arduino via its
5V pin but this is intended to be used
as an output, not an input. Supplying power via the 5V pin bypasses
the onboard voltage regulator, so any
fluctuations or spikes in his power
supply could damage the Arduino.
Similarly, connecting the USB cable
to the Arduino while applying power
via the 5V pin also runs the risk of
damaging the Arduino.
3. Ian said, “I have checked this a million times and am convinced there
are no errors”. Well, we’ve all ‘been
there and done that’. A closer look at
Ian’s photo reveals that he forgot to
connect the pin 16s (the power pins)
on his CD4511s to his 5V supply.
So, how did Ian’s circuit manage to
work at all? His chips were drawing
parasitic power from their data inputs.
Most ICs have normally reverse-biased
protection diodes from each input to
each supply pin. These are intended to
provide protection against static shocks
(ESD protection) and also against the
accidental application of voltage to
pins when the chip is not powered.
Because of these diodes, if you apply
a voltage to a pin of an IC that’s outside its supply range (or any voltage
when it is not powered), that voltage
can become a power source for the IC.
But it won’t provide the full voltage or
necessarily much current.
This explains why the 8s didn’t
display because that requires all the
segments to be lit and there simply
wasn’t enough parasitic power to perform the task.
As a related aside, there’s an amusing story about the first ARM processor.
When engineers at Acorn Computers
developed the first ARM (Acorn RISC
Machine) processor prototype in 1985,
they were surprised to discover that it
didn’t appear to be drawing any energy
from its power supply!
Although they had focused their
design on minimising power consumption, they felt the fact it wasn’t drawing
any power at all was a little extreme. It
turned out that, like Ian, they had neglected to connect the power pin, but
the chip was drawing just enough power
to function from its inputs via tiny leakage currents. However, we digress…
As soon as Ian added those four
little wires and properly powered his
CD4511s, everything worked as expected and the radiance of his smile
brightened the world once more.
All I can say is that I’m scared what
Ian thought when he read my column
in the December 2024 issue of PE, only
to discover that I decided to discard
our CD4511 BCD decoders and replace
them with 74HC595 shift registers!
Endless possibilities
Although our bootcamp clock project is officially over, there are lots
of things we could do to enhance its
functionality. For example, we could
add some pushbuttons and create a
menu system.
If so, one of the first tasks we might
use our menu system to accomplish
is to implement some way to set the
current time. Also, we could use it to
select between 12- and 24-hour display modes.
We could also add an LDR and use it
to implement a nighttime mode, dimming the displays when the ambient
light falls below a certain level, such
as when the bedroom lights are turned
off at night, for example.
Also, we could use our piezoelectric buzzer to add audible accompaniments, such as playing the Westminster
Quarters (aka. Westminster Chimes) to
mark each quarter-hour.
Furthermore, we could use our menu
system to implement an alarm function, setting an alarm time and using
our piezoelectric buzzer to play an appropriate wake-up tune.
What about daylight saving time
(DST)? We could modify our clock
to implement this automatically. Alternatively, we could add a DST On/
Off button, or we could employ our
menu system to activate/deactivate a
DST mode.
Since we ended by using four 8-bit
shift registers to control our four 7segment displays, we now have access
to our displays’ dp (decimal point)
segments. In fact, we aren’t actually
obliged to use the dp segments on the
displays. We could, instead, use these
bits from our shift registers to drive
standalone LEDs.
And what could we use these four
dp segments or standalone LEDs for?
Well, we could flash one on and off to
mark the passing of the seconds.
We could use one to indicate if the
clock was currently in its 12- or 24hour mode. We could use another to
indicate if the clock was displaying
regular time or DST. And we could
use one to indicate if an alarm has
been set.
All the ideas mentioned here are
just things I came up with off the top
of my head. I’m sure you can think
of many more features and functions
that, if implemented, would make your
cunning chronograph stand proud in
PE
the crowd!
1550ZF IP68 flanged
die-cast aluminium
Learn more:
hammondmfg.com/1550zf
uksales<at>hammondmfg.com • + 44 1256 812812
Practical Electronics | January | 2025
13
|