I found that IRemote don´t work as expected if I attach a bjt to other PWM pin (IRremote attached to pin11). I know about the relation between IRemote and internal timers but I am sure that isn´t the problem because the IRremote problem is produced by a NPN attached to pin 6 in PWM mode, the transistor is BC547 (max 100mA) and it is used to power (with GND) a 5v@200mA fan, and also was added a transients protection diode between GND (from the bjt output) and +5V .
If change the bjt, resistor, fan and the diode, and if I connect a led with the mandatory resistor, all work as expected. All is powered from the laptop USB.
If I use the fan configuration with PWM, sometimes IR receive remote control data, and sometimes do not receive.
@DrDiettrich Yes if I remove only the fan also is working ok. I am agree, the fan consumes the double of current that the transistor can achieve (I have this spare components and I tryed the pwm with this, despiste the classic led dimming. But, why this transistor current comsumption can influence MCUs other PWM pins? I dont understand, It is a 1k resistor in the transistor base to limit mcu I/O current
4.5 = approx output voltage of an Arduino output pin ( and that is being generous)
0.7 = voltage drop across the Base Emitter junction of the BJT
1000 = your 1k base resistor
The resulting current is:
4.5-0.7 = 3.8 volts across the 1k
I = e/r = 3.8 / 1000 = 0.0038 amps = 3.8 ma.
Even if you said "...well I could get by with 1/20 of the load current for the base current.."
200ma/20= 10 ma into the base. You might be able to get by with a 500 ohm base resistor and a BJT with more capability. I would use a BJT capable of at least 500 ma.