Introduction: Arduino VFD Display Clock Tutorial - a Guide to VFD Displays

About: Hi there, it's Frank. I'm a 20 year old electrical engineer student currently living in Berlin, Germany. In my free time, I'm in love with traveling, photography, long and calm hikes in the mountains, vegan…

... + A little bit about VFDs

Do you (still) remember the display of your old CD player, HiFi system or car radio? Have you ever noticed the displays used at your local supermarket that shows you the scanned item and the price of it?

These displays have a characteristic beautiful bright blue-green colored glow in common: These are so called vacuum fluorescent displays (VFDs) with outstanding brightness that look pin sharp. Used to replace Nixie tubes way back in the 1960s, they can be found in many of our consumer electronic devices.

Vacuum fluorescent displays look really kinda fancy and cool to me, I really love the blue-green color. That's why I decided to write this Instructable about a clock based on this technology. This is my first instructable here, showing you how I have designed built my clock and how you can build yourself exactly the same or a similar clock that utilizes the VFD display. I'm not a native speaker - just for you to know if you're wondering why some sentences might make no sense at all.

Look at the pictures above that I took if you haven't seen how VFD displays look like yet. The first one shows you how VFDs look different compared to LCDs and the second one shows how your clock could look like after assembling.

Got that I-want-to-do-it-too-feeling? Great, let's get started!




Table of Contents

  1. Introduction - The Arduino VFD Display Clock
  2. VFD Guide - Finding A (Suitable) VFD Display
  3. VFD Guide - Get To Know Your VFD Part I
  4. VFD Guide - Get To Know Your VFD Part II
  5. VFD Guide - Controlling Your VFD With A Microcontroller
  6. VFD Clock - The Hardware Design I: Part List
  7. VFD Clock - The Hardware Design II: Schematics & How It Works
  8. VFD Clock - The Arduino Software
  9. VFD Clock - Prototyping, PCB, Assembling
  10. VFD Clock - The Final Clock
  11. VFD Clock - Final Thoughts

Disclaimer: I am not responsible to anything you might do wrong with your components. The circuits have been tested over and over again by me but I still can't guarantee that they are free of goofs and/or errors. Note that I am neither an electrical nor a software engineer. Just a high school student fascinated by all that.

---

Revision History:

07/03/2015: 50k potentiometer R90 changed to 25k. Initially it was 50k, but I've corrected it to 25k. It failed to save the changes. Datasheet of LM2577T and R90 note on schematics added.

Step 1: VFD Guide - Finding a (Suitable) VFD Display

So one of the first questions of course you might ask is where you can get a VFD that you can turn into a clock.

Take a look at the upper picture. You wanna find a display that is suitable to be turned into a clock, something generic. Favorable are displays that make you think of a clock instantly like the one I got with 4 number digits and a digit for the dots. So displays that come in HiFi systems might be less suitable since they are too specific. The pic on the bottom left shows what I did with a display of the latter type.

