Switch on and off AC Line or Battery Charging from Software RRS feed

  • Question

  • Hello,

    Laptops equipped with a rechargeable battery are connected to a AC power network.
    In some situations we want to stop the Laptops from using AC power, e.g. the AC network is broken and we are running on emergency power.

    I'm interested to get a most high level implementation as possible, wherever I think today I need to write a device driver.
    It is a long time ago when I did my last windows driver (WinCE - 2001)  so I'm most likely a beginner again.

    First of all if you have a indication the AC Line is not under control of SW pls. tell me, so I can stop to investigate on this.

    As I checked the ACPI there all the battery and the charging are listed as devices.
    It seems to be possible to select the battery which is is used to power the PC in the case there is more than one attached to the PC. I hope I can write a driver which will switch off AC Line and put a battery as the power source.

    In kernel.dll there is GetSystemPowerStatus, but there is no way to set this from application space - or?

    So is there some example code out there which can show me the implementation of a ACPI?

    Thank you


    PS: It is a non commercial development which should support the energy Revolution.

    Monday, May 16, 2016 10:14 AM


  • Windows itself does not have a way to switch off external AC power, so yes, you can stop investigating if you want "in-box" solution. By customizing  BIOS and embedded controller you can get any desired behavior. For higher end machines  there are power controllers made to the IPMI standards (but these machines normally are not portable). The key is how do you detect that the AC power is "broken".

    So if you have a lab or computer class or "smart home", you can simply buy a good UPS that will switch to the battery when AC power becomes "bad". You even can make it yourself.

    This site may be helpful:

    -- pa

    Monday, May 16, 2016 10:47 AM