not understanding 7 segment multiplexing

to cut cost, I'd like to control a 12 volt 4 digit 7 segment array using a Mini. But I don't understand what I need for a high side driver. I've read that I need to drive a PNP using an NPN, are there any better ways? This has to fit in a 2" x 2" x 1" enclosure. I keep seeing shift register come up as a high side switch, but I don't see how that is possible?

What about using FETs?

I've read that I need to drive a PNP using an NPN, are there any better ways?

No.

I keep seeing shift register come up as a high side switch, but I don't see how that is possible?

No it is not unless the shift register is running at 12V which most can't. Anyway they can't supply the current.

What about using FETs?

Same problem as with transistors, you need a p-channel FET for the power and a n-channel FET (or NPN transistor) to switch it.

there are 2 different 7 segment displays:
one with a common anode or one with a common cathode.

  • with the common anode you connect the (1 or 2) anodes with the +12V and the other 8 cathodes via an normal NPN-transistor (eg: 2n2222) to the GND.

  • with the common cathode you connect the (1 or 2) cathodes with the GND and the other 8 anodes via an PNP-transistor to the +12V.

I would go for the first option and control the NPN-transistors via 4 shift regs

fredlaatnaarbed:
there are 2 different 7 segment displays:
one with a common anode or one with a common cathode.

  • with the common anode you connect the (1 or 2) anodes with the +12V and the other 8 cathodes via an normal NPN-transistor (eg: 2n2222) to the GND.

  • with the common cathode you connect the (1 or 2) cathodes with the GND and the other 8 anodes via an PNP-transistor to the +12V.

I would go for the first option and control the NPN-transistors via 4 shift regs

Mine goes either way. I'm setting it up as common anode per digit.

A thought I had, since darlington's are cheap and I'm already using one, can I use another to drive the PNP source driver?

cut the pins on the socket on the output side, and only use pins 1, 3, 6, and 6. Use the pads that would be under 2 and 7 as a +12 rail (each shared by 2 PNP's), and output drives on pins 0, 4, 5, and com. That's the easiest way I can save space aesthetically on a 30-stripe board. -> http://i1105.photobucket.com/albums/h355/magnethead494/dial_board_R2-5_board.jpg

The board is 3" x 1.2" and will be attached to a wall of the 5x2.5x2 enclosure the RJ-45 jack will be next to it. The heatsink and 5,12 volt regulators will be attached to the opposite wall. I'll be pulling 1 watt through the 5 volt regulator (7 volt suppression @ 150ma) and 3 watts through the 12 volt regulator (12 volt supression max [24V input] @ 250ma). 5 volt reg will simoply attach to plastic enclosure, 12 V will be on heatsink. The mini will be attached to the right wall (not sure how yet, has no mounting provision [may switch to nano?]).

To drive the common anodes, check out the UDN2981a, see http://www.rapidonline.com/pdf/82-2202.pdf. This contains 8 high side drivers each capable of switching up to 50v from a 5v control signal. The only snag is that the voltage drop in them is almost 2v, whereas a good PNP transistor would only drop around 0.2v.

dc42:
To drive the common anodes, check out the UDN2981a, see http://www.rapidonline.com/pdf/82-2202.pdf. This contains 8 high side drivers each capable of switching up to 50v from a 5v control signal. The only snag is that the voltage drop in them is almost 2v, whereas a good PNP transistor would only drop around 0.2v.

The darlingtons are a 1.2 volt drop, and that is a 1.8 volt drop, net 3 volt drop. So I'd have 9 volts going to an LED board rated for 12 volts (220 ohm resistors, 5 led's in series).

Spec'd at 8.7 volts @ 15mA, 220 ohm resistor, 12Vin
10.8 volts is 9.5mA
9 volts is 1.5mA

So that wouldn't quite work. And Mouser doesn't carry them, either.

Would it work, driving the PNP's with a darlington (only collector is avaliable, common emitter)?

