Go Down

Topic: Aiuto per calcolare resistenze per LedCube (Read 2058 times) previous topic - next topic

Phoed

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-
-Phoed-

cyclegadget


(Supply volts - led volts) / current = resistance
    5v           -   1.1v     / 20ma    =  195ohms
   3.3          -   1.1v     / 20ma     =  110ohms
   3.0          -   1.1v     / 20ma    =   95ohms
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

Phoed

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
-Phoed-

cyclegadget


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

Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123


dc42

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.
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.

Phoed

Thank you very much for your help dc42,

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

dc42

#7
Jan 13, 2013, 09:49 am Last Edit: Jan 13, 2013, 11:39 am by dc42 Reason: 1
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.
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.

Phoed

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
-Phoed-

Phoed

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?
-Phoed-

dc42

#10
Jan 13, 2013, 11:39 am Last Edit: Jan 13, 2013, 11:43 am by dc42 Reason: 1
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.
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.

Phoed

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

thanks
-Phoed-

dc42

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.
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.

Phoed

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
-Phoed-

dc42


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".
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.

Go Up