Single-AA NiMH VFD Clock From a Recycled Calculator Display
by Sciter_ in Circuits > Clocks
214 Views, 3 Favorites, 0 Comments
Single-AA NiMH VFD Clock From a Recycled Calculator Display
This project is a custom VFD clock built from a recycled calculator vacuum fluorescent display. The clock is controlled by an ATmega328P and an HV5812 high-voltage shift-register driver, with timekeeping provided by a 32.768 kHz watch crystal.
The main technical goal was to build a practical VFD clock that can run from a single AA NiMH cell, not from a Li-ion battery or a conventional multi-volt supply. During normal use, the clock runs from USB 5 V while the AA NiMH cell remains connected as a backup and buffer source. When USB power is removed, the clock continues running from the battery without a visible reset or display disturbance.
The firmware includes multiplexed VFD driving, safe blanking control, LDR-based automatic brightness using frame skipping, a menu system for setting time and display options, battery voltage diagnostics, USB power detection, piezo feedback and addressable RGB ambient underglow.
The project also documents several practical development issues: VFD ghosting, filament and high-voltage measurements, NiMH capacity testing, soft charging behavior, WS2812 timing problems with Timer0 disabled, and the final mechanical arrangement using an auxiliary LED/support board.
Supplies
Main components:
- Recycled calculator VFD display
- ATmega328P microcontroller
- HV5812 high-voltage VFD driver
- 32.768 kHz watch crystal
- Original-style low-voltage VFD power converter / transformer section
- LM2576-ADJ buck converter for USB-powered operation and soft NiMH charging
- One AA NiMH cell
- Schottky diode
- 2.2 ohm power resistor for the USB/battery buffer path
- LDR for automatic brightness control
- Three push buttons: SET, PLUS, MINUS
- Addressable RGB LEDs for ambient underglow
- Piezo element for button feedback
- Universal prototype PCB
- Copper pipe elbows for the VFD display mount
- Brass standoffs
- Auxiliary lower PCB for RGB LEDs and mechanical support
Tools:
- Soldering iron
- Multimeter
- Oscilloscope
- USBasp / AVR programmer
- Arduino IDE / MiniCore
- Small hand tools
- Optional: 3D printer or CNC/engraver for panels and labels
The Idea and the Recycled Calculator VFD Display
The starting point of this project was a small vacuum fluorescent display taken from an old calculator. These displays have a very specific look: bright green-blue segments, visible internal structure and a warm retro character that is difficult to reproduce with modern LED or LCD modules.
Instead of keeping the original calculator electronics, I wanted to reuse the VFD display as the basis for a completely new clock. The goal was not just to make another retro clock, but to build a practical low-voltage VFD clock around a recycled display, a custom ATmega328P firmware and an HV5812 high-voltage driver.
The most interesting constraint was the power system. Many small VFD projects use a Li-ion cell or an external multi-voltage supply. This clock was designed around a single AA NiMH cell, with USB 5 V used for normal operation and soft charging. When USB power is removed, the clock continues running from the AA cell without a visible reset.
This step shows the original display and the overall design idea before going into the power supply, VFD driving, multiplexing and firmware details.
Reverse Engineering the Original Calculator Power Supply
Before designing the new clock electronics, I first reverse engineered the original calculator power supply. This was an important part of the project, because the calculator was already able to run a VFD display from a single AA cell.
The original circuit used a small transformer-based blocking oscillator. From one low-voltage battery it generated several different voltages needed by the calculator: an AC filament supply for the VFD, a positive high-voltage rail for the display segments and grids, a negative filament bias, and a logic supply for the calculator IC.
In my measurements, the filament winding produced roughly 2 V RMS for the VFD heater. The display supply was around +27 V with respect to the calculator ground, while the filament was biased negatively, roughly around −15 V. This means that the active VFD electrodes had a much higher voltage relative to the filament than the raw positive rail alone might suggest.
This was the key discovery: the original calculator was not powered by a hidden high-voltage battery or a conventional multi-voltage supply. It used a compact low-voltage converter to generate everything the VFD needed from one cell.
For the clock, I did not keep the original calculator logic. Instead, I reused the idea of a single-cell VFD power system and built a new controller around an ATmega328P and an HV5812 VFD driver. Understanding the original power supply helped determine the correct filament voltage, display voltage range and biasing conditions for the recycled VFD display.
This step also showed why the project is more challenging than a typical VFD clock powered from USB, 12 V, or a Li-ion battery. Running a VFD display from one AA NiMH cell requires careful attention to converter startup, voltage margins, display brightness and total current consumption.
Driving the VFD With ATmega328P and HV5812
After understanding the original calculator power supply, I replaced the original calculator logic with my own control electronics. The clock is built around an ATmega328P microcontroller and an HV5812 high-voltage serial driver.
The HV5812 is used as the interface between the low-voltage microcontroller and the VFD display electrodes. The ATmega sends serial data to the HV5812, which then drives the VFD segments and grids at the required higher voltage level. This made it possible to keep the microcontroller side simple while still controlling the recycled VFD display safely.
The display is multiplexed. At any instant, only one digit position is enabled, while the segment pattern for that position is loaded into the HV5812. The firmware quickly scans through all digit positions, creating the appearance of a continuously lit display.
The basic control signals are:
- DATA from the ATmega to the HV5812 serial input
- CLOCK for shifting data into the driver
- STROBE / LATCH for transferring shifted data to the outputs
- BLANK for safely disabling the HV5812 outputs during switching
The BLANK signal is especially important. It ensures that the VFD outputs are disabled while new data is being shifted and latched. This avoids unwanted static drive conditions and reduces display artifacts during multiplexing.
The final firmware also includes a hardware pull-up on the BLANK line, so that the display remains blanked during reset or startup until the ATmega firmware is fully initialized. This is a useful safety feature when working with VFD displays and high-voltage drivers.
Multiplexing, Blanking and Brightness Control
The recycled calculator display is not driven as a static display. It is multiplexed: the firmware enables only one digit position at a time, loads the correct segment pattern for that position into the HV5812, and then quickly moves to the next digit.
This is important for two reasons. First, it reduces the number of required driver outputs. Second, it keeps the VFD operation close to how these displays were originally used in calculators. The firmware scans through all digit positions fast enough that the human eye sees a stable display.
The multiplexing sequence is designed to avoid unsafe or undefined display states. Before changing the HV5812 data, the firmware activates the BLANK signal. This disables the high-voltage outputs while new segment and grid data is shifted into the driver. After the new data is latched, BLANK is released and the selected digit is illuminated.
The simplified sequence is:
- BLANK on: disable VFD outputs
- wait for a short dead time
- shift new segment/grid data into the HV5812
- latch the new data
- wait briefly
- BLANK off: enable the selected digit
The BLANK line also has a hardware pull-up resistor. This keeps the display blanked during reset or startup, before the ATmega firmware has initialized the multiplexing routine. This was added as a safety measure so that the VFD is never accidentally left in a static high-voltage state.
Brightness control is implemented in firmware. Instead of regulating the VFD high-voltage converter directly, the clock uses frame skipping. At full brightness, every multiplex frame is displayed. At lower brightness levels, some frames are intentionally skipped while keeping the multiplex timing and safety blanking intact.
For example, the firmware can display approximately:
- 16/16 frames for full brightness
- 12/16 frames for high brightness
- 8/16 frames for medium brightness
- 4/16 frames for low brightness
This approach keeps the high-voltage supply stable and avoids the instability that can occur when trying to regulate VFD brightness by changing the converter output voltage. It also makes automatic brightness control simple: the LDR value is mapped to one of several frame-skip brightness levels.
During development, I also tested additional anti-ghosting techniques, including longer blanking intervals and briefly latching an all-off state between digits. In this particular display the improvement was small, so the final firmware keeps the simpler and brighter multiplexing method. A small amount of residual glow is visible only in complete darkness, which appears to be normal for this VFD and its biasing arrangement.
Single-AA NiMH Power System
One of the main goals of this project was to keep the clock compatible with a single AA NiMH cell. This is a much more difficult constraint than using a Li-ion cell or an external 5 V / 12 V supply. A single NiMH cell has a nominal voltage of only about 1.2 V, and during discharge the voltage can fall significantly lower.
The original calculator already demonstrated that a VFD display can be powered from one cell by using a transformer-based low-voltage converter. I used that idea as the basis for the clock power system. The converter generates the voltages needed for the VFD filament, the display electrodes and the logic supply.
During testing, the clock remained operational even when the AA cell voltage dropped well below 1 V. This was one of the most important results of the project. It means that the clock is not simply a USB-powered VFD display with a cosmetic battery, but a real single-cell VFD clock.
The single-cell operation also revealed some practical issues. The average current drawn from the battery is not constant: as the battery voltage falls, the converter has to draw more current to deliver roughly the same output power. This means that battery runtime is not simply calculated from the nominal capacity printed on the cell.
I tested several AA NiMH cells and found that the real usable capacity can be much lower than the advertised value. For example, a new 2200 mAh cell may not necessarily deliver 2200 mAh at the required load current. For this reason, the clock firmware includes battery voltage diagnostics, and I also performed separate discharge tests at about 200 mA down to 1.00 V under load.
For normal use, the AA NiMH cell is not intended to be the only power source all the time. The clock is designed to run primarily from USB 5 V, while the AA cell acts as a backup and buffer source. However, the fact that the clock can run directly from the cell is essential: if USB power is removed, the clock continues operating without a visible reset.
USB Power, Soft Charging and Battery Backup
Although the clock can run from a single AA NiMH cell, I wanted it to be practical for everyday use. For that reason, the final power system uses USB 5 V as the main supply, while the AA NiMH cell remains connected as a backup and buffer source.
The USB 5 V input feeds an LM2576-ADJ buck converter. The buck output is set to a low voltage and then connected to the clock supply rail through a Schottky diode and a 2.2 ohm resistor. The AA NiMH cell is connected directly to the same system rail.
The simplified power path is:
USB 5 V → LM2576-ADJ → Schottky diode → 2.2 ohm resistor → V_SYS / AA+
The AA NiMH cell is connected to V_SYS as a buffer. When USB power is present, the buck converter supplies the clock and can gently charge or maintain the NiMH cell. When USB power is removed, the battery immediately takes over without any visible reset or display disturbance.
The 2.2 ohm resistor is important. It limits the current from the USB-powered buck converter into the clock and battery rail. Without this resistance, the circuit could push too much current into a discharged NiMH cell. With the resistor in place, the behavior is soft and self-limiting. In my tests, the charging current initially reached a modest value and then gradually dropped as the battery voltage increased.
After several hours of operation from USB, the battery voltage settled around 1.30 V and the charging current dropped to nearly zero. This is not a fast charger and it is not intended to fully charge the cell to maximum capacity. Instead, it behaves more like a safe soft-maintenance / backup system.
A two-pole power switch is used so that both the battery ground and the USB/buck ground path are disconnected when the clock is switched off. This prevents the situation where the clock is off but the buck converter continues charging the NiMH cell unnecessarily.
The final arrangement worked very well in practice: with USB connected, the clock runs normally and the battery is maintained as a backup. When USB is disconnected, the clock continues running from the AA cell without any visible change. When USB is connected again, the circuit returns to USB-powered operation.
Firmware, Menu and User Interface
The firmware is responsible not only for timekeeping and VFD multiplexing, but also for the complete user interface of the clock. I wanted to keep the hardware interface simple, so the clock uses only three buttons: SET, PLUS and MINUS.
The SET button opens the menu and confirms selections. PLUS and MINUS change the selected value. A long press of SET exits the menu and returns to the normal time display.
The menu is organized as a set of numbered items. This avoids the need for a larger alphanumeric display or printed front-panel labels. The same VFD display that normally shows the time is also used to show menu numbers, settings and diagnostic values.
The firmware includes settings for time, date, display brightness, automatic dimming, RGB underglow colors, RGB brightness and several diagnostic screens. These diagnostic screens were very useful during development, especially for checking the raw LDR value, battery voltage measurement, USB power detection and internal brightness level.
Automatic brightness is handled by an LDR connected to an analog input. The firmware reads the light level and maps it to one of several frame-skip brightness levels. This means the VFD high-voltage supply remains stable, while the visible brightness changes in software.
The RGB underglow is also controlled by the firmware. The clock can store separate colors for the left and right side, adjust RGB brightness, and automatically enable or disable the underglow depending on ambient light and USB power detection. The RGB LEDs are powered from the USB 5 V input, so they are disabled when the clock runs only from the AA backup cell.
A small piezo element provides short button feedback clicks. The final firmware avoids using Arduino tone(), because Timer2 is reserved for the 32.768 kHz watch crystal time base. The button click is kept short and non-blocking so it does not disturb the clock operation.
This part of the firmware took a surprising amount of tuning. The main challenge was not displaying the time itself, but making the clock comfortable to use: stable button debouncing, sensible long-press behavior, slow enough auto-repeat, useful diagnostics and safe interaction with the multiplexed VFD display.
Mechanical Construction
The mechanical construction is deliberately visible. Instead of hiding the electronics inside a closed case, I wanted the clock to show the recycled VFD display, copper parts, brass standoffs and prototype-board construction.
The main circuit is built on a universal prototype PCB. This made it possible to adjust the layout during development, because the project involved many practical changes: display pin mapping, power supply tuning, button placement, battery backup wiring, RGB underglow and diagnostic inputs.
The VFD display is mounted using small copper pipe elbows. These parts work both as a visual design element and as a physical support for the display assembly. Together with the green-blue VFD glow, the copper gives the clock a retro-futuristic / workshop-built appearance.
The AA NiMH cell is placed directly on the clock assembly, because the single-cell power system is one of the main ideas of the project. I wanted the battery to remain visible rather than hidden inside the case. This makes the power concept clear at first glance.
An auxiliary lower PCB is used for the addressable RGB LEDs and mechanical support. The RGB LEDs are mounted on the underside so that they shine downward onto the table instead of directly into the eyes. This produces a soft ambient underglow without interfering with the readability of the VFD display.
The clock also includes three small buttons for the menu interface. They are positioned so they can be reached from the front or side without adding a large control panel. The goal was to keep the front visually dominated by the VFD display and the copper supports.
The result is not a polished commercial enclosure, but that was intentional. The project is meant to look like a functional experimental instrument: visible parts, visible wiring, copper supports, brass details, VFD light and a real AA cell powering the system.
Testing, Problems and Lessons Learned
Testing, Problems And Lessons Learned
This project required a lot of practical testing. The most difficult parts were not the clock display routine itself, but the power system, VFD biasing, display brightness, button behavior and interaction between different firmware features.
One of the first issues was VFD ghosting. In complete darkness, some inactive segments were faintly visible. I tested longer blanking intervals and even briefly latching an all-off state between multiplexed digits. In this particular display, the improvement was small. The remaining glow appears to be related more to the VFD biasing and filament reference than to the multiplexing sequence itself. In normal lighting, the ghosting is not visible.
Another important test was filament measurement. The filament voltage was approximately 2 V RMS, similar to the original calculator. Measuring filament current was more difficult, because switching noise and common-mode interference can make small shunt measurements misleading. In the end, the practical result was more important than the raw shunt reading: the display brightness and filament heating remained stable, and the total current consumption showed that the main power draw came from the converter, not from the filament alone.
The single-AA NiMH power system also required several tests. The clock can run from the AA cell alone, and it continues operating when USB power is removed. However, real battery runtime depends heavily on the actual usable capacity of the cell. Some cells marked as 2200 mAh did not deliver anything close to that in practical testing. This confirmed the need for battery voltage diagnostics and separate discharge testing.
The USB soft-charging and backup system was tested by running the clock from USB for several hours. The AA NiMH cell settled around 1.30 V and the charging current gradually dropped close to zero. The 2.2 ohm resistor in the buffer path became warm but remained acceptable in my build. This confirmed that the circuit behaves as a soft maintenance and backup system rather than as a fast charger.
One firmware problem was caused by the addressable RGB LEDs. The clock firmware originally disabled Timer0 to reduce power consumption. This worked for the clock itself, because timekeeping uses Timer2 with a 32.768 kHz crystal. However, the Adafruit NeoPixel library depends on timing functions that require Timer0. With Timer0 disabled, the RGB update could hang the firmware and the buttons stopped responding. The fix was to keep Timer0 enabled when using WS2812 or SK6812 LEDs.
Button behavior also needed tuning. The first menu versions reacted too quickly or skipped values during long presses. The final firmware uses debounce logic, delayed auto-repeat and slower repeat timing, so the clock can be set comfortably using only SET, PLUS and MINUS.
The main lesson from the project is that a recycled VFD display can be reused successfully, but it must be treated as a complete system. Filament supply, high-voltage drive, biasing, multiplex timing, power conversion and firmware all affect the final result. Small details such as blanking, grounding, ADC filtering, button debounce and Timer0 usage can make the difference between an unstable prototype and a usable clock.
Firmware and Project Files
A minimal demonstration firmware is attached to this step. It shows the basic principle of safe HV5812 multiplexing and displays the fixed test time 10-18-47. The separators are displayed using segment G only.
This minimal code is not the full clock firmware. It does not include the menu system, real timekeeping, LDR automatic brightness, battery voltage diagnostics, USB power detection, RGB underglow or piezo feedback. It is intended as a readable starting point for understanding how the ATmega328P sends data to the HV5812 and how the VFD display is multiplexed safely.
The complete clock firmware used in my final build is more specific to this particular recycled calculator VFD display, especially because the segment and digit mapping depends on the actual display wiring. Anyone reusing this code with a different VFD display should expect to adjust the output mapping tables.
The schematic attached to this step is a simplified core schematic. It shows the main parts of the project: the ATmega328P, the HV5812 driver, the recycled VFD display, the 32.768 kHz crystal and the original-style single-cell VFD power converter. Some auxiliary parts, such as the USB soft-charging circuit, push buttons, LDR input, battery voltage sensing, USB power sensing, RGB LEDs and piezo feedback, are not shown in the schematic for clarity.
I would be happy to hear any ideas, suggestions or improvements from other makers, especially regarding the power supply, VFD driving method, firmware or mechanical construction.