LED circles using multiplexing

This project uses two groups of  eight LEDs sharing eight GPIO pins via one of my Pi interfaces. The anodes of each group of LEDs are commoned and driven by a BFY51 transistor.

The two transistors are controlled by a further two GPIO pins to select either one or the other group. To make things nicer looking, the LEDs are mounted in the form of two circles. The circuit diagram can be seen on the right whilst the photograph below shows the project connected to a Raspberry  Pi.

LED circles using multiplexingTo turn an LED ON, its GPIO pin has to go low, to allow current to flow. At the same time its selector line has to go high to turn the transistor ON. This is quite straight forward as long as the LEDs to be lit are in the same group.

Should you want to light LEDs  that are members of both groups at the same time and not connected to the same GPIO pin, multiplexing has to be used. This means that your program must send signals to turn the selected LEDs on and off in rapid succession. If this is done fast enough, the eye is deceived into thinking that all LEDs are on at the same time. It is a technique commonly used with LED displays.

LED circles using multiplexing SchematicIf you feel really creative, you could combine this multiplexing with pulse width modulation in order to change the brightness of the LEDs. By varying the on-off proportion of the signal supplying an LED an apparent change of brightness can be produced.

 

 For more detail: LED circles using multiplexing


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top