Pages: 1 ... 6 7 [8]   Go Down
Author Topic: RGB SMT LED Cube, resistors, drivers, and shift registers.  (Read 22907 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just wanted to try to get you to do and understand one thing right: the common emitter circuit.
The key to understanding is to stay with the subject, avoiding the introduction of side issues.
I set out a modest experiment, but without a voltmeter it's pointless.
(You have an ammeter, but no voltmeter?)

There's a big difference between VB, VBE (approx 0.7V), and VCE.

With regard to "specific beta", all design assumptions are, or should be, based on worst-case, h_fe/beta guaranteed Minimum.
In some production lot there would likely be little variation unit to unit, but from lot to lot, or manufacturer to manufacturer there's no telling.
You may find that your transistors do better than the guaranteed minimum, well and good, so you can utilise that overage.

Anyway, till we can agree to work on one specific circuit, really wring out the fundamentals, I can't see any point in going on.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a pile of DMMs, the are cheap, but good enough. Somewhere, I may still have a nice meter (you know, the kind with a needle resting on some diamond chips to pivot smooth and effortlessly. I cant remember the last time I saw it, but its a basic VOM.

I think i understand the basics of the calculations, but it would be nice to understand why the parts are needed.  I also dont like the guessing part of the calculation, it seems to me that the part will likely behave about the same under similar conditions for most people. It seems like it should be easy to look that up in a chart or graph, and get close with your calculations, but I wasnt able to do that, I had to test things, before I could get in the ballpark.

The last several posts, I've only been talking about using 2n2222 BJT in my circumstances of lighting up to 0 to 4 RGB LEDs (0 to 12 LEDs total) at one time.
The posts with the schematics show you how the transistors are being used. That same circuit can probably be modified to use mosfets, or ULN (darlington arrays) chips easily though. I did test all 3 types of parts using the same LEDs and resistors that I used on the cube.

I do also have unfinished projects that will need mosfets, and I've picked out some tiny parts that hopefully will be suitable for my needs (about 1 amp), and as I understand it, they dont need a resistor between the arduino, but they need one between the gate/source, I think I have some 4.7k's for that.
Logged


Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think i understand the basics of the calculations, but it would be nice to understand why the parts are needed. 
Which parts?  Are we discussing the common emitter circuit?

I also dont like the guessing part of the calculation, it seems to me that the part will likely behave about the same under similar conditions for most people.
It's not a  "guess".  You have to start somewhere.  Having only the least is a good start, if there's more (as in more beta, as may be likely) then it only gets better.  The circuit will not be a worse performer for the transistor's having more beta (gain) than anticipated.

It seems like it should be easy to look that up in a chart or graph, and get close with your calculations, but I wasnt able to do that, I had to test things, before I could get in the ballpark.
How can I know where you're losing the plot?  You haven't shown your work.

I can't see what's going on in your schematics; they're pretty free-form, difficult to follow.


Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just went back and changed some other drawings, and removed the incomplete ones. The complete one is kind of big 2000x2000 pix, but if I reduce it too much, its harder to read.

I will look for my notes, it was a while ago, so I may be a while before I find them.
Logged


Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I took some data with two different transistors, a 2N3904 and a PN2222.



I ran the 2N3904 out past recommended Absolute Max.
What's not across the load (VL is across VCE.

Clearly, the PN2222 has more gain.
If you don't like comparing the 32Ω load data, the PN2222 does a lot better job with 67Ω load.  It's able to sustain > 120mA collector current with 1mA base current.
I'm using resistors for load because I don't want to string out a bunch of LEDs.

[Given the 32Ω example: 3 Greens in series (= 6V) with a 220Ω resistor would result about 10mA; so, 24 of those circuits in parallel would have the same effect (240mA).]

> > > This is what I was trying to get you to do in Reply #101.
« Last Edit: April 05, 2013, 06:13:24 pm by Runaway Pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I looked around for my notes, and I couldnt find much, so I did the calculations again:

I considered 4 circumstances Highest load (240ma), lowest load (20ma), Highest gain guess (100), lowest gain guess (10). Im only using 5v, and saturation point is .7v.

Loads:
1-12 LEDs, assuming 20mA.
20mA to 240 mA
.7v Saturation
Vin=5v
Gain/Beta/HF_E: 10, 100


#1 (20ma load, gain 10)
Base current = 2mA  (20/10=2)
5v-.7v = 4.3v
4.3/.002(2ma) = 2150 ohms
Base resistor size 2.15K ohm

#2 (20ma load, gain 100)
Base current 20mA (20/100)= .2
5v-.7v = 4.3v
4.3/.0002 = 21,500
Base resistor = 21.5k ohm


#3 240 mA load,  gain 10
Base current = (240/10) =24mA
5v-.7v = 4.3v
4.3/.024 = 179 Ohm


#4 240 mA load, gain 100
Base current = (240/100)=2.4 mA
5v-.7=4.3v
4.3v/.0024 = 1791 ohm
Base resistor =1791 ohms

From there It looks like I have range of 180 to 2k ohms. Which is pretty big, it doesnt help me figure out what part to order, so I cant order parts, until I narrow this down.
 
To make thing a little more complicated, Im cascading the transistors, so, even if these numbers were 100% accurate, they may not be after the second transistor.

In the past I've done calculations, and later found out that real world numbers and calculations can be very different, its best to test things with the specific parts, and specific power supplies, because they can vary.  Sometimes that 5v power supply is only 4.5v, others may be over 5v. 100 ohm resistors may actually be 95 ohms. These seem like tiny insignificant amounts, but when you throw them into the equation, it can change the results quite a bit.

I ended up getting using many resistors and a few transistors, setup a test rig with the parts I plan on using (LEDs, resistors, 2n2222s and a variety of base resistors). I did a bunch of testing and measuring, then I realized that I needed to use 2 transistors for my testing, so that It would be exactly like I will be using them.

I had a lot of hassle trying to measure, since my ranges of measurement was from a fraction of an mA to about 250mA, which meant 2 settings on the meter, and the 2 settings were inconsistent. but my measurements lead me to believe that I could use between 150 and 1k ohm base resistors, 150 drew a lot of current at the base when all LEDs lit (about 40ma), and 1k restricted the current a little bit, 300 ohms seemed to work good, and keep the base current under 20ma. I wasnt able to get 300, but I was able to find 270 ohm resistors, which is what I ended up using.

While I was testing the 2n2222 with 4 RGB LEDs I did similar experiments with the mosfets that I picked out for the other cubes (they need to sink/source almost a amp, way too much for 2n2222s). I have a p-channel, and an n-channel, both have similar ratings, both need to be able to light between 1 and 48 LEDs (assuming 20ma), thats nearly a whole amp. I only did a little measuring, but it seem like they only had about 1ma load on the gate, they seem like a much better part than the BJTs.

Logged


Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
In the past I've done calculations, and later found out that real world numbers and calculations can be very different, its best to test things with the specific parts, and specific power supplies, because they can vary.
Yes, this is known as "DVT" - Design Verification Testing.

Again, my sole motivation in posting on the subject was in response to your having posted that you hadn't gotten support enough to understand the relationship between beta and collector current.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I still dont have any idea how to figure out how to figure out the gain/hfe/beta for the calculations, It seems to me, that should be as simple as looking it up in a table on the datasheet.
The beta numbers 10 and 100 came from 2 different individuals, when I asked them where on the datasheet can I find the right value for my uses (20-240ma at 5v).

It seems to me, that there should be a few common resistors used with 2n2222 transistors, one for 5v, and other for 12v applications. the part is only good for about 1/2 amp (mine are smt, and only good for 350ma). I would think that I would find 5v circuits all had about the same value base resistor, and 12v circuits would have a different value, but the 12v circuits would all have a similar value base resistor.

It seems like it should be easier than it is, and it seems like I have to assume every transistor will have a beta between 10 and 100, and be prepared for every calculation in between.

Logged


Offline Offline
Faraday Member
**
Karma: 66
Posts: 2578
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I still dont have any idea how to figure out how to figure out the gain/hfe/beta for the calculations,
Then you haven't been reading any of my posts.

It seems to me, that should be as simple as looking it up in a table on the datasheet.

Again, (I have posted this twice before) beta is not a firm figure, there's a range, but a minimum guaranteed is always specified - that's what you work with.  Reconcile yourself to the fact that the way it's done and how you want it are two different matters.

The beta numbers 10 and 100 came from 2 different individuals, when I asked them where on the datasheet can I find the right value for my uses (20-240ma at 5v).
Those numbers did not come from me.

It seems to me, that there should be a few common resistors used with 2n2222 transistors, one for 5v, and other for 12v applications. the part is only good for about 1/2 amp (mine are smt, and only good for 350ma). I would think that I would find 5v circuits all had about the same value base resistor, and 12v circuits would have a different value, but the 12v circuits would all have a similar value base resistor.
Why would you think they would be the same?  
The base current required for IC up to 240mA is different than that for 100mA or 50mA. Yes, someone could set it all up for the possibility of 240mA, no matter what, but then where that's more than required it'd be over-driven like crazy. That's OK, in a political sense, but the cognoscenti will deride the unnecessary base current.


Moderator edit: unnecessary sarcasm removed
« Last Edit: April 08, 2013, 02:56:12 pm by Coding Badly » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I understand that the gain will not be the same at all voltages, and all currents, but the part is pretty limited in its rage of current, and using it at 5v is very common (especially when you are using it with microcontroller, like we do on this forum)

With a 2n2222 transistor, and 5v, how many possible base resistor sizes could I need? We know the current wont be more than 1/2 amp, or we would need a different transistor. At 240ma, you may have a different gain than at 10ma, which will effect the size of the base resistor. but at similar current levels, it should be pretty similar (note: similar does not mean exactly the same, it means near, or close to.) I understand there will be some deviation from lot to lot, and manufacturer to manufacturer but at 5v, one size resistor should be good for a fair range of current.

Anyway doing the calculations isnt the problem, calculating my needs isnt a problem, figuring out the right value for gain/beta/hfe is a problem You mentioned that I can assume its 50, someone else says I should assume its 10, another person says its probably about 100.

When all is said and done, the calculations were kind of pointless, since I had to hook them up and measure to find the answer.


Moderator edit: severe over-quoting removed; vitriol removed
« Last Edit: April 08, 2013, 03:02:08 pm by Coding Badly » Logged


Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for removing those offensive posts.

I am curious about the claims of vitriol though, but whatever, its probably not important.
I dont really see any value in the posts after I posted my calculations. Those are mostly just a bunch of incorrect assumptions and of little or no educational value.
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13041
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I dont really see any value in the posts after I posted my calculations.

There is value to the forum.  The posts stay.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13041
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am curious about the claims of vitriol though, but whatever, its probably not important.

It is entirely up to you to decide if it is or is not important.  If I have to edit any of more your posts on this thread you will be given a timeout.  If access to this forum is important to you then you will temper your responses.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help, its a big improvement. Im sorry for any hassle.
Logged


Pages: 1 ... 6 7 [8]   Go Up
Jump to: