This is my ciruit of my project:
LED3_RED 56 Ohms
|-------(<)------------////------------ +5V
| LED2_RED 56 Ohms
|-------(<)------------////------------ +5V
| LED1_RED 56 Ohms
|-------(<)------------////------------ +5V
10kOhms |
Pin 9 (PWM) |¯||¯||¯||¯|_ ----///-----/ transistor BC549
> Emiter
|
|
|
|
GND
LED3_GREEN 56 Ohms
|-------(<)------------////------------ +5V
| LED2_GREEN 56 Ohms
|-------(<)------------////------------ +5V
| LED1_GREEN 56 Ohms
|-------(<)------------////------------ +5V
10kOhms |
Pin 10 (PWM) |¯||¯||¯||¯|_ ----///-----/ transistor BC549
> Emiter
|
|
|
|
GND
LED3_BLUE 56 Ohms
|-------(<)------------////------------ +5V
| LED2_BLUE 56 Ohms
|-------(<)------------////------------ +5V
| LED1_BLUE 56 Ohms
|-------(<)------------////------------ +5V
10kOhms |
Pin 11 (PWM) |¯||¯||¯||¯|_ ----///-----/ transistor BC549
> Emiter
|
|
|
|
GND
BC549 datasheet says… VCEsat (Coletor-Emiter Voltage in Saturation) is 0.2V with IC=100mA…
(5V - 0,2(VCEsat) - 3,3 (LED)) / 56Ohms =~ 27mA per LED
It’s working, but i wanna a second opnion about this circuit.
I have only one problem… When I write
turnOffPWM(TIMER1A) //Pin9
turnOffPWM(TIMER1B) //Pin10
turnOffPWM(TIMER2A) //Pin11
to turn off Timers, but only working to TIMER2A (pin11). If I disconect transistor for RED, GREEN and BLUE turn off… Maybe same problem with polarization of transistors?
If I write:
analogWrite(9,0);
analogWrite(10,0);
analogWrite(11,0);
All colors is switched off…