Products for USB Sensing and Control
Products for USB Sensing and Control

LED Display Control with Phidgets

How to Control A 4-Digit 7-Segment LED Display Using Phidgets


by Kat

Introduction

Phidget user hammerstan set out to create a 5-digit display using a single multiplexed 7-segment LED display and minimal electronic components. Without having an extensive electronics background, he’s found using an IC/chips based method overly complex. So, he wired a 5-digit 7-segment LED directly to a Phidget LED 64 board , via 5 PNP transistors. The same technique can be used to program 2, 3 or 4 displays (single displays don’t need the transistor and can be wired directly to the Phidget board)

Using his transistor method significantly reduces the number of Phidget slots for a 5-digit display versus traditional method of wiring a collection of single digit LEDs, each digit using up to 8 Phidget slots.

Materials

How To

The Phidget LED 64 has two common anodes: One for the even numbered connector slots (ie 0 to 62), and one for the odd numbered connector slots (1 to 63). For these instructions, we’ll be using the anode rail for the even numbered slots.

1. Connect cathodes A to G and the decimal point (DP) on the 7-segment multiplexed LED display to 8 black wires (cathodes) connected into the even sockets on the Phidget board. So, it will be connected like so:

LED Display Cathode – Phidget Connector Slot (black wire only)

  • A – 0
  • B – 2
  • C – 4
  • D – 6
  • E – 8
  • F – 10
  • G – 12
  • DP – 14

2. Connect the common anodes for digit 1 on the 7 segment display to the collector of a transistor (that is right leg while holding the flat face of the transistor away from you). Repeat for the remaining digits.

3. Using the next available even-numbered Phidget connector slots, wire the black AND red wires from each Phidget slot to the other 2 legs on the transistor. The red wire (common anode) connects to the emitter leg (the left leg while holding the flat face of the transistor away from you). The black wire (cathode) connects to the base (the centre leg).

Now, it should be mapped like so:

LED Display Common Anode – Phidget Connector Slot (black & red wire)

  • Digit 1 – 16
  • Digit 2 – 18
  • Digit 3 – 20
  • Digit 4 – 22
  • Digit 5 – 24

Turning any of these Phidget slots on will activate the respective digit.

Conclusion

This set up wires 4 digits and punctuation, or 40 individual LEDs using only 12 Phidget connector slots. The alternative would be to use 40 connector slots. The drawback is that only one digit can be displayed at a time, necessitating a small interval (<30ms) between illuminating each digit – Therefore, the program must cycle through activating Digits 1 – 5 rapidly for the eye to see all 5 digits active. Download and compile the sample program written in C++ and work from that to develop your project.