Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: shayvidas on August 21, 2014, 04:33:58 pm

Title: on\off switch to power on pc ?
Post by: shayvidas on August 21, 2014, 04:33:58 pm
so i am wiring my pc to turn on and off with an external switch...
the thing is that my switch that is already bought and is in the control panel is an on\off switch (not a bounce switch...)
here it is >
http://www.12voltplanet.co.uk/user/products/large/ON-OFF_toggle_switch_LED_tip_1_with_icon.jpg (http://www.12voltplanet.co.uk/user/products/large/ON-OFF_toggle_switch_LED_tip_1_with_icon.jpg)

the thing is if i turn it on my computer turns on... then after around 3 seconds shuts itself off...
the only way to turn on the pc is to turn on the switch then imidiatly to turn it off... that turns on the pc normaly ...

i know i should have bought a bouncing switch.. but i didn't :( didn't had enough research i guess.. and everything is wired now..

is there a way i can make this switch that i have.. to just put it up and turn on the pc normaly ? (without having to imidiatly push it back down...)

thnx...


shay
Title: Re: on\off switch to power on pc ?
Post by: DaOld Man on August 21, 2014, 05:57:36 pm
You could wire a small capacitor in series with it to provide a pulse. Not sure what size capacitor you would need, but shouldn't take a very large one.
Turn switch on, capacitor charges providing a pulse to the PC. The only obstacle is discharging the capacitor when you turn the switch off, maybe a high resistor (10 megohm or such) wired with the capacitor so the capacitor can discharge through it?
If the switch is a SPDT you could wire it so the switch shorts the capacitor when you turn it off.
Title: Re: on\off switch to power on pc ?
Post by: dkersten on August 21, 2014, 06:20:37 pm
You could also flip it on then off again to make it act like a momentary switch, but this is a bandaid.  When you turn it on, it is "held down" and after 5 seconds just about every motherboard ever made will do a "hard off" when the power button is held for 5 seconds. 

Best to just get the right kind of switch. 


Title: Re: on\off switch to power on pc ?
Post by: keilmillerjr on August 21, 2014, 07:05:16 pm
Purchase a momentary switch of the same size hole. Most of those style switches have similar hole sizes. 3$ spent and problem solved.
Title: Re: on\off switch to power on pc ?
Post by: IAmDotorg on August 22, 2014, 08:56:41 am

the only way to turn on the pc is to turn on the switch then imidiatly to turn it off... that turns on the pc normaly ...

You have a few options if you want to use a switch like that:

