Reverse-Engineering a Scoreboard Show
Just a few weeks in the past, I began designing my very own IoT gadget platform from scratch.
At this level, I’ve a strong microcontroller that may talk over
Bluetooth and Wi-Fi, and tons of I/O for making enjoyable issues. However, I haven’t
really made something helpful but.
So, how about making one thing fully foolish? This factor looks like a superb
begin:
Coming in at 11 inches tall and 6 inches large, this gigantic seven-segment
show looks like an amazing toy start line for my high-octane IoT undertaking.
Take a detailed take a look at the board, and also you’ll see this textual content below the solder masks:
COMPONENT SIDE
DAKTRONICS, INC.
COPYRIGHT 1996
Daktronics is an American firm that makes massive LED shows, like digital
billboards and scoreboards. If I needed to guess, this fellow bought yanked out of a
discarded basketball scoreboard. It’s the correct measurement for a rating digit in a
small health club, or a clock in an enormous health club.
I really like science/electronics surplus shops, as a result of oddities like this are
ample and low-cost. On EBay, you would possibly pay upwards of $50 for this factor. From a
surplus store? $4.
The store had a number of of those, however I didn’t need to purchase a couple of till I
had decided that these are literally value shopping for. That was a mistake – I
ought to have purchased all of them. Because it seems, these shows are brutally
easy, and very hackable. Somebody knew higher than I did, as a result of by the
time I had one other likelihood to purchase the store’s remaining inventory, they had been bought out.
Deciphering the Display
There’s a 9-pin connector on the back, so it’s reasonable to guess that each
segment is controlled individually. 9 pins gives us one common pin, 7 pins for
each segment, and an extra pin full of fun and surprises. Maybe all those LEDs
draw so much current that it needs a second common pin? Perhaps that pin does
nothing, and it would be used for a decimal point on a different model?
Those two big DIP chips in the photo above gave me some pause: if there’s
silicon in there, this thing could be a lot more complicated than it looks.
Fortunately, the “R220” numbering is a dead giveaway: they’re just resistor
packs. Mouser still has a product listing for these, although they appear to
have been obsoleted years ago. Here’s how they’re wired inside:
Simple enough – this board has sixteen 220-ohm resistors. Now we just have to
figure out what it’s doing with those resistors.
By shining a bright light through the board, I was able to see most of the
traces. By the way, there’s no ground plane on this board; that’s why I could
shine a light through it. One of the traces coming out of the 9-pin connector is
much larger than the others, and lo and behold, it snakes around the whole
board. We’ve found our common pin!
By looking at the traces, I could see that each segment is wired as a parallel
pair of 7 LEDs and a resistor. I don’t know the polarity yet, but we can
guess the supply voltage from this:
- These chunky 5mm red LEDs are usually rated for something like 20mA with a
1.9V forward voltage. - 7 LEDs in series × 1.9V = 13.3 volts dropped across the LEDs.
- 220 ohm resistor × 20mA = 4.4 volts dropped across the resistor.
- 13.3 volts + 4.4 volts = 17.7 volts… let’s round that to 18 volts dropped
across each segment. - 4.4 volts × 20mA = 0.088 watts dissipated across the resistor – comfortably
below its power rating. - 20mA per chain × 2 parallel chains per segment × 7 segments = 280mA max
current draw for the whole display. - 280mA × 18 Volts = roughly 5 watts for the whole display.
These LEDs might turn out to have a slightly different forward voltage than my
1.9V guesstimate, but it seems like this display might have used an 18 volt
power supply. This is only a sort-of weird supply voltage – I would have guessed
that it would use 12 or 24 volts, but 18 isn’t totally outlandish. At the very
least, we probably won’t break anything by running this display at 18 volts.
It’s also possible that Daktronics ran this display at 12 Volts, but as I
describe below, there are several reasons to doubt that.
Poking and prodding
We have some estimates for the display’s power characteristics, but we’re still
missing one very important detail: which way are the LEDs facing? To find out, I
took a 12V supply and a couple alligator clips, and poked at the 9-pin
connector.
By poking the board with a 12V supply, I was able to figure out two things. Most
importantly, the display is wired as common-anode. Ta-daa! Here’s our completed
schematic for one segment of the display:
Adding a multimeter into the mix, I was able to peek into the power
characteristics of the LEDs. At 12V, each LED is only pulling 2.2mA (that’s
30.8mA for the whole display), slightly more than a tenth of my estimated
current draw at 18V. the LEDs definitely aren’t close to their maximum
brightness, but they’re still very clearly “on.”
Poking the display with 12V gave me even more reasons to believe something
around 18V is probably the correct supply voltage. Anything over 18V would be
getting into no-no territory for LED voltage drop. But, at 12V, the LEDs are
quite dim, and this display is supposed to be easily readable in a brightly-lit
gym. Furthermore, the LEDs’ current draw at 12V is so low that Daktronics’ use
of 14 resistors would be complete overkill. If they ran this display at 12V,
they could have replaced the fourteen 220 ohm resistors with seven 390 ohm
resistors.
Prototyping a driver
We now have a complete understanding of how this giant 7-segment display is
wired, so now I can create a circuit to control each segment. Even at the
guesstimated max current draw, we will easily be able to power this thing with
cheap, tried-and-true 2N3904 transistors:
I’ll drive each segment with the circuit shown above. With this combination of
resistors and transistor, the circuit should switch from “off” to “on” somewhere
around 0.6-0.8V. That’s not a standard logic level, but it does mean that this
circuit should accept input from any microcontroller running on 5V, 3.3V, or
1.8V logic.
The 100k resistor pulls the transistor’s base to ground when the CTRL input
isn’t being driven. This ensures that the output state will be “off” when CTRL
isn’t connected to anything.
This circuit could be better, but it’s okay for some home hacking. I could make
a much more efficient circuit by using a MOSFET, but I have a big pile of
2N3904s sitting around, so I might as well use them.
Making upgrades
This circuit was perfectly fine for switching the segments on and off, but I
wanted more. Namely, I want to be able to control lots of giant 7-segment
displays using only a handful of microcontroller pins. I could use a
multiplexer, but that would strobe the LEDs and make them appear dimmer. That’s
no fun, but you know what is fun? Latches!
That chip on the breadboard is a 74HC74 dual D-latch. It has clear and preset
pins, but I don’t need those, so they are tacked to the supply rail through a
couple 4.7k resistors. For poops and giggles, I decided to take a similar
approach to the latch input pins, making them normally-high. This was the wrong
choice, because it would make the output “normally on” when the input isn’t
connected. But hey, prototypes.
Here’s that breadboard, turned into a schematic (the schematic doesn’t show the
buttons – those are hooked from D/CLK to ground):
Here’s how the circuit works:
- To turn the segment on, press and release the CLK button.
- To turn the segment off, hold the D button down while pressing and releasing
the CLK button.
The 74HC74 updates its output state when it sees a rising edge on its CLK pin,
so the segment should change when you release the CLK button. This isn’t always
what happens in practice, because these switches are suuuuper cheap and I
haven’t added a debouncing circuit.
Takeoff
My prototype circuit only handles one segment. I want to control all 7 segments
with a tidy, permanent board that I could reuse for other projects in the
future. Here’s what I came up with:
Download the schematic here (PDF).
This circuit supplies all the identical performance because the prototype, however copied
eight occasions over. As an alternative of a 74HC74, I exploit a 74HC273. That is one other widespread
D-Latch chip, however with 8 latches as an alternative of two. It additionally lacks the preset pin,
which I didn’t want anyway. I additionally added some rudimentary overvoltage safety
by way of a 24 volt Zener diode, and somewhat little bit of provide voltage cleanup with a
10uF capacitor. As an alternative of pulling the latch inputs excessive, I now pull them to
floor. That method, the outputs default to “off” when nothing is related to
their corresponding inputs.
There are two 0.188-inch holes on the board, spaced three inches aside. These
holes line up completely with the mounting holes on the scoreboard show. That
will likely be useful if I resolve to bundle this factor up neatly sooner or later.
After a pair weeks of anticipation, the boards lastly arrived. Right here’s the
high:
Right here’s the underside:
I had these boards manufactured with a black substrate and clear solder
masks, so you may see the entire gold and copper in its shiny metallic glory. I
suppose these boards are stunning, and I’ll undoubtedly have extra boards made
this fashion sooner or later.
Listed below are a pair pictures of the assembled board:
Please excuse the horrendous SMD soldering work. I haven’t executed any SMD
soldering in fairly some time, and this was my first time ever making an attempt to
hand-solder teeny-tiny 0603 parts. It received’t be my final time, both – I
ordered 50 of them, and I solely wanted 10 to assemble this board.
There may be one mistake on this board’s design: I forgot to label the inputs and
outputs. It’s an annoyance, however not the top of the world. All of the traces go to
the correct locations, and that’s a very powerful factor.
I managed to seek out the connector Daktronics used on this show. Because it turns
out, they’re garden-variety TE “Mate-N-Lok” connectors, and Digi-Key will promote
you a bag filled with them for very low-cost.
It’s possible you’ll discover that a number of the part selections are somewhat unusual. There’s
a hodgepodge of surface-mount and through-hole elements. The 1/4-watt 4.7k
resistors are unnecessarily cumbersome for this use case. The 24V Zener diode actually
ought to be 20V if I need to shield the show correctly. As talked about earlier than,
swapping out the 2N3904s for N-channel MOSFETs would make the circuit extra
environment friendly.
The rationale for the odd part selections is straightforward: it’s what I had sitting
round. The screw terminals, TE connector, and 10k surface-mount resistors are
the one elements I ordered particularly for this undertaking. I had some 10k
through-hole resistors mendacity round, however utilizing SMD resistors allowed me to make
the boards so much smaller, and thus, cheaper.
Back to the Keyboard
I wanted to tie this project back into my IoT platform project, which I
introduced a few weeks ago in this post. That meant integrating my show
driver into the Zephyr RTOS. Zephyr’s auxdisplay driver API suits the 7-segment
show fairly properly, in order that’s the place I applied the driving force. You’ll be
capable of finding the code for that on my private fork of the Zephyr SDK.
Right here’s a photograph of the show in motion, pushed by a microcontroller operating
my driver:
Within the above picture, I’m operating the driving force board from a 12 volt provide. The
LEDs are predictably dim, however nonetheless seen. This can be a good voltage for testing
code, since I can take a look at the show with out being blinded by pink mild. Right here’s
what it appears to be like like on the full 18 volts:
Clearly, images can’t actually talk the distinction all that properly,
however the show is sort of blindingly vivid when operating at 18 volts. This
is ideal for a health club the place the scoreboard is much away, however when it’s sitting on
your desk, it’s a bit a lot.
Okay, so I throw collectively some state administration for the MQTT dealer connection,
subscribe to a subject, and…
See these two strains close to the underside that say
no match for cmd 128: Recv N bytes
? That’s the Zephyr’s ESP32-AT driver
deciding it doesn’t know what to do with the TCP packets being acquired from the
MQTT dealer. This, regardless of it receiving the CONNACK efficiently. The dealer
sends a SUBACK, however Zephyr will get confused, so my code by no means receives the occasion.
At this level, I’ve had sufficient of that horrible, half-broken driver – learn the
first post about my IoT platform design journey to study my
ESP32/ESP-AT frustrations. It’s fully attainable that I created this bug once I
shimmed some rudimentary Bluetooth assist into the driving force, or if there’s
one thing completely damaged with the driving force itself. I don’t significantly care to
discover out, both. It would simply be time to throw ESP32 out the window, and
change to a correct Wi-Fi controller module.