• AVR Freaks

transistor of choice for mulitiplexing?

Page: < 123 > Showing page 2 of 3
Author
P Lameijn
Super Member
  • Total Posts : 1959
  • Reward points : 0
  • Joined: 2004/01/22 18:30:23
  • Location: The Netherlands
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/03 23:45:37 (permalink)
0
If you sink 8mA or less, you can indeed omit the transistor. (Sourcing max. 3mA)
Should be plenty if using a HE led.

Regards,
Peter
#21
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 00:29:38 (permalink)
0
Indeed you can. I have a multiplexed 3 digit display on my breadboard at the moment that is adequately bright for indoor use driving the segments directly  through 270 ohm resistors (just what I had handy in a resistor array.)  Its sinking about 10ma on each drive pin.  As I need to source 80 ma, the common anodes each have a BC320 PNP driver transistor.  This is for software testing only so I didn't bother with b-e resistors as I dont care about ghosting, which is easily visible in a dark room, with the lit digits masked off.

 The final application will probably require 1 m high digits and I am considering multiplexing fluorescent tubes to keep the cost down.  Trouble is, that will need 10 filament transformers to maintain the heaters and very complex switching circuits to avoid net DC across the tubes so it may be cheaper to bite the bullet and order 21 electronic ballasts and forget about multiplexing it.
#22
P Lameijn
Super Member
  • Total Posts : 1959
  • Reward points : 0
  • Joined: 2004/01/22 18:30:23
  • Location: The Netherlands
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 00:55:46 (permalink)
0
The logic levels are guaranteed to a max. sink of 8.3mA.
You can easily use 10mA, if you only use writes to the port.
If you use bit operations on a port (bsf,bcf...), you'll need to buffer the port value before writing, or you can get RMW issues...

Regards,
Peter
#23
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 01:25:52 (permalink)
0
*Excellent* reminder for anyone considering sharing a port without buffering it.  Not a problem in my case as the 8th bit will either be an input or the decimal point and cant get written seperately.  I'd reccomend never using BSF and BCF on a port used for multiplexing as there are far too many oppurtunities for RMW mayhem to occur.
#24
Stefan Uhlemayr
Super Member
  • Total Posts : 4292
  • Reward points : 0
  • Joined: 2005/05/12 12:25:46
  • Location: Germany
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 01:33:02 (permalink)
0
Nice discussion here... wink