- Find an older PC-AT style power supply, and hack in the power connectors. May be very hard, I doubt anyone has made them in 15 years. Older PCs had power switches. Newer ones use momentary switches and power controllers
- Set your PC (in the BIOS) to start after a power interruption, wire the switch to a relay and just cut the power. You lose graceful shutdowns, though, so you have to be careful. (That's why PCs use momentary switches, not toggle switches -- so the OS can shut down properly)
- Find someone who knows electronics to make you a circuit to do it. PC power supplies have an LED output and the momentary switch input. You need a simple logic circuit -- If the LED circuit is off, and the switch is on, pulse the momentary circuit. If the LED is on and the switch is off, pulse the momentary circuit. Otherwise, do nothing. Then you'd flip the switch on, the PC would see a button push. Flip it off, it'd get another one. Its probably only a couple bucks worth of parts to do something like that.
- Replace the toggle with a momentary toggle, so you just toggle it to turn on or off. The LED you'd wire into the PC.

Personally, I went without. My PC is set to power on after a power loss, and I have a "breaker" that disables all the power in the cabinet. But I just use its BIOS setting to power on the PC with USB input, so I just hit any of the CP buttons to turn it on. It hibernates on its own, or I can shut it down.
Title: Re: on\off switch to power on pc ?
Post by: dkersten on August 22, 2014, 10:07:53 am
Killing power without shutting down properly is not a very good idea.  Usually it won't cause any damage or file corruption, but it can, so it is best to not even have the option to do that.  For the few dollars it costs for a momentary switch, spending anything on trying to make it work seems moot.  However, if the OP is dead set on not buying another switch, hack it - take it apart and remove the latch part and leave the spring, making it a momentary switch.  BOOM, done.  :cheers:
Title: Re: on\off switch to power on pc ?
Post by: IAmDotorg on August 22, 2014, 10:22:54 am
Usually it won't cause any damage or file corruption, but it can, so it is best to not even have the option to do that.

If the OP is really set on it, the best route would be to use a Linux back-end with a RAM-based temp space, and mounting the disk read-only. You can power it down all you want at that point, completely safely. You just have an extra step of remounting your filesystems read/write before you can change anything. There's tricks to making that work in Windows, but its pretty simple to do in Linux.
Title: Re: on\off switch to power on pc ?
Post by: keilmillerjr on August 22, 2014, 12:47:05 pm
Why is this thread continuing? 3$ for a momentary switch that will fit in same hole. Can buy it locally at radio shack.
Title: Re: on\off switch to power on pc ?
Post by: IAmDotorg on August 22, 2014, 12:51:16 pm
Why is this thread continuing? 3$ for a momentary switch that will fit in same hole. Can buy it locally at radio shack.

Because you're not the OP, and that doesn't answer the OPs question?

Other than some bizarre desire to be able to say you tossed out an answer and were "right", why do you care?
Title: Re: on\off switch to power on pc ?
Post by: shayvidas on August 22, 2014, 12:55:49 pm
as i said, i know i can buy a new switch..
by the way you mean swiches that are laybeld on-off-on right ?

the thing is i could also bought the whole mame cabinent , the idea here is to have a project and build stuff from scratch.. so yea i wouldn't build a monitor... but still...

guys your all awsome !!

probebly in the end i'll buy one :) but i'm really thinking about what oldman sayd about wiring capacitor and see if that works... just afraid it will fry up the pc...
also my cabinet is allmost ready .. it is playeble now i'll post some pictures in a few minutes
Title: Re: on\off switch to power on pc ?
Post by: IAmDotorg on August 22, 2014, 01:03:02 pm
by the way you mean swiches that are laybeld on-off-on right ?

No, you need an off-momentary switch. Almost all switch designs (including the one you've got) come in off-on, off-momentary and sometimes on-off-on. You want off-momentary, if you're replacing the switch.
Title: Re: on\off switch to power on pc ?
Post by: DaOld Man on August 22, 2014, 04:35:41 pm
as i said, i know i can buy a new switch..
by the way you mean swiches that are laybeld on-off-on right ?

the thing is i could also bought the whole mame cabinent , the idea here is to have a project and build stuff from scratch.. so yea i wouldn't build a monitor... but still...

guys your all awsome !!

probebly in the end i'll buy one :) but i'm really thinking about what oldman sayd about wiring capacitor and see if that works... just afraid it will fry up the pc...
also my cabinet is allmost ready .. it is playeble now i'll post some pictures in a few minutes

I would suggest you buy a normally open momentary switch too.
That's one that is closed when you press it but opens when you release it. (Like one of your control panel pushbuttons, which will work for what you want to do, but you will have to make a larger hole.)
But if you want to go the route of the capacitor, it wont hurt your pc. Let me know if you decide to do this, I will pitch up a couple of ideas.

Title: Re: on\off switch to power on pc ?
Post by: PL1 on August 22, 2014, 08:32:34 pm
by the way you mean swiches that are laybeld on-off-on right ?

No, you need an off-momentary switch. Almost all switch designs (including the one you've got) come in off-on, off-momentary and sometimes on-off-on. You want off-momentary, if you're replacing the switch.
Momentary switches are sometimes labeled "OFF - (ON)".

The parentheses indicate momentary contact.


Scott