The IV-18 specifications recommends 50 volts for anode/grid pulses, with an absolute maximum of 70 volts. Setting OCR0A to 128 in the software is sufficient to provide 55-60 volts, and the clock's Zener diode, D5, prevents voltage from ever exceeding 60 volts.
The Ice Tube Clock normally controls brightness by changing the anode/grid voltage, so with a constant voltage, another method is required for controlling display brightness. The most straightforward way is applying a PWM signal to the MAX6921 BLANK pin. By rapidly enabling and disabling each digit, the display will appear dimmer and brightness can be controlled by changing the duty cycle of the PWM signal.
The microcontroller provides three timers capable of generating PWM signals, but all are already used for various functions. Even so, timer 0 supplies a PWM signal to the boost circuit and is active whenever the display is active. Timer 0 can also be configured to output a second PWM signal on PD5/OC0B. Inconveniently, PD5 is already used for the MENU button, so modifications are required:
- cut trace between PD5 and the MENU button
- cut trace between PC3 and the MAX6921 BLANK pin
- wire PB4 to the MENU button (green)
- wire PD5 to the MAX6921 BLANK pin (blue)
Code: Select all
// COM0A1:0 = 10: clear OC0A on compare match; set at BOTTOM
// COM0B1:0 = 11: clear OC0B at bottom; set on compare match
// WGM02:0 = 011: clear timer on compare match; TOP = 0xFF
TCCR0A = _BV(COM0A1) | _BV(COM0B0) | _BV(COM0B1) | _BV(WGM00) | _BV(WGM01);
VFDs are typically driven by alternating current, so to generate an alternating current signal from the microcontroller, PC2 and PC3 are configured as outputs, with PC2 initially pushed high and PC3 initially pulled low:
Code: Select all
DDRC |= _BV(PC2); DDRC |= _BV(PC3);
PORTC |= _BV(PC2); PORTC &= ~_BV(PC3);
Code: Select all
PORTC ^= _BV(PC2) | _BV(PC3);
The push-pull circuit is incorporated into the clock as follows:
- glue the push-pull circuit board to the right plexiglass sidepiece
- cut traces from ground to female header pins 11 and 12 (picture below)
- desolder and remove R3
- wire the first push-pull input to microcontroller pin PC2 (yellow)
- wire the second push-pull input to microcontroller pin PC3 (yellow)
- wire the push-pull power to the clock power (red)
- wire the push-pull ground to the clock ground (black)
- wire the first push-pull output to female header pin 2 (white)
- wire the second push-pull output to female header pins 11 and 12 (white)
The full-board photo below is linked to a larger image, but please ignore the rightmost white wire. It's part of an unrelated mod to extend battery life.
Overall, I'm satisfied with the end result, pictured below. At very low brightness, individual segments seem to fluoresce more evenly. Increased voltage to the cathode eliminates the dim digit problem exhibited by some displays. And there is no brightness gradient across the display, which was sometimes noticeable in the original design at very low brightness (albeit barely). All-in-all, the improvement is minor, but there is something aesthetically pleasing about driving the IV-18 "to spec."
The software portion of this hack is implemented in my unofficial xmas-icetube firmware and may be downloaded from GitHub.