koci
Posts: 2
Joined: Fri Apr 05, 2013 6:55 pm

How to turn on r.Pi after shutdown?

Fri Apr 05, 2013 7:02 pm

Hi.
I finally got my Pi and tried it with raspbmc, and openelec on two separate cards.
Within each of those, there is a Reboot, and a shutdown button, and they both work fine.

My question is, once it has completed shutdown, how do you turn it back on?
I essentially just unplug the power, and plug it back on to get the pi to turn on.
Is that the normal way or might that mess up the SD card?
I see things on the forums how you can reboot or shutdown remotely with SSH, but nothing on how to turn it back on after shutdown.
Please note that I do not want to reboot, I just want to shut it down for the night, and turn it on next day.

Thanks.

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: How to turn on r.Pi after shutdown?

Fri Apr 05, 2013 8:56 pm

Yes, you just pull the plug once shutdown is complete, and re-insert it to start the boot process again. The critical thing is to make sure that the shutdown procedure is complete, especially the last few lines where the file systems are unmounted. As long as you do that, you will be OK. Rather than wearing out or breaking the micro-usb plug or receptacle, I have my pi connected to a power strip with an on/off button.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How to turn on r.Pi after shutdown?

Fri Apr 05, 2013 10:18 pm

I have a vague memory of there being a way to power it on (from the "off but still plugged in" state). I think you short some pair of pins - in P5 or something like that.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
rpdom
Posts: 15418
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to turn on r.Pi after shutdown?

Sat Apr 06, 2013 5:05 am

Joe Schmoe wrote:I have a vague memory of there being a way to power it on (from the "off but still plugged in" state). I think you short some pair of pins - in P5 or something like that.
From shutdown you can briefly short pins 5 and 6 on P1 to cause a restart.

koci
Posts: 2
Joined: Fri Apr 05, 2013 6:55 pm

Re: How to turn on r.Pi after shutdown?

Sat Apr 06, 2013 12:55 pm

Thank you guys.
No wonder I could not find anything about how to turn it on.
I have the r.Pi plugged in a Kindle USB charger, so I just disconnect the usb cable from the wall charger (not from the pi itself), so it should not wear out the micro-USB port on the pi.

Maybe I will buy one of those wall plugs with a on/off switch.

Thanks for your answers.

User avatar
Casalor
Posts: 67
Joined: Wed Feb 15, 2012 11:14 am
Location: Nantwich, UK
Contact: Website

Re: How to turn on r.Pi after shutdown?

Mon Mar 17, 2014 2:14 pm

Sorry for the thread necromancy - and I bet it's answered more fully elsewhere - but I sort of stumbled on the solution to this over the weekend.

I've built an internet radio where one of the buttons shorts pins 5 and 6 initiates a 'sudo shutdown -h now' command. This is all well and good (and works) but I found to my surprise that it also restarted the pi once it had been halted. This is on a Rev 1 board.

A happy accident indeed.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12351
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How to turn on r.Pi after shutdown?

Mon Mar 17, 2014 10:40 pm

The (revision 2) PI has a reset header, (P6) shorting it will reset the PI, and will take it out of shutdown.


User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: How to turn on r.Pi after shutdown?

Thu Jan 29, 2015 12:14 am

Enkidu wrote:this is what you need to do

http://raspi.tv/2012/making-a-reset-swi ... spberry-pi
Can this work with the model b+?
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to turn on r.Pi after shutdown?

Thu Jan 29, 2015 1:48 am

expandables wrote:
Enkidu wrote:this is what you need to do

http://raspi.tv/2012/making-a-reset-swi ... spberry-pi
Can this work with the model b+?
Yes the pin holes are near the LED's and are labeled RUN.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

claggierk
Posts: 4
Joined: Fri Sep 12, 2014 9:11 pm

Re: How to turn on r.Pi after shutdown?

Fri Nov 13, 2015 2:16 pm

