The LED current will be:-voltage across resistor 12 - 2.1 = 9.9V510R resistor will cause 9.9 / 512 = 19.33mA to flow.So the transistor has to take 4 * 19.33 = 77.3mAAssuming a transistor gain of 20 means 3.86mA needs to flow through the base.Therefore R5 needs to be5 - 0.7 = 4.3 / 3.86 = 1KIf the real gain of the transistor is greater than 20 then it doesn't matter because the transistor will still be saturated.
R5 is there for two reasons:a) Stop more than 40mA from coming out of the Arduino pin.b) Allow enough current to saturate the transistor.For (a), any value from 150 ohms and upwards will do.For (b) ... a BC337 will multiply the current going through the base by about 50. You need 200mA so you need to allow more than 4mA through. For this, R5 needs to be less than about 1K.Me? I'd use a 470 Ohm resistor, although 220, 330, 680, etc. will work just as well.PS: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt_theory.html
...given the gain of 20 is assumed instead of the 50.
Quote from: ohiggins on May 09, 2013, 02:59 pm...given the gain of 20 is assumed instead of the 50.Gain depends on voltages, currents, etc. 20 is quite conservative.Quote from: ohiggins on May 09, 2013, 02:59 pmThankyou!Karma points are given via the little green '+' over on the left.
Use this link, will be very helpful next time. http://ledcalculator.net/
If you put 50mA thru your LEDs they will die an early death.