Log in

View Full Version : Starting PC from PIC



Tissy
- 8th December 2005, 20:40
Has anyone replaced the mechanical momentary switch found on PCs with an electronic version.

I want a PIC to be able to control the momentary action of this button.

The voltage across the header on the motherboard is around 3.17 volts, but i want the PIC to be a mechanical replacement where it then doesn't matter about the polarity etc on these motherboard pins.

What would be the best method of creating this switch, preferably without using a relay.

Cheers.

BigWumpus
- 8th December 2005, 20:46
Normaly, we suggest you to use an "open-collector" Output of the PIC (maybe RAx) or use some NPN-transistor...

But if you want to be free of any polarity...
You have to use a relay...

Charles Linquis
- 9th December 2005, 02:27
I have an ECS motherboard that doesn't automatically restart upon power fail. The machine is in my attic, and provides (MP3) music 24/7 to my bathroom. I got tired of going up to the attic to restart it after every power flicker.

I use a 12F675 powered from the 5V standby of the power supply. One PIC output pin is tied to one of the "PowerButton" pins. After power up, I wait for 3 seconds (for the power supply voltage to stabilize) and then write a 1 to an output pin and set it as an output for 300ms, then I set it back as an input. This simulates an open-collector driver (so that the ordinary power button still works). The entire circuit consists of the PIC and a 10uF cap across the power leads.

Works great.

My motherboard needed a logic "high" on the pin to start it. Check your motherboard. It may need a logic "low". In that case, just write a "0" to the PIC pin before you set it as an output.

Squibcakes
- 9th December 2005, 06:23
Yeah I've done this.. very neat program too!

Two things I found, to get you started.

1. Use the pic and relay in parallel with the soft Soft -Off wire. I used an omron G5V-1 SPDT type, but you could use a reed relay instead. I know you dont want to use a relay.. but for a couple of bucks... you'll get total isoltation!

2. Depending on your ap, you may need feed back from the pc (floppy power cable example) so the pic doesn't turn the pc off, when it's actually turning it on. Opto isolator for this is a must!

Good luck
J

Luciano
- 9th December 2005, 09:53
Hi,

Automatically restart upon power fail

Go into the PC BIOS and under the menu POWER see if you can find
the option "Restore on AC Power Loss".

Best regards,

Luciano

G8RPI
- 14th December 2005, 11:55
Hi,
if you want polarity free isolated switching without a relay try a MOSFET based Solid State Relay (SSR).
Omron make the G5VM series, NAIS the AQY210 and AQY221 and IR the PVA2352 and PVG612
They are basically opto coupled MOSFETs. There are normally two FET's in series so the body diodes don't conduct on AC. The input is just an LED so there are no noise or common mode problems with long wires. You just need a series current limiting resistor on the pic output like any other LED.

Robert G8RPI.

Tissy
- 14th December 2005, 12:48
Thanks for your reply Robert.

Is this the type of device you are refering to:

http://www.europe.omron.com/Images/en/165_19403.pdf

So if the Output of the PIC is HIGH (connected to this devices LED), then the isolated outputs of this device are shorted, is this right.

Many thanks again,

Steve

Tissy
- 25th February 2006, 14:42
I thought i would update this thread with what i discovered should it be useful for this applkication or another with similar requirments.

Maxim produce a chip called the DG403. This is a dual purpose TTL driven analogue switch. There for it has normally open and noramlly closed isolated contacts in the DIP package. Send a 1 and one switch will open and the other will close. It has two type switch configurations in the package.

Alternatively, they produce the DG303 which has about 4 NC switches.

Personally i think the DG403 is the better device as it caters for NO or NC contact operations.

Hope its useful to someone.

Steve