I am making a LED Light Stick with IR control to change the colour. This is the schematics I made. Is there any mistake ? Do i misunderstand anything ? If yes, please forgive me, I am a complete noob and here to learn. I am going to add a 5v regulator to the Attiny85 power supply. And 380ohm resistor from pin5,6,7 to the corresponding transistor’s base pins. I planned to use S8050 NPN transistor.
How i calculate the things:
The RGB LED Strips i using is rated at 15W/metre @ 5V . Power supply i am using is 6V which is 4xAAA battery .I apply P=IV and get 2.5A/metre of current. Then I calculate current used in 60cm of LED Strips (2.5/100*60) and I get 1.5A current per 60cm. I devided the value by 3 and get 0.5A for each Red, Green and Blue pin.
Next step, I found the S8050 DC current gain (hFE/Beta) which is 40 and apply the formula Ic/Ib = B (Ic = 0.5A , Ib = unknown, B=40). I get the Ib of 0.0125A. Which mean i need 0.0125A of current in order to Fully-On the transistor at Ic=0.5A @ 6V.
3.To find the resistor value from Attiny85’s Pin, I apply formula Ib = (Vb-Vbe)/Rb (Ib=0.0125, Vb=5 because the power supply of Attiny85 is 5v not 6v , Vbe=0.7V , Rb = Unknown) and i get value of Rb = 376ohm approximate to 380ohm.
Another issue is that i didn’t really know how to write the code. analogWrite seem didn’t work for ATtiny85 sincce there’s just 2 analog output for the controller. Or delayMicroseconds will work ? But i could’nt figure out how to write the code. I am very new to arduino. I know i should start at the basic first but i really need to get this project done. And please forgive my language. I didn’t know English very well.
Thanks a lot.