Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

UPS=PC turn off circuit design help needed

Status
Not open for further replies.

muheeb

New Member
Hi,I am a new member and am a newbie in this electronics field and I was wondering if you guys could help me with this project of mine.

First a fact
.Where I live there is lots of loadshedding happening,so I use a ups to turn off the computer

with that fact in mind,what I want to do is build a circuit that will be connected to my ups and my pc.My understanding is that ups has a system that tells it to change to ac to battery when current is gone,ans battery to ac when current is back up,the circuit will be connected with that system,and the other side of the circuit will be connected with my pc's power button cables.

The power button of the pc as you all know works by one touch,you make them contact once and it is activated.

So,my circuit basically will take the input from the ups that current is gone and touch the cables once together and turn off the pc,and when current is back on it will take that input and touch the cables together again and turn it on.

Can you guys help me out with what components I need and the circuit diagram?The help is appreciated.
 
Most decent UPS units include software to initiate a controlled shutdown of the PC when mains power is lost or removed. Shall we assume that your UPS does not have this feature or ability?

Assuming a Microsoft Windows OS here:

While holding the power button pressed (closed) for about 5 seconds will do a shutdown it is not a controlled shutdown. This is not a good practice and depending on what the system is doing can lead to corrupt data and other numerous problems. I am not saying don't do it, I am merely saying that I personally do not see shutting down this way as a good practice.

So to be clear about this, when mains power is available you want the PC to be on and when mains power is lost you want to initiate a hard shutdown of the PC? When mains returns you want the system to restart?

Ron
 
Most decent UPS units include software to initiate a controlled shutdown of the PC when mains power is lost or removed. Shall we assume that your UPS does not have this feature or ability?

Agreed, You need software shutdown in conjunction with the hardware shutdown. Otherwise you mite as well keep it pluged into the mains. Andy
 
Unfortunately my ups does not come with that controlled shutdown method you mentioned.And I don't think they can turn it back on again.

About the 5 second pressing of the power button and the hard shutdown I know that.Fortunately my PC is programmed so when it is on if i press the power button briefly(like I would do for turning it on)it will perform a soft or regular shutdown.So the circuit should just touch the power button,that's all I want from it.whether power goes out or comes back on it's main output will be to "press the power button(the power button being the two wires are touched briefly) and quick release it" once for each of the events(1 event power out and 1 event power back on).I am not looking for intelligent solution that it will know that PC is on so turn it off or it is off and turn it on(in that case though if suddenly my circuit skips once then the proccess will get reversed,when power goes out it will turn the PC on and when power is back on it will turn the PC off,-_-')
but I am willing to take that risk(because it is a temporary solution,but really urgent).
 
Last edited:
OK, that be known, does the UPS have a LED or any indicator on it that indicates when mains are lost and it is running on battery? The trick here becomes getting a signal from somewhere to indicate when AC mains are off. Short of using AC mains as a last resort.

The button part is not a big problem as it is a momentary open button. You could parallel the output of a one shot going high to low for maybe about a .5 second duration.

Ron
 
Yes,it does have a LED indicator,one green one for showing AC is on,and a orange one for showing AC main is off.
But please simplify it as much as you can,maybe because my lack of knowledge in the field or so but I did not understand what is a momentary open button,and what is paralleling the output of a one shot going high to low for maybe about a .5 sec duration?Please give more details and keep in mind I am not a student near in EEE or that sort.

BTW,thanks for at least giving this a thought.
 
Yes,it does have a LED indicator,one green one for showing AC is on,and a orange one for showing AC main is off.
But please simplify it as much as you can,maybe because my lack of knowledge in the field or so but I did not understand what is a momentary open button,and what is paralleling the output of a one shot going high to low for maybe about a .5 sec duration?Please give more details and keep in mind I am not a student near in EEE or that sort.

BTW,thanks for at least giving this a thought.

Knowing that I would tend to agree with blueroomelectronics in that the best and easiest solution would be to try and replace your existing UPS with a unit that has shutdown capabilities and interfaces with your computer. There are ways to do what you want to do but it would require some electronic design work as well as building.

Ron
 
Dude,You are not listening to me,Those ups' can turn my pc off,can't turn it back on,or I could have gotten one of those

Ron-I am willing to do the work,tell me what circuit components I need.And what circuit design.I will say what I want again so to be clear,I want my little circuit to pick up the ac on/ac off signal(the easiest way possible to do that) and send one out put,contact the two wires of the power button together momentarily,The out put can happen any time the ac on/ac off signal is given.You mentioned the led's,so I am assuming you want to pick that signal up from there?please give me details.

**broken link removed**
 
Last edited:
Well OK, it works like this. The first thing you need is a simple way to figure out what the UPS is doing or if mains power is present or not present. Keep in mind that most of this is thinking out loud, I never tried this. So starting with the UPS. Since like many UPS units it does have LEDs to let you know what is going on. Maybe those LEDs could be used to advantage. It would be nice if we knew the voltage across the LEDs when they are lit. This is where the wires driving the LEDs could also maybe drive a few Opto Couplers. An Opto Coupler is no more than an electronic LED driven switch of sorts. The Opto Couplers might be used in a scheme to drive a device called a One Shot configured from maybe a 555 timer chip. When a one shot is triggered it outputs a pulse with a duration based on components selected. The pulse is positive but could be inverted. What you want is a negative going pulse of about a 1/2 second duration. If I read you correctly the computer is setup to only require a momentary push of the front panel power button to initiate shutdown.

More on the computer. The start push button on a home computer is a normally open switch. The switch closes only for the duration the button is held down. One line of the button is at ground (logic low) the other line is at about 5 volts maintained there by a pull up resistor on the motherboard (logic high). When the button is pressed that logic high becomes a low state bridged to ground by the switch contacts. That is what gets things going.Matter of fact this web page gives an overview of what happens electronically to start a PSU in a home computer. Even when the computer is off for all purposes there is still 5 volt standby (5V SB) present in the system for control purposes.

So the trick becomes electronically simulating the button pushes of On / Off based on whether AC mains power is available or not. Another option beyond using opto couplers off the UPS LEDs might be an external mains powered small relay configured to trigger the one shot configuration in some way.

Regardless of how it is done, it will require some electronics knowledge, soldering skills and a few other things as well as a pile of small parts and a way to mount everything into a package to connect to the PC. If you want a hard fast solution all drawn out I don't have one. I have a few thoughts on how it might be done and that is about it at this point. Actually it is a challenging little project.

Ron
 
@Ron,can't thank you enough.I will try it.I have a older computer and a old ups(actually a few more).I will try this on them.And also got to get the components.about the challenge...Life is a big old challenge right?and for your information when I was a younger I experimented circuit surgeries on my toys and such,even had a book called "hobby of electronics stuff" I think.Wish me luck.

Btw I am still in the middle of nowhere,but still!
 
Last edited:
Just experiment slowly and carefully. Read before you try things. Of course good luck too! :)

