0
\$\begingroup\$

I have designed and built a clock, that uses a microcontroller to drive a 4x7 segment common-cathode display. Each digit is driven sequentially, with all appropriate segments of that digit driven in parallel.

schematic

Given that I'm not using charlieplexing, I figured I could add capacitors to the segments to reduce flicker. But I find that when I add a capacitor, I get "ghosting" of all the segments on that digit. To clarify: they light up, albeit dimly, when they are not supposed to.

In the schematic, I show an example capacitor C8 between segment F and cathode 4. This causes false triggering of all segments on digit 4.

The microcontroller outputs (LEDA to LEDG) are high to illuminate a segment, and low otherwise. The same is true for the digit control lines (CC1 to CC4).

I don't understand how charge is flowing from C8 to the other segments.

\$\endgroup\$
3
  • \$\begingroup\$ No need of a capacitor. Just use a "blanking" time between digit show. Just at a "high" frequency. No flicker. \$\endgroup\$
    – Antonio51
    Commented Dec 3, 2023 at 13:22
  • \$\begingroup\$ I am particularly sensitive to flicker. To avoid my notice, the frequency has to be on the order of 10KHz or so. I can achieve this refresh rate; but I was just experimenting to see if the problem could be solved with capacitors. \$\endgroup\$ Commented Dec 3, 2023 at 13:56
  • \$\begingroup\$ A refresh rate of 1kHz could be enough without flickering (min = 50 Hz*4). But ok for the capacitor, if that work. \$\endgroup\$
    – Antonio51
    Commented Dec 3, 2023 at 16:34

3 Answers 3

1
\$\begingroup\$

What is probably happening is that the capacitor is allowing leakage on the cathode of digit 4 so the segments that are supposed to be on for the other digits are showing up on 4 as well.

You don’t want to use capacitors to reduce flicker on a multiplexed display, it will slow the switching down. What you want is faster switching. Increase the multiplexing rate if you can.

\$\endgroup\$
1
  • \$\begingroup\$ I'm not sure why it would slow the switching down. Putting capacitors on each segment would cause them to "fade out" at the end of their activation period, but otherwise switch normally. If they weren't causing parasitic leakage, of course. Which I now understand they are. \$\endgroup\$ Commented Dec 3, 2023 at 14:01
1
\$\begingroup\$

The problem is not charge flowing from C8 to the other segments, but charge flowing from other segments to C8, namely its cathode. C8 does exactly what you designed it to do: it stops the CC4 signal from "flickering" by continuing to provide negative voltage (with respect to LEDF) and current while iterating through the other digits.

You cannot add capacitors to a multiplexing system without also adding diodes that confine each capacitor to operating with a single LED. Without access to the individual multiplexed elements themselves (and the connectors don't provide it), this is not possible.

\$\endgroup\$
3
  • \$\begingroup\$ Ah, I see! It's acting a little like a charge pump. The capacitor charges to 5V, and then its anode is effectively connected to 0V, causing its cathode to drop to -5V. This activates all the segments of that digit when the other digits are active, even those segments whose anodes are at 0V. Right? \$\endgroup\$ Commented Dec 3, 2023 at 13:58
  • \$\begingroup\$ Would the capacitors work correctly if I changed the firmware such that the segment lines (LEDA to LEDG) were high/open instead of high/low? Then the anode of the capacitors wouldn't be connected to ground, and no current would flow from rogue segments. Maybe. \$\endgroup\$ Commented Dec 3, 2023 at 14:06
  • \$\begingroup\$ @SodAlmighty No. You essentially want one capacitor per individual segment (namely 28 of them) in order to reduce flicker, and without isolating diodes per segment they turn into one large capacitive swamp rather than individual flicker reducers. You cannot buffer from outside of the multiplexed array. \$\endgroup\$
    – user107063
    Commented Dec 3, 2023 at 14:34
0
\$\begingroup\$

10 uF is a HUGE load for a microcontroller GPIO pin. Is that really your capacitor value?

Here is the schematic for the 8401AS-1F from the XLITX datatsheet.

enter image description here

I have isolated the an area of interest, with your circuit attached.

schematic

simulate this circuit – Schematic created using CircuitLab

When CC4 and LEDf are low, but LEDa goes high (because that segment is lit in another digit), current will temporarily flow from the LEDa pin, through LED Da4, through C8, and into the low LEDf pin.

schematic

simulate this circuit

The same will apply to all the other segment LEDs in digit 4.

If you have enough voltage head room, you could add diodes to the outputs of your microprocessor, to ensure that current can only flow out of the gpio pins.

schematic

simulate this circuit

At the end of the post, but no less important

There is an alternative that may save you hardware if your microprocessor supports it. Instead of bringing an output pin low, change its mode to high-impedance. This will deactivate that segment line, but will also prevent current flowing back into the GPIO pin.

\$\endgroup\$
1
  • \$\begingroup\$ So if I used capacitors how I intended, but changed the unused segment lines to high-impedance, it would work? user107063 says not. \$\endgroup\$ Commented Dec 3, 2023 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.