Author Topic: Multiplexing high-current, high-voltage 7-segment  (Read 1799 times)

0 Members and 1 Guest are viewing this topic.

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #25 on: October 02, 2024, 06:20:48 pm »
Thanks very much for the reply.  Looking at the continuous option first, since an HV 595 would be right next to each digit, and the cathodes will be grounded, there shouldn't be any problem with the load lines.  But the Uno would be directly driving the SPI lines, and the serial clock in particular would be fanned out to each of the 11 chips, at varying distances.  I've seen schematics of button boards and such where this is done, but don't know if it actually works.  Serial data would only go to the first chip, and is then refreshed going to the next chip in the cascade.  But I guess if the clock line is a problem, a single-gate buffer of some kind could solve that.

That's normal, CMOS fanout is quite large.  If there's a lot of distance (delay) between chips, you can end up with indeterminate or ringing clock waveforms and get inconsistent and lost data (multiple shifts per edge).  This is due to the characteristic of a source-terminated transmission line, that the voltage level on the line, at a middle position, is Vstep/2 after the incident wave, until the reflected wave passes.

If everything fits on a breadboard like pictured, it's likely that delay is less than the risetime, and the clock will be well-behaved.


Quote
In the multiplex option the SPI lines would be quite short, and only going to one chip.  But the load current lines would fan out over some distance.  I figured out a way to avoid having to power down those lines during changes (to avoid ghosting)  by triggering all the latch pins from a single GPIO pin so both the anodes and cathodes change state at the same instant.  That means that if the refresh period is 100us, that's the maximum speed at which the load lines would change state.  If I understand what you've said, that's not likely to cause a problem so long as the layout done properly.

You'll still get a faintly visible ghost image, actually.  The load switches won't turn on/off at exactly the same time, plus the one column's capacitance has to discharge through the newly activated rows (or, even if there's a pulldown resistor to discharge it, some charge will take the LED route).  Probably nothing that would be visible daytime, but indoors or dim conditions perhaps.

But yeah, nothing wrong with that at all.


Quote
Quote
As a general rule, only use what bandwidth you need.  This might not be optimal, as you're starting with the risetime of the Arduino, and the driver IC(s), and so filtering would be needed -- a tedious parts cost.

Sorry, you've lost me.

Bandwidth is not just the clock rate, but the edge rate too.  You might only be toggling columns at some kHz, but the MCU or driver's risetime might be a few ns, thus the bandwidth extends into the low 100s of MHz.  You need a scope of at least as much bandwidth to properly resolve the risetime of such a signal, and you need a medium of such bandwidth to transport it (bandwidth, usually in terms of attenuation per distance vs. frequency, is a characteristic of a real transmission line).

Filtering components can be added to slow that down (give or take clock pin specs -- in the extreme case, a schmitt trigger might be needed to honor maximum risetime spec), and thus avoid activating any signal quality and EMI issues in the corresponding frequency bands: can't be an EMI problem if you aren't operating in that frequency range to begin with.  Conversely, filtering makes your circuit more immune to interference in the cutoff range.


Quote
In multiplexing, the SPI transfer would be initiated toward the end of the timer ISR, and only needs to complete before the next interrupt.  The slowest you can run SPI on the Uno is at 1/128th the speed of the 16MHz system clock, which would be 125KHz.  I think the ISR will be fairly short, so that should work timing-wise.  I just don't know how good the GPIOs would be in driving these lines.

I mean, they're made to do it.  And a heck of a lot faster than that; GPIOs typically have a toggle rate equal to peripheral clock (which is trivial on ATMEGA, but most ARMs for example, the CPU can run much faster than the peripherals).

Average HC/LV family CMOS pins (and by association, most CMOS ASICs -- but not guaranteed, always check the datasheet!) have a source resistance of 30-70 ohms (depending on type, supply voltage, temperature, manufacturing variation, and polarity -- pull-up (PMOS) is usually weaker), typical trace/cable impedances are 40-120 ohms, so a direct connection, or with a small source termination resistor taking up the remainder (typ. 15-47 ohm), achieves a source termination condition, and good signal quality will be had at the far end of the transmission line.

Note datasheets don't spec pin resistance per se, let alone the output V(I) curve; you have to infer it from the VOH/IOH and -L parameters, which are usually given as worst-case, and the average case might be 2-3x better than that.

MCU GPIOs can be stronger; they may be made to drive LEDs or other loads directly, i.e. spec'd for 20mA output, or even more, at low voltage drop; again, check the datasheet.  That's simply solved by choosing an appropriate source termination resistor.


Mind, I'm just going off the cuff here, responding to comments as they come.  If this isn't making sense, you might want to raise some more pointed questions -- what is a transmission line, signal quality, etc.?  Have you done reflection (ladder/lattice) diagrams before, do you understand how reflections propagate on a TL?  Do you know about logic pin equivalent circuits, and how they interact with TLs?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline LinuxHata

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #26 on: October 02, 2024, 08:43:47 pm »
There are dedicated chips used in LED matrix display panels with higher voltage, higher current, anti-ghosting, built in memory and so on.

