Chunky LED 7-Segment Displays (Patreon)
Content
Almost a year ago, I did a post about using 7 segment LED displays, demonstrating the common 4-digit modules based on the MAX7219 or TM1637 chips. They're easy to use, but when you're making a big timer display that counts down to impending doom, you might want something a little bit more..... imposing!
Fortunately, one of the parts I recently salvaged from a deceased fruit machine were these lovely chunky 1.8" LED display units. Each display is separate, but they interlock together enabling you to create a multi-digit display of any arbitrary length you want. They require 5.55Vf, so you can't power them directly by just writing a HIGH signal from an Arduino GPIO pins. Instead, I use two transistor array chips:
- The first is a UDN2981 which *sources* current into the anode segments (also called a "high-side" transistor). When a small current is received on any of the 8 input pins, it allows a larger current from a separate 12V supply to flow on the corresponding output pin.
- The second a ULN2803, which *sinks* current through the cathode of the LEDs back to ground. When a small current is received on one of the 8 input pins, the corresponding output pin is connected through to ground.
Both of these transitor chips have 8 outputs, which means that their pins can be conveniently set by passing a single 8-bit value into a shift register. And, because two (or more) 74HC595 shift registers can be chained together, that means you can do all this using only 3 pins on the Arduino. Phew!
This is a free project which is available to all - not just my lovely Patreons - so I've put up all the code on GitHub, and you can find it here: https://github.com/playfultechnology/arduino-fruitmachine
Please ask if you have any questions!