7-segment multiplex - what benefit from this oddball method? - Page 1
Forum section: electronics / projects

author: Peabody
author_rank: Super Contributor
timestamp: January 16, 2025, 04:17:15 pm
content: As a hobby project, I recently modified the behavior of my microwave oven to remove a minor annoyance from my life, and that required installing an Arduino circuit to detect when the cooking countdown reached one second, and then pressing the Stop button, so not letting it terminate normally. The main difficulty was figuring out how the oven firmware was driving the display. The answer was something I haven't seen before, and which to my mind offers no advantage. So I'm wondering what I've missed.Not counting the colon in the middle, there are four common anode lines and seven segment lines, so it's just a normal 7-digit LED display. The driving algorithm drives the four CA lines in succession, but it does that twice to do a full refresh. The first time, it displays only the A, B , C and D segments. On the second round it does the E, F, and G segments, plus the colon. Each CA line is on for 1ms.I'm trying to understand why the Magic Chef engineer would have done it that way, but I can't come up with a reason that's better than simply multiplexing by digit, as God intended us to do. Or possibly multiplexing by segment, as I've been known to do when God wasn't looking.So in regular multiplexing by digit, each segment is turned on 1/4 of the time. As my oven does it, each segment is on 1/8 of the time. My understanding has been that the brightness of a segment to the human eye is a function of the average current driving it. If that's true, then the current through an oven segment has to be twice as much when lit as in the normal by-digit method. So both the average current and the maximum current are the same to achieve the same brightness.So why bother to do it that way? In addition to the brightness and current issues, there's also the issue of flicker. But again, the oven method would seem to offer no benefit.Well, since some engineering effort must have been required to come up with the oven method, I have to assume there is some benefit, and I'm just not thinking about it right. Can someone explain it? I mean, if this is a better method, I'd like to use it in the future.

author: ajb
author_rank: Super Contributor
timestamp: January 16, 2025, 04:48:14 pm
content: Maybe having a max of four segments on at a time means they don't have to use drive transistors for the anodes, and can drive everything directly from MCU pins? Or they're using one of those weird cost-optimized 4-bit MCUs designed for volume production?

author: Peabody
author_rank: Super Contributor
timestamp: January 16, 2025, 05:07:33 pm
content: If the regular method would have all eight segments on at the same time at, say, 5mA each, 1/4 of the time, the oven method would need to raise the current to 10mA to get the same brightness since each segment is lit for only 1/8 the time. It's 40mA through the anode in either case.The processor has no markings, but it's something like 32 pins in a quad package.

author: globoy
author_rank: Frequent Contributor
timestamp: January 16, 2025, 05:32:49 pm
content: Quote from: Peabody on January 16, 2025, 05:07:33 pmRemember that we have a non-linear perception of brightness. It could be they get almost the same perceived brightness but at less total current. I tend to think ajb has a reasonable idea why they did this. Eliminating the extra transistors results in cost savings for this cost-sensitive application.

author: Peabody
author_rank: Super Contributor
timestamp: January 17, 2025, 12:03:11 am
content: Perhaps the perception "free lunch" is something I could test. If it's true, then the parts savings would be an explanation.But you would agree there is no other reason to do it this way?

author: ajb
author_rank: Super Contributor
timestamp: January 17, 2025, 01:46:44 am
content: There are other conceivable reasons, like reusing some firmware that was designed for a larger display or something, but it really is possible that it’s a 4-bit MCU. They’re well suited to simple BCD-oriented tasks like this, and you can still order them from Digi-Key:https://www.digikey.com/short/ppn1vnj0( EM Electonic EM6627WP11-013, just as one example.) I expect a lot of the less well known high volume chipmakers have only recently stopped producing 4-bit architectures, or may still do them to order.

author: floobydust
author_rank: Super Contributor
timestamp: January 17, 2025, 01:47:17 am
content: I'm not sure if it's trying to be interlacing, if the eye gets fooled an additional way here, as well as persistence of vision.By-digit multiplexing is the highest average current, as far as multiplexing goes.Magic Chef's approach I think halves that, with benefit to the power supply and also the CA pin current requirement as well, which is important if the MCU is driving that alone.The penalty is mux frequency must be doubled and the brightness loss might not be an issue with only 1msec on-time.

