Can I control high voltage (here 5V) to power a led lamp and a fan(both operating at 5v) from Raspberry Pi GPIO only using a transistor . Or should I isolate both the circuits using a relay or octo-coupler
1 Answer
yes, you CAN just use a npn transistor:
see more info here
but if you want to use A pnp transistor:
I think a voltage divider with a pnp transistor might work:

simulate this circuit – Schematic created using CircuitLab
you probably just want to go with the npn circuit, though.
-
1Obviously you haven't tried thisMilliways– Milliways2018-03-06 21:15:46 +00:00Commented Mar 6, 2018 at 21:15
-
No, not the pnp voltage-divider circuit. I adapted that from another website. but I have used the npn one.Benjamin Ashbaugh– Benjamin Ashbaugh2018-03-06 23:48:27 +00:00Commented Mar 6, 2018 at 23:48