Here another useful part (which would save some of the quite worthful pic-pin's):
ORIGINAL: Flying with HardWare Favorites Gallery List

-------------------------------------------------------------------
[ Useful external parts:                                                              ]
-------------------------------------------------------------------

SPI-controlled o.c.-output-latches (500 mA max. / 50V): from Allegro MicroSystems

Greetings,
Stefan
#25
flubydust
Super Member
  • Total Posts : 1286
  • Reward points : 0
  • Joined: 2005/05/19 13:44:42
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 02:01:08 (permalink)
0
ORIGINAL: Ian.M
@Robert:  Did you miss I said "sinking significant current on other outputs"?


On which PICs have you seen this horrendous level of internal ground resistance which makes outputs driven low turn on NPN transistor bases?

I happen to have a PIC24F design on 3.3v supply which directly drives the cathodes of a 7 + dp segment display at about 12mA per segment. When I measure the voltage on other outputs driven to 0 with all segments on the highest voltage I see is 15mV dropping to about 4mV with one segment on. The effective ground resistance of this chip and its package is a fraction of an ohm.


#26
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 04:04:17 (permalink)
0
I noticed it way back when I first got interested in PICs so it has to be pre 16F series.  Also I didn't take the time to quantify it with proper four terminal measurement technique, so there may have been some contributing resistance in the Vss circuit external to the chip.  It doesn't take much oxidization of a  pin or socket for  ground to get rather bouncy.  From your measurements it seems that it is not likely to be a serious problem on a modern high end PIC  soldered on a board with a reasonably  competant layout.  I think I might have a spare PIC16C84 somewhere around from that period so I may be able to make some measurements.

It can of course be a significant problem on breadboard or if the circuit is badly built with a 'soft' 0 V rail. As I was pulsing over 100 mA through a couple of LEDs at the time,  it's likely I had a  significant amount of 'hash' on the 0V anyway.
post edited by Ian.M - 2010/01/04 04:11:24
#27
K8LH
Super Member
  • Total Posts : 1872
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 08:12:43 (permalink)
+2 (1)
As Stefan mentioned, adding a driver IC can reduce host PIC I/O pin requirements and provide some additional features.

Mike


post edited by K8LH - 2010/01/04 08:14:20
#28
bonedoc
Super Member
  • Total Posts : 1017
  • Reward points : 0
  • Joined: 2009/11/14 21:58:31
  • Location: 0
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 11:14:12 (permalink)
0
Ok, so here is a related question. I am now working on a project like an led cube. Except I am just doing one "wall" of the cube that is a 4x4 matrix. I am using a 20 pin chip.

I dont have the schematic drawn, but....the column provides the power (from the pic pin right now) and then the rows share a ground. So, I can send power to a vertical column, and then select what horizontal row I want by enabling the ground with a transistor.

This would allow me to isolate any LED I needed....but fails under one situation. Lets says I start at the top right and move to the top left, holding the lights one. When I reach the corner, all columns receive power and the top row is grounded. If I then want to move to the next row, one by one...I cant. Why? Because the next row is already receiving power and once grounded, all lights on that row will be on.

My LEDs in this case are RGB leds....thats why I have the 20 pin chip. I have 4 columns x 3 colors = 12....plus the 4 transistors for the grounds = 16. There is one input only pin and two for power = 19....so one spare.

I am glad that I am multiplexing 4x4x3 = 48 lights with a 20 pin pic. But, now I am trying to decide how I can activate ONE led of a row when and adjactent row is fully illuminated. I guess I will have to flash each row at high speeds?
#29
Stefan Uhlemayr
Super Member
  • Total Posts : 4292
  • Reward points : 0
  • Joined: 2005/05/12 12:25:46
  • Location: Germany
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 12:28:57 (permalink)
0
ORIGINAL: bonedoc

I dont have the schematic drawn, but....
it would help us a lot to help you, if you would draw one and post it here...[8|]

ORIGINAL: bonedoc

the column provides the power (from the pic pin right now) and then the rows share a ground. So, I can send power to a vertical column, and then select what horizontal row I want by enabling the ground with a transistor.
As far as I understand this, you've designed your matrix just the wrong way. The common signal (you call it "power" for the column) has to be driven by a transistor (for example), as there is the "high"-current, whereas the single horizontal row-LED can be driven directly out of the pic... But as said, I'm not sure, if I've understood you correctly, so you might better draw us a schematic.Smile

Additional, you may find some useful info in this old RGB 8x8 Matrix Design Help-thread.

Greetings,
Stefan
#30
gogo2520
Senior Member
  • Total Posts : 140
  • Reward points : 0
  • Joined: 2008/11/06 20:29:41
  • Location: 0
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 12:48:06 (permalink)
0
why use a shift register? why not use a 4511 BCD to 7-segment chip there cheaper and easier to use.
                                    gogo
#31
BobK
Super Member
  • Total Posts : 1404
  • Reward points : 0
  • Joined: 2008/04/16 12:13:38
  • Location: Worcester, MA
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 12:50:46 (permalink)
0
I don't think you understand multiplexing.
 
The idea is that only one of your columns should be powered at any given time.   You cycle through the 4 columns.  For each column, you set the power on for that column only, and you set the four row bits to correspond to the the state of the LEDs in the powered column.  I.e.  low if you wan't that LED on and high if you want it off.  You do this fast enough that it appears that multiple columns are lit at the same time.  You need to cycle through the 4 columns about 100 times per second.
 
Bob
#32
Stefan Uhlemayr
Super Member
  • Total Posts : 4292
  • Reward points : 0
  • Joined: 2005/05/12 12:25:46
  • Location: Germany
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 14:42:35 (permalink)
0
ORIGINAL: gogo2520

why use a shift register? why not use a 4511 BCD to 7-segment chip there cheaper and easier to use. ...
Yes, with the 4511 you could realize it, too - but you'll need one pic-pin more: 4-pin's for the BCD versa the 3 pin's for the shift-register.

Greetings,
Stefan
#33
bonedoc
Super Member
  • Total Posts : 1017
  • Reward points : 0
  • Joined: 2009/11/14 21:58:31
  • Location: 0
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 14:55:07 (permalink)
0
Here is a pic below. I am supplying power to the vertical pieces to the LEDS. I then have a ground to each row. The pic sends power to transistors, to ground each row individually. So, sending power to the left row and transistor 1 will turn on the uppermost led. The problem comes when I light all of the lights in the top row and then proceed to turn on ONE led in the next row. It is not possible because all columns are receiving power and when transistor 2 grounds the row, all lights in that row would be on.

So, Can I just flash each column or row to appear the way I want, or do I have it all wrong?



http://img691.imageshack.us/i/pic1n.jpg/
#34
P Lameijn
Super Member
  • Total Posts : 1959
  • Reward points : 0
  • Joined: 2004/01/22 18:30:23
  • Location: The Netherlands
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 15:09:39 (permalink)
0
As said above by BobK, you don't understand what multiplexing is... If you want to light a led in the lower row, you must turn off the upper row and column...
(You cannot power them both together. Look for some reading on multiplexing)

Regards,
Peter
#35
bonedoc
Super Member
  • Total Posts : 1017
  • Reward points : 0
  • Joined: 2009/11/14 21:58:31
  • Location: 0
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/04 15:16:47 (permalink)
0
That is what I was asking. What I have wired is correct....because I can control each light individually....but I can only "flash" them one at a time and hope the the persistence of eye is working. 
#36
P Lameijn
Super Member
  • Total Posts : 1959
  • Reward points : 0
  • Joined: 2004/01/22 18:30:23
  • Location: The Netherlands
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/05 01:01:45 (permalink)
0
but I can only "flash" them one at a time and hope the the persistence of eye is working. 

You just discovered the principle of multiplexing... grin
What you say is not entirely true, you can address 4 leds at the same time, (the leds on the same row) so in this case multiplexing only means selecting row #1 or row #2. Mostly done at a rate > 60Hz, so if you take 1000mS / 60Hz /2 (number of multiplexing elements) = 8.33mS as minimum, you'll do fine.
(If your mains frequency is 60Hz, don't use that exact frequency; it will give you nasty interference effects if placed near a fluorescent lightsource)

Regards,
Peter
#37
K8LH
Super Member
  • Total Posts : 1872
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/05 07:22:04 (permalink)
0
For a 4x4x4 cube I would use a 16-bit constant current sinking driver IC and four high current P-FET drivers (one P-Fet to power each layer).  A total of 5 I/O pins would be required...

Mike
post edited by K8LH - 2010/01/06 21:26:58

Attached Image(s)

#38
bonedoc
Super Member
  • Total Posts : 1017
  • Reward points : 0
  • Joined: 2009/11/14 21:58:31
  • Location: 0
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/05 08:20:46 (permalink)
0
ORIGINAL: K8LH

For a 4x4x4 cube I would use a 16-bit constant current sinking driver IC and four high current P-FET drivers (one P-Fet to power each layer).  A total of 5 I/O pins would be required...

Mike


Just to be sure, I am actually using RGB leds, so 5 pins will not work, correct? 4 columms x 3 colors = 12 plus 4 transistors = 16 pins.
#39
K8LH
Super Member
  • Total Posts : 1872
  • Reward points : 0
  • Joined: 2004/03/26 05:12:34
  • Location: Michigan, USA
  • Status: offline
RE: transistor of choice for mulitiplexing? 2010/01/06 21:30:00 (permalink)
0
Oh, now they're RGB LEDs (LOL)?  Yeah, you can still do it with 5 pins but you'll need three 16-bit constant current sinking driver ICs.  I'll attach a graphic shortly...

Mike

<added>

I added the 5-pin MacMux© drawing but you could also wire it up using more traditional techniques.  You could use 4 pins for the layer (anode) drivers, plus 1 <CLK> pin, plus 3 <DAT> pins (8 pins total).  Or you could cascade the driver ICs which would use 4 pins for the layer (anode) drivers, plus 1 <CLK> pin, plus 1 <DAT> pin, plus 1 <LAT> pin (7 pins total).

Many other possibilities too.

Have fun...

post edited by K8LH - 2010/01/11 01:55:39

Attached Image(s)

#40
Page: < 123 > Showing page 2 of 3
Jump to:
© 2019 APG vNext Commercial Version 4.5