LED circles using multiplexing

The circuit diagramThis 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.

 The 16 LED dissplay project

To 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.

If 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.


The pcb layout
The project

A close-up of the project and the pcb layout are shown on the left.

As a new departure, I provide the pcb layout in the form of a Windows metafile as well as Xara file. This allows high resolution printout of the files by using suitable programs.

I found that either Xara XS or OpenOffice Draw produce excellent results. I use a Canon printer and colour inkjet film. A single pass at high dot density produces a printout with a lot of tiny holes in the black lines. By making a second printout on top of the first, these holes can be covered up quite successfully.

Here is a link to the zip archive of the PCB
Pi-LED-circles-pcb



  10 A demonstration program will follow as soon as I have written one.
  







Return to the interfacing index

Back to the Limavady home page

Tudor with sign