Chat freely about anything...

User avatar
By btidey
#92366 In principle you should not need a resistor to 0V if the GPIO1 is set to OUTPUT mode as then the voltage at that pin is either 3.3V or 0V.

The reason for maybe adding a resistor to 0V is to ensure the output is 0 if the mode might be set to INPUT or during start up before the mode is set.

The TIP41 transistor can accommodate a load of up to 6A but the leakage current when it is OFF (VB=0) can be relatively high (~0.7mA) this may be enough to turn the LED on although not bright. TO check this disconnect the base of the TIP41 from the GPIO and connect it direct to 0V. This then shows what the LED is doing when the transistor is 'off'.

If that proves to be the case then either use a different transistor with a current rating suitable for your LED but with lower leakage current or better still use a MOSFET which will have a much lower leakage ( 5uA).