RGB LED Pseudo Nixie Driver

by GreenPAK™ in Circuits > LEDs

17 Views, 0 Favorites, 0 Comments

RGB LED Pseudo Nixie Driver

FO0PZJ5KVF8X9KM.png
1.JPG
2.JPG

The pseudo Nixie tube is an edge-lit LED display that emulates and expands on the operation of the classic cold cathode Nixie displays of the mid to late 1900's. The display consists of laser cut acrylic layers that have individual digits laser engraved into each layer. An RGB LED array near the base of the display can then illuminate each layer in turn, illuminating the corresponding digit.

The GreenPAK Programmable Mixed-Signal SLG46620 circuit can be used to create the edge-lit LED driver necessary for the pseudo Nixie tube. It offers 8 bit PWM resolution and 13 unique colors. The driver receives commands from an external device via SPI. The GreenPAK4 also implements a shift register in order to allow multiple pseudo Nixies to be daisy chained together and controlled over a single SPI bus with one chip select line.

Below we described steps needed to understand how to program the driver. However, if you just want to get the result of programming, download GreenPAK Designer software to view the already completed GreenPAK design file. Plug the GreenPAK Development Kit to your computer and hit the program to create the system.

SPI Interface

3.JPG
4.JPG

The implemented driver accepts 16 bit commands consisting of PWM brightness, color, and binary coded decimal to be displayed.

Pins 2, 3, and 10 provide the input SPI signals SCK nCS, and SDI respectively. SPI[15:8] from the SPI is output directly to the DCMP module for PWM output.

The SPI Parallel output is used to capture the color and digit commands. The data from the parallel output is latched by DFF 3, DFF 5, DFF 6, DFF 7, DFF 8, DFF 9, DFF 10, and DFF 11. The nCS input is used as the latching clock for the DFFs so that the output is not changed until the nCS is pulled high. As seen in AN-1065, the Parallel Output clears its data after nCS goes high. P DLY 0 is used to delay nCS to the SPI module to give the DFFs time to latch parallel data before it is cleared.

In order to support daisy chained SPI with a single nCS line, DFF 0, Pipe Delay 0, and INV0 are used to create a shift register for the SDI data that is output on Pin 4 as SDO (serial data out). DFF 0 clocks the data in at the rising edge of SCK since SDI is stable at that time, but Pipe Delay 0 is clocked at the falling edge of SCK to realign SDO with SDI.

The pipe delay is 16 bits long so that SDO is a delayed version of SDI by a full command.

If multiple drivers are daisy chained by connecting SDO of one driver to SDI of the next, a command should be issued to each driver in the chain, starting with the driver farthest from the host. While sending the command to the final driver—the one closest to the host—the nCS line should be pulled low. This will clock in each respective command to each driver at the same time. Upon pulling nCS high, the respective commands will be latched and start displaying accordingly.

The scope trace shown in Figure 4 represents an SPI transaction to a daisy chain of 2 pseudo Nixie displays. Note that 2 16 bit SPI frames are clocked out—one for each display—but nCS is only pulled low during the last frame. Also note that the SDO word is always a copy of the previous SDI command. In this case, 0xFED6 displays on digit 0 while 0xC7D3 displays on digit 1.

PWM Brightness

DCMP 0 is configured for PWM output and the duty cycle is determined by SPI[15:8]. CNT 7 and CNT 8 generate the PWM frequency of about 500Hz. CNT 8 counter data is set with 255 to ensure that we get the full 8-bit PWM output. If the counter data was set to anything less than 255, then any SPI[15:8] value over it would cause full PWM brightness, effectively reducing brightness resolution. CNT 7 was needed to get the PWM to the desired frequency.

Output Decoding

5a.JPG
5b.JPG
6.JPG

The output of DCMP 0 is routed to the output enable (OE) lines of PIN 5, PIN 13, PIN 14, PIN 16, and PIN 18. These pins are the high side LED drivers. So PWM signal enables and disables the LED being driven.

Figures 5 and 6 show the output decoding. The upper 3 bits of the digit command—b1, b2, and b3—are used by 3bit LUT 9, 3bit LUT 10, 3bit LUT 11, 3bit LUT 12, and 3bit LUT 13 to determine which set of LEDs will be driven on the high side. The color bits—R_bit, G_bit, B_bit—and the LSB of the digit command are used by 2bit LUT 0, 2bit LUT 1, 2bit LUT 2, 2bit LUT 3, 3bit LUT 0, 3bit LUT 1 to determine which color channels will be driven on the low side.

Only one digit is intended to be illuminated at one time. By using this matrix style output, 30 led channels—consisting of 10 RGB LEDs—can be driven with only 11 pins out of the 20 pins on the GreenPAK.