Ultimately I need a Sziklai pair. Supposedly these are marketed as hex buffers?

How about driving 4 TPIC6B595 shift registers via SPI interface, one for each digit?
Yeah, its not multiplexing, but its easy write the digits, they handle 12 volts, don't need high side drivers.
They handle 150mA per segment. 84 cents at Avnet.
https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/Texas-Instruments/TPIC6B595N/_/R-1750249/A-1750249/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1

Or use a 6D595, 100mA/segment for 57 cents.
https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/STMicroelectronics/STPIC6D595B1R/_/R-5750380/A-5750380/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1

Only need 3 pins - SS, SCK, MOSI, sometimes all the multiplexing is just not worth hassle!

Both available in multiple surface mount versions as well.

CrossRoads:
How about driving 4 TPIC6B595 shift registers via SPI interface, one for each digit?
Yeah, its not multiplexing, but its easy write the digits, they handle 12 volts, don't need high side drivers.
They handle 150mA per segment. 84 cents at Avnet.
https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/Texas-Instruments/TPIC6B595N/_/R-1750249/A-1750249/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1

Or use a 6D595, 100mA/segment for 57 cents.
https://avnetexpress.avnet.com/store/em/EMController/Counter-Shift-Register/STMicroelectronics/STPIC6D595B1R/_/R-5750380/A-5750380/An-0?action=part&catalogId=500201&langId=-1&storeId=500201&listIndex=-1

Only need 3 pins - SS, SCK, MOSI, sometimes all the multiplexing is just not worth hassle!

Both available in multiple surface mount versions as well.

Nowhere enough room for 4 DIP10's. The board only has 30 columns and I'm restricted on size. Also have to fit 2 voltage regulators on the board.

If they're 8 bits, can't I still multiplex, one digit per drain?

I'm removing one switch, and moving it to the center of the board. It's a on-off-on SPDT switch with a resistor between the 2 end poles (used for dimming). The top horizontal will be voltage to the sourcing circuit for the LED's, the bottom horizontal will be 12V, and the column above the switch will be 12V with a resistor (68 ohm) on it.

Yes, can mulitplex the shift register across the digits. Still need to switch the 12V on/off to the common cathode of the digits tho.

I' d personally ditch that board you have, get an "island of holes" board, futurlec.com has plenty of options, cut down to size you need, and have the WHOLE board available for use. You're backed into a corner with that thing.
http://www.futurlec.com/ProtoBoards.shtml $1.50

CrossRoads:
Yes, can mulitplex the shift register across the digits. Still need to switch the 12V on/off to the common cathode of the digits tho.

I' d personally ditch that board you have, get an "island of holes" board, futurlec.com has plenty of options, cut down to size you need, and have the WHOLE board available for use. You're backed into a corner with that thing.
http://www.futurlec.com/ProtoBoards.shtml $1.50

Those do me no good. I need something small to fit in a 5x2.5x2 enclosure. Eventually I will transfer it to PCB and fit it in a 4x2x1 enclosure (the thinner the better).

So if I multiplex source on the register and sink on the darlington, that's a DIP20, DIP18, a STDP switch, and 5 pins for the voltage regulators. Leaves 3 columns empty I think. Sounds good.

Everything stays self contained on that board, regulators go off-board, and an RJ45 breakout (or two) and the mini.

Wait- aren't these low side drivers? I need high side. For something so simple, I don't understand why they don't exist (particularly in DIP form). Seems to me there's no difference between the chip you posted and a darlington, other than being SPI rather than direct drive.

Can I simply use 4 Logic Level P-FET's, one per digit, rather than driving a PNP with an NPN?

I found this. A tad pricey, but if it does what I want and makes things cleaner than having 8 transistors.......

Buy the board, cut it down to the size needed, wire up your circuit. You are really limiting yourself on usable board space by insisting on using the strips.

