-
Oscillator Inhibit and Power-Path Fix
4 hours ago • 0 commentsOne of the later improvements was adding firmware-controlled shutdown of the VFD oscillator.
Originally, the clock could blank the VFD display, but the high-voltage and filament converter continued running. I wanted the firmware to be able to shut down the VFD power section completely when the display was intentionally turned off.
The oscillator is built around a ZTX851 transistor. The inhibit circuit uses an ATmega328P output pin driving a BC547 transistor, which pulls the base drive of the oscillator transistor down through a resistor. Initial tests with a 220 ohm resistor only reduced the oscillation amplitude, but did not stop the oscillator completely. Oscilloscope measurements showed that the oscillator was still running, just in a weakened state.
Changing the resistor to 100 ohm solved the problem. With the inhibit signal active, the oscillation stops completely, the VFD high voltage drops to zero, and the filament supply also disappears. Measurements confirmed that the BC547 is not stressed: the voltage across the 100 ohm resistor during shutdown is only about 0.12 V, so the current is roughly 1.2 mA.
A second issue appeared after adding Schottky OR-ing between the USB 5 V supply and the internal 5 V branch. When the oscillator was shut down, the ATmega briefly lost power during the transition between supply paths and restarted. Adding capacitance to the shared 5 V logic rail fixed the brownout. In the final build, a 220 uF capacitor was enough to keep the ATmega running during the transition.
The firmware now handles the VFD shutdown as a local power-section state change, not as a full system reset. When the oscillator is disabled, the ATmega continues running and keeps time. When the VFD section is enabled again, the firmware restarts the VFD driver sequence safely: oscillator on, delay for power recovery, HV5812 cleared, multiplex state reset, and then the display is unblanked.
This made the clock behave much more like a finished device: the display can be turned off cleanly, the VFD power section is not running unnecessarily, and the time is preserved.
Sciter