Check Macroblock MBI5026 datasheet as a starting point.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #27 on: October 02, 2024, 10:36:16 pm »
Quote
MCU GPIOs can be stronger; they may be made to drive LEDs or other loads directly, i.e. spec'd for 20mA output, or even more, at low voltage drop; again, check the datasheet.  That's simply solved by choosing an appropriate source termination resistor.

I should have said that under the multiplex option each load line will have a series resistor that will be used to set the current.  Does that make things worse, or better?

Quote
Mind, I'm just going off the cuff here, responding to comments as they come.  If this isn't making sense, you might want to raise some more pointed questions -- what is a transmission line, signal quality, etc.?  Have you done reflection (ladder/lattice) diagrams before, do you understand how reflections propagate on a TL?  Do you know about logic pin equivalent circuits, and how they interact with TLs?

No, I'm just a hobbyist.  I don't know what any of that stuff is.  What I know about transmission lines is that if I make them short enough, I don't have to worry about them.  But I don't know what happens if you make them long, other than things I've read about reflections, ringing, overshoots, or whatever.  So as a result, I don't have a "feel" for whether this wide-area multiplex system will work at all.  Which is why I posted.

On another idea, I think it would be possible to divide the 11 digits into groups of 6 and 5, and multiplex both groups simultaneously. A second MIC5891 would be needed, but no additional TPIC6C595s. And seven more resistors.  :-)

At the end of each servicing interrupt the Uno would initiate sending the first of two bytes, one for each 5891 in sequence.  At the end of the first byte transmission, SPI would generate an interrupt, at which point the second byte transmission would be intiated.  That would require a faster SPI rate, like fSYS/32 = 500KHz. so that the two bytes are in place before the next interrupt occurs, at which point the latch on both chips will be toggled.

Then on the cathode side I already had two TPICs grounding one CC at a time by shifting one On bit through the chips. All I would have to change is to shift through two On bits, 6 bits apart.

There is one issue with the TPIC6C595, and that's it's low current spec per line.  The 6B would have been better.  Anyway, I could add a third TPIC, which would then provide enough pins to have two per digit, for double the current.  Then I would just shift through two pairs of adjacent On bits, 12 bits apart.

That option would essentially double the brightness on the same current per segment.

« Last Edit: October 02, 2024, 10:42:04 pm by Peabody »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #28 on: October 02, 2024, 10:54:23 pm »
I turned this one over in my mind once more. I'm talking about static drive here.
Before seeking out exotic drivers (eg, the TD62783, which is obsolete), why not keep it simple and break away from "everything connects to ground".
Why not just float the LED/power stage?
That would keep the controller (Arduino?) safe, and solve a lot of other problems.

Here's a suggestion using one (cheap) PNP transistor plus one resistor per segment. Current-controlled at 25...30 mA.
Each digit is controlled by a 74HC595.
The digits are SPI-wise series connected as 11 digits = 11 x 8-bits.
The whole shebang is powered from some source that's free to choose, eg, a 15 V PSU or a laptop 19 V supply that's available from the dumpster.
The only thing you need to watch out for is the power dissipation in the PNP transistors.
I don't see how it can be done much simpler and cheaper.

« Last Edit: October 03, 2024, 12:57:16 am by Benta »
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #29 on: October 03, 2024, 12:18:52 am »
I agree that connecting everything to V+ instead of ground makes a lot of sense for the static continuous drive.  But he has 11 digits, so that's 77 transistors.  And he's actually wanting to make three of these displays.  So I suspect he would use arrays for the transistors and resistors if he decides to do it that way.  I was really more interested in the multiplex version since it greatly reduces the parts count.  But your method could also apply to that version.  I just don't know what he plans to do about power.

I am a bit curious about the emitter resistors in your circuit. Is there no chance that the voltage drop across them would be large enough that the PNPs would no longer be turned on fully by the 595s?  I guess the alternative would be using collector and base resistors instead, which would be yet more resistors.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #30 on: October 03, 2024, 12:47:55 am »
I am a bit curious about the emitter resistors in your circuit. Is there no chance that the voltage drop across them would be large enough that the PNPs would no longer be turned on fully by the 595s?  I guess the alternative would be using collector and base resistors instead, which would be yet more resistors.
I think you need to find a "Transistors 101" somewhere. Just joking.
The PNP plus emitter resistor is a wonderful current source that will provide a constant collector current to the load.
Provided that the base voltage is constant. And it is: it's -3.3 V from the 'HC595.
There is absolutely no need to use more resistors.

