Intel PC interrupt - Page 1
Forum section: electronics / projects

author: Connoiseur
author_rank: Regular Contributor
timestamp: January 11, 2016, 11:10:34 am
content: I want to run a PC (intel DH55TC with gen1 core i3) on 24V flooded lead acid battery bank (100Ah), which is charged by solar panels. My plan is to use a 24V to 12V buck converter*and then step this down further to the 5V and 3.3V rails. It will run mostly unattended for simulations and other resource intensive tasks. I'll be accessing it by remote desktop.However I'm not able figure out a way to hibernate the PC if the battery voltage falls to just above the safe discharge limits. How do I do it? Can a simple comparator circuit trigger an event via the parallel port or it requires more elaborate engineering?*http://www.amazon.in/Black-Metal-Voltage-Reducer-Converter/dp/B00NR32XKW/ref=sr_1_20?s=electronics&ie=UTF8&qid=1452509021&sr=1-20&keywords=12v+to+24vI can design my own custom psu but it takes too much time(can't afford $40 shipping from digikey) for components and PCB to arrive, I think the above one is good enough but haven't finalized it yet, maybe I'll consider a better one.

author: dom0
author_rank: Super Contributor
timestamp: January 11, 2016, 11:24:26 am
content: Ideally you would have an USB-capable micro implement the HID Power Device interface. Any operating system would recognize your UPS as some kind of battery then and could collect statistics and live data. They would also support automatic, safe shutdown if the battery runs low.This would be a bit long and tedious to do with no prior experience in USB device programming.Much simpler and quicker: Micro <=> RS-232 [<=> USB bridge] <=> computer <=> small script that reads battery state and issues shut down command if necessary.For stepping down the 24 V to ATX-compatible something something, take a look at PicoPSU. They are efficient and work very well.

author: Ian.M
author_rank: Super Contributor
timestamp: January 11, 2016, 11:47:18 am
content: As the previous poster mentioned, you'd be better off with a 24V DC input PC PSU, e.g.http://www.powerstream.com/DC_PC.htm.Old 'dumb' UPS used voltage level signalling over the serial port control lines. If your battery monitor emulates such a UPS, you could use one of the various FOSS UPS control daemons to monitor your batteries and trigger a shutdown or hibernate.I believe your board has a serial port header, so no need for USB<=>serial converters, and yes, a simple comparator circuit, could be used.

author: PA0PBZ
author_rank: Super Contributor
timestamp: January 11, 2016, 11:59:28 am
content: There are (automotive) 24V DC power supplies with built-in battery monitor, that can shut down (hibernate?) the pc if the voltage drops under a certain level.

author: MrSlack
author_rank: Frequent Contributor
timestamp: January 11, 2016, 12:13:02 pm
content: Hack approach: set the windows "on power button" event to hibernate in the power settings. Wire up something to short the switch pair on the front panel connectors header with a small relay (to give ground isolation) when the voltage hits the lower limit, using a comparator as specified but only when there is a load attached.Manual here:http://downloadmirror.intel.com/18505/eng/dh55tc_productguide01_english.pdfHeader F, pins 5 and 6.I'd use a UPS personally as other people have said. Just works.

author: rr100
author_rank: Frequent Contributor
timestamp: January 11, 2016, 01:03:32 pm
content: Traditionally you could (and would be the simplest way, maybe if we exclude the dead "game" port) use the parallel port to get high/low I/O information but if we're talking windows it'll be a major hassle to access the port directly and get this info.You don't have by any chance a multimeter with pc connectivity capabilities ... ? Or at least a bus pirate (it can read voltages up to something like 6V) ?

author: DimitriP
author_rank: Super Contributor
timestamp: January 11, 2016, 01:20:55 pm
content: Quote from: MrSlack on January 11, 2016, 12:13:02 pmA few years back the way the APC UPS software would initiate a shutdown was by pulling op the Carrier detect on the RS-232 port. Since nowdays most PCs a) don't have rs-232 ports and B) windows can have its power switch initiate a shutdown or hybernation this is the best bang for the buck solution.Calling it a "hack" discounts the brilliance of its simplicity.

author: Connoiseur
author_rank: Regular Contributor
timestamp: January 11, 2016, 01:34:39 pm
content: Thanks everyone for the replies I'll prototype dom0's solution and give it a go. It seems like a preety good optionQuote from: rr100 on January 11, 2016, 01:03:32 pmUnfortunately the system runs windows 7 pro.I have an Amprobe AM-270 but can't afford to keep it hooked up for this mundane job and nor do I own a bus pirate. I'm more into electrical and power electronic stuff so didn't bother to buy one, however I'm pretty good with AVR and MSP430.

author: rr100
author_rank: Frequent Contributor
timestamp: January 11, 2016, 01:42:30 pm
content: For the "power button" solution: keep in mind you need to give just a relatively short impulse, otherwise most PCs would perform a complete and unconditional power-off (as opposed to ACPI signaling Windows is time to shut down, or do whatever it wants with the event). You can probably do it with a capacitor and some resistor and a diode, maybe a transistor.I like this solution because you don't need extra software (but you COULD in theory do anything software with the event). Anything else would take quite a bit programming and especially testing.

author: Ian.M
author_rank: Super Contributor
timestamp: January 11, 2016, 01:48:49 pm
content: For the power button hack, you also need a lockout circuit that prevents it retriggering once the machine is in its Hibernated/Powerdown state or it will turn the PC back on.YourIntel DH55TCmotherboard has a serial (COM) port header right next to the PCI slot, surely it would be easier to use that to interface to your emulated 'UPS', rather than messing with USB<=>RS232 converters? The pinout of the header is in the manual linked.Seehttp://www.apcupsd.org/for a FOSS UPS daemon.Seehttp://www.scn.rain.com/~neighorn/docs/apcupsd/cables.htmlfor APC dumb UPS signals.You can do a two stage alert system. Use the 'AC fail' signal to provide warning that the battery is getting low, then the 'Low Battery' signal for critical low battery, must hibernate/shutdown now.

author: dom0
author_rank: Super Contributor
timestamp: January 11, 2016, 01:59:50 pm
content: Quote from: Ian.M on January 11, 2016, 01:48:49 pmCould monitor current drain and switch hard off when the current drain drops low. Both can be done at the same time with some smart switches, which usually have a current output whose current is roughly proportional to the output current.You could drive the power button with an opto-coupler. On the LED side a RC high pass can avoid the problem the others above mentioned (independent of input pulse width).

author: Connoiseur
author_rank: Regular Contributor
timestamp: January 11, 2016, 02:13:27 pm
content: Quote from: Ian.M on January 11, 2016, 01:48:49 pmThe emulated UPS approach seems very nice and easy to implement. Thanks for the links.