So far, I am aware of only two ways to "turn on" the Raspberry Pi:
1) disconnect the Raspberry Pi from power, then restore power
2) Add a "reset" switch as you described and press the "reset" switch while the Raspberry Pi is off (but still connected to power)

I can turn off the Raspberry Pi safely by responding to a button in software (issuing whatever bash command I would like to issue). I want to know if it is possible to have a "turn on" button. Below is a description:
- Raspberry Pi is off; Press the "turn on" button; Raspberry Pi turns on
- Raspberry Pi is on; Press the "turn on" button; Raspberry Pi does absolutely nothing

Any ideas? Is there some way to use the "turn on" behavior you discovered coupled with the "reset" functionality to effectively have a "turn on" behavior alone (without the "reset")?

gordon77
Posts: 4237
Joined: Sun Aug 05, 2012 3:12 pm

Re: How to turn on r.Pi after shutdown?

Fri Nov 13, 2015 3:50 pm

If you aren't using GPIO pins 5&6, eg an RTC or other I2C device, then connect a switch between pins 5 & 6.

It will restart the Pi but not shut it down if running.

(Remember never to set pin 5 as an output or presumably enable I2C, or maybe fit a resistor in series just in case.)

User avatar
DougieLawson
Posts: 36322
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How to turn on r.Pi after shutdown?

Fri Nov 13, 2015 5:50 pm

If you want to do it in a controlled way you need an external processor. The WittyPi seems to be the best of breed for add-on boards to control your system. It includes an RTC so startups and shutdowns can be done on a timed/wall clock schedule.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

epretorious
Posts: 10
Joined: Mon Mar 13, 2017 1:45 am
Location: Portland, Oregon
Contact: Website Twitter

Re: How to turn on r.Pi after shutdown?

Thu Feb 14, 2019 6:20 pm

gordon77 wrote:
Fri Nov 13, 2015 3:50 pm
If you aren't using GPIO pins 5&6, eg an RTC or other I2C device, then connect a switch between pins 5 & 6.

It will restart the Pi but not shut it down if running.
I can confirm that this also works for the Raspberry Pi 3 B.

HTH,
Eric Pretorious
Portland, Oregon

Mario D
Posts: 2
Joined: Tue Aug 27, 2019 1:51 pm

Re: How to turn on r.Pi after shutdown?

Wed Aug 28, 2019 3:04 pm

How to Turn On/Off Raspberry Pi via TV USB Port
Greetings,

After searching for a week for a simple and easy way to turn On/Off a Raspberry Pi via the TV, and not finding a good solution, I found a simple, clean easy inexpensive non-intrusive way via a $8.00 relay switch. If you can do simple splicing and know very basic wiring you can do this.

Preface: I have all my movies on a Western Digital 4TB portable hard drive that is connected to a Raspberry Pi 4B via USB 3.0, any version of a Pi would work. The Pi's video out goes to the TV's HDMI in. I am using LebreELEC and only have Kodi installed and loading up. Turning Kodi off is easy via the Kodi ‘s O/S, but the issue was that the Pi can’t be turned back on although power remains plugged in? To me this is useless as you can’t turn it back on! The biggest grip is that although it’s being powered, you can’t turn it back on so being powered has no real purpose (except the clock) other than wasting power even though it's very low and people say just leave it on. I also prefer to have it completely off as I don't care about the clock. The popular method everyone seems to use, plug/unplug or put a switch on the power USB cable causes the time to be lost also so apparently many are accepting of this method.

I found many other ways how to make the Pi be able to be turned On or Off; a manual On/Off switch on the power supply, a remote controlled powered On/Off switch on the power outlet, plug/unplug the power supply (the lamest), add on boards, IR diodes, add on boards that you have to install software or some add on boards to the GPO which take up space inside the Pi case which is already very limited. I rather leave all that open and available for other things if needed inside the case as there is not a lot of room. I wanted no additional remotes, or deal with software or drilling the case (I have a FLIRC case) for IR’s or have any wires coming out the case. This method also does not interfere with the board itself, gives the box a clan appearance, does not need to use any additional power off the board or cause heat or amp loading issues and is very easy to do.

