Go Down

Topic: I need help selecting a transistor (Read 11819 times) previous topic - next topic

Paul__B


Many thanks Paul__B. I have amended the offending paragraph - please review it again for me?

Looks fine now!

Now, Pelleplutt has got it ass-backwards!  Did he draw that bad diagram, or did he get it from somewhere?

It looks like an attempt to have the resistors dissipate some of the power rather than the transistors, however it would badly fail to distribute the current to the segments properly and if the transistors saturate, it will pull down the driving pins on the chip and tend to overload it.

Bad, bad, bad.   :smiley-eek:

Pelleplutt

Yes, I got it "somewhere", Google is your friend.
Do you know what driver it is on the low side, perhaps with current limit?
I can not identify the part number.

On the highside  what voltage as input?

I know it was an bad schematic, but I did not have time to do a better.

Pelle

Pelleplutt

This is not anything from the net.
This need an software sign generator so you can make your own signs.

Pelle

PaulRB

I hope the OP has gone away happy with his answer, because this thread it getting a bit silly now! 2 ICs and four exotic surface-mount-only FETs just to drive a cheap red 4 digit display...

He may well have had 12 Arduino lines available and just wanted 4 bog-standard NPNs.

BTW, did anyone else notice that the OP's question was 10 sentences long, of which 5 began with the word "so"? (am I turning into Sheldon Cooper?)

Paul__B


I hope the OP has gone away happy with his answer, because this thread it getting a bit silly now! 2 ICs and four exotic surface-mount-only FETs just to drive a cheap red 4 digit display...

Did I not introduce the only sensible fork of this quite promptly when I pointed out "way back then" that a MAX7219 will perform the job perfectly?  Least components and board space, least code/ multiplexing dealt with, least pins used.  All other versions are merely exercises in head-banging "for the academic exercise".


He may well have had 12 Arduino lines available and just wanted 4 bog-standard NPNs.

But that is limited in the available drive current anyway.


BTW, did anyone else notice that the OP's question was 10 sentences long, of which 5 began with the word "so"? (am I turning into Sheldon Cooper?)

You mean you are not Sheldon Cooper already?   :smiley-eek:

{Like most of us.}

PaulRB

Yes, indeed you did suggest max7219 first.

But I think using the atmega328 is also a pretty good solution for some situations. You can sink 10mA per segment, and maybe stretch to 20mA if you spread the segments over 2 ports. Even combined with a 1:4 multiplex that's useably bright. I did it on the link below and that was only around 8mA per segment.

http://forum.arduino.cc/index.php?topic=188135.msg1392372#msg1392372

MarkT

The ATmega will source or sink 30mA even. [although the aggregate limits kick in
at some point]

The one word I probably shouldn't mention in this thread is Charlieplexing!
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

PaulRB

#22
Aug 21, 2014, 02:02 pm Last Edit: Aug 21, 2014, 02:07 pm by PaulRB Reason: 1

