Introduction: Audio Level Meter From an Upcycled VFD
VFD - Vacuum Fluorescent Displays, sort of Dinosaur of Display Technology, still pretty nice and cool, can be found in many outdated and neglected home electronics devices. So shall we dump them? Noooo we can still use them. It cost a little effort but that's worth it.
Step 1: Get to Know the Display
A VFD has 3 major parts
- Filament (blue)
- Gates (green)
- Plates (yellow) coated in phosphor which light up when hit by electrons.
Electrons travel from filament to the plates, passing the gates. For this to happen, the plate must be about 12 to 50V more positive then the filament (the negative electrons are pulled towards the positive side). The gates will allow the electrons to fly through when their voltage is close to that of the plates. Otherwise, when gates have a low or negative voltage, the electrons are bounced off and do not reach the plates, resulting in no light.
When looking closely at the display you will see that the gates (the punctuated metal plates) cover multiple plates (the display elements behind), so one gate toggles a number of display elements. A number of plates is also connected together on one pin. This results in a matrix, which needs to be run in a multiplexed way. You toggle on one gate at a time and also turn on the plates which should light up under this gate, then turn the next gate on and some other plates.
To test the Display you can look for the filament pins - usually the outermost - and apply about 3V to it, using 2 AA batteries. Don't use higher voltage this could blow the fine filament wires. Then the wires become visible as red glowing stribes, you used to much voltage !
Then apply 9/12/18V (2x 9V batteries) to a gate and a plate (just look into the display where the pins for the metal gates are) this should light up one display element somewhere.
In the pictures I simply connected (almost) all gates and anodes to 12V this turns on everything.
Take some notes about which pin lights up which display segment ! This will be needed for connecting and programming the display.
Step 2: Challenge 1: HighVoltage
As we've seen in Theory, the Plates/Gates need a Voltage of 12 to 50 Volt to be attractive for Electrons and get a nice illumination of the phosphor. In Consumer devices these voltage is usually taken from an extra tab on the main transformer. As a DIY guy you don't have transformers with extra tabs and you favor simple 5V USB supplies anyway :)
Then running a multiplexed matrix display we need more voltage when the ~12V from our test, because the display segments are lit up only shortly one after the other, resulting in a dimming effect (PWM style with a ratio 1:NumberOfGates). So we should aim for 50V.
There are a number of circuits to boost voltages from as low as 5V to 30V..50V, but most deliver only a small amount of power, like a few mA@50V for the driver I show in the next steps, which uses pullup resistors, this is not sufficient. I ended up using one of the cheep Voltage booster circuits you can find on Amazon or eBay (search for "XL6009"), it converts 5V to ~35V with high current, which is good enough.
This XL6009 based devices can be pimped to output ~50V by changing a resistor. The resistor is marked in the images with a red arrow. You can also search for a datasheet of the XL6009, which contains the necessary info for calculating the output voltage.
Step 3: Challenge 2: Get the Filament Powered
The Filament should be driven with about 3V (depends on the display). Preferably AC and somehow taped in the middle to GND. Puh, 3 wishes in one row.
Again in the original Devices this would be achieved with a tab on the Transformer and some kind of Z-diode connection to GND or somewhere even more strange (like a -24V rail)
Some experiments later I found, that a simple AC voltage above GND is good enough. DC voltage, like 2 AA batteries, also work, but it produces a brightness gradient from one side of the VFD to the other, their are some examples on youtube when you look for "VFD".
To get an AC voltage, this is a voltage which constantly changes it's polarity, I can use a H-Bridge circuit. These are very common in robotics to control DC motors. The H-Bridge allows to change the direction (polarity) and also the speed of a motor.
My favourite DIY electronics supplier offers a small module "Pololu DRV8838" which does exactly what I want.
The only input needed is Power and a clock source so the thing toggles polarity constantly. Clock? Turns out a simple RC element between the negative output and the PHASE input can act like a oscillator for this thing.
The image shows the hookup of the Motor driver to generate AC voltage for the VFD filament.
Step 4: Interfacing With 5V Logic
Now we can light up the whole display, great. How do we show a single dot/digit ?
We need to toggle each gate and anode at a certain time. This is called multiplexing. I've seen some other tutorials about this here. E.g ( https://www.instructables.com/id/Seven-Segment-Di... https://www.instructables.com/id/Multiplexing-7-S... )
Our VFD has lots of pins, all these must be driven with different values, so each would need a pin on the controller. Most small Controllers do not have that many pins. So we use shift registers as port expanders. These connect with a clock, a data and a select line to the controller chip (only 3 pins) and can be cascaded to provide as many output pins as needed. An Arduino can utilize it's SPI to efficiently serialize data out to these chips.
On the display side, there is a chip for this purpose as well. The "TPIC6b595" it's a shift register with open drain outputs, which handles up to 50V. Open drain means, that the output is left open when set to TRUE/1/HIGH and an internal transistor switches actively to the low side FALSE/0/LOW. When adding a resistor from the output pin to V+ (50V) the pin will be pulled up to this voltage level as long as the internal transistor does not pull it down to GND.
The circuit shown cascades 3 of these shift registers. Resistor Arrays are used as pull up's. The circuit also contains the filament power switcher (H-bridge) and a simple voltage booster which was later rejected and replaced with the XL6009 board.
Step 5: Making a Levelmeter
For this I use a Dot matrix display with 20 digits and 5x12 pixels per digit. It has 20 gates, one for each digit and each pixel has a plate pin. Controlling every pixel would require 60+20 individual controllable pins e.g. 10x TPIC6b595 chips.
I only have 24 controllable pins from 3x TPIC6b595's. So I connect a bunch of pixel to one larger level indicator pixel. Actually I can divide each digit into 4 because I can control 20+4 pins. I use 2x5 pixels per level indicator step. The pins for these pixels are soldered together, looks a bit chaotic but it works :)
PS: Just found this project where this display is controlled pixelwise.. https://www.mikrocontroller.net/topic/385250
Step 6: Programming the Arduino
As mentioned the shift register will be connected to a hardware SPI. In the pinout diagram of the Leonardo (Image from Arduino) the pins are called "SCK" and "MOSI" and look purple. MOSI stands for MasterOutSlaveIn, thats there the date is serialized out.
If you use another Arduino, search the pinout diagram for SCK and MOSI and use these pins instead. The RCK signal shoud be kept at pin 2, but this can be relocated when also changing this in the code.
The sketch runs the AD converter at pin A0 as an interrupt service. So the AD values are constantly read and added to a global variable. After some readouts a flag is set and the main loop picks up the ad value, transforms it into which pin does what and shifts it out to the SPI into the TPIC6b.. The Display update needs to be looped over all the digits/gates over and over again with a rate such that the human eye will not see it flickering.
Exactly the kind of job an Arduino was made for :)
Here comes the code for my Level meter display...
Step 7: PCB
I made a few PCBs for this project, just to have a nice and clean build. This PCB contains another voltage booster which did not deliver enough power, so I did not use it here and injected the 50V from the XL6009 booster instead.
The tricky part is adding the VFD, since these can have all kinds of shapes I tried to make the PCB somewhat generic in the VFD connector part. In the end you have to figure out the pinout for your Display and hook up the wiring somehow and eventually change the program code a bit to make everything fit together.
The PCB is available here: https://aisler.net/p/NKSVGTKN
Participated in the
Trash to Treasure