Woohoo, that is rich! I propose a piece of $1.50 perfboard and four 56 cent shift registers, you come back with a $12 part.

Well, I guess it is true, can lead a horse to water ...

So replace each darlington with an 8 bit shifter. How do I command which output is on?

So I'd only need 4 pins of the Mini to control 28 segments?

Ideally if I used a land of holes board, I'd have to cut tons of traces?

Idea would be to fit everything in a 4x2x1" enclosure. The shift registers would take up 2 linear inches, leaving 2 more inches for the mini board, RJ-45 breakout, and heatsink/regulators. Then mount it all to the enclosure using the switch. It should weigh low enough that vibration shouldn't make it break loose. (This is an exposed part going on a ~200 mph dragster)

Once I get it on PCB, I figure I could fit everything on a single 2" square PCB, including the RJ-45 connection.

No, only 3 - SS, SCK, MOSI, and could be 32 (7 + decimal point, use as warning lights or something, : , etc)

digitalWrite(SS, LOW);
SPI.transfer (digit1); // data can come from an array even:  SPI.transfer ( displayArray[digit1data] );
SPI.transfer (digit2);
SPI.transfer (digit3);
SPI.transfer (digit4);
digitalWrite(SS, HIGH);
[code]
and in the rest of void loop you create/determine/whatever the digit data will be.
displayArray[0-9] will be the high/lows that create your display of a 0, 1, 2, ...9 or maybe letters A,b,c,C,d,E,F,g,h,i,J,L,P,U

[/code]

CrossRoads:
No, only 3 - SS, SCK, MOSI, and could be 32 (7 + decimal point, use as warning lights or something, : , etc)

digitalWrite(SS, LOW);

SPI.transfer (digit1); // data can come from an array even:  SPI.transfer ( displayArray[digit1data] );
SPI.transfer (digit2);
SPI.transfer (digit3);
SPI.transfer (digit4);
digitalWrite(SS, HIGH);

[code]
and in the rest of void loop you create/determine/whatever the digit data will be.
displayArray[0-9] will be the high/lows that create your display of a 0, 1, 2, ...9 or maybe letters A,b,c,C,d,E,F,g,h,i,J,L,P,U


[/code]

Me like much.

so I'd just send the segmentary binary over SPI?

Say I had 2 displays, about 5 feet apart (opposite side of car).....I'd have 8 shifters total running on 3 wires plus power/ground? They'd all share the SCK and MOSI, each would just have a different SS pin on the mini? So I could use another Cat5 cord to connect the 'slave' display to the 'master' display? SSx4, SCK, MOSI, +12V, and GND?

read the SPI docs. So each shifter would have it's own SS pin- but I could tie the mirrored shifters together to save pins on the mini. So I'd need four SS pins along with the 2 default SCK and MOSI pins- 6 total.

Just have to read up on controlling shift registers.

Yeah, I think I follow that. Be 2 boxes, each with 4 shift registers, one talking to other?
Each display set would have 4 shift registers in series, only need 1 SS for each set. Or just 1 even if both are displaying same thing.

Re-reading, sounds like you have off-board regulator, I moved things around to have headers/holes for regulators and for the segments.
Was also thinking you'd have off board resistors for the digits as they are 12V displays.

more tomorrow, need to get these contacts out & get to bed. G'night.

CrossRoads:
more tomorrow, need to get these contacts out & get to bed. G'night.

It's only 3:30AM there in boston...:eek:

I'll research driving shift registers. I REALLY like how this is coming out! Not sure how cascaded shift registers only need one SS, but i'll see fif I can't learn!

Be nice if the drains were all on one side, but I'll take what I can get!

A thought: I could EASILY fit the control system inside a 3"x2"x1" enclosure by affixing the shift registers directly to the display boards! So If I made a PCB (from iTead) that connected the a,b,c...f,g connections over to the shift register, then I would only need SCK, SS, MOSI