Announcement

Collapse
No announcement yet.

Switching power source by software ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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 ?

      Comment


      • #4
        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

        Comment


        • #5
          ...ah yes, i remember.

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

          Comment


          • #6
            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.
            --------------------------
            Software Developed:
            DS-ATX Controller Interface
            Laptop Shutdown Controller

            Considered Projects:
            TPMS Interface
            Bluetooth Handsfree Interface (WIDCOMM/BROADCOMM)

            Comment

            Working...
            X