Green Pulse Skipping

7.JPG
8.JPG

In order to get a few extra unique colors, the green channel has four allowable states in the color command determined by GRN0 and GRN1 as seen in Figure 7. Since the SPI Parallel Output module shares outputs with DCMP 1 and DCMP 2, there was no additional PWM to modulate the green channel separately from the red and green channels.

Instead, the green channel gets its four states from pulse skipping of the PWM signal.

The output of CNT 8 is divided in half by DFF 4 and then in half again by DFF 1. 3-bit LUT 2 is used to generate a single pulse for every four PWM pulses as shown in Figure 8. 4-bit LUT 1 selects, based on the state of GRN0 and GRN1—the state of the green channel.

In states 1 and 2, the green channel is disabled for 3 or 1 PWM periods respectively. These two states are shown in Figure 9. This represents a transition from ¼ brightness to ½ brightness using pulse skipping. The small glitch pulses do not affect the visible output. This changes the overall frequency of the green channel during these pulse skipping states. In state 1, the green channel frequency is one quarter the PWM frequency, or 125Hz. This is still sufficiently high to appear smooth and does not flicker when viewed. Using pulse skipping enables 13 unique colors versus the 7 available if only using 3 color bits.

Circuit

9.JPG
10.JPG
11.JPG

Figure 11 shows the pseudo Nixie driver circuit. The external SPI signals are protected by 150 ohm current limiting resistors. The red LEDs are current limited by 240 ohm resistors while green and blue are limited by 180 and 150 ohm resistors respectively.

There are two LEDs connected to each output to increase brightness and light coverage across the laser engraved digits. As previously mentioned, 11 outputs drive the LED array. Resistor packs were used to ensure consistent lighting across LED pairs as well as for easy placement.

Since brightness on an LED is related to current flow, let us take a look at the current when the GreenPAK4 is driving different colors.

The rated current of the high side drive pins is 39.27 mA while in 2x drive mode and powered by 5V. We know that driving white draws the most current, approximately 36.67 mA.

The data in the table assumes that the PWM command is set to 255, which is the maximum. From this we can conclude that different colors have inherently different apparent brightnesses. These differences can be compensated for by using different PWM brightness settings for each color.

The Pseudo Nixie Tube

12.JPG
13.JPG
14.JPG
15.JPG
16.JPG
17.JPG

The pseudo Nixie PCB is shown in Figure 12. It is a 2 layer board with no special requirements since the GreenPAK4 is very easy to escape, from a PCB layout perspective. The service used to fabricate this PCB had a 6 mil trace and 6 mil space minimum requirement.

Figures 13, 14 and 15 show different views of a completed tube. The PCB is in the base. The PCB is shaped so that it locks in place once sandwiched between acrylic layers. The tube is the same scale as the ever popular IN-18 Nixie tube. The font of the digits is also very similar to the classic IN-18.

It can be plugged directly into a breadboard or anything with 0.1 inch female headers. This makes for simple prototyping or mounting for something like a clock.

As part of a test routine, SPI commands are rapidly sent to the driver PCB to display multiple colors at the same time. Of course, they just appear to display at the same time.

In reality, the driver is cycling through the LEDs faster than the eye can respond. Figure 16 shows this effect by displaying 10 out of the 13 unique colors possible.

In order to isolate each pair of LEDs so that they only illuminate a single acrylic layer, a small piece of laser cut black paper is sandwiched between the acrylic layers and the LED pairs, touching the top surface of the PCB.

The paper is not very tall and does not get in the way of the engraved digits. Another piece of laser cut black paper is placed behind the last acrylic layer with a digit to provide better viewing contrast.

As with the original cold cathode Nixie tubes, the digits are arranged out of order. This should be taken into account when commanding the digits. A look up table should be used in firmware to convert desired display digit to LED pair. If desired, the acrylic layers could be arranged so that the digits are in fact in the same order as the LED pairs, but this was avoided to better replicate the look and feel of Nixie tubes.

Some illuminated digits can be found in Figure 17. Most of the digits were engraved with a single set of outlines so that digits further in the back would be easier to see. Since digit “0” and digit “1” were in the back, and slightly more difficult to see, they got extra outlines to emphasize them. The original Nixie tubes often had a digit “1” that was thicker and larger than the other digits for similar reasons.

Conclusion

The GreenPAK programmable mixed-signal SLG46620 circuit enables complex behavior with minimal design effort in a small package. Its small size and low cost enables its use in many applications. The GreenPAK does a great job driving LEDs for small edge lit displays like the pseudo Nixie tube presented here. It enables hardware designers to create interesting behavior with zero written code thanks to GreenPAK Designer's schematic style design entry. This can provide a faster time to market on a variety of products.