I have designed a circuit to trigger a relay with GPIO port. I have used pin 4 for 5v as Vcc to my circuit, pin 6 for ground and pin 8 (BCM 14) as GPIO (output in this case). Further the pin 8 is connected to relay with PNP transistor 2n3906 and a diode with some resistor as in the image
There is no problem when I connect raspberry pi with laptop usb port as power. But when I connect the system (raspberry pi along with my designed ckt) to adapter (came along with raspberry pi) the relay do not trigger. All linux thing is working. I can see the programming logic all working fine with putty. So, I want to know if there is anyone out there facing such problem, if yes or if I am doing anything wrong please suggest the solution. The only issue I see is with adapter power ( which i think shouldn't be).