author
3Comments

Tell us about yourself!

  • Arduino Controlled Pc Power Switch

    Is it a good idea to use Pin 13 on the Arduino? The way I see it, if the onboard LED is lit for any reason, you will be sending a "shutdown pulse" to the PC. Wouldn't that mean that every time you try to communicate with the Arduino (for example when you program it using the USB), this will just shut your PC down? It confused me initially when I did this! My workaround was to use a different pin on the Arduino (D12) and change the references in the sketch from 13 to 12...

    View Instructable »
  • Arduino Controlled Pc Power Switch

    Hi rakly3, a PC On/Off switch works by shorting the sensing pin to ground. This pin is normally pulled HIGH (5volts) internally. Therefore, I would suggest that the original code would be correct, where the pin is pulled LOW first and then set back to HIGH after half a second (500 ms). This would simulate you pressing the power button for half a second and then releasing it... Basically, the code you have posted above says "if you receive the trigger-code "O", do nothing for 5 seconds (not sure of your reason for changing this delay), then press and keep holding the button forever"... Note that holding the power button for more than 4 seconds will result in a forced power off, rather than letting your operating system deal with it and close down cleanly, so you're…

    see more »

    Hi rakly3, a PC On/Off switch works by shorting the sensing pin to ground. This pin is normally pulled HIGH (5volts) internally. Therefore, I would suggest that the original code would be correct, where the pin is pulled LOW first and then set back to HIGH after half a second (500 ms). This would simulate you pressing the power button for half a second and then releasing it... Basically, the code you have posted above says "if you receive the trigger-code "O", do nothing for 5 seconds (not sure of your reason for changing this delay), then press and keep holding the button forever"... Note that holding the power button for more than 4 seconds will result in a forced power off, rather than letting your operating system deal with it and close down cleanly, so you're probably risking losing data and getting "Windows did not close down properly" sort of messages when you start it again. I'm pretty sure that's not what you want to be doing :) ... In fact, I suspect you might be stressing components by doing that, because your computer is trying to send that pin to +5v, but your arduino is going to be constantly pulling it to ground, so they're fighting each other. No sure which one would win, but you might find nasty things happen sooner or later, and I suspect you could damage your arduino eventually ...If anyone could confirm this, I would be grateful :)

    View Instructable »