Pages: [1] 2   Go Down
Author Topic: Aiuto per calcolare resistenze per LedCube  (Read 1758 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Buongiorno a tutti quanti,
mi trovo a parlare ed a fare una domanda su un argomento di cui si è davvero molto parlato nel web; e vi chiedo scusa di questo, tuttavia, non sono in possesso delle conoscenza che mi permetterebbero di ricavare le migliori resistenze da applicare al progetto che vorrei realizzare:

seguendo progetti vari ho notato nella maggior parte dei casi (al di la della solita disposizione del catodo in comune su ciascun piano e dell'anodo in comune nei LED della stessa colonna verticale), l'impiego: (considerando un cubo 3x3x3) di 9 resistenze da 220 ohm, ognuna per ciascuna colonna verticale; e l'impiego di 3 resistenze da 22 K-ohm per ciascun piano, ciascuna collegata ad un transistor NPN. per poi collegare ciascuna terminazione ai pin di controllo ovviamente...

come in questo link ad esempio: http://www.instructables.com/id/LED-Cube-and-Arduino-Lib/?ALLSTEPS

Ma la domanda che mi sorge è questa: tali valori per le resistenze sono ottimali anche nel mio caso? impiegherei dei LED 20 mA; 3.0-3.2V

Vi ringrazio per la disponibilità   

-Phoed-
Logged

-Phoed-

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 (Supply volts - led volts) / current = resistance
    5v           -   1.1v     / 20ma    =  195ohms
   3.3          -   1.1v     / 20ma     =  110ohms
   3.0          -   1.1v     / 20ma    =   95ohms
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply cyclegadget,
but in my case will be: (5V-3V) / 0.02A = 100 ohms?

and what is the reason for the 22k-ohm resistors connected to the transistors?
is it correct?

thanks again
Logged

-Phoed-

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1330
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply cyclegadget,
but in my case will be: (5V-3V) / 0.02A = 100 ohms?

I used 1.1v as an example. If your leds drop 3volts, then yes 100 ohms is correct.

and what is the reason for the 22k-ohm resistors connected to the transistors?
is it correct?

In this case, the transistor is an amplifier. The base requires a smaller current to control the collector to emitter circuit. The 22k-ohm resistor protects the base from over-current damage. http://en.wikipedia.org/wiki/Transistor

thanks again

Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you very much!! smiley-kitty
Logged

-Phoed-

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As with many instructables, that one has some serious deficiencies:

- 2N3904 or BC548 would be very poor choices for the transistor, especially if you want to scale it to more LEDs. 2N2222A or BC337 would be OK.

- 22K is far too large a value for the base resistor. 1K would be a better value to use, or 220 ohms for larger cubes.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for your help dc42,

do you think are ok transistor BC237B?
because I have a lot in the box...
Logged

-Phoed-

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That circuit calls for NPN transistors. BC237B are PNP so not suitable. It would be possible to redesign the circuit and modify the code to use PNP transistors, and then BC237B would be suitable.
« Last Edit: January 13, 2013, 05:39:50 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's true...

I know I'm asking a lot,
but could you explain how to modify the circuit?
I'm sorry  but I don't know much about the transistors....

If my question is too difficult to explain, is not a problem, and I thank you anyway for availability

thanks thanks thanks
Logged

-Phoed-

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found this datasheet about BC237:

http://www.datasheetcatalog.org/datasheet/philips/BC237.pdf

"NPN general purpose transistors BC237; BC237B"
is it correct or not?
Logged

-Phoed-

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I made a mistake, I mistook BC237 for BC327. Unfortunately, BC237 is optimised for low currents, just like 2N3904. But as the current you are switching is only 60mA (3 * 20mA), it will be OK. I suggest you use base resistors no higher than 1K.

EDIT: I got it wrong again, the transistors need to switch 9 LEDs at a time, i.e. 9 * 20mA = 180mA. So BC237 is not suitable.
« Last Edit: January 13, 2013, 05:43:04 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perfect,
but between the various values of the transistor datasheet, what is the value that must be greater than or equal to 180mA?

thanks
Logged

-Phoed-

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You are looking for the following:

1. Collector current rating above the value you want to switch.

2. Vce(sat) quoted at or above the current you want to switch.

3. hfe at or around the current you want to switch should be reasonably high, say 50 or more.

4. Vce(sat) times the current you want to switch must be below the maximum allowed power dissipation.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

THANK YOU dc42,
now it is more clear, so if I want for example to have a plan with 12 leds, for that I could use a transistor that supports 12x20mA = 240mA;

then 2N2222A is ok for my experiece?
http://www.datasheetcatalog.org/datasheet/philips/2N2222.pdf

1. Collector current> 240mA
2. Vce(sat) above the current I want to switch
3. hfe > 50   
4... ?

is it correct?
And what is the best resistance for the ground?

I am very grateful
Logged

-Phoed-

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

THANK YOU dc42,
now it is more clear, so if I want for example to have a plan with 12 leds, for that I could use a transistor that supports 12x20mA = 240mA;

then 2N2222A is ok for my experiece?
http://www.datasheetcatalog.org/datasheet/philips/2N2222.pdf

1. Collector current> 240mA
2. Vce(sat) above the current I want to switch
3. hfe > 50  
4... ?

is it correct?

Yes, 2N2222A meets the requirements - although BC337 is better because it has higher hfe and lower Vce(sat). ZTX851 is better still, but more expensive.

And what is the best resistance for the ground?

Please explain what you mean by "resistance for the ground".
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Pages: [1] 2   Go Up
Jump to: