Yep, working now. Dimming looks pretty good... I can't see any flicker or anything.
I've used the OE pin on various Supertex driver chips for dimming on a few of my clocks as well. I find it works quite well. I do my PWM in software at 4KHz. I picked 4KHz because I already had a (hardware) counter interrupt firing at that rate for other purposes. Of course this was done on Atmega not ESP so I had considerably more resources to work with.
Look into it later when the dust is clearing off the crater.
Ty_Eeberfest wrote: Of course this was done on Atmega not ESP so I had considerably more resources to work with.
yeah you kind of take resources like ADC/PWM/DACs for granted because you think "It's 2017 what MCU doesn't have this?", but then you get over it and start using the resources you do have.
moving on, when i implemented the dimming feature i have noticed that the nixie tubes that are used to display the hour have started to show signs of cathode positing.
Initially i implemented a "slot machine" effect for showing the time and i thought that that would be enough, clearly it wasn't because the most cycled tubes where the ones showing minutes which did not show any cathode poisoning in the first place.
so my anti cathode poisoning strategy has changed to:
set display to full brightness
cycle throw all the digits of all the tubes for 15s
set display to users selected brightness
repeat every 5min (might change it to allow changes from webui)
but is this enough to prevent cathode poisoning ? any other way to prevent this ?
What frequency is your PWM set to? The cathodes need time to come fully on and if the frequency is set too high, this may not be happening all the time. I have read that a frequency of between 100-300 Hz is good. Some data sheets actually specify this time, most don't. The trick is to find the sweet spot between making the cathode come fully on and the human eye not detecting the flicker.
Another way to look at this is that if the frequency is too high, the latency of the tube is effectively smoothing the square wave into an average value and is thus driving the tube out of spec.
Anecdotally, I have observed that high frequencies lead the tubes to behave as if they were being driven with too low a current - I.e. they show incomplete coverage of the cathode when dim, so this would appear to be supportive evidence.
There is also some evidence that an out of spec and/or badly regulated wall wart can lead to the same result - something that I am prepared to believe having observed the effect of using a 9V wall wart when I should have been using a 12V one (an extreme example, but it is often easier to observe these effects if we push the parameters to extremes).
So. Some of this is fact (cathode latency), some is anecdotal (my own and others observations), some is theorizing (signal smoothing). I would posit, however, that ACP is also anecdotal. As Jeff Walton says (or to paraphrase him a little), these tubes weren't around long enough for the science to become certain.
PWM frequency is quite low, only 60Hz any higher than this will cause the HVPS i am using to make a high pitched noise.
But i first noticed the cathode poisoning before implementing the dimming, so no PWM because this is a direct driver design.
A for Jeff's comment, i am running the tubes pretty much to spec 2.45mA (calculated), maybe i managed to damage them and they are showing gas leaks.