How can I turn the pins off by turning off the raspberry pi?

  • I installed a fan on the raspberry pi, which I have connected to ground and to 5v. When I turn off the raspberry pi the fan continues to run, since the two 5v pins are still active. Is it possible to turn these pins off by turning off the raspberry pi so that the fan does not continue to run?:/

  • I'm pretty sure the only option is to switch the power off, as there is still power to the RPi when shutdown (As you can see with the red led which stays on).

  • You cannot turn those 2 pins off while there is power to the raspberry pi..

    The only solution would be either a switch for the fan or else you'll have to connect a transistor or relay switch to one of the GPIO to control the fan...I just done mine and is fairly easy...thanks to help I found on the forum..Fan goes on when a set temp is reached...and goes off when minimum temp is reached....never goes on when rpi is on standbye