I am thinking of something like a mobile charger that would plug in a regular 3-pin plug at one end and a computer at the other, and some software/sensor combo that would read the (DC) voltage at the computer end. If there is no voltage, there is no power in the mains and ergo - we are in the middle of a power outage, so take action. Know of something along these lines?
(idea is to detect power failures, while powered by a "dumb" UPS unit - one that cannot communicate with the a computer. Any other solutions/suggestions?).
Binand
On Fri, Feb 15, 2013 at 7:57 PM, Binand Sethumadhavan binand@gmail.com wrote:
I am thinking of something like a mobile charger that would plug in a regular 3-pin plug at one end and a computer at the other, and some software/sensor combo that would read the (DC) voltage at the computer end. If there is no voltage, there is no power in the mains and ergo - we are in the middle of a power outage, so take action. Know of something along these lines?
(idea is to detect power failures, while powered by a "dumb" UPS unit - one that cannot communicate with the a computer. Any other solutions/suggestions?).
Good idea. You could use one of those AC Mains to USB adapter/charger; which I think gives out 5V on the USB power line. A USB cable into the computer USB port should be a good starting.
-- Arun Khan
On Sat, Feb 16, 2013 at 1:45 AM, Arun Khan knura9@gmail.com wrote:
On Fri, Feb 15, 2013 at 7:57 PM, Binand Sethumadhavan binand@gmail.com
wrote:
I am thinking of something like a mobile charger that would plug in a regular 3-pin plug at one end and a computer at the other, and some software/sensor combo that would read the (DC) voltage at the computer
end.
If there is no voltage, there is no power in the mains and ergo - we
are in
the middle of a power outage, so take action. Know of something along
these
lines?
(idea is to detect power failures, while powered by a "dumb" UPS unit -
one
that cannot communicate with the a computer. Any other solutions/suggestions?).
Good idea. You could use one of those AC Mains to USB adapter/charger; which I think gives out 5V on the USB power line. A USB cable into the computer USB port should be a good starting.
-- Arun Khan
A laptop already detects that using battery charging or not. I'm not sure how. You can rig that power module from a laptop to make a makeshift UPS that can do that. But I guess here you are looking at UPS for Desktop/Servers. In which case you will need to spend a USB port. However the standard on power grids is PLC. I remember people doing final year engineering projects on this topic. Here is an intro article on the topic. http://en.m.wikipedia.org/wiki/Power_line_communication
The USB will work for sure to detect power failure but how will you communicate to "dumb" ups from the computer? Curious.
On Sat, Feb 16, 2013 at 9:53 AM, Sanket Shah 88.sanket@gmail.com wrote:
The USB will work for sure to detect power failure but how will you communicate to "dumb" ups from the computer? Curious.
Make take on this question - the UPS is dumb we cannot communicate with it at all. I guess, the idea here is to initiate a proper system shutdown (file system integrity etc.) when the power goes down. The "dumb" UPS is *not* giving any info at present.
With a solution like this, the OS would detect that mains power has gone and that it is running on battery back up. It could take proper action per the configuration - e.g. wait X mins. poll again and if still down then do a poweroff etc.
-- Arun Khan
On 16-02-2013 01:45, Arun Khan wrote:
On Fri, Feb 15, 2013 at 7:57 PM, Binand Sethumadhavan binand@gmail.com wrote:
I am thinking of something like a mobile charger that would plug in a regular 3-pin plug at one end and a computer at the other, and some software/sensor combo that would read the (DC) voltage at the computer end. If there is no voltage, there is no power in the mains and ergo - we are in the middle of a power outage, so take action. Know of something along these lines?
(idea is to detect power failures, while powered by a "dumb" UPS unit - one that cannot communicate with the a computer. Any other solutions/suggestions?).
Good idea. You could use one of those AC Mains to USB adapter/charger; which I think gives out 5V on the USB power line. A USB cable into the computer USB port should be a good starting.
-- Arun Khan
-------------- Complex Idea ------------------------------------------ Generally an UPS will have a led indicator of the power source AC/Battery check this http://electronics.stackexchange.com/questions/26101/connect-a-light-sensor-... now you can use the frequency generated as an input to the line-in of the pc
-------------- Simple Idea ------------------------------------------ Use an electomagnetic switch which switches on when the magnet is off This can be adapted to setting a signal on the USB/Serial Port
Surya Pratap
One way to do that is to use a USB Hard disk enclosures that requires AC power. Connect this enclosure to mains and add a cheap / spare SATA desktop HDD.
With a cron job, a shell script can check presence of this HDD (E.g. lsusb | grep "device-id-here") every minute. If this HDD is not present, shutdown can be initiated by the same script.
Similarly, you can attach a cheap / spare router (would cost 400 - 900 Rs) to AC mains and check reach-ability of this router to determine presence of power in mains.
On Fri, Feb 15, 2013 at 7:57 PM, Binand Sethumadhavan binand@gmail.comwrote:
(idea is to detect power failures, while powered by a "dumb" UPS unit - one that cannot communicate with the a computer. Any other solutions/suggestions?).
Binand
On 1 April 2013 09:01, Shamit Verma subs.linux.mum@vshamit.com wrote:
One way to do that is to use a USB Hard disk enclosures that requires AC power. Connect this enclosure to mains and add a cheap / spare SATA desktop HDD. With a cron job, a shell script can check presence of this HDD (E.g. lsusb | grep "device-id-here") every minute. If this HDD is not present, shutdown can be initiated by the same script.
Similarly, you can attach a cheap / spare router (would cost 400 - 900 Rs) to AC mains and check reach-ability of this router to determine presence of power in mains.
Nice and cheap ideas :)
Regards, Pavithran
On 1 April 2013 09:01, Shamit Verma subs.linux.mum@vshamit.com wrote:
One way to do that is to use a USB Hard disk enclosures that requires AC
Similarly, you can attach a cheap / spare router (would cost 400 - 900 Rs) to AC mains and check reach-ability of this router
Pretty nifty ideas. My office LAN has two servers, a switch and a Wifi box. The former three are on UPS but the last isn't, so one would think that I could use it for this purpose. But no, I have trained my staff to power off the Wifi box when leaving for the day. I need to evaluate whether to "untrain" them or plan something else, but along these lines (we are getting a printer next week which I don't plan to put on UPS, perhaps it would be a good candidate).
Thanks for all the suggestions, folks.
Binand
On 4 April 2013 18:20, Binand Sethumadhavan binand@gmail.com wrote:
"untrain" them or plan something else, but along these lines (we are getting a printer next week which I don't plan to put on UPS, perhaps it would be a good candidate).
Not a good idea to use a device (eg. printer) that may be switched off every once in a while. Unless you plan to stop your scripts every time you service the printer. Reachability to a cheap netwrok device which will not be used for anything else appears to be a better approach. I remember streaming mp3's across all the segments of an old network. If the music ever stopped it meant that some part of the network had crashed. It was fun while it lasted :)
-gabin
--
They pay me to think... As long as I keep my mouth shut.
On 5 April 2013 15:49, gabin kattukaran gkattukaran@gmail.com wrote:
Not a good idea to use a device (eg. printer) that may be switched off every once in a while. Unless you plan to stop your scripts every time you service the printer. Reachability to a cheap netwrok device which will not be used for anything else appears to be a better approach.
You are right, but my LAN has a total of 5 devices (apart from user PC/laptop/phones) - 2 servers, 1 switch, 1 Wifi and 1 printer. Since the servers and switch are on UPS, they are ruled out. I really want to continue with the discipline of switching off the Wifi box at the end of the day. Using the printer is my best bet - after all, I don't mind a few Type I errors in this system.
I will share the script(s) I plan to write for this.
Binand