I salvaged mine from a scrap lot of old electronics I got off eBay (actually I went for some vintage CPUs for my CPU Museum but the display came with the lot so I decided to turn it into something useful again). I took out this particular VFD display (it's a NEC FIP4B08) out of a PCB that might belonged to some household electronics device - something that had the ability to count the time but wasn't a clock itself. Possibly a microwave oven. You can see the remaining circuit board on the bottom right picture.

You can get one on eBay. I do believe that there are sellers that still have these kind of displays. If not, try to browse through scrap lots carefully, for example on eBay. They usually come along with old CRT TV circuit boards and other consumer electronics PCBs. You won't be that lucky if you focus on PC motherboards. Then, the "crate of devices that are not working and you always wanted to throw away but never had time to" might be a great source too if you have such. Or just ask around in your neighborhood and sweep through the streets looking for electronics others threw away.

Yes I said not working. Please avoid to take apart displays from working devices. I think that's just not worth it. I have came across a non working VFD in a non working device. 99% something else went wrong in this device and the VFD is OK.

Step 2: VFD Guide - Get to Know Your VFD Part I

Let's move on to the next step. I assume that you have already found the perfect display. Feel free to desolder the display from the old device. Now we will finally do awesome things with the VFD display such as enjoying its blue-green glow. Of course we need to wire up the VFD display correctly if we want to see it in action. In order to make this happen, there's some work ahead. Part I makes your display glow!

The first thing I want you to do is to google the part number of you VFD display. You will find a datasheet of the VFD if you are lucky enough. The datasheet provides the pinout of the display, tells where to apply what kind of voltage and a lot of other useful information. Study it and feel free to skip the two steps.

I wasn't that lucky enough so I had to figure the pinout myself, the hard way, even if the pinout was printed on the PCB. I noticed that LATER on (lol). So check, if the PCB where your VFD belonged to has the pinout printed on it. If not, the next part helps you with figuring out the pinout. Feels like too much reading ahead? Here's a useful video on YouTube I've found that shows the same things I will try to explain to you below:

Dave (EEVblog) has also uploaded a great video that shows you how to hack VFDs. This video is rather a guide on how to address the interface with VFD display and driver IC on it. But since we want to keep the circuit board as small as possible, we will write our own driver and design our own simple driver circuit.

Hacking The VFD Display - The Hard Way

A bit of theory: I think it is helpful starting off by telling you how a vacuum fluorescent display works.
It is great if you already how a triode vacuum tube works - the VFD itself actually IS a triode.

Inside the vacuum glass package of the display, a tungsten filament is located above the anode segments. At proper heat, the cathode (-) emits electrons that impinge on the anode make the fluorescent material attached to the anode (+) glow. A grid that sits between the cathode and the anode allows to control the electron flow.
So we need to find out the cathode, the anode and the grids of the display.

In short: We need to find the filament, the anodes (they represent the segments) and the grids (they represent the digits)!


Usually it's the easiest to find out which pins the cathode takes up. In most of the VFDs, these can be found separated left and rightmost. Since we only want the heat the cathode, you can either use a DC or an AC voltage. In our case it's easier to get DC, but AC voltage offers a more balanced brightness on both sides of the display while on DC, the side with the more negative voltage is brighter.
The usual VFD display works great with a filament voltage between 2.5V to 3V. When I accidentally went MUCH higher than the voltage, I blew up one of the filament wires, but the display still works. Breadboard, jumper wires, VFD display, power supply. Get set go! Now you can apply a voltage to the filament! You should NEVER see the filament glowing. Glowing shortens the lifetime of the display drastically. Don't do what I did (See 1st picture of Step I)

All the remaining pins in between must be anode and grid pins then. Lets tie all the pins together for now and apply a DC voltage of at least +12V. At +12V you will already see the display glow really bright, but you can safely go up to around 30-35V if you want things really bright. Look at the picture above how I've connected VFD displays just to light them up. Enjoy the light!

In short (DC):

  • One side of filament: GND
  • Other side of filament: 2.5-3V DC
  • Anode and grids: 12-36V DC and connect together

Step 3: VFD Guide - Get to Know Your VFD Part II

Welcome to the second part of exploring your VFD. Previously I hopefully helped you to find the filament pins and the pins of the grids and anodes. Now we will exactly figure out what these pins are good for. Now disconnect the wires connected to the grids and anodes. Take two jumper wires. Connect one wire rightmost and one leftmost. Now you should see one segment lighting up on the display. If not, just try around with some other pins.

Since I have a super short memory I found it useful to write everything down (Look at the scan). You could do it too if you have similar memory capacity. See how the numbers represent the grids (selecting the character/digit that you want to light up) and the letters a to g represent the anodes (segment), just like 7 segment displays. Then, my NEC display has horizontal bars located above and below the digits, for whatever use. I just called them x and y. The colon that splits the 4 digits shares the pins e and f and has its own grid. The 4 digit 7 segment VFDs might look quite similar to each other, but I do believe that they have different pinout. You have to figure out how your display works.

So if that is done, you can combine some segments and grids for fun and display some numbers, letters for example. I have written down the pinouts needed to display particular characters (numbers) myself. That's useful for later on.

Step 4: VFD Guide - Controlling Your VFD With a Microcontroller

Since you now know how your VFD displays the characters by applying some voltage somewhere we want to do even more with our VFD display. Especially if you get bored displaying only one character on all segments or already got exhausted un- and replugging wires for new characters over and over again. At this time you could either hire some crackhead who does this for you crazily fast or guess what... microcontrol it!

The picture above shows you how to drive the VFD display the least complicated way I could find. Any general purpose NPN would work in this case. I've used BC547B since these are most common in Europe. I assume that you have enough resistors lying around, if not, desolder some from your non working devices. I usually source parts from old circuit boards. That saves time and money compared to heading over to the local electronics supply.

Basically you can treat your VFD display like a regular seven segment display with a common cathode now. Sending a low signal to the base of the NPN transistor turns off the NPN. This will allow current to flow from the anode voltage through the 10k resistor to our segment or grid. So by turning on the transistor (high), the segment or grid will receive 0V from the emitter and turn off. In short: LOW on µC turns on segment/grid; HIGH on µC turns off segment/grid.


Browsing through Google and Instructables I've found code examples (Arduino based) and projects that show how to do some counting, how to turn it into a clock, how to hook it up to shift registers to save pins and how to multiplex. Of course you can write your own software and use any microcontroller you are comfortable with. There are even projects with 7 segment displays and 8051s. I sure would like to see some of my ceramic golden C8751s run a clock like this! :D

The second picture that I took with my lousy smartphone camera shows some code example running on the VFD display that is connected to an Arduino.

---

Do yourself a favor and use large breadboards to run your VFD display. Those small ones quickly run out of space and yea... Not good!

Step 5: VFD Clock - the Hardware Design I: Part List

Finally, now that you know more about how VFDs work, how you wire them up to do things you want them to do I think it's time to show you how you can make a clock out of your VFD, just like I did! Since I try not to keep you waiting, Here (or just take a look at the picture above) is the list of things I've used and you'll need to build the VFD clock. I've tried my best to use generic components.

  • 1x Atmel ATmega328P-PU. Purchase a standalone one or take it out of an Arduino!
  • 1x 28-pin DIP socket
  • 12x [or 13x (Note 0)] BC547B or similar small signal NPN transistor
  • 20x (approx.) 10k resistor 1/4W (You can never have enough 10k resistors)
  • 7x 33k resistor 1/4W
  • 4x Tactile Switch
  • 1x 16 MHz HC49U/S crystal
  • 1x LM7805 +5VDC linear regulator
  • 1x LM1117MPX-2.85 +2.85VDC linear regulator
  • 6x (approx.) 100n ceramic capacitor (You can never have enough 100n caps)
  • 2x 22pF ceramic capacitor
  • 3x 10µF electrolytic capacitor
  • 1x 470µF electrolytic capacitor
  • 1x DC input jack power connectorNote 0: The 13th transistor is used to control the bars above and below the digits. You can do without.

The required basic components should not cost you more than 20 EUR if you get them new. Otherwise you just haven't found the best source of components. I only needed to buy the AVR and the 2.85V regulator. All the other components were salvaged from scrap.

Obviously required:

  • The VFD display itself
  • An Arduino Uno for prototyping and/or uploading the code to the AVR microcontroller (Get it from gearbest.com)
  • Some perfboard or a fancy PCB
  • Some money Measuring equipment. I find the continuity testing function most helpful when soldering components. Use it to measure voltage levels and current draws
  • Soldering equipment
  • Some wire
  • A lot of coffee
  • A lot of time and much patience
  • Much love and passion
  • Someone you can show off your clock to

Then you need to decide whether you want to use an RTC module (I will explain in the next part) or build the module yourself AND if you want to build the step up converter yourself or use a step up module. I decided to build my own DS1307 module and use a boost converter. Actually it turned out that modules are much cheaper than self construction:

DS1307 Based RTC IIC / I2C Real Time Clock Module with Calender (Get it from gearbest.com)

XL6009 Step-up Module (Get it from gearbest.com)

For building the DS1307 RTC module on your own you need:

  • 1x DS1307 RTC IC
  • 1x 4-pin DIP socket
  • 1x CR2032 battery holder
  • 1x CR2032 battery
  • 1x 32.768 KHz quartz

For building the LM2577 based (very handy IC!) step up converter you need:

  • 1x 2k2 and 1k resistor all 1/4W
  • 1x 25k potentiometer (instead of 18k resistor)
  • 1x 100µH inductor (around 500 mA)
  • 1x 330n ceramic capacitor
  • 1x 680µF electrolytic capacitor
  • 1x 1N5821 schottky diode

Step 6: VFD Clock - the Hardware Design II: Schematics & How It Works

This step is to show you how the hardware of the clock works.

Actually it is just a freakin' simple extension of controlling the VFD clock. Take a look at the schematics. You will see the familiar elements like the VFD segment and grid driver transistors. Since eagle doesn't have this specific display, I just decided to place a male pin header that has the exact same pin count like my VFD. Next to an AVR controller you can find the DS1307 RTC and the buttons that help you to adjust the time. On bottom left, the 7805 provides the +5V voltage to the AVR microcontroller and you'll find the 2.85 regulator for the filament/cathode of the VFD. On the top left you can see the LM2577T boost converter. Read more about power supply considerations below.

---

The Arduino Standalone Design

I've decided to use the Arduino platform because it is easy to upload code to it. No SPI programming, no HV, just USB! However, this clock uses a standalone AVR ATmega328P-PU (datasheet) microcontroller instead of the whole Arduino Uno circuit board. Simply because of size and money. It goes like you upload the code to the Arduino on which your AVR µC is mounted on and then lift your AVR off the socket and plug it into your clock which has a standalone socket itself. In order to make an AVR think that it is on an actual Arduino PCB you need to connect the following:

  • Pin 1, /RESET IN to Vcc through a 10k resistor and to a tactile switch with the other end of the switch going to GND
  • Pin 7 and 20 to Vcc
  • Pin 8 and 22 to GND
  • Pin 9 and 10 to a 16 MHz crystal and each pin to one 22 pF ceramic cap with the other end of the cap going to GND
  • Pin 21 (AREF) is left floating for this project
  • You might add a 100n buffer capacitor between Vcc and GND right next to the AVR.

There you have it. A standalone Arduino.

---

Why Using An RTC?

Ever wondered why your PC or laptops keeps the time even after unplugging the power source? The answer is a real time clock IC that keeps holding the time. Since there's no way this IC can source power out of nowhere, a button cell CR2032 is used to keep it alive. But hey, that's fantastic! It means that the RTC saves you from adjusting the time everytime you remove the power source of the clock.
Additionally, you don't have to write your own clock ticking software. The RTC tells you what time it is. And has a higher precision compared to the AVR's timer. Clocks I have built with just an AVR (using the milis() function) aren't that exact. Maybe I just haven't found the correct way to make it super exact yet. But anyways, that are basically the main reasons why I choose to use an RTC.

The RTC chip used for this project is a commonly available DS1307 (datasheet). I've built the RTC directly to the other components to save some space, but normally it's cheaper if you go for a module, that's what I've found out.

Wiring for the DS1307goes like this:

  • Pin 1 and 2 to the 32.768 KHz quartz
  • Pin 3 to the positive side of the CR2032 socket while connecting the negative side to GND
  • Pin 4 to GND
  • Pin 5 and 6 (SCL and SDA) to the Arduino SCL and SDA pin (Pin 28 and 27)
  • Pin 7 left floating
  • Pin 8 to VCC.
  • You might add a 100n buffer capacitor between Vcc and GND right next to the DS1307

---

Power Supply Considerations

You can really do whatever voltage configuration you want. It's all possible. Or just do like I did with 12VDC out of a wall wart. But generally speaking it's good to keep in mind that very little current is required at high voltage for the anodes and grids and much current on the lowest voltage level (2.5-3V).

  • So if you want to use a higher voltage power source (24 DC e.g.): Mind the power consumption of your 2.85/low voltage linear regulator. It will surely produce some serious heat. Add a heat sink. The advantage though is that you won't need a boost converter anymore.
  • There's no actual advantage of using a 12V power source like I did. Because you need to regulate down the high voltage for the AVR and the filament and boost the voltage for the anode. The only reason why I might have used 12V is because I have just too many wall warts lying around and 12V just came in handy. Maybe that's the advantage. It's the most compatible solution.
  • I think that a 5V source, out of a USB connector e.g. is the most efficient solution. The 7805 regulator won't be needed. Less heat will be produced to regulate voltage from 5V down to 2.5-3V and a boost converter can still be used to generate a small amount of current at high voltage.

In case you are building a step up converter yourself, it's necessary to find suitable feedback resistors for the step up switching regulator, the LM2577T (datasheet). Use a 25k potentiometer instead of the 18k that can be seen on my schematics. 18k for R90 would only give you an output of 23.5V. We want more. Much more. So with 25k for R90 you will get around 32V.
However I got my hands on a boost converter module and that even saved money. At least Germany you have to pay more for LM2577T + parts compared to a module.

Current draw of my VFD clock at 12V DC: Around 120-180 mA, I'd expect 200mA max (see bottom picture. You only need to look at the multimeter). That's about 1-2 Watt. Maybe 3 Watt when you count the power consumption of the wall wart. Of course yours could draw more or less current. Find that out by measuring the current!

---

Schematics: Below you can find the original eagle files I've created. Up above is the PNG rendered version with come comments on it. On the 2nd schematic the 60 seconds LED circle has been removed.

Step 7: VFD Clock - the Arduino Software

Yes, let's talk about the software, a little bit. Not that I can say much about it - I don't even dare to call myself a beginner. I'm well... almost close to a noob.

Okay, the software is written to run on the Arduino plattform and an exact replica of the awesome work that niq_ro has done and can be found here. I've slightly adjusted the logic levels and some basic stuff so that it works on the VFD clock now. But still, I mostly have no idea how this sketch works. Adjustments I've made:

  • Inverting the HIGH and LOW states for common cathode
  • Adjusting the pins according to my circuit diagram
  • Making the clock showing one more digit in the time between 0:00 and 9:59 -> 00:00 and 09:59

Known bugs: The colon is not working properly. It actually needs its own grid controlling but now it is just lighting up according to the active segments on the left:

  • 1: none
  • 2: lower
  • 3: none
  • 4: upper
  • 5: upper
  • 6: both
  • 7: none
  • 8: both
  • 9: upper
  • 0: both

Then, it could still have a liiiiitle bit more of brightness. Maybe it's caused by multiplexing. BUT I didn't manage to figure out anything close to a solution yet.

So this is also the part where I really need your help. I'm on my way learning to write proper software to hardware but that takes a loooooooooooooong time. Until then, it'd be really cool if you could somehow help the VFD clock to become brighter or solving the colon issue. I will gladly add your contribution to the project, also for others.


Have a look at the software yourself and upload it to your Arduino. Hook up the wires accordingly to the comments I made on the sketch to the schematics!

Step 8: VFD Clock - Prototyping, PCB, Assembling

If you've followed this guide exactly, your VFD clock as well as everything that comes with the VFD clock circuit hooked up on a breadboard running either with connection to an Arduino or with a standalone AVR. It can possibly look like the picture above: Chiz load of wires!

Now if you feel like you had enough of breadboarding and prototyping, let's make it permanent (and make some breadboards available for other projects again).

My VFD clock had to be built on perfboard because of three most important reasons:

  1. Money
  2. Money
  3. Money
  4. Money

Oops, actually four reasons. I attempted to create a PCB for you (double sided) on eagle. I don't remember if it is final or not anymore. Anyways, you can take a look at the PCB design below!

Soldering everything on a PCB usually takes a few hours; the perfboard soldering can take up to one week or a few days if you are fast enough. So prepare some coffee and take some patience with you. If you feel exhausted or demotivated, take a break and go for a walk. Here are some tips for you during assembly I think that might be useful to you:

  • Doesn't matter how you are going to assemble your parts into a clock, it's always helpful to begin soldering the shortest, smallest components. Resistors definitely belong into this category as well as SMD capacitors, SMD ICs and diodes. The last thing you want to do is to mount TO-220s and electrolytic capacitors. With those soldered to the board, its really uncomfortable if you want to change anything of smaller size.
  • When assembling on perfboard, remember to initially roughly locate the components and see how you can get the best possible way to connect. You want to eliminate overlapping and crossing over wires in order to reduce the jumper wires you will have to use.
  • Try to solder short and thick traces in order to ensure the best possible connection.
  • Use the continuity testing function of your multimeter regularly to check if you did everything right, even if you are mounting components on a PCB and check for leads that you have tied together accidentally.
  • Remove unwanted connections with a solder sucker.

Take a look at a picture I've taken during assembly (2nd one). You can do it better than I did!! Building it on PCB using smaller SMD components can save whole lot of space and makes the clock looks way more elegant. I could have also used much more SMD components on perfboard. That could have superseded the need of a second perfboard.

Finished? DO NOT INSERT THE ICs INTO THEIR SOCKETS YET! Check every connection twice and if you really think that everything has been mounted correctly, plug in the main power chord. Now grab your multimeter and check all voltage levels. Especially those on the IC sockets (AVR, DS1307) and the output voltages of the voltage regulators. If you know that everything is correct, unplug the board again, insert the programmed AVR and maybe the clock IC, pray and hope the circuit to work!

Step 9: VFD Clock - the Final Clock

Well yea... That's the result after a few days of wiring. For me it worked right away. So I was kinda happy that I didn't mess up anything during wiring at all.

But you see the size relation VFD display size <-> clock size? Or can relate what I mean? That could, like I've just said, have been avoided using an actual PCB.

And since I neither have a saw, nor a drill at home, don't know how to use design software and don't have a fancy 3D printer, I had to build the casing from scratch. I cut off some old PCBs with scissors to form a stable platform where the PCB can sit inside. One the top scrap PCB I created a window so that the VFD display can look out of it. The PCBs were then covered by some fake wood textures.
I measured the height of the tallest component, which is the VFD display of course and fixed a sliding mechanism on the inside with cardboard. Then I created a backplane out of another piece of PCB and coated it with some background that slides into the sliding mechanism and perfectly holds the whole perfboard and the display on the back side. That all can be seen on the bottom two images. The left one shows the front view; the second one the back view and the view to the inside of the clock.

To adjust the clock, it is required to take the clock out of the box. That's why a RTC module is such a great help. You can do it better though with buttons on the side or whatever creative idea you might have.

Step 10: VFD Clock - Final Thoughts

No, this picture of the clock standing on a vintage Grundig tube radio, next to some valves, modern and vintage processor boxes and a poster of Tiffany Alvord only tells you half of the truth. Actually it's sitting on my nightstand as the perfect clock - especially at night. Take a look at the bottom picture. That is how it looks like when it's really really dark. And to me it looks really really beautiful. I din't take a photo of my nightstand because... well... I've not yet tried to decorate it.

One big advantage compared to fancy nixie clocks that might also be used as a clock for the nightstand is that this VFD clock only operates at harmless voltages while nixie clocks have voltages that can seriously injure you if you touch them. Since you never know how you behave when you're sleeping, you are better off with a clock with harmless voltages.

---

Thank you very much for your time reading and or following instructions of this instructable!

Now that was a lot of work and effort. But I just had to share my VFD passion with you so I couldn't help myself not to do an Instructable like this.

If you find this Instructable helpful, please please please help me to improve the Instructable and or the VFD clock project in any way you feel like you want me to - doesn't matter if software (e.g. bugfixing, expanding, improving), hardware (producing an actual PCB e.g.) or casing (designing and producing a better case) because I am sure a whole lot of things can be improved in order to get a VFD Display clock that is more perfect than perfect.

You can even help me finding grammar mistakes to make this Instructable more readable!

---

Frank

Bedroom Contest

Participated in the
Bedroom Contest