1

I was wondering if; I leave the power on my Rpi but shut it down. Could I leave a pin on high?

Would love to make a led go on as soon as the rpi shutsdown. I was wondering if I could do that without making a relay.

1
  • I think you are going about this backwards. You could wire a relay to be normally closed then on power up toggle the relay to an open state turning your LED off. Jul 16, 2017 at 22:18

2 Answers 2

1

Unlike a PC, the Pi has no true "shutdown" where the power goes off completely.

What actually happens is that the system sets a flag in a special area of memory that survives a reset, and then goes through the reset. The GPU firmware then detects that flag and puts the system to sleep in a minimal-power consumption state.

Unfortunately, that means you can't control the state of the pins easily, or perhaps at all. If it's possible at all, it would be with a custom "device tree blob", though even that couldn't help you avoid the several seconds during which the state of all the pins are set to inputs with pull-ups or pull-downs, depending on their default state in the hardware, and you can't override that. The custom DT blob approach could work only if this "sleep" state is entered after the blob is processed. I have no idea if it is but I suspect it's not.

The default state of all the pins at reset is documented on page 102 in the datasheet, linked under "Peripheral specification" of the BCM2835 docs.

0

The question did say without wiring a relay . One way would be to use a changeover switch to turn your Rpi on and off however I would recommend shutting the rpi down through a recognized shutdown process. The changeover switch would be a final power isolation after shutdown. There are of course other ways such as letting the pin go low and usingthat pin as the ov side . I'm sure with power left connected to the input a few of the pins stay with voltage .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.