Fork me on GitHub

Project Notes

#080 4x7-Segment Double Shift

Driving a 4-Digit 7-Segment display with only 3 pins, using two 74HC595 shift registers and some NPN BJTs

The Build


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.

The SingleShift experiment demonstrated how to use a 74HC595 shift register and some NPN BJTs to save Arduino pins. But it still needed 7 pins (3 for the 74HC595, 4 for the BJTs).

This circuit is a variation that uses two registers and means we reduce the number of Arduino pins required to 3.

It works by chaining the 74HC595 shift registers: each data update pushes two bytes down the pipe. The first byte encodes the selection of which digit(s) to enable, and the second byte endodes the selection of which LED segments to enable.

The LED segments and BJTs are wired to the shift register outputs accordingly. So then it is just a matter of pushing the right bytes out to the shift registers and latch the result.

As before, the 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.

When fully on (e.g. displaying 8888), it appears the display and associated components on the breadboard are drawing an average of about 2.87mA. A direct replacement of the S9013 BJTs with n-channel FETs - see Led4Digit7Segment/DoubleShiftWithFETs - results in an average current of 2.47mA).


The Breadboard

The Schematic

The Build

Credits and References

Project Source on GitHub Project Gallery Return to the LEAP Catalog

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

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - 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
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.