So cutting the power gave me an idea to use the TV's 5V USB port as a trigger/power supply. Someone may ask why not run the hard drive directly through the TV? I can, but the media center the TV has built in is awful, a far cry from being able to manage anything or be useful as a media center, no artwork, or movie info, etc. I can run the Pi off the TV USB port, but only by itself as the TV’s USB port does not have enough amps to drive both devices at once.

The solution was this relay switch: https://www.amazon.com/DZS-Elec-Adjusta ... ics&sr=1-1

DZS Elec 5V-30V 1 Channel Wilde Voltage 0-24s Adjustable Delay Internal/External Trigger Relay Board with Timer Delay Conduction Delay Circuit Switch with USB to Micro USB Power Line.

Image

Setup:
1. All that is needed to be modified on the relay switch itself is to remove/unsolder the momentary button trigger and solder a wire across the switch to have a continuous closed contact across the switch. This will keep the relay switch on as long as there is power via the 5V input of the Micro USB 5V input.
2. Connect a USB cable from the switch's Micro USB input 5V to the TV's USB port. As long as when the TV is off and it turns off the power on the USB port this will work perfectly. I can confirm this works on a Hisense 65” TV.
3. The third part is to take the power cable you are using to power your Pi and tap or cut it to get to one line, either Red or Black. Tapping is best so you can leave all the other wires intact as they will not be used. You only need to tap or cut/use ONE line, either the Red or Black, but not both! All other wires may be left alone or taped off. Take ONE of the cut lines (ie: Red), and connect one side of that cut line to the COM (Public COM) terminal on the relay switch terminal and the OTHER side of that cut Red wire to the NO (Normally Open NO) terminal. If you cut the Red, do not cut the Black wire, leave the back wire alone as all the other wires in the power cable as they are not to be used. If you look at the diagram, you would simply take both ends of the ONE cut wire’s two ends (Red for example) and connect one side of the cut wire to the terminal named Public COM and the other cut side of the wire to the Normally Open NO terminal.

Note: You will NOT use the Normally Closed terminal (NC). You do not need to worry about the relay time setting of 0~24 either as it will be bypassed due to closing of the button trigger switch. You also Do Not need to connect anything else to power the relay ie: trigger (TRIG) low level trigger or the terminals labeled Input + or Input - as they are not used when you connect a Micro SUB 5V input cable as they are just an alternative power input.

Running/Using: Plug the power cable into the power supply that was powering the Pi (on both ends) and connect the relay switch's 5V USB input power supply to the TV's USB port. When you turn on the TV, the USB port of the TV will energize the relay switch and power it on via the Micro USB input 5V. The light on the relay will turn on and stay on, this will power up the Pi.

After you are done for the day/night and ready to power off Kodi, use the O/S to power off and then when you turn off the TV, it will turn off the TV's USB port removing power to the relay switch which will power off the Pi.

I hope this helps someone who is looking for a simple inexpensive reliable solid way to turn on and off their Pi.

Enjoy!

j038lack666
Posts: 2
Joined: Sat Jun 01, 2019 12:24 am

Re: How to turn on r.Pi after shutdown?

Fri Sep 06, 2019 5:38 pm

​Hey Mario,

I came up with a similar solution back in June which is working great --- posted here. - https://www.raspberrypi.org/forums/view ... 7#p1482843


The small difference between yours and mine is, I didn't splice the power cable and I did use the timer relay to just briefly trigger the GPIO Low to cause the wake up function built in the Pi. For ShutDown I setup Kodi's power save feature, which will shutdown the pi/kodi when left inactive for whatever time you set.

With your setup you risk corrupting the memory card Image due to the risk of cutting the power before shutting down correctly. ( its way to easy to just power off your TV before shutting down the Pi )


Take a look at my post

J03

Return to “Beginners”