Four 7-Segment LED Display Driven by Raspberry Pi’s GPIO



Demonstration of four 7-segment LED display directly driven by Raspberry Pi’s GPIO.

I try to keep things simple by using fewest parts as possible.

Working on my goal of building a clock while saving power by relying on persistence of vision. This is usually done by switching between the four LED modules in rapid succession giving the illusion that all four LED modules are always on.

Here you’ll see that the four modules are being switch on and off one at a time while showing their relevant digits.

Each segment is driven directly by 7 GPIO outputs. All four modules are wired in parallel.

The common cathodes of each module are powered by one NPN transistor each for a total of four.

A single 4700k ohm resistor goes between each of the four GPIO outputs and the base of each of the transistors.

I wrote a simple script to switch on the first LED module and its relevant segments to form a digit. Then it goes on to the second module, then the third and forth.

So to show 0159, the left most module is switched on and the other three are switched off by turning off the other three transistors. Just before the first module is switched on, its relevant segments are powered. Then the first transistor is switched off, and the second one goes on and we do the same with its segments. Then the third and forth.

Finally, I’ll teach you how to tell which segments of the LED module are powered by which pin and how to tell if its common anode or common cathode. All done by a simple multi-tester volt meter.

Recorded: June 13, 2013


Post time: Oct-19-2017
INQUIRY NOW
  • * CAPTCHA: Please select the Tree