author: Peabody
author_rank: Super Contributor
timestamp: January 17, 2025, 03:27:51 am
content: Quote from: floobydust on January 17, 2025, 01:47:17 amI don't see how interlacing is involved. If it was, they would have alternated ABCD with EFG on one digit, then done the same on the next digit. But they do ABCD on all four digits one at a time, then come back and do the others. So if anything, their method makes things worse. But I think if the refresh is fast enough that no segment flickers, interlacing isn't a factor.QuoteAll of that is true only if you ignore that it produces half the brightness. A normal by-digit multiplex would produce the same brightness as the Magic Chef with half the current per segment. So regular multiplexing is easier on the segment drivers (but twice as many being driven), and there's no difference on the CA lines, if you want the same brightness.QuoteI don't think the on-time matters except for blinking. What determines brightness is the percent duty cycle and the current.Well, maybe it is something about human perception that provides an advantage for the MC method. But I want to think about how I might test the two methods. I have a four-digit display. Maybe I could drive two digits one way, and the other two the other way.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 17, 2025, 04:13:07 am
content: Quote from: Peabody on January 16, 2025, 04:17:15 pmMaybe they had issues with relative dimming, and this was the band-aid SW patch ?If your common drive is limited, you might find that '8' has 3.5x lower drive of a '1', and users might notice that, and generate service calls.If you limit the common sink drive to a max of 4, that can move on the MOSFET load line, and reduce the relative dimming effect to < 2.

author: Peabody
author_rank: Super Contributor
timestamp: January 17, 2025, 02:56:40 pm
content: I can see how that might be an explanation, but both visually and on my scope, I don't see evidence of any variation in segment drive current, whether it's displaying a "1" or an "8".

author: KerimF
author_rank: Frequent Contributor
timestamp: January 17, 2025, 04:13:04 pm
content: In my experience, doubling the LED current and reducing the duty cycle to half give higher brightness.Yes, this surprised me too.Then I recalled that by increasing the LED current, the LED voltage increases too (following its V-I).And it seems that the higher power (V*I) also increases the effective emitted light. So, In the average, brightness becomes higher.

author: Peabody
author_rank: Super Contributor
timestamp: January 17, 2025, 07:01:11 pm
content: Quote from: KerimF on January 17, 2025, 04:13:04 pmDid you actually measure that the current was doubled? I ask because if I test this theory, I would be measuring the voltage drop across the segment resistor as the best way to measure the current - since that would take into account any change in Vf at different current levels.I'm thinking a good test would be on the A segment on each of the two digits in a display, with everything driven from GPIO pins. The first segment would be set up as a pretend four-digit display, with a 25% duty cycle at, say, 5mA. The second would be at 12.5%, and double the current. That would tell me if there's any difference in perceived brightness.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 17, 2025, 09:30:19 pm
content: Quote from: KerimF on January 17, 2025, 04:13:04 pmNo. It does not work that way. Light output of a LED is pretty much lineair with LED current. (In between the cutoff at the low end, and saturation at the maximum) As a result, the higher voltage needed at higher currents decreases led energy efficiency. (Lumens per Watt).The whipping tail is in your use of "brightness". Human eyes are very non linear, and the difference between bright sunshine and moonlight is probably a difference of 120dB or thereabouts. Humans are very bad ad estimating and comparing "brightness". On top of that, I once read something about the eye's latching high peak levels. That could explain why a LED with twice the current but half the duty cycle (i.e, same light output) appears brighter. A bit like looking into the sun, when you can see lines of "over exposure" for many seconds afterwards. But that may be yet another and unrelated effect. Although something similar also happens when you're adjusted to darkness and the light level suddenly increases. Those biological light sensors are quite weird things.

author: KerimF
author_rank: Frequent Contributor
timestamp: January 18, 2025, 03:03:52 am
content: Quote from: Doctorandus_P on January 17, 2025, 09:30:19 pmIn other words, it appears brighter relative to human's eyes (which is the case here), not to light sensors.

