Alphanumeric Led Display Project

Alphanumeric LED display breadboard labeled

Alphanumeric LED display breadboard labeled

Need for a Counter Display

I recently experimented with variations of a basic BEAM solar engine (relaxation oscillator). I wanted to test how modifications of the voltage kick point would affect the performance of the pager motors.

A tiny sandwich flag connected perpendicular to the motor spindle aids observation of how long it takes to complete one full rotation. This worked initially, as each burst from the capacitor barely moved the flag 1/4 of a rotation. As the circuit variations became more efficient and powerful (the capacitors values became larger), a single burst provided rotational speed faster than a human can count. I took a huge diversion and built a counter circuit.

(About six months later, I built a superior counter and non-contact tachometer)

Design Requirements

The counter probably needed to be able to count beyond 10. Since a 8-bit hexadecimal display ($00-$FF, a count of up to 255) might be useful for other projects, that became the goal.

A pushbutton (SW1) was necessary for manual testing, although an infrared interrupter pair would eventually provide input when connected to the BEAM engine project. The incredibly noisy (electrically speaking) pushbutton added an obstacle, as its signal needed to be cleaned up (Switch Debouncer) so that only a single increment in count is generated from a single press.

A pushbutton (SW3) connects to the counter (IC3) to clear the display to zero.

And, of course, there needs to be a way to display the count. I purchased a very nice display (LED1) from DigiKey (part #160-1011). It’s a 13.72 mm Multiplex Common Anode, Right Hand Decimal, Orange, 2-Digit LED Alphanumeric, 15-segment display manufactured by Lite-On. Attractive and low-power!

To drive the current of the display, use 2N2222 NPN transistors. 2N3904 NPN transistors are acceptable substitutes.

Notice all the resistors that are necessary. If the circuit relied on a resistor between +5 volts and Q1 and Q2 to limit the current to the LEDs, then characters with fewer segments (the number one) would be brighter than characters with many segments (the number eight). This is because the current from Q1 and Q2 would be divided among the lit segments, and characters with few segments would have more current per segment. The more current a given segment receives, the brighter it emits. By placing a resistor at every segment, all segments are limited to an equal amount of current.

Alphanumeric LED display schematic

Alphanumeric LED display schematic

Hitting A Wall

Although the 15-segment LED display was easily obtained, I could not find a hexadecimal (sixteen) character generator chip. The combinational requirement of 15 segments for 16 characters appears even less likely to be met for off-the-shelf chips.

PPROM backside view of 256 diodes PPROM face view of 32 dip switches

Left: PPROM backside view of 256 diodes. Right: PPROM face view of 32 dip switches

Laborious Solution

I decided to create a 16-bit, 16-address diode ROM. That’s right, I soldered 256 diodes to 32 dip switches to 16 address lines. Each set of 16 diodes is also soldered to the next set of 16 to make a 16-bit data bus.

PPROM backside view close-up

PPROM backside view close-up

(The numbers refer to which pin it controls on the LED display. Pins 11 and 16 are not controlled, as they are for the common anode power supply.)

When one of the address select lines (IC2) becomes logic low (grounded), current flows through the dip switch at that address through the diodes at that address to the cathodes (and resistors) of the alphanumeric display. The diodes prevent disconnected (or logic high) addresses being having their dip switches passed through. That condition would combine the characters, and the board would have ended up being a massive OR gate! (If more than one address becomes logic low, then those characters will indeed OR together.)

Dip Switch

Dip Switch

By physically setting the pair of 8-pole dip switches for a character, each segment of the alphanumeric LED can be turned on or off for each character. In this design, a connected switch is logic low and a disconnected switch is high impedance (disconnected). If desired, using 16 pull-up resistors on the data bus would make disconnected switches logic high.

I wish I had used a common anode LED display and reversed the direction of all the diodes so that an on switch was high, and an off was low. But, I wanted to avoid using 16 transistors to drive the data line. Since chips can usually sink (ground) more current than they can source (drive), I chose to connect the cathodes to the character generator ROM board.

What do I call this monstrosity? A Physically Programmable Read Only Memory, or PPROM. It’s pronounced “Pee-Pee Rom”, because it’s a stinky solution. A microcontroller is a much easier, versatile, and inexpensive solution! (I later replaced this entire project with a single 68HC908GP32.)

It’s Alive!

...and quite lovely as well.

Hexadecimal character set

Hexadecimal character set