BTW: decoupling caps etc. are not shown in my circuit. You'll need to add them.

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #31 on: October 03, 2024, 01:53:58 am »
No, I'm just a hobbyist.  I don't know what any of that stuff is.  What I know about transmission lines is that if I make them short enough, I don't have to worry about them.  But I don't know what happens if you make them long, other than things I've read about reflections, ringing, overshoots, or whatever.  So as a result, I don't have a "feel" for whether this wide-area multiplex system will work at all.  Which is why I posted.

Ok, well that's much easier then -- just do it!  Don't sweat the small stuff.  Make something, and if you see spooky behavior, come back with schematics, drawings, photos, etc., and we can probably spot the issue pretty quick.  Maybe it needs a lot of rework (bad board layout?), but most likely it's just some resistors and capacitors in places.  CMOS logic is pretty well conceived, it's hard to get wrong.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline BennoG

  • Regular Contributor
  • *
  • Posts: 180
  • Country: nl
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #32 on: October 03, 2024, 05:15:15 am »
It seems to me that video is the lesser problem.  The frame rate will likely be either 30fps or 60fps, and if multiplexing is fast enough that should be doable.  But stills is another matter, particularly if shooting outside.

The shutter time can be short on stills at 30fps you you still have the problem.
total frame rate can be 30 or 60 Hz, but the shutter at this frame rate can be 1/10000 that is where you thinking is going wrong.

Benno
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #33 on: October 03, 2024, 10:30:44 am »
I would skip multiplexing.

+1 for this.

If it has to look good on video drive each segment with DC only.
This obviously means you cant use matrix LEDs but normally 7 segments are just common'ed, so totally fine to drive with DC from a latched shift register or something

It seems to me that video is the lesser problem.  The frame rate will likely be either 30fps or 60fps, and if multiplexing is fast enough that should be doable. 

You still get pulsing at the beat frequency unless you're careful.  It can be annoying and sometimes easier to just not deal with it at all and use DC.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #34 on: October 03, 2024, 02:07:02 pm »
It seems to me that video is the lesser problem.  The frame rate will likely be either 30fps or 60fps, and if multiplexing is fast enough that should be doable.  But stills is another matter, particularly if shooting outside.

The shutter time can be short on stills at 30fps you you still have the problem.
total frame rate can be 30 or 60 Hz, but the shutter at this frame rate can be 1/10000 that is where you thinking is going wrong.

Benno

Ok, yes, I see what you mean.  So indoors it might be ok, but in bright light it wouldn't, both at the same fps.  Thanks for setting me straight on that.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #35 on: October 03, 2024, 02:16:30 pm »

I think you need to find a "Transistors 101" somewhere. Just joking.
The PNP plus emitter resistor is a wonderful current source that will provide a constant collector current to the load.
Provided that the base voltage is constant. And it is: it's -3.3 V from the 'HC595.
There is absolutely no need to use more resistors.

I'm usually the one teaching that course to rank beginners, and in fact have used the NPN version many times.  But for some reason yesterday I just didn't recognize the Australian version.  I was concerned that it would pinch off the current at a certain level, which of course is exactly what it does.  Getting old, I guess.

Anyway, while I think some form of multiplexing is completely workable here, it finally got through to me that it's not going to work for video and stills, at least not reliably. So, time to put the breadboard away.  Thanks to everyone for all the comments and suggestions.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #36 on: October 06, 2024, 03:58:10 pm »
For the benefit of any future readers, it turns out that for common anode displays, the TLC5916 is the one to use.  It can be controlled by a 3.3V MCU, and has a constant current driver on each pin cadjusted by a single resistor to ground on pin 15, so you don't even need to use individual segment resistors, and can adjust brightness with a pot.  You can also adjust brightness via software, but either way, there's no flicker.  About a dollar at Digikey/Mouser.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #37 on: October 06, 2024, 09:45:40 pm »
For the benefit of any future readers, it turns out that for common anode displays, the TLC5916 is the one to use.  It can be controlled by a 3.3V MCU, and has a constant current driver on each pin cadjusted by a single resistor to ground on pin 15, so you don't even need to use individual segment resistors, and can adjust brightness with a pot.  You can also adjust brightness via software, but either way, there's no flicker.  About a dollar at Digikey/Mouser.

Erm... it's a sink driver. Those are like sand on the beach. Do tell how it works with a CC display.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #38 on: October 06, 2024, 09:55:30 pm »
It's a sink driver with adjustable constant current output, which means you don't have to mess with the seven resistors.   That feature is not common as far as I know.  And as I said in my post, "for common anode displays..."  So of course it doesn't work with CC.  Not unless there's a CC version of this chip, which I haven't found.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #39 on: October 06, 2024, 10:10:17 pm »
So: not a solution to this thread.
 

Offline LinuxHata

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: us
Re: Multiplexing high-current, high-voltage 7-segment
« Reply #40 on: October 07, 2024, 05:13:56 am »
As I said above, industry of color led panels has special chips for any possible config you can imagine.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf