Freeform VFD clock
I decided to step things up a bit from the previous little freeform project and do something more complex.
This uses a Russian made IVL2-7/5 VFD (find them on eBay) as the display, cute little things. Controller IC is an ATTiny84, connecting to an HV5812P high voltage driver to power the VFD anodes.
Soldering the VFD
The first thing I did was to figure out an arrangement that I thought worked well, and connect the VFD to the HV5812P driver IC.
Proper orientation of this VFD is with the little glass nipple (super fragile, be careful!) to the left, 16 pins at the bottom, and 7 on top. Lower row has pins 1 to 16 from left to right, and upper row has pins 17 to 23 form right to left, so it all goes counter clockwise starting from bottom left. Here’s the IVL2-7/5 pinout:
13 - Top left segment
14 - Top segment
15 - Grid 5
16 - Filament
17 - Filament (same as 16)
18 - Grid 5 (same as 15)
19 - Grid 4 (same as 11)
20 - Grid 3 (same as 8)
21 - Grid 2 (same as 6)
22 - Grid 1 (same as 2)
23 - Filament (same as 1)
1 - Filament
2 - Grid 1
3 - Top dot of colon
4 - Middle segment
5 - Bottom left segment
6 - Grid 2
7 - Bottom right segment
8 - Grid 3 (the colon)
9 - Bottom dot of colon
10 - Bottom segment
11 - Grid 4
12 - Top right segment
The top row is a repeat of all the filament and grid pins from the bottom row, so I decided for balance that I would connect the segments at the bottom and the grids at the top, leading to the contraption below.
Power Supply
The ATTiny works at 5V so I decided I would use a common 5V USB power supply for the whole setup. The IVL2-7/5 VFD needs around 24V to 25V on the anodes (segments and grids), so I made a DC-DC booster setup as shown below.
This is based on an LM2577T switching regulator. These values worked well for me and produced an output voltage of a little under 25V. The resistors I used in the final circuit were slightly different as I ended up using some vintage mil-spec resistors of similar, but not completely identical values. I used ceramic capacitors for input decoupling and the RC combination on the COMP pin, and a larger electrolytic cap on the output, plus a 100uH inductor.
Next, I needed a source for the voltage to the filament. This VFD needs around 2.4V - 2.5V on one side of the filament. It could have simply been done with one resistor, but I also wanted to insert a photoresistor so that final voltage would depend on ambient light, less display brightness for a darker environment. For this, I used a BC337 (NPN) transistor and a voltage divider with the photoresistor on the base. The trick here was to figure out resistor values so that I would obtain a supply voltage for the VFD between 2.0V and 2.4V. Getting the result I wanted was a bit of trial and error, but the goal here was to not only limit the maximum voltage but also prevent it from going completely dark in low light. My final circuit had some modifications from my initial schematic because it wasn’t working quite like I wanted with the VFD load on it.
I’m sure there’s a better way to do this though, but it worked out.
I forgot to mention that fully breadboarding this stuff is a real pain so at some point you just have to go for it, start soldering, and fix later :)
The Brains
Now it’s time to put the ATTiny84 and the VFD driver together. The ‘tiny is paired with an 8MHz crystal and 2x 22pF capacitors for time keeping duties, and a couple buttons for controlling hours and minutes. Starting to attach it all to the main frame, built with 1/16 brass rods. The main support frame will carry the ground.
Here’s how the brains of the operation come together:
All Together
Adding the muscle. At this point it’s all measuring, bending, soldering…and then doing it again because it doesn’t fit. All the while trying to not break that damn little nipple. I did break one VFD, and burned another, but thankfully the one that I had already soldered did not get harmed (and you don’t really want to do that twice, to be honest.) Unlike the first HV5812P I used, which died for no reason I could figure out. I had to remove it and then solder the backup. But I did get better solder joints that time around so there’s a silver lining.
And finally, the end result. I added a tiny flip switch on the side, and used a USB type B plug for power, included some support for the buttons into the frame, and 3D printed a base.
It works, it was fun to do, and now I’ll move on to the next project :)
The Code
And here’s some code for it. Since I organized the connections between the controller and the VFD to suit the freeform aspect of things, it leads to a weird order of the segments rather than what we’d see traditionally, for example starting at the top and going clockwise. But it wasn’t difficult to figure out. The HV5812P is managed via SPI and there’s a bit of a weird sauce going on with the bits arrangement, but it works well. Hopefully the comments will make it clear.