Hi,
Intro: I'm a newbie at this and tried my hand at doing a simple fading circuit driving 3 LEDs in series with a transistor (BC337). Basically the base is driven by pin 9 of the Arduino Uno through a 1k resistor and the LEDs are connected across the collector and emitter. The power for the LEDs is through a 9V battery..
The issue: The transistor heats up very quickly! The V drop across each LEDn is the usual 3.x volts and the current is a mere 180mA...not sure what wrong I'm doing here..
I look at your "layout" and I can not make sense of it... So I did a re-wiring of your circuit. I change the value - base transistor 1 K to 4.7 K... more safe... and a limiting resistor - 100 ohm in series with the LED's to limit the current going into the transistor ...more safe. I use the breadboard "rail" for Vcc ( +9 V ) and GND ( Negative of the battery ). And I connect to pin 11, a PWM pin.
The cause is : maybe bad wiring, no limiting resistor, the base resistor is low ? My guess...