I am working on a project where I need to control a couple of relays from the GPIO header on a Raspberry Pi. I tried getting a PCB with the layout like the right version in the image below, but I cannot switch the relay by setting the GPIO pin high/low.
After some more studying I came up with version 2, which is the left version, using an NPN instead of a PNP transistor - is it correctly understood that it looks more correct than the first version?
VCC is 12v and H1PXX is the GPIO pins which are 3.3v. P1/P2 are used to determine what to switch and are not relevant for this
Can I somehow make the right version work? I already have the printed circuit boards, so if it is just a matter of soldering on a wire/resistor somewhere I could do that without too much of a problem.
The board has a 5V regulator for the Raspberry Pi, so GND on the circuit is shared with the Raspberry Pi