[arduino|module]Library for IV-22 VFD Tube


It is not only excitement and surprise when I receive the IV-22 VFD Tube Module for Arduino from NixeClock.org. As our newly developed Nixie Tube module for Arduino, VFD tube is also an old electronic component that is vanishing from our sight. As the mark on tube, all these model IV-22 VFD tubes are manufactured in former Soviet Union on November, 1991. Yes, I wrote former Soviet Union, but not Russia. November 1991 was right before its dissolution, as the end of the Cold War. Now the VFD tube has been out of production for almost two decades, leaving the mark whispering about the old days.


Open Hardware community energizes VFD tubes with bran new life. With independent power supply, serialized extendible controller and open-source Arduino library, driving a VFD tube has become easy and convenient than ever. Most of the VFD tube works among a few hackers are clock application with a fixed quantity, like 4 or 6. Now we can make a difference.


Unlike the popular and kinda cheap LED digital display, the first challenge to drive VFD tubes is always the voltage it required, and it is not 12 or 24 volt DC we are talking about, it is 30 volt AC. This module takes care of this problem. 5V DC is all it needs. Since it consumes “big” currency, like 200ma each, regular USB host is only capable of powering two of them. An external power supply is strongly recommended. Every module got its own power pumb and transfers the source power from input to the next module. In this way, no matter how many module connected in serial, as long as the power supply is sufficient, each module will be functional just fine, which supply us great expansibility and all possibilities.


There are two sets of VCC/GND available on the pins dock. one could be used as power supply, and the other one could be the power for the mcu system, like Arduino, Rasperberry Pi or any other platforms. 5V is always most welcomed in hackers’ world.


Similar to the Nixie Tube module, 74HC595 is adopted, the most popular serial-in and parallel-out logic controller. There are two chips of 595 on each module. Of the 16 output pins we can programmed, 8 are being used for the digital display, as there are 7 segments to constitute an 8 figure and 1 segment for the dot, 3 are appointed to the background RGB LED, and the left 5 are N/C. So, there are 2^8 states of the digital figure, (along with digits, it can display a few letters,) and 8 background colors, White, Yellow, Magenta, Red, Cyan, Green, Blue, Black/off.


High Byte Low Byte
RGB Background LED 7 Segment digit with a dot
R G B dp g f e d c b a
10 9 8 6 3 2 4 7 5 1 0

Based on 74HC595 driver, I have developed a Arduino library for this module. It is host on https://github.com/aguegu/nixie-tube,releases at https://github.com/aguegu/nixie-tube/blob/master/VFDTube.zip

Declare an object of VFD moudle in serial is quite simple.

VFDTube tube(8, 9, 10, 11, 6);
// DIN on pin #8, OE on pin #9, STCP on pin #10, SHCP on pin #11,
// 6 for sections count in serial

Only 4 pins are needed to make full control of the tubes. There are no special requirements for the pins, as long as it works with “digitalWrite(pin, value);” function. It is recommended to connect OE to a pin with pwm, with which the brightness can be easily configured.


To support advanced function, the quantity of tubes in chain is also needed. The library will apply for certain amount of memory.


Background color can be determined by the two functions below. One sets color to all sections, the other works individually.

void setBackgroundColor(Color color);
void setBackgroundColor(byte index, Color color);

Colors are defined in a enum as:

enum Color
	White, Yellow, Magenta, Red,
	Cyan, Green, Blue, Black,


To configure the digits display:

void setPoint(byte index); // set the dot/dp on the no. index section
bool setChar(byte index, char c); // set character c on the no. index section
void setChar(char c); // set character c to all sections

the character patterns are stored in flash as well, including number 0-9 and a few letters. Example:

tube.setChar(0, '0')


To get the effect as above picture, the code would be like

tube.setChar(0, '1');
tube.setChar(1, '6');
tube.setChar(2, '2');
tube.setChar(3, '2');
tube.setChar(4, '9');
tube.setChar(5, '8');

Well, to make job done quicker and easier, printf() function is introduced in to the library. printf(); is widely used for formatting output. However, in default Arduino system, formatting float/double is not supported yet.

So the sample above can be replaced as



tube.printf("%02d.%02d.%02d", 16, 22, 98);

It makes life easier, right? No more pain at locating the figures. After configuring the cache, you may use

void display();

to send the cache to the VFD modules. It is probably the only function that working on hardware layer. Others are mainly cache setting functions. For more details, please check https://github.com/aguegu/nixie-tube/tree/master/VFDTube

More photos of VFD tube module for Arduino.

A cute “101” on the back









VFD Tube Module with Nixie Tube Module

Library host on: https://github.com/aguegu/nixie-tube,releases at https://github.com/aguegu/nixie-tube/blob/master/VFDTube.zip

For more details about the hardware design, please check the hardware designer, Yan Zeyuan’s blog, http://nixieclock.org.

Hardware Description in English: http://www.nixieclock.org/?p=411
Hardware Description in Chinese: http://www.nixieclock.org/?p=381

Application Guide in English:

Aplication Guide in Chinese:

Available on DFRobot: www.dfrobot.com/index.php?route=product/product&filter_name=vfd&product_id=831


此条目发表在模块分类目录,贴了, , , , , , , , 标签。将固定链接加入收藏夹。