Multiplexing technique...

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I've been looking online at some examples of AVR's that drive those 7 segment numeric LED's. I noticed that in the 2 or 3 digit models that they are driving the LED's all from the same pins and then using a transistor on each one hooked to a pin.

My theory is that they constantly rotate through the digits, displaying each one for a brief time.

My question is - can you tell that only one is being active at a time? Can you see a pulsing or strobing on them?

Also, is there any sort of issue when switching from one digit to the next - can the AVR change the 7 pins for the new digit and the 3 pins controlling the transistors all at exactly the same time? Or does it happen so fast that you can't see the led's change from one digit to another?

Does this affect the brightness of the LED's?

How many digits can be handled with this technique?

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Can you see a pulsing or strobing on them?
Only if the referesh rate is too slow, anything lower than 20ms should be ok. 20ms could still give you some flickering.
Quote:
any sort of issue when switching from one digit to the next...Does this affect the brightness of the LED's?
For every extra led block you use you are reducing the current to the other leds by the same ammount, therefore you need to supply more current to maintain the same brightness.
Quote:
How many digits can be handled with this technique?
It depends on how fast you can refresh them and what is the maximum pulse current you can use with the leds.

We do up to 25 characters led displays.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One thing that works in your favor when you multiplex is that the perceived brightness doesn't fall off linearly as the "duty factor" of an individual LED is reduced. For example, if six LEDs are being multiplexed, so that any one of them is only turned on one sixth of the time, each still appears brighter than it would if run 100% of the time at one sixth of the current.

I don't really know why that should be; since the forward drops across the LEDs are relatively constant over reasonable ranges of currents, I'd expect the RMS power in each LED to vary linearly with duty factor, unlike the "proportional to square root of duty factor" effect for PWMed resistive loads. Maybe it's a physiological effect in the eye.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

appears brighter

Quote:

Maybe it's a physiological effect in the eye.

That's what they told me in a recent thread about LED communications. Given the "persistence effect" when we multiplex, I had questions on commo with LEDs 'cause I thought the turn-off time would then be slow. But not true--they told me it is just the eye.

I guess it makes sense, or optocouplers would be dead-slow. ;)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Each display is on usually for 1/N the time where N is the number of digits.
It's good practice to turn off the segment outputs just before you change digits, and to turn them back on with the new digit information just after the switch, otherwise you'll get ghosting.

The eye is a remarkably fast detector. Set up an AVR to output 1PPS to an LED, with the pulse as short as you can make it at 16 MHz, like SBI/CBI.
If you have enough led current, you'll be able to see the pulse, even though it's much less than a microsecond wide.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The AVR cannot switch more than 8 pins simultaneously (one port), but for your multiplexing application, it does not have to. The thing is that there is very much time, you can turn whole digit off, change bit pattern for the next digit, and and turn whole next digit on. For example 1kHz timer ticking interrupts, updating 4 digits, means that one digit is on 1ms and whole refresh period is 4ms (250Hz). Besides, you need to have some guard time between digits too, so that if you have slow transistors driving the digits, the transistors really turn off before changing the digit.

And the persistence effect is definitely in your eyes. Almost any regular LED can be used to transfer up to 10 megabits per second. For example SPDIF data over TOSLINK.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The eye responds to the peak brightness with that sort of pulsed input.

Leon

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With modern LEDs the a LED that is on 1/6 of the time looks very much the same as one with 1/6 the current. With the very first LEDs there was a difference, because there the efficiency was lower at low currents.

The is a small effect on the visual impression if the frequency for multiplexing is just at the limit when you see it flicker, but then the display gets very hard to look at.
Just for a quik test: use a constant PWM ratio and change the frequency: there is essentially no change from 100 Hz to 100 kHz. At 100 kHz the eye has no chance to see the difference to a constant lower current.

Driving Segement lines directly from the AVR, the current limit is about 20 mA. For me this is OK for up to about 6 Digits, depending on the display and the required intensity. For outdoor applications 2 may allready be hard.
With extra drives there is a limit at about 40 Digits because the pulse current is typical limited to about 10 times the average current.