2 added 171 characters in body
source | link

I tried Peter Bennett's circuit, and like Antonio, I too had the red LED on at all times. At first, I tried Antonio's modification to the circuit, but then I realized that it was wrong (even though it worked). Below is my modification of the circuit. I substituted a BC547 NPN and a BC557 PNP because it's what I had. I changed R2 to 8.5k, and added the 2 pull-up resistors(R5 and R6). When the MCU pulls the bases of both transistors to ground, the green LED turns off and the red LED turns on. I know this was an old post, but I figured I'd add to it since it somewhat helped me.

  

Two transistors turn on/off LEDsschematic

simulate this circuit – Schematic created using CircuitLab

I tried Peter Bennett's circuit, and like Antonio, I too had the red LED on at all times. At first, I tried Antonio's modification to the circuit, but then I realized that it was wrong (even though it worked). Below is my modification of the circuit. I substituted a BC547 NPN and a BC557 PNP because it's what I had. I changed R2 to 8.5k, and added the 2 pull-up resistors(R5 and R6). When the MCU pulls the bases of both transistors to ground, the green LED turns off and the red LED turns on. I know this was an old post, but I figured I'd add to it since it somewhat helped me.

 

Two transistors turn on/off LEDs

I tried Peter Bennett's circuit, and like Antonio, I too had the red LED on at all times. At first, I tried Antonio's modification to the circuit, but then I realized that it was wrong (even though it worked). Below is my modification of the circuit. I substituted a BC547 NPN and a BC557 PNP because it's what I had. I changed R2 to 8.5k, and added the 2 pull-up resistors(R5 and R6). When the MCU pulls the bases of both transistors to ground, the green LED turns off and the red LED turns on. I know this was an old post, but I figured I'd add to it since it somewhat helped me.

 

schematic

simulate this circuit – Schematic created using CircuitLab

1
source | link

I tried Peter Bennett's circuit, and like Antonio, I too had the red LED on at all times. At first, I tried Antonio's modification to the circuit, but then I realized that it was wrong (even though it worked). Below is my modification of the circuit. I substituted a BC547 NPN and a BC557 PNP because it's what I had. I changed R2 to 8.5k, and added the 2 pull-up resistors(R5 and R6). When the MCU pulls the bases of both transistors to ground, the green LED turns off and the red LED turns on. I know this was an old post, but I figured I'd add to it since it somewhat helped me.

Two transistors turn on/off LEDs