Results 1 to 6 of 6

Thread: Switching power source by software ?

  1. #1
    Newbie
    Join Date
    Dec 2004
    Location
    Belgium - south
    Posts
    14

    Switching power source by software ?

    My car computer is a laptop IBM PIII Thinkpad 390x. The problem is that it's already the second battery that i have to replace after one year of use because it's progressively unable to keep its charge.

    Now, the laptop connected to the 12v power supply starts to cut off after only two minutes and soon it will refuses to boot because of the defective battery.

    I could just buy a new laptop battery but the problem will come back again after a few months because the battery will stay constantly under external charge from the 12v ps without charging/discharging as it sould do in a normal use.

    So, i have thought to use a short program running in the memory that would be able to verify the internal battery charge level and cut off the power supply current feeding when battery is full. Then, feeding the laptop from the battery current until low charge level and switch again to the power supply until full charge of the battery and repeat the cycle... Same as if you were connecting/disconnecting manually the power supply plug but automatically controlled by software...

    So, could it be possible to hook a few XP api's to check the level battery and also to force the motherboard to switch between a/c and battery feeding ? I already know that exists a few api's to know the battery charge level but i don't know if there is any windows api or lower level hardware handles that could be able to force to switch between a/c and battery feeding...

    In my installation, the power supply is powered at the same time as the audio amplifier through a manual switch. I don't use any shutdown controller... Maybe this could be the only way to not quckly kill again a new battery ?

    Thank u

  2. #2
    It ain't easy being a green moderator meddler's Avatar
    Join Date
    Aug 2002
    Location
    Steps out the front of Henson's workshop or Sydney
    Posts
    2,783
    I am going to need the same thing. I do know in the power options, you can have the low battery warning run a file which could send an output to turn your power supply on. I am not sure about keeping tabs on the battery level. I am sure it can be done tho.
    Never let the truth get in the way of a good story

  3. #3
    Newbie
    Join Date
    Dec 2004
    Location
    Belgium - south
    Posts
    14
    Quote Originally Posted by meddler View Post
    I do know in the power options, you can have the low battery warning run a file which could send an output to turn your power supply on.
    ...where are those power options you are talking about ? Do you mean the power management in XP or a Thinkpad utility ?

  4. #4
    It ain't easy being a green moderator meddler's Avatar
    Join Date
    Aug 2002
    Location
    Steps out the front of Henson's workshop or Sydney
    Posts
    2,783
    in xp power management

    control panel / power options / alarms / alarm action. You can then select "when the alarms occurs, run this program.
    Never let the truth get in the way of a good story

  5. #5
    Newbie
    Join Date
    Dec 2004
    Location
    Belgium - south
    Posts
    14
    ...ah yes, i remember.

    Anyway, i think too that it's possible to do it by talking to the hardware interrupts...

  6. #6
    Variable Bitrate
    Join Date
    Apr 2006
    Location
    Dallas, Texas
    Posts
    264
    A .NET application could be written to monitor the battery level of the laptop. Refer to this article for this ..

    http://msdn2.microsoft.com/en-us/lib...47(VS.85).aspx

    For switching to AC from the battery. I'm not totally sure as I do not see how you are getting AC power at the moment. Since you didn't ask, I assume you already have a method to programmatically turn on your AC power. Once you turn on AC power, the laptop will switch to AC power mode automatically. You can still monitor the power level and when it reaches 100%, you can turn off the AC power.

    I think the only part I see missing is enabling / disabling the AC power to your laptop. If you don't have that solution, let me know more about your setup and I'll try to find you a solution.

Similar Threads

  1. del
    By hanzacra in forum Classified Archive
    Replies: 1
    Last Post: 08-07-2005, 10:32 PM
  2. Power Source for Xenarc
    By legend5761 in forum LCD/Display
    Replies: 7
    Last Post: 11-19-2004, 02:39 PM
  3. switching between power supplies?
    By jrbless in forum Power Supplies
    Replies: 5
    Last Post: 04-21-2002, 01:54 PM
  4. Here's an alternative power source....
    By A Boy and his Miata in forum General Hardware Discussion
    Replies: 7
    Last Post: 11-21-2000, 11:44 AM
  5. About a power source
    By SuperAJ in forum General Hardware Discussion
    Replies: 5
    Last Post: 08-04-1999, 07:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •