Fork me on GitHub

Project Notes

#078 4x7-Segment Single Shift

Driving a 4-digit 7-segment LED display with a shift register and a few BJTs

The Build

Notes

See Led4Digit7Segment for general discussion of 4-digit 7-segment displays, how to drive them, and the details of the specific SMA420564 unit used in this test.

While you can wire up each segment pin to a digital out on the Arduino, it soon becomes pretty wasteful of pins. This project uses an 8-bit shift register to feed segment values and some BJTs to control digit selection.

A 74HC595 is used to shift out the segment values in a block, requiring only 3 pins.

S9013 NPN BJTs are used to switch the sinking of each digit’s common cathode connection. In this circuit, the BJTs are directly controlled with an additional 4 pins. The S9013 is selected for no other reason than it’s a nice reliable small-signal transistor, and some were on hand. Pretty much any NPN transistor would do.

This circuit puts the current-limiting resistors in series of the common cathode pins. Which is a bit of an approximation, as current (brightness) varies a little depending on how many LED segments are on. The better way is to put a resistor on each segment pin. But this was good enough for a simple test.

Construction

The Breadboard

The Schematic

The Build

Credits and References

About LEAP#78 LED 7-SegmentCMOS/TTLArduino

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader