Go Down

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

#### Phoed

#15
##### Jan 14, 2013, 10:23 pm
"resistance for the ground" is the resistance connected to each plane of the cube, connected to the transistor...

Is ok 1K?

#### dc42

#16
##### Jan 15, 2013, 12:44 amLast Edit: Jan 15, 2013, 12:46 am by dc42 Reason: 1
If you mean the resistor connected between the base of the transistor and the Arduino pin, then 1K (giving base current around 4mA) is rather high given that you are switching 240mA. I would use 220 ohms (base current around 18mA).
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

#17
##### Jan 15, 2013, 10:01 am
yes, is "the resistor connected between the base of the transistor and the Arduino pin". Sorry for my inaccuracy...

I will entrust to your experience dc42,
but could you please explain the calculations you have done to understand it?

thank you very much

#### dc42

#18
##### Jan 15, 2013, 04:07 pm
To switch a transistor full on, you need to supply it with enough base current. You could calculate the base current by dividing the collector current by the hfe, however hfe is typically measured at Vce = 10V, whereas we want Vce (the collector-to-emitter voltage) to be well under 1V when we turn the transistor on. So you need more base current than the value implied by the hfe. A guide is to look at the conditions under which Vce(sat) was measured, given on the datasheet. For the 2N2222A, Vce(sat) is measured with Ib = 0.1 * Ic. So to will achieve the manufacturer's Vce(sat) figure, we need to supply a base current of 0.1 times the collector current, which is 24mA in this case. In practice, we can usually tolerate a slightly higher voltage drop than the Vce(sat) figure given in the datasheet, so a slightly lower base current will do.
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

#19
##### Jan 15, 2013, 11:58 pm
Thanks for your great availability dc42!

I will use the transistor you suggested (BC337 or ZTX851) for the next "cube", because I was lucky enough to find six 2N2222A from my grandfather...

now at last I understand a little 'more about the transistor, but... I hope it's last question... how to connect?
Arduino_Pin  --> base of the transistor --> 220 Ohm resistor --> plane of the cube with 12 Leds
Vss --> emitter of the transistor
Vdd--> Collector of the transistor?

........or something is missing??
I apologize but these things I've never seen

thanks again

#### dc42

#20
##### Jan 16, 2013, 09:14 am
Emitter to ground.
Base to 220 ohm resistor; other side of resistor to Arduino plane output pin.
Collector to cathodes of the 9 LEDs in the plane. The series resistors for the LEDs will be between the 9 anode lines and the corresponding Arduino outputs.
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

#21
##### Jan 16, 2013, 10:01 am
perfect,
(each floor will have 12 LEDs in my project)

thanks, thanks, thanks very much

Go Up