Very strange VFD effect

Hi, I have a very simple VFD clock code, edited and stripped down from other sources. It literally should only read the time from a DS3231 and write to the VFD display using a MAX6921 driver. I added some other segment definitions for a simple animation (rotation of segments) on the unused VFD digits.

The time displays OK. However, the NUMBERS 1 and 4 are displayed much brighter than the rest of the numbers. I do not mean certain grids are brighter than others - as an example, as you watch the 'ones of seconds' tick upwards, when it displays a '1' or a '4' those numbers are much brighter than when the same grid is displaying any other number.

This happens across all VFD digits, and it is always just the 1 and 4 which appear (much) brighter. I cannot understand why a combinaton of outputs from the MAX6921 would be brighter so I think it must be to do with the multiplexing code.
The code is quite straightforward, and perhaps I have stripped it back too far but does still work to display the time.

One last note - this effect goes away somewhat if I lower the grid voltage considerably, however, at that stage the display is too dim for everyday use.

Any assistance greatly appreciated. I am certainly not a coder - any workable code is good enough for me - but effect is incredibly annoying and after many sights searching for how this could be possible I am at a complete loss.

long_vfd_clock_code_-_muckaround.ino (11.4 KB)

Stop cross-posting.

@Bluethunder22

  1. Is your code working?
  2. Which VFD display are you using? 7, 14 or 16 Segments? How many grids are you using?
  3. How did you connect the MAX6921 pins to the VFD? (Pin Mapping)

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

That is certainly an interesting, but very memory intensive multiplexing strategy. I've never seen it done like that before.
You have, if I counted correctly, 74 twenty byte arrays, each representing a pre-built "image" to be pushed out to the 20bit shift register, one for each possible combination of grids (digit position) and digits values.

Not only that, there is no regulated timing between pushing out one digit and the next, so the brightness of the digits is not going to be consistent. The lower numbers are going to be brighter because, after displaying say a 2 in the minutes position, it then goes through to see if it should display 3, 4, 5, 6 ,7 , 8, 9 in that position. During all the time it churning through those calculations, the 2 is still displayed, which gives the impression of it being bright. If it were to display say an 8 or a 9, however, that would be quickly overwritten by the digit to be displayed in the next digit position. This would appear less bright.

A better approach is to have a global array representing the display. If it a 9 segment display, make it a 9 byte array. In this array, you would maintain the time, say HH:MM:SS. You would also have a global byte variable to represent the current digit position.
You'd then have a function, best called by a timer, say every 5 milliseconds, which would take the next digit from the display array, build the image (including the digit converted to segments and its position converted to a grid number, then push the whole, dynamically created image out to the shift register.

What display are you using, incidentally ? With multiple segments, I guess it could be an IV-18 like I have used in one of my projects, however, using a HV5812 shift register (similar to the MAX6921) to drive it: Exhibition / Gallery - Arduino Forum