The ATmega will source or sink 30mA even. [although the aggregate limits kick in
at some point


Yes, at 8*30=240mA you would be exceeding the total dissipation for the 328.


The one word I probably shouldn't mention in this thread is Charlieplexing!


Do you mean that you, Mark, should not mention the "C" word, or that no-one should? Because I already did by posting that link...

Wouldn't work anyway with a 4 digit display (was that what you meant?).

Paul__B

#23
Aug 21, 2014, 02:58 pm Last Edit: Aug 21, 2014, 03:00 pm by Paul__B Reason: 1
So what's wrong with Charlieplexing?  Nine Arduino pins can service up to eight separate 7-segment digits.  Yes, well they must of course be separate to arrange the wiring.

It works just fine with the NPN emitter followers; you put the current limit resistors in series with the LED cathode commons.  The restriction on the drive current is the same.

The only problem is the extra complexity in the code.

PaulRB


The only problem is the extra complexity in the code.


I found its not too bad at all really, just 3 or 4 extra lines of code, as long as you wire the segments up in the right way. See the sketch on the thread I posted the link to earlier.

Question: suppose you had only common cathode displays. Am I right assuming you could just use pnp as low-side switches ("collector followers")?

red913

Wow, quite the discussion you guys shared in here. The max7219 seems great, but I'm not sure I'd know how to use it or if it'd even work with the buttons I have.  I just finished a schematic. Hope this helps.  http://i62.tinypic.com/16hojm9.jpg(higher res in the link)

What I'm doing is the 5V regulator from 9V battery to an ATTiny84 because I'm going to control the 7 seg's individual digits with buttons, so I needed extra pins(vs the tiny85). They'll just cycle through the numbers.  The buttons get power straight from the 9v, and have a pull down resistor. They're your typical momentary push buttons. As for the actual transistor issue I had, I went with something like this:

from this guy's page:
http://jeelabs.org/2012/11/12/high-side-switching/


The table halfway down this page might help.

Thank you, that was pretty helpful.

But it's just as someone else here mentioned, high side switching is what i'm doing because a single pin can pull around 60mA and the I/O's pins max out at 40. So in the drawing where the guy goes "?" to GND that translates to 7 segment(instead of "?") to gnd(gnd for each individual segment)

As far as figuring out which transitor I needed...I was able to narrow some down on digikey, but the ones I selected had no Hfe gain and were pricier, so I just figured I'd use whatever sparkfun had up. That was for NPN, BC547 and for PNP 2N3906. They do have some gain, but such a small amount I figure it won't matter much. Finally if you see anything  that's missing, or just plain wrong feel free to chime in and let me know. My skill level with electronics is low and I'm still learning.

...oh ya and no Arduino, but I'll be using Arduino code and using it as  a programmer for my ATTINY84. :)





BTW, did anyone else notice that the OP's question was 10 sentences long, of which 5 began with the word "so"? (am I turning into Sheldon Cooper?)


That's what happens when I quickly throw something up without proof reading it. I think my wife just finished making dinner as well and was getting annoyed at me to get off the computer. lol

Pelleplutt

#26
Aug 22, 2014, 07:25 am Last Edit: Aug 22, 2014, 07:31 am by Pelleplutt Reason: 1
Looks great!
Also attach a resistor between base and emitter on all 2N3906, 10 kOhm will be OK.
But using 74LS....?What century are you from.

Good luck

Pelle

Edit.
IF you power everything from 5volts, you do not need the NPN transistors, just connect R12-R15 directly to the arduino.
You also have to invert the code for this outputs.

PaulRB

#27
Aug 22, 2014, 08:26 am Last Edit: Aug 22, 2014, 09:46 am by PaulRB Reason: 1
Hi red913,

Apologies for our rambling conversation. So many posts here are started by newbies who post a couple of times and are never heard from again, but if the question raises something interesting, we carry on regardless!

Well done on the design so far. It all looks pretty good. You should put a few caps in there. Each chip should have a 0.1uF decoupling cap close to its Vcc pin. The regulator output also needs one, plus a 10uF to keep things smooth. But there are a few simplifications I could suggest:

1. Easiest first: use a 5V (or less) supply so you don't need a regulator. If using batteries, use 3 or 4 rechargeable AA or AAA cells instead of a 9V battery. Nothing in your circuit needs 9V, and that regulator will just waste four ninths of the 9V battery's charge.

2. Connect the switches to ground and use the Arduino's internal pull-up resistors, saving 4 resistors.

3. Your tiny84 and 74hc595 are two 14/16 pin chips. There is a single 28 pin chip that could replace them: a mega328. The '595 has a maximum current source/sink of only 70mA, whereas the '328 can handle 200mA for a much brighter display. You won't need a crystal for the 328 because it will run at 8MHz just fine without. You can buy a blank 328 without a bootloader and program it using your Arduino exactly as you planned to do with the tiny84.

4. Pelleput is right about using only the pnp and not needing the npn. Alternatively use only the npn and then you don't even need any base resistor. See earlier discussion about emitter-followers between me and the other Paul.

5. As the 74hc595 is limited to 70mA, you could replace it with a tpic6c595 which has the same pinout but can sink up to 100mA per output (but not source at all - not a problem with your common anode display).

I realise you may have chosen your design to use components you already have, but if not, I hope these suggestions help simplify things

Paul
 

PaulRB


Did I not introduce the only sensible fork of this quite promptly when I pointed out "way back then" that a MAX7219 will perform the job perfectly?


I just realised red913 said his display is common anode, but max7219 works with only common cathode so the display would need to be replaced to use the max.

Paul__B


I just realised red913 said his display is common anode, but max7219 works with only common cathode so the display would need to be replaced to use the max.

The MAX7219 works perfectly well with common anode displays!

There are a couple of limitations. One is that you are multiplexing by eight (or seven if you do not want the decimal points) even though you have only four displays.  But for the absolute simplicity of the design it is worth it.  If you had eight displays, there would be no such difference at all!

The second "limitation" is that you have to alter the code and provide your own character patterns, you can only use the internal character generator with common cathode displays.  That however is limited to generating 0 to 9, "H", "E". "L", "P", blank digit and "-".  But if you insist on using shift registers, you have to do all the character generation in code anyway, so this is really no limitation either.

If nothing else, not having to do the multiplexing in software and using only three wires to interface (not to mention requiring only one chip, one resistor and a couple of capacitors) is an enormous advantage of the MAX72189.



Also attach a resistor between base and emitter on all 2N3906, 10 kOhm will be OK.

Umm, why?  What happens if you do not?

Go Up