This is only a preview of the January 2025 issue of Silicon Chip. You can view 38 of the 104 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 "Digital Capacitance Meter":
Items relevant to "Compact HiFi Headphone Amp":
Articles in this series:
Items relevant to "Gesture-controlled USB lamp":
Items relevant to "BIG LED clock":
Items relevant to "40A Current Probe":
Items relevant to "Battery-Powered Model Train":
Items relevant to "TCS230 Colour Sensor":
Purchase a printed copy of this issue for $13.00. |
Mini Projects #019 – by Tim Blythman
SILICON CHIP
The BIG Clock
If you need a BIG
Clock, look no
further! It tells the
time, is three feet
wide and one foot
tall (that sounds
larger than 90 ×
30cm). The BIG
Clock has a simple circuit and we think our clever
readers will come up with other ideas for using the BIG, bright display we have designed.
W
e’ve thought for a while that
addressable RGB LED strips
would be a good way to make a large,
bright display. We thought of arranging the strips in rows to create a dot-
matrix type display, but that would not
have been as big as the BIG Clock. It
is 90cm wide and 30cm tall, with the
active area of the digit display being
65cm wide and 20cm tall.
These strips have a connection for
power, ground and data in at one end,
with a matching connection at the
other end for power, ground and data
out. Multiple strips can be joined by
simply connecting power to power,
ground to ground and data out to
data in. Many strips can also be cut
to shorter lengths; the smaller strips
can then be rejoined in the same way.
We’re using Jaycar’s XC4390
WS2812B RGB LED strip. It is 2m long
and contains 120 RGB LEDs. Thus,
there is one LED every 16.6mm. If we
had cut this into five strips of 24 LEDs
(about the minimum number of rows
needed to make a working dot-matrix
display), it would be about 9cm tall
and 40cm wide.
Instead, we have arranged the LEDs
as multiple 7-segment digits. If the segments have five LEDs, we can make
digits that are each nearly 20cm tall
Fig.1 (left): by arranging the
strips in this fashion and
wiring in this order, the length
of wire between each segment
is kept short.
Photo 1 (right): here is what a
single digit (showing a ‘0’) looks
like up close.
siliconchip.com.au
Australia's electronics magazine
January 2025 55
Fig.2: this segments order was arranged to simplify the wiring and matches the software mapping of the segments in the
BIG Clock sketch.
and 10cm wide. The 120 LEDs yield
three 7-segment digits, with three
segments to spare; enough to make a
12-hour clock display.
You can see a video of it in operation
at siliconchip.au/Videos/BIG+Clock
Photo 1 and Fig.1 show the basic
arrangement of a digit. Like smaller
7-segment displays, we have tilted
the segments about 10° from vertical.
The digits are around 9cm wide and
18cm tall, with the segments each
about 8.3cm long.
Fig.1 also shows the way we have
wired the segments in each digit. You
can see that this keeps the wiring quite
short and tidy.
Fig.2 shows the pattern we used to
wire all the segments of the digits on
our BIG Clock, with the output of one
numbered segment going to the input
of the segment numbered one higher.
We used two spare segments to create
a leading ‘1’ (#1 & #2) to show hours
up to 12. This leaves a single segment
spare, which we used as a dash (#10)
to separate the hours and minutes.
Circuit details
The LEDs are controlled by an
Arduino Uno WiFi R4 microcontroller board. Its inbuilt WiFi radio can be
used to fetch the time using NTP (network time protocol) from the internet.
To provide a discreet (and discrete)
interface, we added a magnetic reed
switch to allow daylight savings to be
switched off and on.
The circuit is pleasingly simple.
All we need is a microcontroller to
provide the necessary serial signal to
produce the clock display. This digital signal comes from the A0 pin.
Although it can be used for analog
functions, we have used it as a digital output since it is close to the other
(5V and GND) pins needed to drive
the LEDs.
The reed switch is connected
between A2 and GND; an internal
pullup means this pin is high unless
a magnet is nearby, when the switch
shorts the pin to ground. Fig.3 shows
the circuit.
Construction
Laying out and connecting the segments is the most time-consuming
part of the construction process. If you
want to test the LEDs before or during
assembly, jump forward to the Software section so that you can load up
the libraries or a test sketch to do so.
We used a 900mm x 600mm sheet of
Corflute cut in half lengthwise, giving
a panel 300mm tall and 900mm wide.
Corflute is like corrugated cardboard
but made from plastic. The corrugations run parallel to the long side,
which is helpful when sketching out
your plans.
Fig.4 shows the critical dimensions
of a single digit and its relation to adjacent digits. Using a plastic substrate
means that you can use an erasable
Fig.3: the circuit of the BIG Clock is simple; the microcontroller board
provides power and data to a series of addressable LEDs. A magnetic reed
switch provides a digital input that can be used to toggle the daylight saving
mode.
56
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
Photo 2: much of the wiring is hidden at the back of the panel. If you have kept the
other half of the Corflute sheet, it could be used to make a rear panel to hide the wiring.
marker to demarcate the locations and
remove them later.
Find the centre of the panel and
mark the corresponding horizontal
and vertical lines. Add horizontal lines
9cm below and above the centreline.
Similarly, add vertical lines 15cm and
30cm to the left and right of the centre.
These will allow you to use Fig.4 to
sketch the outline of each digit.
Next, mark out the holes needed for
each digit (the green dots in Fig.4). Note
that not all locations require holes! The
centre position, for example, will only
need holes for the central segment, as
it only shows a dash. Double-check the
segments against the photos as you go.
Cut the LED strip into sections with
five LEDs. Be careful to leave some
visible copper on each side to allow
soldering. The first and last segments
come with fixed wiring attached, so
they will have to go in the locations
marked 1 and 24 in Fig.2.
We found that attaching the wires
was a bit tricky, since the conformal
coating applied to the board inhibits
soldering, although it can be soldered
through with patience and ventilation. We suggest wiring the segments
in groups of seven (for the three full
digits) using short pieces of wire (about
5cm). For each connection, join 5V to
5V, DO to DIN and GND to GND.
If you cut narrow slots in the Corflute as marked by the cyan lines in
Fig.4, you can slot these short wires
in from the front, so they are hidden.
Then, you only need to make the longer joins between the segments; the
longer lengths will allow a bit of room
to manoeuvre the strips into a position
to allow wiring.
Take your time, ensure that the
strips go in the correct locations and
that wiring flows in the direction of the
arrows marked on the strip and in the
siliconchip.com.au
order shown in Photo 1. Don’t be afraid
to hook it up to test that the segments
wired so far are working correctly.
Photo 2 shows our layout from the
rear of the panel. Once everything is
roughly in place, remove the backing
paper from the adhesive on the strips
and press them against the Corflute.
There are extra red and white
(power) wires at each end. We connected these with insulated wire and
heatshrink tubing to provide an extra
power feed and to terminate the loose
ends. We cut the extra set of three wires
short so that they would not get in the
way or contact anything else.
Uno WiFi R4 wiring
We plugged an 8-way header into
the headers on the Uno WiFi R4 as
shown in Fig.3 and Photo 3. Remove
the middle two pins by pulling them
out with pliers. This will prevent an
inadvertent connection to VIN, since
the LEDs only work with 5V supplies.
When bending the leads of the reed
relay, avoid straining them where
they enter the glass envelope, or it
can break. We suggest you grasp the
lead with pliers close to the body,
then bend it, so that no bending force
reaches the glass. Solder the wires as
shown in Fig.3 and plug the header
into the main board.
The wire colours on the LED strip
might be different; ours had red for 5V,
white for ground and green for data.
Photo 3 shows that detail on our build.
Fig.4: use these dimensions to sketch out the segments on your Corflute before
making the holes marked in green. Their size is not critical; about 5mm should
work well. The cyan lines indicate slits that can be used to feed the wires
through from the front of the panel.
Australia's electronics magazine
January 2025 57
Parts List – Big Clock (JMP019)
1 Arduino Uno WiFi R4 microcontroller board [Jaycar XC9211]
1 120 RGB LED addressable strip [Jaycar XC4390]
1 magnetic reed switch [Jaycar SM1002]
1 8-pin header, 2.54mm pitch [cut from Jaycar HM3211]
3 1.5m lengths of insulated wire in different colours [Jaycar WH3032]
1 600mm x 900mm sheet of Corflute or similar [Bunnings 0390160]
1 short length of double-sided tape to secure the Uno WiFi R4
[Jaycar NM2821]
1 reel of electrical tape to secure loose wires
1 10cm length of 3mm diameter heatshrink tubing
1 magnet to operate the reed switch
1 USB-C cable to suit the Uno WiFi R4
Secure the Uno WiFi R4 to the Corflute
using double-sided tape, and secure
loose wires with the electrical tape.
Software
Arduino IDE needs to be installed
and the Arduino R4 board profile
selected. This can be installed by
searching for “R4” in the Boards Manager and then clicking install.
The Adafruit Neopixel library is also
required; we’ve included it in the software download package (siliconchip.
au/Shop/6/530), along with the sketch
file. You can also search for “neopixel”
in the Library Manager to find it.
There are several sketches under
the Neopixel examples (and one in
the Jaycar XC4390 data sheet); you just
need to change the LED_PIN to A0 and
the LED_COUNT to 120. These are a
quick way to test that the display is
functional.
Open the BIG_CLOCK_UNO_R4_
WIFI sketch and change the WiFi
credentials at the top of the sketch.
There are other parameters that can be
changed, but that should be enough to
check that all features are functional.
Upload the sketch after selecting the
correct board and serial port from the
menus.
The Serial Monitor will report the
Clock’s status (115,200 baud); a typical boot sequence is shown in Screen
1. The LEDs should all switch on for
two seconds, then normal operation
will start. If you see an E0 message
on the LEDs, the WiFi connection has
failed. E1 indicates that the time has
not been updated. Table 1 also lists
some commands that can be entered
at the serial monitor.
Customisation
There are a few things that can be
changed in the sketch code. The standard time zone offset (in minutes) is
set by STD_TZ_OFFSET. The daylight
saving adjustment (effected by using a
magnet on the reed switch) is one hour.
The colour of the lit LEDs is set by
Connected
IP address: 192.168.0.15
Checking UTP on connection
Starting NTP check
UDP packet sent
25ms round trip. Packet received
Time OK
UTC is 2024-09-11T04:39:20
Time is 2024-09-11T14:39:20
Time is 2024-09-11T14:40:00
Time is 2024-09-11T14:41:00
Time is 2024-09-11T14:42:00
Screen 1: this shows a normal
startup on the Serial Monitor. The
IP address and round trip time
are not important. Other messages
may appear automatically or if the
commands from Table 1 are run.
the CLOCK_COLOUR #define; you can
use the values given or provide RGB
triples. The brightness dictates the current draw, which peaked at 700mA for
a BRIGHTNESS setting of 70 on our
prototype. Check your supply capabilities and adjust this to suit.
If you have Arduino experience,
you can also modify the LED layout
or mapping. The digits array is a C++
struct (with type seg7_t) for each digit.
The struct’s first item is the number of
pixels for each segment, followed by
the first pixel of each segment in order
from ‘a’ to ‘g’.
For example, with just four LEDs per
segment, you could have 30 segments,
giving a full four 7-segment digits plus
a couple of segments to spare; enough
to count up to 19999.
We think the white Corflute looks
smart but it doesn’t give a lot of contrast against the LEDs. When we get the
chance, we plan to paint the Clock’s
background a flat grey to make the
SC
numbers stand out more.
Photo 3: an 8-pin header with the
two central pins removed is used
to connect the wiring to the Uno
WiFi R4. The green wire at right
carries data to the DIN pad of the
first LED pixel. When completed,
the Big Clock is three feet (900mm)
wide and lights up the room. We
think it will give our readers some
great ideas for creating other large
displays.
Table 1: serial commands
58
Silicon Chip
Australia's electronics magazine
Command
Action
u
Force NTP time refresh
r
Reboot processor
t
Make time invalid
0
Turn off daylight saving
1
Turn on daylight saving
siliconchip.com.au
|