Ron
 
Last edited:
I have had a need for a similar circuit for quite some time, but priorities are such that I don't even have time to do it. What I can do, is tell you how I interfaced a piece of audio equipment many years ago. I used a VTL5C1 FET opto isolator which is a leaded version of some DIP varieties. The FET contacts go across the button and I used an LM334 current source set to 10 mA. I also used a diode. Now my control signal can be anything from 3 to 32 volts.

I also had to detect whether the unit was on. I just paralleled the LED portion of an optoisolator with a resistor. I lost some brightness, but it worked. Nor I had an open collector signal to detect ON.

I used timer chips that are obsolete now to generate what I needed.

What I would like now could be massaged into what you want, but I don't have the time to do a microcontroller based solution.

It would also be best to know the state of power to the computer. e.g. is the computer on. Some amount of time of stable power should exist before you attempt to turn on the laptop.

It may be possible to use modules such as these, about $50 USD **broken link removed** to help accomplish what you need to do. e.g. Once power has returned, start a timer for say 30 sec. If that timer times out and the computer is OFF, then pulse opto.

Detecting if the computer is on can be done by detecting voltage present on the floppy connector. A simple 12V relay with supression diodes would be all that's needed.

The computer shutdown I would still do via a UPS that is interfaceable to the computer.

This company **broken link removed** looks promising for a processor based solution that might be easy.

It would not be my choice for what I want to do though. You have a UPS, I don't.

This (IDEC smart relay) https://www.idec.com/language/english/manual/FL1AManual.pdf may also be a possible starting point.

There are always the questions of time, money, reliability, availability, # of units and whether a development system is required.

You can play with the CPUSTIC BASIC for free on your computer and you can play with the IDEC program and simulator free as well.

What makes it tough is dealing with power on/power off events, but with a few signals, you should be good to go.
1. Is computer on? Relay on 12V disk drive connector with supression diode.
2. Interface to power button - I showed how to do that.
3. Is AC power available. You can use a mains powered relay to do this.

You have a UPS to keep the controller on.

You need one other piece of info and that is, you need to have some idea as to when the UPS will quit delivering power. A comparitor on the battery voltage may work powered by the UPS battery itself. This is where the USB based shutdown would be advantageous.

The IDEC programming language (ICON based) looks easy.
 
Status
Not open for further replies.

Latest threads

Back
Top