I was hoping to get some assistance with using a transistor as a switch in a circuit that I am working on. The project is to integrate a Raspberry Pi into an old Playstation 2 housing while utilizing the power supply board from the playstation and integrating the power button already existing on the PS2 case to turn the Pi on and off.
The button is a momentary push button on a circuit board and I would like to utilize the button as well as the LEDs on the small PCB. There is a switch on the back of the PlayStation that controls the mains power to the DC power supply in the PS2. When this switch is turned on, the red LED should receive power from the 12V PSU indicating that the unit is in "standby", and when the power button is pressed and the Raspberry Pi is turned on, the red LED should turn off and the green LED will be turned on.
I will use the GPIOs in the Pi to make these changes. The button PCB has a flat ribbon cable that I will use to connect the 7 pins of the button PCB. For the LEDs to function, +12V will be supplied when the PS2 power supply is turned on (from the master switch on the back of the PS2 which turns on the 12V PSU). The PCB has the LEDs and resistors already integrated.
My thought was to use a PNP transistor for the red LED on the cathode side, as it would allow current to flow through the emitter-collector when the base is 0V, which will be the normal state when the PSU is powered on. When the Raspberry Pi turns on, i can have a GPIO set to high to send voltage to the base. I am unsure if the GPIO alone can give enough voltage to turn off the transistor.
My next thought was to use an NPN transistor to actuate the PNP transistor, but I dont know if I am doing this correctly and how I should size the base resistor for the PNP (R108 in the drawing below) and even if it is needed at all.
Does this look correct and/or is there a better way to accomplish this, or could I get away with just the PNP (R108) connected directly to the Pi's GPIO? Thanks in advance!