Go Down

Topic: Power on/off computer using Arduino Yun (Read 8457 times) previous topic - next topic

thatkookooguy

But the reason to write here in the forum is to get expert's advise. If you have other information then what I read on powering up using WOL after a bad shutdown you're more than welcome to write it down here and I'll try it.

sonnyyu

#16
Aug 07, 2015, 03:29 pm Last Edit: Aug 07, 2015, 03:54 pm by sonnyyu
Plan B:

Base on ShapeShifter's idea







Wire PS-ON and PS-Ground from PC and connect them to above circuit. (two wires between PC and Arduino)



ATX Power Supply Design Guide







sonnyyu

#17
Aug 07, 2015, 03:34 pm Last Edit: Aug 07, 2015, 03:39 pm by sonnyyu
It doesn't cover all of my needs, so why try it?

It doesn't work if the computer was shutdown incorrectly. which often happens as I stated since there are a lot of power outage.

It will also won't allow me to do anything if the computer froze but didn't shutdown.

I do have my media center which have a WOL feature which I use sometimes and I can say from experience it doesn't always allow me to power it up from afar.

I just didn't try this on my server PC, because of that experience. And I tried to read about WOL to check if something changed since my media center is 2 years old and my server is 3 months old.
You keep add new requests, we are not future tellers.






thatkookooguy

I didn't understand the post with the pictures since there are no explanations on it. Can you elaborate?


and you're right. I tried to explain everything in the original post but after a few comments I understood I didn't so I refined my request.
Don't see something wrong with that. But thanks for the criticism. I'll try to be more thorough on my next post.

ShapeShifter



Wired PS-ON and PS-Ground
OK, looks like that's the way to do it without a relay. Good to know. If you tap into the switch connector as shown in the video you posted, you need to make sure which pin is ground and which is the PS-ON signal, as the polarity is important with this circuit.

If you're tapping into the power connector as shown, instead of just the switch connector, you could also use any of the +5V signals (red wires) as the power on sense to the Yun instead of the USB cable. You could also use the +5VSB (purple wire) to see if the wall power is available by connecting that to another YUN input. +5VSB is the standby power that is always on when the unit is plugged in, even if the machine is turned off. +5V has power only when the machine is turned on. When using any power source like that as a sense input, it's a good idea to use a 1K (or a bit larger) series resistor to limit the current draw if something goes wrong (like setting the input pin to be a low output.)

Your post about not understanding the pictures came in just as I was about to hit "Post" for the above data.

The first picture is the ATX power supply connector plugged into the computer's motherboard.

The next picture shows two commonly used pinouts for that connector, the colors of the wires, and the meaning of the signals. These signals will be interesting to you:
  • Ground - Black - connect to the Yun ground
  • PS-ON - Green - this is the power switch signal, ground it to simulate pushing the switch
  • +5V - Red - this will have 5 volts when the computer is on, can be used to sense that it's on
  • +5VSB - Purple - this will have 5 volts anytime the computer has wall power, even if the computer isn't on. Can be used to sense if the AC power is present
Just don't hook up to any of the +12V, -12V or -5V lines!

The last picture shows a circuit where the Yun could control the computer's power switch. ATX Ground goes to one of the black wires, PS-ON goes to the purple wire. When the Yun output (D12 in this diagram) is HIGH, the transistor will be on, and the PS-ON signal will be grounded, simulating pressing the button. When the output is LOW, the PS-ON signal will not be grounded, releasing the push of the button.

jessemonroy650

#20
Aug 08, 2015, 01:05 am Last Edit: Aug 08, 2015, 01:07 am by jessemonroy650
But the reason to write here in the forum is to get expert's advise. If you have other information then what I read on powering up using WOL after a bad shutdown you're more than welcome to write it down here and I'll try it.
@thatkookooguy,
your run-on-sentences are hard to read.
Jesse

zstergios

@ShapeShifter great post!


Just a question, 2N3904 can be replace with NCHANEL MOSFET?

ShapeShifter

Just a question, 2N3904 can be replace with NCHANEL MOSFET?
I don't see why not. The idea is that you want to ground the ATX power on signal to turn on the supply. How you do that (FET, bi-polar transistor, relay, etc) doesn't really matter.

Theoretically, the power on input is a TTL level signal, and you could drive it directly with an Arduino output pin. But I've not tried this, and I take no responsibility if a wiring issue blows up the power supply or the Arduino board. Using the transistor to provide some level of isolation is a good idea.

zstergios

Great.
Do you know, how much time required to to connect the PS_ON with GROUND?

I have set on my code 2000 ms.
(The thought there is the motherboard to have some time to boot and keep the PS_ON high it's self)


I will test it on an old PC

zstergios

Does not work!

ATX power is enabled, fun and cpu fun is running but
1) Computer does not boot (screen is black)
2) If PS_ON and GND is not connected then anything powers down. So this signal is only for the PSU not for computer.

Seems you have to hack the button

ballscrewbob

Late to the party here but.....
What settings are available in your BIOS on the computer as most already have a feature to re-boot after power loss !

Maybe I am keeping things too simple LOL

The only thing you would have to do is to set the OS to "autologin" which is also very simple.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

zstergios

I know that BUT it's safer I think via arduino because it will wait 1 minute before turn off.
Many times power is comes back for seconds and falls again

ballscrewbob

Or maybe you are just over complicating things !

That function of the BIOS is there for that very specific reason and is EXACTLY what you need !

The BIOS also usually has a WOL feature too which also provides what else you were looking for.
Many motherboards support that feature.

Save all that hacking of computer hardware with those two items that are normally available specifically for that reason.

1 minute is not that long for a full boot unless its a stripped down OS running from an SSD on pretty good hardware !


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up