author: Peabody
author_rank: Super Contributor
timestamp: January 18, 2025, 03:22:42 am
content: I tested this idea today. I made sure that one segment was driven at half the duty cycle and twice the current as the other, and was unable to detect any difference in brightness to my eye. I even tried switching the segments, but still no difference. Maybe this varies from person to person, but for me, brightness is a function of average current. So I still think the Magic Chef algorithm is pointless.

author: KerimF
author_rank: Frequent Contributor
timestamp: January 18, 2025, 10:47:42 am
content: Quote from: Peabody on January 18, 2025, 03:22:42 amI believe you.Please note that my experience about it is dated 4 decades agoAt that time, I designed and built a small indoor moving text sign using the available red LEDs, rated for 20mA. Each LED was pulsed by 100 mA for around 16us (the frame period was 8 msec). Although the average current was 0.2 mA, the brightness was good enough to read clearly the moving message.I am not sure now if this can be repeated with the today's highly efficient LEDs also rated for 20 mA (I mean without burning them).

author: Siwastaja
author_rank: Super Contributor
timestamp: January 18, 2025, 12:03:48 pm
content: Quote from: KerimF on January 17, 2025, 04:13:04 pmThis myth lives so strong. Obviously, the opposite is true. You can check the, at best, linear relationship of luminous intensity vs.current(not power) from any LED datasheet.Of course, if you blink slowly enough, it will be visually more alarming to the eye and easier to notice - because it blinks or "flickers". But then you also see it flickering so it's apples vs. oranges; if that is not desirable, best intensity and efficiency can be had by continuous DC current.QuoteYes, but this extra power is converted into heat; never as photons. LEDs basically convert electrons to photons - current into light.The opposite is true, though - at higher current, thiscoulombic efficiencydrops, too. Often very little, nearly negligibly though, until close to rated maximum current, after which it starts to drop more, so that the efficiency loss from increasing Vf dominates.Increasing die temperature also reduces efficiency. LED curves might be measured by somehow keeping the die at constant temperature; but in reality higher current leads to more heating, so apart from very low duty short pulses, real-world efficiency drops more than expected from the curve. (Manufacturers don't really specify how they measure this, and it could explain how some LEDs show nearly perfectly linear relationship and others show dropping light per current - maybe latter one was characterized with DC current running for seconds, for the die to heat up.)Note that LEDs have negative Vf tempco, so at first glance it seems that running it hotter would increase efficiency, but in my (limited) experience it seems that the coulomb-to-light conversion efficiency suffers faster.

author: Peabody
author_rank: Super Contributor
timestamp: January 18, 2025, 02:56:20 pm
content: QuoteI don't think anyone is questioning the datasheets or the physics. The issue is human perception of brightness. If you "ask" an instrument whether a multiplexed display is flickering, it will answer yes. If you ask a human, he will say no - if it's flickering fast enough. The question is whether something like that is involved with brightness that would result in one multiplex algorithm being perceived as brighter even though average current is the same. In the tests I've done, the answer appears to be no. That's just for the display and at the currents I've tested, and it's just for me, but I agree that the efficiencies involved would favor continuous current over equivalent high-current, low-duty-cycle, alternatives.

author: KerimF
author_rank: Frequent Contributor
timestamp: January 18, 2025, 04:09:42 pm
content: Lately, I produce various A_V meters for my inverters/chargers and mains stabilizers. Fortunately, the brightness of the today's 7-seg LED are relatively high at 20 mA.The MCU of the meters is ATmega8A (supply 5V). The internal pin resistance is ~40 Ohm. And its recommended out/in current is 20 mA.So, I let the limiting resistance equal to 750 Ohm for each segment (the 7-seg is common anode).For 8, the LED current is around 2.7 mA, total ~21 mA (their anode current). If 1 seg is on, it becomes ~ 3.5 mA.The result which I got is that I didn't get any complain from my consumers about brightness.Conclusion:As on reply #1 and if the supply of the MCU is 3.3 V, adding limiting resistors could be no more necessary. The internal resistance of the MCU pins could also work as current limiters. So, driving just 4 segments at a time is safer.Anyway, without knowing for sure all factors/parameters related to the problem, we are just guessing.