Why does my display flicker? - Page 1
Forum section: electronics / projects

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 09:49:39 am
content: I have 2.98875ms ON and then 28.28125ms OFF, repeat... i.e. a frame rate of 31.25ms. i.e. 32HzWhy does this appear noticeably flickery?(It's meant to appear DIM but not flickery)

author: wraper
author_rank: Unknown
timestamp: October 10, 2017, 09:52:01 am
content: and why it shouldn't? You are flashing it quiet slowly and for minimal time, what a surprise it flickers.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 09:53:02 am
content: Quote from: wraper on October 10, 2017, 09:52:01 amCan you be more quantitative?PAL has a frame rate of 25 fps but a field rate (due to interlace) of 50 per second. What is a sensible minimum field rate?

author: Zero999
author_rank: Super Contributor
timestamp: October 10, 2017, 09:58:04 am
content: Move the decimal places on your timings to the left one point (multiply the frequency by 10) and the flicker will go away.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 10, 2017, 10:01:13 am
content: Might help if you gave us a clue as to what sort of display you're talking about.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 10:01:37 am
content: Quote from: Hero999 on October 10, 2017, 09:58:04 amThat's going to be hard; I might be able to double it at a squeeze.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 10:03:33 am
content: Quote from: mikeselectricstuff on October 10, 2017, 10:01:13 amI was intentionally trying to avoid that.... but... it's a nixie cathode.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 10:11:15 am
content: At a guess you may have a phosphor on your nixie that doesn't last as long as your blanking period, would i be correct in assuming your ratio of on time vs off time is for brightness control?Equally are you viewing it under natural light or under an incandescant light source, the double mains frequency strobe effect of a standard light bulb may be making the flicker effect much worse.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 10, 2017, 10:16:47 am
content: Bear in mind different people have different thresholds for perceiving flicker, and it's generally worse in peripheral vision.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 11:07:47 am
content: Quote from: Rerouter on October 10, 2017, 10:11:15 amInteresting. Yes. The idea that is there are six modes... fully off, fully on and 1/5, 2/5, 3/5 and 4/5 in between. For 1/5 mode I get on ON period every 31.25ms, when operating at fully ON I get an ON period every 6.25ms. (My ON period is always 2.98875ms). When operating at fully ON I see 'little' flicker.. (but of course the effective refresh rate is 160Hz then).Quote from: Rerouter on October 10, 2017, 10:11:15 amGood point. I'm viewing with room lights which are LED spot lights attached to our 50Hz mains supply.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 11:17:17 am
content: I guess I could have less dimming levels... currently I have 5.... If I had OFF, 1/3, 2/3, ON.... then my worst case would be 2.96875ms ON every 18.75ms i.e. 53.33Hz... maybe that would work.

author: Benta
author_rank: Super Contributor
timestamp: October 10, 2017, 11:24:03 am
content: Even fluorescent tubes have visible flicker when in peripheral vision (when viewed directly it's no problem), and that's at 100 Hz. At 120 Hz I don't know.ON TVs it's not an issue due to longer phosphor persistence.

author: Zero999
author_rank: Super Contributor
timestamp: October 10, 2017, 11:26:47 am
content: It sounds like there is no phosphor. Flicker will probably still be noticeable at 50Hz, especially at low duty cycles. Fluorescent tubes and CRTs don't flicker as much as they would otherwise would do, because the phosphor has some persistence, which smooths the ripple. The ends flicker more because there's not much phosphor there and the corona flickers at 50Hz. Look at a small mains powered neon indicator and you can see the electrodes flickering at 50Hz. The light emitted isn't as bad because it flashes at 100Hz and the duty cycle is quite high.How about ditching PWM and linearly varying the cathode current? It's fairly straightforward to design a constant current circuit, which can be controlled by a voltage derived from PWM, with a suitable low pass filter.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 11:39:27 am
content: I have to say that is far more decimal points than i expected.The fixed on time is odd to me, but could you approach it with a higher effective frequency,Instead of 2.998875ms on per period, in one part, could you split it in to a higher effective frequency, e.g. 8 slices across the period of 0.37359375ms reducing the dip in brightness to less than the full on.For light sources i'm more used to fixed off time.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 11:40:28 am
content: Quote from: Hero999 on October 10, 2017, 11:26:47 amI could ditch the PWM dimming.My tubes are actually configured as two sets of three... blank 0.15625ms , SetA 2.96875ms, blank 0.15625ms , SetB 2.96875ms repeat. Not sure how constant current would work during the blanking periods.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 11:45:40 am
content: Quote from: Rerouter on October 10, 2017, 11:39:27 amI have a 6.4kHz interrupt... my blanking period is one interrupt.... my on time is 19 periods... making my blank and ON time equal to 20 interrupts... I'm two way multiplexed... so blank,A,blank,B is 40 periods... giving a frame rate of 160 per second.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 12:08:25 pm
content: Ok, so full brightness is your 6.25ms loop, 40 interrupts at 6.4Khz, meaning each light is off for at most 3.2ms which you say is hard to spot the flicker for,So why not keep the 40 periods fixed, and change how many of the cycles between blanks your on for, At the moment i assume you blank out full 40 interrupt cycles to accomplish the dimming.e.g. per bulb, it still leaves the bulb dim for half the cycle, but the element stays warm over the dark period. should just involve a decrementing counter in your interrupt using a 8 bit variable.full = 19 1111 1111 1111 1111 11104/5 = 16 1111 1111 1111 1111 00003/5 = 12 1111 1111 1111 0000 00002/5 = 8 1111 1111 0000 0000 00001/5 = 4 1111 0000 0000 0000 0000off = 0 0000 0000 0000 0000 0000

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 12:20:54 pm
content: Quote from: Rerouter on October 10, 2017, 12:08:25 pmThat's a really good idea. I will have to refactor my code to accomodate that.... I'll report back.[Currently I only shift out to the HV5812s four times in each frame.... this will have to change if individual digits dim separately (fade effect) but it might be do-able; i.e. previously all digits in a set turned on at interrupt 1 (counting from zero) and off with the blanking at interrupt 20, now the fully on ones turn on at interrupt 1 and the half bright ones turn on at interrupt 11 and they all turn off again at interrupt 20 etc]

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 12:38:28 pm
content: The chips have a blanking input, i expected you would be using that, or are you literally shifting in all 0's to turn off each bulb. you would be adjusting how many interrupts that those pins are high for.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 10, 2017, 12:54:53 pm
content: Quote from: Rerouter on October 10, 2017, 12:38:28 pmI have 2x HV5812 each with 20 outputs giving 40 outputs.... they are arranged so that 30 of these are attached to cathodes (tubes are paired) and 2 are used to drive the anodes (with the ones left over for decimal points, colons etc). To turn the tubes off I turn their anode off (which is commoned to three tubes) and vice versa.I can't turn anything on or off without shifting 40 bits.My Atmel 328P clock is 16MHz, the HV5812 has a minimum clock time of 150ns... so I can pretty much blast it at full rate...

author: StillTrying
author_rank: Super Contributor
timestamp: October 10, 2017, 12:55:26 pm
content: "my on time is 19 periods... ...giving a frame rate of 160 per second."If you could arrange it, creatingonperiods of 0,2,4,8,16, or 0,1,2,4,9,19 periods, should give a good result.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 01:08:14 pm
content: ok, devil in the details.Still you should have more than enough free processing time to handle it.

author: xani
author_rank: Frequent Contributor
timestamp: October 10, 2017, 05:46:26 pm
content: Quote from: NivagSwerdna on October 10, 2017, 09:53:02 amAnd it was displayed on CRT phosphor which has persistence (doesn't immediately go "off" once electrons stop hitting it) that negated a lot of effects of having such slow refresh.You might just "test it" but different people have different tolerance for it so I'd steer at 100Hz+ or "as fast as you can make it"

author: edavid
author_rank: Super Contributor
timestamp: October 10, 2017, 06:33:28 pm
content: Quote from: Rerouter on October 10, 2017, 10:11:15 amNixies don't have phosphors. They do have a rather slow turn on and turn off.QuoteI don't know why people say things like this. There is no mixing process between ambient light and an emissive display like a Nixie.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2017, 07:40:40 pm
content: For the phosphor comment i have to point the finger at wikipedia then. They where described as phosphor anodes.As for the type of light source it was based upon my own experiences in the past. A free running display hit a beat frequency with my light bulb and i couldnt stand the effect whenever i was not looking straight on it. Have also found the same effect with my reflective ceiling fan on high.

author: BrianHG
author_rank: Super Contributor
timestamp: October 10, 2017, 08:22:19 pm
content: Quote from: edavid on October 10, 2017, 06:33:28 pmIt's because your pupil/iris in you eye shrinks with brighter lighting and for many, this improves your eye's ability to see rapid pulsating light with bright surrounding light improves slightly. It has nothing to do with the mixing of light, and the effect isn't much worse, just a little more noticeable for some.

author: latigid on
author_rank: Contributor
timestamp: October 11, 2017, 06:49:17 am
content: Quote from: Rerouter on October 10, 2017, 12:08:25 pmCould also space out the blanks:full = 19 1111 1111 1111 1111 11104/5 = 16 1110 1110 1110 1110 11103/5 = 12 1010 1010 1010 1010 10102/5 = 8 1010 1000 1010 1000 10101/5 = 4 1000 1000 1000 1000 1000off = 0 0000 0000 0000 0000 0000

author: Rerouter
author_rank: Super Contributor
timestamp: October 11, 2017, 07:00:36 am
content: I thought the same thing originally, but i felt as far as programming simplicity moving the blanking start point would be easier.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 11, 2017, 10:04:20 am
content: This is a work in progress but is looking very hopeful. Thanks