Friday, November 04, 2011

My VFD display project


In 2004, I built this project around a vacuum fluorescent display (VFD). I bought the VFD at American Science & Surplus when visiting a friend in Chicago. It is clearly designed for a piece of consumer audio equipment with tape and CD players. There are various audio-related indicators at the top, a 12 character 14 segment display in the centre, and two bar graphs and a two digit 7 segment display at the bottom. I use it to display Winamp status, CPU load, and a few other things. Here's a closeup of the display:

A VFD is basically an array of triode vacuum tubes. Thin and almost invisible wires stretched across the display form the cathode. They emit electrons when heated. The phosphor coated display segments are anodes. When they're significantly more positive than the cathode, they attract electrons which make the segment glow. To reduce the number of pins, segments are connected together and the display is multiplexed via the grids. To light up a segment, a positive voltage needs to be applied to both the corresponding anode and corresponding grid.

Special purpose chips are typically used to drive VFDs, because required grid and anode voltages are higher than logic voltages. I chose the Allego A6812. The chip contains drivers, a shift register for loading contents serially, and latches so that output can continue while new data is loaded. The cathode also requires its own driver circuit. Because the cathode is also the heater, there is a significant voltage drop across it. If it was powered by DC, one side of the display would be brighter than the other, and so it needs to be powered by AC. I built the driver using a 555 timer and an H-bridge. Here is the driver circuit board before the display was placed on top:

I first tried out the display using an MC68705P3S which had a small bootloader for loading code into RAM via the parallel port. This was convenient because normally, code needs to be written into a 2716 EPROM and copied to the MC68705P3S, and then the microcontroller and EPROM need to be erased via ultraviolet light before the process is repeated. After this experiment, I started working on the permanent firmware, basing it on the firmware from my LED sign. Here's a photo with the unused initial circuit on the breadboard, and the start of the final circuit on perfboard:

I had a lot of TTL chips which I easily removed from a large ISA card, and I ended up adding several of those plus some other chips to the project. I added various capabilities: 6 digital outputs, 4 analog inputs (via an ADC0804 with multiplexing via a 4016), and a shift register to accelerate loading of data into the sign. (Many modern microcontrollers have similar functionality integrated into the microcontroller chip itself.) Here is a closeup of the almost completed main board:


One of the last things I added was a simple step up converter, so the VFD anode voltage is derived from the 5V supply that powers everything else:

Like with my LED sign, the case consists of quarter inch plywood. This time, I made the case by myself. Drilling edgewise into plywood isn't hard if done slowly and carefully. Here are a few photos of the case, progressing from the two boards connected together to the final painted case:

The firmware started out with the software serial code and command interpreter from my LED sign. Thanks to various optimizations, serial communication is at 1200 baud. This time, the command prompt offers only basic functionality, because I focused a lot more on functionality that's meant to be used from software running on a computer. From the command prompt, software can enter into what I call "byte mode", where commands are efficiently encoded into bytes, and they can be sent without any waiting. In that mode, the sign can multitask, scrolling a message without interruptions, while accepting other commands. That mode is also optimized for sending bar graph values and changing numbers at individual locations in the display.

The last thing I added was standalone ability to function as a clock, with multiple "alarms" changing the parallel outputs. The crystal oscillator provides good accuracy, and it was easy to calibrate the clock based on drift observed overnight.

The software controlling the sign currently runs as a Winamp DSP plugin. That is because the main function of the sign is display of Winamp status. It's not something I really need, but I really like it. When Winamp isn't playing, the bar graphs display CPU activity. This part is really useful if I turn off the monitor for some long operation, or to monitor CPU usage when running full screen software. It also helps spot anomalous activity, such as an application taking up 100% of one core.

I've used the digital outputs for various purposes. At first, I used the clock and alarm functionality to turn on my computer when it's time to wake up. Later, I used it to upload code to MC68705P3S microcontrollers for various experiments. Most recently, I used it when first trying it the TLC5940 for my RGB lamp. I didn't do as much with the analog inputs. One is connected to a photocell, and another to a thermistor, but I don't really need that data.

You can download the firmware from Dropbox and see a few more photos in the album.

2 comments:

Drifter Herbert said...

wow,looks like a good project!

Unknown said...

Hey, do you have schematic for dc to dc convertor? thnx